Creates a new Scene
defines the engine to use to render this scene
defines the scene options
Gets or sets the action manager associated with the scene
ActionManagers available on the scene.
Gets the performance counter for active bones
Gets or sets the current active camera
All of the active cameras added to this scene.
Gets the performance counter for active particles
Sets a function to be executed after rendering a camera
Sets a function to be executed after rendering this scene
Defines the color used to simulate the ambient color (Default is (0, 0, 0))
Gets all animatable attached to the scene
All of the animation groups added to this scene
Gets or sets the animation properties override
Gets or sets a general scale for animation speed
Gets a list of Animations associated with the scene
Gets or sets a boolean indicating if animations are enabled
Gets or sets if audio support is enabled
Gets or sets a boolean that indicates if the scene must clear the render buffer before rendering a frame
Gets or sets a boolean that indicates if the scene must clear the depth and stencil buffers before rendering a frame
Sets a function to be executed before rendering a camera
Sets a function to be executed before rendering this scene
Gets or sets a boolean blocking all the calls to markAllMaterialsAsDirty (ie. the materials won't be updated if they are out of sync)
Gets or sets a boolean blocking all the calls to freeActiveMeshes and freeRenderingGroups It can be used in order to prevent going through methods freeRenderingGroups and freeActiveMeshes several times to improve performance when disposing several meshes in a row or a hierarchy of meshes. When used, it is the responsability of the user to blockfreeActiveMeshesAndRenderingGroups back to false.
Define this parameter if you are using multiple cameras and you want to specify which one should be used for pointer position
All of the cameras added to this scene
Defines the color used to clear the render buffer (Default is (0.2, 0.2, 0.3, 1.0))
Gets or sets the active clipplane 1
Gets or sets the active clipplane 2
Gets or sets the active clipplane 3
Gets or sets the active clipplane 4
Gets or sets a boolean indicating if collisions are enabled on this scene
Gets or sets a boolean indicating if the scene must keep the meshUnderPointer property updated Please note that it requires to run a ray cast through the scene on every frame
Gets or sets a user defined funtion to select LOD from a mesh and a camera. By default this function is undefined and Babylon.js will select LOD based on distance to camera
The list of user defined render targets added to the scene
Gets the debug layer (aka Inspector) associated with the scene
Defines the HTML default cursor to use (empty by default)
The default material used on meshes when no material is affected
Use this array to add regular expressions used to disable offline support for specific urls
Gets or sets a boolean indicating that all submeshes of active meshes must be rendered Use this boolean to avoid computing frustum clipping on submeshes (This could help when you are CPU bound)
Gets or sets a boolean indicating if next render targets must be dumped as image for debugging purposes We recommend not using it and instead rely on Spector.js: http://spector.babylonjs.com
The list of effect layers (highlights/glow) added to the scene
This is use to store the default BRDF lookup for PBR materials in your scene. It should only be one of the following (if not the default embedded one):
Texture used in all pbr material as the reflection texture. As in the majority of the scene they are the same (exception for multi room and so on), this is easier to set here than in all the materials.
Gets or sets the fog color to use
Gets or sets the fog density to use
Gets or sets a boolean indicating if fog is enabled on this scene
Gets or sets the fog end distance to use
Gets or sets the fog mode to use
Gets or sets the fog start distance to use
Gets or sets a boolean indicating if all rendering must be done in point cloud
Gets or sets a boolean indicating if all bounding boxes must be rendered
Gets or sets a boolean indicating if all rendering must be done in wireframe
Gets the list of frustum planes (built from the active camera)
Gets the gamepad manager associated with the scene
The list of geometries used in the scene.
Gets or Sets the current geometry buffer associated to the scene.
Lambda returning the list of potentially active meshes.
Lambda returning the list of potentially active sub meshes.
Lambda returning the list of potentially colliding sub meshes.
User updatable function that will return a deterministic frame time when engine is in deterministic lock step mode
Lambda returning the list of potentially intersecting sub meshes.
Defines the gravity applied to this scene (used only for collisions)
Gets or sets if audio will be output to headphones
Defines the HTML cursor to use when hovering over interactive elements
Default image processing configuration used either in the rendering Forward main pass or through the imageProcessingPostProcess if present. As in the majority of the scene they are the same (exception for multi camera), this is easier to reference from here than from all the materials and post process.
No setter as we it is a shared configuration, you can set the values instead.
Gets the list of meshes imported to the scene through SceneLoader
Gets if the scene is already disposed
Returns a boolean indicating if the scene is still loading data
The list of layers (background and foreground) of the scene
The list of lens flare system added to the scene
Gets or sets a boolean indicating if lens flares are enabled on this scene
All of the lights added to this scene
Gets or sets a boolean indicating if lights are enabled on this scene
Gets the name of the plugin used to load this scene (null by default)
The main sound track played by the scene. It cotains your primary collection of sounds.
All of the materials added to this scene In the context of a Scene, it is not supposed to be modified manually. Any addition or removal should be done using the addMaterial and removeMAterial Scene methods. Note also that the order of the Material wihin the array is not significant and might change.
Gets the mesh that is currently under the pointer
All of the (abstract) meshes added to this scene
Gets or sets user defined metadata
The list of morph target managers added to the scene
All of the multi-materials added to this scene
Gets or sets the current offline provider to use to store scene data
An event triggered when the activeCamera property is updated
An event triggered when active meshes evaluation is done
An event triggered after animations processing
An event triggered after rendering a camera
An event triggered after draw calls have been sent
An event triggered when particles rendering is done Note: This event can be trigger more than once per frame (because particles can be rendered by render target textures as well)
An event triggered when physic simulation has been done
An event triggered after rendering the scene for an active camera (When scene.render is called this will be called after each camera)
An event triggered after rendering the scene
An event triggered when render targets were rendered. Can happen multiple times per frame.
This Observable will be triggered after rendering each renderingGroup of each rendered camera. The RenderinGroupInfo class contains all the information about the context in which the observable is called If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3)
An event triggered when sprites rendering is done Note: This event can be trigger more than once per frame (because sprites can be rendered by render target textures as well)
An event triggered after calculating deterministic simulation step
An event triggered when active meshes evaluation is about to start
An event triggered before animating the scene
An event triggered before rendering a camera
An event triggered before draw calls are ready to be sent
An event triggered when particles rendering is about to start Note: This event can be trigger more than once per frame (because particles can be rendered by render target textures as well)
An event triggered when physic simulation is about to be run
An event triggered before rendering the scene (right after animations and physics)
An event triggered when render targets are about to be rendered Can happen multiple times per frame.
This Observable will be triggered before rendering each renderingGroup of each rendered camera. The RenderinGroupInfo class contains all the information about the context in which the observable is called If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3)
An event triggered when sprites rendering is about to start Note: This event can be trigger more than once per frame (because sprites can be rendered by render target textures as well)
An event triggered before calculating deterministic simulation step
An event triggered when a camera is removed
An event triggered when SceneLoader.Append or SceneLoader.Load or SceneLoader.ImportMesh were successfully executed
Sets a function to be executed when this scene is disposed.
An event triggered when the scene is disposed.
An event triggered when a geometry is removed
Observable event triggered each time an keyboard event is received from the hosting window
An event triggered when a light is removed
An event triggered when a material is removed
This Observable will when a mesh has been imported into the scene.
An event triggered when a mesh is removed
An event triggered when a camera is created
An event triggered when a geometry is created
An event triggered when a light is created
An event triggered when a material is created
An event triggered when a mesh is created
An event triggered when a skeleton is created
An event triggered when a texture is created
An event triggered when a transform node is created
Callback called when a pointer down is detected
Callback called when a pointer move is detected
Observable event triggered each time an input event is received from the rendering canvas
Callback called when a pointer pick is detected
Callback called when a pointer up is detected
This observable event is triggered when any keyboard event si raised and registered during Scene.attachControl() You have the possibility to skip the process and the call to onKeyboardObservable by setting KeyboardInfoPre.skipOnPointerObservable to true
This observable event is triggered when any ponter event is triggered. It is registered during Scene.attachControl() and it is called BEFORE the 3D engine process anything (mesh/sprite picking for instance). You have the possibility to skip the process and the call to onPointerObservable by setting PointerInfoPre.skipOnPointerObservable to true
An event triggered when the scene is ready
An event triggered when a skeleton is removed
An event triggered when a texture is removed
An event triggered when a transform node is removed
All of the particle systems added to this scene
Gets or sets a boolean indicating if particles are enabled on this scene
Gets or sets a predicate used to select candidate meshes for a pointer down event
Gets or sets a predicate used to select candidate meshes for a pointer move event
Gets or sets a predicate used to select candidate meshes for a pointer up event
Gets or sets the current on-screen X position of the pointer
Gets or sets the current on-screen Y position of the pointer
Gets the current postprocess manager
Gets the postprocess render pipeline manager
The list of postprocesses added to the scene
Gets or sets a boolean indicating if postprocesses are enabled on this scene
This is used to call preventDefault() on pointer down in order to block unwanted artifacts like system double clicks
This is used to call preventDefault() on pointer up in order to block unwanted artifacts like system double clicks
Gets or sets a boolean indicating if probes are enabled on this scene
The list of procedural textures added to the scene
Gets or sets a boolean indicating if procedural textures are enabled on this scene
The list of reflection probes added to the scene
Gets or sets a boolean indicating if render targets are enabled on this scene
Gets or sets a boolean indicating if lights must be sorted by priority (off by default) This is useful if there are more lights that the maximum simulteanous authorized
For internal use only. Please do not use.
Gets the list of root nodes (ie. nodes with no parent)
Gets the octree used to boost mesh selection (picking)
Gets or sets a boolean indicating if shadows are enabled on this scene
Gets or sets the simplification queue attached to the scene
The list of skeletons added to the scene
Gets or sets a boolean indicating if skeletons are enabled on this scene
The list of sound tracks added to the scene
The list of sounds used in the scene.
All of the sprite managers added to this scene
Gets or sets a boolean indicating if sprites are enabled on this scene
Textures to keep.
Gets or sets a boolean indicating if textures are enabled on this scene
Gets the performance counter for active indices
Gets the performance counter for total vertices
All of the tranform nodes added to this scene In the context of a Scene, it is not supposed to be modified manually. Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods. Note also that the order of the TransformNode wihin the array is not significant and might change.
Return a unique id as a string which can serve as an identifier for the scene
Gets the pointer coordinates without any translation (ie. straight out of the pointer event)
Gets or sets a boolean indicating if a constant deltatime has to be used This is mostly useful for testing purposes when you do not want the animations to scale with the framerate
Defines if texture loading must be delayed If true, textures will only be loaded when they need to be rendered
Gets or sets a boolean indicating if the scene must use right-handed coordinates system
Time in milliseconds to wait to raise long press events if button is still pressed. Default is 300 ms
Gets or sets the distance in pixel that you have to move to prevent some events. Default is 10 pixels
If you need to check double click without raising a single click at first click, enable this flag
The fog density is following an exponential function
The fog density is following an exponential function faster than FOGMODE_EXP
The fog density is following a linear function.
The fog is deactivated
Time in milliseconds to wait to raise long press events if button is still pressed. Default is 500 ms
Gets or sets the maximum deltatime when deterministic lock step is enabled
Gets or sets the minimum deltatime when deterministic lock step is enabled
Adds the given action manager to this scene
The action manager to add
Adds the given animation to this scene
The animation to add
Adds the given animation group to this scene.
The animation group to add
Adds the given camera to this scene
The camera to add
Adds the given effect layer to this scene
defines the effect layer to add
Add an externaly attached data from its key. This method call will fail and return false, if such key already exists. If you don't care and just want to get the data no matter what, use the more convenient getOrAddExternalDataWithFactory() method.
the unique key that identifies the data
the data object to associate to the key for this Engine instance
true if no such key were already present and the data was added successfully, false otherwise
Adds the given geometry to this scene
The geometry to add
Adds the given lens flare system to this scene
The lens flare system to add
Adds the given light to this scene
The light to add
Adds the given material to this scene
The material to add
Add a mesh to the list of scene's meshes
defines the mesh to add
if all child meshes should also be added to the scene
Adds the given morph target to this scene
The morph target to add
Adds the given multi-material to this scene
The multi-material to add
Adds the given particle system to this scene
The particle system to add
Adds the given reflection probe to this scene.
The reflection probe to add
Adds the given skeleton to this scene
The skeleton to add
Adds the given texture to this scene.
The texture to add
Add a transform node to the list of scene's transform nodes
defines the transform node to add
Execute all animations (for a frame)
Attach events to the canvas (To handle actionManagers triggers and raise onPointerMove, onPointerDown and onPointerUp
defines if you want to attach events to pointerup
defines if you want to attach events to pointerdown
defines if you want to attach events to pointermove
Will start the animation sequence of a given target
defines the target
defines from which frame should animation start
defines until which frame should animation run.
defines if the animation loops
defines the speed in which to run the animation (1.0 by default)
defines the function to be executed when the animation ends
defines an animatable object. If not provided a new one will be created from the given params
defines if the current animations must be stopped first (true by default)
defines if the target should be animate if animations are present (this is called recursively on descendant animatables regardless of return value)
defines the callback to call when an animation loops
the animatable object created for this animation
Begin a new animation on a given node
defines the target where the animation will take place
defines the list of animations to start
defines the initial value
defines the final value
defines if you want animation to loop (off by default)
defines the speed ratio to apply to all animations
defines the callback to call when an animation ends (will be called once per node)
defines the callback to call when an animation loops
the list of created animatables
Begin a new animation on a given node and its hierarchy
defines the root node where the animation will take place
if true only direct descendants will be used, if false direct and also indirect (children of children, an so on in a recursive manner) descendants will be used.
defines the list of animations to start
defines the initial value
defines the final value
defines if you want animation to loop (off by default)
defines the speed ratio to apply to all animations
defines the callback to call when an animation ends (will be called once per node)
defines the callback to call when an animation loops
the list of animatables created for all nodes
Will start the animation sequence of a given target and its hierarchy
defines the target
if true only direct descendants will be used, if false direct and also indirect (children of children, an so on in a recursive manner) descendants will be used.
defines from which frame should animation start
defines until which frame should animation run.
defines if the animation loops
defines the speed in which to run the animation (1.0 by default)
defines the function to be executed when the animation ends
defines an animatable object. If not provided a new one will be created from the given params
defines if the current animations must be stopped first (true by default)
defines if the target should be animated if animations are present (this is called recursively on descendant animatables regardless of return value)
defines the callback to call when an animation loops
the list of created animatables
Will start the animation sequence of a given target
defines the target
defines from which frame should animation start
defines until which frame should animation run.
defines the weight to apply to the animation (1.0 by default)
defines if the animation loops
defines the speed in which to run the animation (1.0 by default)
defines the function to be executed when the animation ends
defines an animatable object. If not provided a new one will be created from the given params
defines if the target should be animated if animations are present (this is called recursively on descendant animatables regardless of return value)
defines the callback to call when an animation loops
the animatable object created for this animation
This function will remove the local cached buffer data from texture. It will save memory but will prevent the texture from being rebuilt
Call this function to reduce memory footprint of the scene. Vertex buffers will not store CPU data anymore (this will prevent picking, collisions or physics to work correctly)
Creates a default camera for the scene.
has the default false which creates a free camera, when true creates an arc rotate camera
has default false, when true replaces the active camera in the scene
has default false, when true attaches camera controls to the canvas.
Creates a default camera and a default light.
has the default false which creates a free camera, when true creates an arc rotate camera
has the default false, when true replaces the active camera/light in the scene
has the default false, when true attaches camera controls to the canvas.
Creates a new environment
defines the options you can use to configure the environment
the new EnvironmentHelper
Creates a default light for the scene.
has the default false, when true replaces the existing lights in the scene with a hemispheric light
Creates a new sky box
defines the texture to use as environment texture
has default false which requires the StandardMaterial to be used, when true PBRMaterial must be used
defines the overall scale of the skybox
is only available when pbr is true, default is 0, no blur, maximum value is 1
has default true indicating that scene.environmentTexture must match the current skybox texture
a new mesh holding the sky box
Creates a new VREXperienceHelper
defines the options used to create the new VREXperienceHelper
a new VREXperienceHelper
Creates a new XREXperienceHelper
a promise for a new XREXperienceHelper
Creates or updates the octree used to boost selection (picking)
defines the maximum capacity per leaf
defines the maximum depth of the octree
an octree of AbstractMesh
Creates a ray that can be used to pick in the scene
defines the x coordinate of the origin (on-screen)
defines the y coordinate of the origin (on-screen)
defines the world matrix to use if you want to pick in object space (instead of world space)
defines the camera to use for the picking
defines if picking will be done in view space (false by default)
a Ray
Creates a ray that can be used to pick in the scene
defines the x coordinate of the origin (on-screen)
defines the y coordinate of the origin (on-screen)
defines the ray where to store the picking ray
defines the camera to use for the picking
the current scene
Creates a ray that can be used to pick in the scene
defines the x coordinate of the origin (on-screen)
defines the y coordinate of the origin (on-screen)
defines the world matrix to use if you want to pick in object space (instead of world space)
defines the ray where to store the picking ray
defines the camera to use for the picking
defines if picking will be done in view space (false by default)
the current scene
Deletes a physics compound impostor
defines the compound to delete
Detaches all event handlers
Disables the GeometryBufferRender associated with the scene
Disables and disposes the physics engine associated with the scene
Releases all held ressources
Creates a depth renderer a given camera which contains a depth map which can be used for post processing.
The camera to create the depth renderer on (default: scene's active camera)
the created depth renderer
Enables a GeometryBufferRender and associates it with the scene
defines the scaling ratio to apply to the renderer (1 by default which means same resolution)
the GeometryBufferRenderer
The provided function will run before render once and will be disposed afterwards. A timeout delay can be provided so that the function will be executed in N ms. The timeout is using the browser's native setTimeout so time percision cannot be guaranteed.
The function to be executed.
optional delay in ms
Registers a function to be executed when the scene is ready
the function to be executed
Clear the active meshes smart array preventing retention point in mesh dispose.
Clear the processed materials smart array preventing retention point in material dispose.
Clear the info related to rendering groups preventing retention points during dispose.
Use this function to stop evaluating active meshes. The current list will be keep alive between frames
the current scene
Freeze all materials A frozen material will not be updatable but should be faster to render
Gets the total number of active bones rendered per frame
the total number of active bones rendered per frame
Gets the total number of active indices rendered per frame (You can deduce the number of rendered triangles by dividing this number by 3)
the total number of active indices rendered per frame
Gets the array of active meshes
an array of AbstractMesh
Gets the total number of active particles rendered per frame
the total number of active particles rendered per frame
Gets all animatables associated with a given target
defines the target to look animatables for
an array of Animatables
Gets the animatable associated with a specific target
defines the target of the animatable
the required animatable if found
get an animation group using its name
defines the material's name
the animation group or null if none found.
Gets the animation ratio (which is 1.0 is the scene renders at 60fps and 2 if the scene renders at 30fps, etc.)
a number
Gets the current auto clear configuration for one rendering group of the rendering manager.
the rendering group index to get the information for
The auto clear setup for the requested rendering group
Gets the bounding box renderer associated with the scene
a BoundingBoxRenderer
Gets the cached visibility state (ie. the latest rendered one)
the cached visibility state
Gets a string idenfifying the name of the class
"Scene" string
Gets the engine associated with the scene
an Engine
Get an externaly attached data from its key
the unique key that identifies the data
the associated data, if present (can be null), or undefined if not present
Gets an unique Id for the current frame
a number
Gets the list of geometries attached to the scene
an array of Geometry
Return a the first highlight layer of the scene with a given name.
The name of the highlight layer to look for.
The highlight layer if found otherwise null.
Gets the internal step used by deterministic lock step
the internal step
Gets a the last added mesh using a given id
defines the id to search for
the found mesh or null if not found at all.
Gets a lens flare system using its id
defines the id to look for
the lens flare system or null if not found
Gets a lens flare system using its name
defines the name to look for
the lens flare system or null if not found
Gets the first added mesh found of a given ID
defines the id to search for
the mesh found or null if not found at all
Gets a mesh using a given name
defines the name to search for
the found mesh or null if not found at all.
Gets a mesh with its auto-generated unique id
defines the unique id to search for
the found mesh or null if not found at all.
Gets a list of meshes using their id
defines the id to search for
a list of meshes
Get a list of meshes by tags
defines the tags query to use
defines a predicate used to filter results
an array of Mesh
Gets a morph target using a given id (if many are found, this function will pick the first one)
defines the id to search for
the found morph target or null if not found at all.
Gets a morph target manager using a given id (if many are found, this function will pick the last one)
defines the id to search for
the found morph target manager or null if not found at all.
Get an externaly attached data from its key, create it using a factory if it's not already present
the unique key that identifies the data
the factory that will be called to create the instance if and only if it doesn't exists
the associated data, can be null if the factory returned null.
Gets the outline renderer associated with the scene
a OutlineRenderer
Gets a particle system by id
defines the particle system id
the corresponding system or null if none found
Gets the current physics engine
a IPhysicsEngine or null if none attached
Gets the mesh under the pointer
a Mesh or null if no mesh is under the pointer
Gets the current projection matrix
a Matrix
Gets an unique Id for the current render phase
a number
Gets the uniform buffer used to store scene data
a UniformBuffer
Gets the step Id used by deterministic lock step
the step Id
Gets the total number of vertices rendered per frame
the total number of vertices rendered per frame
Gets the current transform matrix
a Matrix made of View * Projection
Gets the first added transform node found of a given ID
defines the id to search for
the found transform node or null if not found at all.
Gets a transform node using a given name
defines the name to search for
the found transform node or null if not found at all.
Gets a transform node with its auto-generated unique id
efines the unique id to search for
the found transform node or null if not found at all.
Gets a list of transform nodes using their id
defines the id to search for
a list of transform nodes
Gets an unique (relatively to the current scene) Id
an unique number for the scene
Gets the current view matrix
a Matrix
Returns the number of items waiting to be loaded
the number of items waiting to be loaded
Get the world extend vectors with an optional filter
the predicate - which meshes should be included when calculating the world size
min and max vectors
Call this function if you want to manually increment the render Id
Gets a boolean indicating if the given mesh is active
defines the mesh to look for
true if the mesh is in the active list
Gets a boolean indicating if the current material / effect / visibility must be bind again
defines the current material
defines the current effect
defines the current visibility state
true if one parameter is not cached
Gets a boolean indicating if there is an active physics engine
a boolean indicating if there is an active physics engine
Gets a boolean indicating if the current pointer event is captured (meaning that the scene has already handled the pointer down)
defines the pointer id to use in a multi-touch scenario (0 by default)
true if the pointer was captured
This function will check if the scene can be rendered (textures are loaded, shaders are compiled) Delay loaded resources are not taking in account
true if all required resources are ready
Will flag all materials as dirty to trigger new shader compilation
defines the flag used to specify which material part must be marked as dirty
If not null, it will be used to specifiy if a material has to be marked as dirty
Launch a ray to try to pick a mesh in the scene
X position on screen
Y position on screen
Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
defines an optional predicate used to select faces when a mesh intersection is detected
an array of PickingInfo
Launch a ray to try to pick a mesh in the scene
Ray to use
Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
defines an optional predicate used to select faces when a mesh intersection is detected
an array of PickingInfo
Launch a ray to try to pick a mesh in the scene
position on screen
position on screen
Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
Launch a fast check only using the bounding boxes. Can be set to null.
to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
defines an optional predicate used to select faces when a mesh intersection is detected
a PickingInfo
Launch a ray to try to pick a sprite in the scene
position on screen
position on screen
Predicate function used to determine eligible sprites. Can be set to null. In this case, a sprite must have isPickable set to true
Launch a fast check only using the bounding boxes. Can be set to null.
camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
a PickingInfo
Use the given ray to pick a sprite in the scene
The ray (in world space) to use to pick meshes
Predicate function used to determine eligible sprites. Can be set to null. In this case, a sprite must have isPickable set to true
Launch a fast check only using the bounding boxes. Can be set to null.
camera to use. Can be set to null. In this case, the scene.activeCamera will be used
a PickingInfo
Use the given ray to pick a mesh in the scene
The ray to use to pick meshes
Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true
Launch a fast check only using the bounding boxes. Can be set to null
defines an optional predicate used to select faces when a mesh intersection is detected
a PickingInfo
Add a new geometry to this scene
defines the geometry to be added to the scene.
defines if the geometry must be pushed even if a geometry with this id already exists
a boolean defining if the geometry was added or not
Registers a function to be called after every frame render
defines the function to register
Registers a function to be called before every frame render
defines the function to register
Removes the given action manager from this scene.
The action manager to remove
The index of the removed action manager
Remove a animation for the list of scene's animations
defines the animation to remove
the index where the animation was in the animation list
Removes the given animation group from this scene.
The animation group to remove
The index of the removed animation group
Remove a camera for the list of scene's cameras
defines the camera to remove
the index where the camera was in the camera list
Removes the given effect layer from this scene.
defines the effect layer to remove
the index of the removed effect layer
Remove an externaly attached data from the Engine instance
the unique key that identifies the data
true if the data was successfully removed, false if it doesn't exist
Removes an existing geometry
defines the geometry to be removed from the scene
a boolean defining if the geometry was removed or not
Removes the given lens flare system from this scene.
The lens flare system to remove
The index of the removed lens flare system
Remove a light for the list of scene's lights
defines the light to remove
the index where the light was in the light list
Removes the given material from this scene.
The material to remove
The index of the removed material
Remove a mesh for the list of scene's meshes
defines the mesh to remove
if all child meshes should also be removed from the scene
the index where the mesh was in the mesh list
Remove a morph target for the list of scene's morph targets
defines the morph target to remove
the index where the morph target was in the morph target list
Removes the given multi-material from this scene.
The multi-material to remove
The index of the removed multi-material
Remove a particle system for the list of scene's particle systems
defines the particle system to remove
the index where the particle system was in the particle system list
Removes the given reflection probe from this scene.
The reflection probe to remove
The index of the removed reflection probe
Remove a skeleton for the list of scene's skeletons
defines the skeleton to remove
the index where the skeleton was in the skeleton list
Removes the given texture from this scene.
The texture to remove
The index of the removed texture
Remove a transform node for the list of scene's transform nodes
defines the transform node to remove
the index where the transform node was in the transform node list
Render the scene
defines a boolean indicating if cameras must update according to their inputs (true by default)
defines a boolean indicating if animations should not be executed (false by default)
Resets all cached information relative to material (including effect and visibility)
Resets the last animation time frame. Useful to override when animations start running when loading a scene for the first time.
Sets the default candidate providers for the scene. This sets the getActiveMeshCandidates, getActiveSubMeshCandidates, getIntersectingSubMeshCandidates and getCollidingSubMeshCandidates to their default function
Force the value of meshUnderPointer
defines the mesh to use
Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
The rendering group id corresponding to its index
Automatically clears depth and stencil between groups if true.
Automatically clears depth between groups if true and autoClear is true.
Automatically clears stencil between groups if true and autoClear is true.
Overrides the default sort function applied in the renderging group to prepare the meshes. This allowed control for front to back rendering or reversly depending of the special needs.
The rendering group id corresponding to its index
The opaque queue comparison function use to sort.
The alpha test queue comparison function use to sort.
The transparent queue comparison function use to sort.
Sets the step Id used by deterministic lock step
defines the step Id
Sets the current transform matrix
defines the View matrix to use
defines the Projection matrix to use
defines the right View matrix to use (if provided)
defines the right Projection matrix to use (if provided)
Use this method to simulate a pointer down on a mesh The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay
pickingInfo of the object wished to simulate pointer event on
pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)
the current scene
Use this method to simulate a pointer move on a mesh The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay
pickingInfo of the object wished to simulate pointer event on
pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)
the current scene
Use this method to simulate a pointer up on a mesh The pickResult parameter can be obtained from a scene.pick or scene.pickWithRay
pickingInfo of the object wished to simulate pointer event on
pointer event state to be used when simulating the pointer event (eg. pointer id for multitouch)
indicates that the pointer up event should be considered as part of a double click (false by default)
the current scene
Sorts the list list based on light priorities
Stops and removes all animations that have been applied to the scene
Will stop the animation of the given target
the target
the name of the animation to stop (all animations will be stopped if both this and targetMask are empty)
a function that determines if the animation should be stopped based on its target (all animations will be stopped if both this and animationName are empty)
Switch active camera
defines the new active camera
defines if attachControl must be called for the new active camera (default: true)
Use this function to restart evaluating active meshes on every frame
the current scene
Unfreeze all materials A frozen material will not be updatable but should be faster to render
Unregisters a function called after every frame render
defines the function to unregister
Unregisters a function called before every frame render
defines the function to unregister
Update the transform matrix to update from the current active camera
defines a boolean used to force the update even if cache is up to date
Returns a promise that resolves when the scene is ready
A promise that resolves when the scene is ready
Adds n individual parser in the list of available ones
Defines the name of the parser
Defines the parser to add
Adds a parser in the list of available ones
Defines the name of the parser
Defines the parser to add
Factory used to create the a collision coordinator.
The collision coordinator
Gets an individual parser from the list of avaialble ones
Defines the name of the parser
the requested parser or null
Gets a general parser from the list of avaialble ones
Defines the name of the parser
the requested parser or null
Parser json data and populate both a scene and its associated container object
Defines the data to parse
Defines the scene to parse the data for
Defines the container attached to the parsing sequence
Defines the root url of the data
Generated using TypeDoc
Represents a scene to be rendered by the engine.
http://doc.babylonjs.com/features/scene