https://videolancer.net/transparency-3d-layer-depending-on-the-angle-of-the-camera/
适用于不透明度参数。尽如果用于其他参数,请改变endVal和startVal行中的值。
例如,要改变图层的大小,需要写上[X, Y]的数值。
endVal = [100,100];
startVal = [150,150]。
endVal = 100; // Value if the layer is facing the camera
startVal = 0; // Value if the layer is at an angle
fadeAngle = 90; // The angle at which the maximum influence on the value
v = toCompVec([0,0,1]);
d = length(toWorld(anchorPoint),thisComp.activeCamera.toWorld([0,0,0]));
c = v[2]/d;
ease(c,Math.cos(degreesToRadians(fadeAngle)),1.0,startVal,endVal)