You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Angles are not defined consistently as far as I can see
Value for fieldOfView of a perspective camera denotes the full angle
Value for angle in the case of SpotLight denotes the half angle
We noted that 3js isn't very clear in what it supports for spotlight:
"angle - Maximum angle of light dispersion from its direction whose upper bound is Math.PI/2."
Math.PI / 2 = 90 degrees so we assume its half the angle but it would be good to test this.
The discussion in the meeting was that it would be useful to have consistency but if we are following the 3JS approach then that is also fine with implementers but would be good to confirm this is the reason for the inconsistency.
The text was updated successfully, but these errors were encountered:
For spotlights in three.js, the angle is indeed the half-angle of the spotlight cone. Here is an example demonstrating a spotlight angle of 90 degrees: https://codepen.io/JellyfishJail/pen/vYPwNvx (copied and only slightly modified from https://codepen.io/boytchev/full/ZEMJEeR). The angle is specified in line 40 and can be changed to interactively see the effect.
With regard to differences between the fieldOfView angle value and the spotlight dispersion angle, it's worth noting that the spotlight angle defines a cone while the field of view doesn't. The FOV is defining a square frustum, and for both the draft spec and three.js specifically the FOV defines the top-to-bottom angle of the frustum planes. Out of curiosity, does anything use half-angles for FOV?
Remark by Rita in the European timed 3d TSG call:
Angles are not defined consistently as far as I can see
We noted that 3js isn't very clear in what it supports for spotlight:
"angle - Maximum angle of light dispersion from its direction whose upper bound is Math.PI/2."
Math.PI / 2 = 90 degrees so we assume its half the angle but it would be good to test this.
The discussion in the meeting was that it would be useful to have consistency but if we are following the 3JS approach then that is also fine with implementers but would be good to confirm this is the reason for the inconsistency.
The text was updated successfully, but these errors were encountered: