Constructor
Variables
passes:Array<FoxRenderPass> = [new FoxRenderPass([0], "default")]
Any custom pass you want for this camera, add them here.
By default, there's one pass that will render everything in group 0 on the "default" render target.
Warning! If you create two cameras, make sure to change the output or else it'll overwrite the previous camera render!
__prevViewMatrix:Matrix3D = new Matrix3D()
This is the view matrix from a previous frame, used for motion vector calculations
lightData:FoxLightData = new FoxLightData()
The light data associated with this camera.
This handles all dynamic lighting that's visible by this camera, including ambient light.
Normally, this is handled by the camera itself and the lights on the scene, so you don't need to touch this unless you know what you're doing!
Methods
getScreenPoint(point:Vector3D):Vector3D
Projects a world-space 3D point to Normalized Device Coordinate (NDC, aka Screen-Space Position).
Note: the center is at (0,0) instead of (0.5, 0.5). If you need flixel coordinates, use toFlixelScreenPoint()
Note 2: The values are unclamped! Make sure to clamp them if needed.
getWorldSpace(point:Vector3D):Vector3D
Re-projects a screen-space point to world space, useful for point and click in 3D with raycast.