h3d.scene.Scene is the root class for a 3D scene. All root objects are added to it before being drawn on screen.
Constructor
new(createRenderer:Bool = true, createLightSystem:Bool = true)
Create a new scene. A default 3D scene is already available in hxd.App.s3d
Variables
Methods
addEventListener(f:Event ‑> Void):Void
Add an event listener that will capture all events not caught by an h2d.Interactive
computeStatic():Void
Perform a rendering with RendererContext.computingStatic=true
, allowing the computation of static shadow maps, etc.
removeEventListener(f:Event ‑> Void):Bool
Remove a previously added event listener, return false it was not part of our event listeners.
setElapsedTime(elapsedTime:Float):Void
Before render() or sync() are called, allow to set how much time has elapsed (in seconds) since the last frame in order to update scene animations. This is managed automatically by hxd.App
setOutputTarget(?engine:Engine, ?tex:Texture):Void
Temporarily overrides the output render target. This is useful for picture-in-picture rendering,
where the output render target has a different size from the window.
tex
must have a matching depthBuffer attached.
Call setOutputTarget()
after render()
has been called.
syncOnly(et:Float):Void
Synchronize the scene without rendering, updating all objects and animations by the given amount of time, in seconds.