Class Scene
Hierarchy
- AbstractScene
- Scene
Implements
Index
Constructors
Properties
- _after
Render Target Post Process Stage - action
Manager - action
Managers - ambient
Color - animation
Groups - animation
Time Scale - animations
- animations
Enabled - audio
Enabled - audio
Listener Position Provider - audio
Listener Rotation Provider - audio
Positioning Refresh Rate - auto
Clear - auto
Clear Depth And Stencil - camera
To Use For Pointers - cameras
- clear
Color - clip
Plane - clip
Plane2 - clip
Plane3 - clip
Plane4 - clip
Plane5 - clip
Plane6 - collisions
Enabled - constantly
Update Mesh Under Pointer - customLODSelector
- custom
Render Targets - debug
Layer - default
Cursor - delta
Time - depth
Peeling Renderer - disable
Offline Support Exception Rules - dispatch
All Sub Meshes Of Active Meshes - do
Not Handle Cursors - dump
Next Render Targets - effect
Layers - environmentBRDFTexture
- environment
Intensity - fluid
Renderer - fog
Color - fog
Density - fog
End - fog
Start - force
Show Bounding Boxes - gamepad
Manager - geometries
- geometry
Buffer Renderer - get
Active Mesh Candidates - get
Active Sub Mesh Candidates - get
Colliding Sub Mesh Candidates - get
Deterministic Frame Time - get
Intersecting Sub Mesh Candidates - gravity
- headphone
- hover
Cursor - imported
Meshes Files - layers
- lens
Flare Systems - lens
Flares Enabled - lights
- loading
Plugin Name - main
Sound Track - materials
- meshes
- metadata
- morph
Target Managers - multi
Materials - needs
Previous World Matrices - offline
Provider - on
Active Camera Changed - on
Active Cameras Changed - on
After Active Meshes Evaluation Observable - on
After Animations Observable - on
After Camera Render Observable - on
After Draw Phase Observable - on
After Particles Rendering Observable - on
After Physics Observable - on
After Render Camera Observable - on
After Render Observable - on
After Render Targets Render Observable - on
After Rendering Group Observable - on
After Sprites Rendering Observable - on
After Step Observable - on
Animation File Imported Observable - on
Before Active Meshes Evaluation Observable - on
Before Animations Observable - on
Before Camera Render Observable - on
Before Draw Phase Observable - on
Before Particles Rendering Observable - on
Before Physics Observable - on
Before Render Observable - on
Before Render Targets Render Observable - on
Before Rendering Group Observable - on
Before Sprites Rendering Observable - on
Before Step Observable - on
Camera Removed Observable - on
Data Loaded Observable - on
Dispose Observable - on
Geometry Removed Observable - on
Keyboard Observable - on
Light Removed Observable - on
Material Removed Observable - on
Mesh Imported Observable - on
Mesh Removed Observable - on
Multi Material Removed Observable - on
New Camera Added Observable - on
New Geometry Added Observable - on
New Light Added Observable - on
New Material Added Observable - on
New Mesh Added Observable - on
New Multi Material Added Observable - on
New Skeleton Added Observable - on
New Texture Added Observable - on
New Transform Node Added Observable - on
Pointer Down - on
Pointer Move - on
Pointer Observable - on
Pointer Pick - on
Pointer Up - on
Pre Keyboard Observable - on
Pre Pointer Observable - on
Ready Observable - on
Scene Performance Priority Changed Observable - on
Skeleton Removed Observable - on
Texture Removed Observable - on
Transform Node Removed Observable - particle
Systems - particles
Enabled - physics
Enabled - pointer
Move Triangle Predicate - post
Process Manager - post
Process Render Pipeline Manager - post
Processes - post
Processes Enabled - pre
Pass Renderer - prevent
Default On Pointer Down - prevent
Default On Pointer Up - probes
Enabled - procedural
Textures - procedural
Textures Enabled - reflection
Probes - render
Targets Enabled - require
Light Sorting - reserved
Data Store - root
Nodes - selection
Octree - simplification
Queue - skeletons
- sound
Tracks - sounds
- sprite
Managers - sprites
Enabled - sub
Surface Configuration - textures
- transform
Nodes - use
Constant Animation Delta Time - use
Delayed Texture Loading - use
Order Independent Transparency - FOGMODE_
EXP - FOGMODE_
EXP2 - FOGMODE_
LINEAR - FOGMODE_
NONE - Max
Delta Time - Min
Delta Time
Accessors
- active
Bones Perf Counter - active
Camera - active
Cameras - active
Particles Perf Counter - after
Camera Render - after
Render - animatables
- animation
Properties Override - before
Camera Render - before
Render - block
Material Dirty Mechanism - blockfree
Active Meshes And Rendering Groups - default
Material - environment
Texture - fog
Enabled - fog
Mode - force
Points Cloud - force
Wireframe - frustum
Planes - image
Processing Configuration - is
Disposed - is
Loading - lights
Enabled - mesh
Under Pointer - on
Dispose - performance
Priority - pointer
Down Fast Check - pointer
Down Predicate - pointer
Move Fast Check - pointer
Move Predicate - pointer
Up Fast Check - pointer
Up Predicate - pointerX
- pointerY
- pre
Pass - rendering
Manager - shadows
Enabled - skeletons
Enabled - skip
Frustum Clipping - skip
Pointer Down Picking - skip
Pointer Move Picking - skip
Pointer Up Picking - textures
Enabled - total
Active Indices Perf Counter - total
Vertices Perf Counter - uid
- un
Translated Pointer - use
Right Handed System - Double
Click Delay - Drag
Movement Threshold - Exclusive
Double Click Mode - Long
Press Delay
Methods
- add
Action Manager - add
Animation - add
Animation Group - add
Camera - add
Effect Layer - add
External Data - add
Geometry - add
Lens Flare System - add
Light - add
Material - add
Mesh - add
Morph Target Manager - add
Multi Material - add
Particle System - add
Pending Data - add
Reflection Probe - add
Skeleton - add
Texture - add
Transform Node - animate
- attach
Control - begin
Animation - begin
Direct Animation - begin
Direct Hierarchy Animation - begin
Hierarchy Animation - begin
Weighted Animation - bind
Eye Position - clean
Cached Texture Buffer - clear
Cached Vertex Data - create
Default Camera - create
Default Camera Or Light - create
Default Environment - create
Default Light - create
Default Skybox - create
DefaultVRExperience - create
DefaultXRExperience Async - create
Or Update Selection Octree - create
Picking Ray - create
Picking Ray In Camera Space - create
Picking Ray In Camera Space To Ref - create
Picking Ray To Ref - create
Scene Uniform Buffer - delete
Compound Impostor - detach
Control - disable
Depth Renderer - disable
Fluid Renderer - disable
Geometry Buffer Renderer - disable
Physics Engine - disable
Pre Pass Renderer - disable
Sub Surface For Pre Pass - dispose
- enable
Depth Renderer - enable
Fluid Renderer - enable
Geometry Buffer Renderer - enable
Physics - enable
Pre Pass Renderer - enable
Sub Surface For Pre Pass - execute
Once Before Render - execute
When Ready - finalize
Scene Ubo - free
Active Meshes - free
Processed Materials - free
Rendering Groups - freeze
Active Meshes - freeze
Materials - get
Active Bones - get
Active Indices - get
Active Meshes - get
Active Particles - get
All Animatables By Target - get
Animatable By Target - get
Animation Group By Name - get
Animation Ratio - get
Auto Clear Depth Stencil Setup - get
Bone ByID - get
Bone By Id - get
Bone By Name - get
Bounding Box Renderer - get
Cached Effect - get
Cached Material - get
Cached Visibility - get
Camera ByID - get
Camera By Id - get
Camera By Name - get
Camera By UniqueID - get
Camera By Unique Id - get
Cameras By Tags - get
Class Name - get
Engine - get
External Data - get
Frame Id - get
Geometries - get
Geometry ByID - get
Geometry By Id - get
Glow Layer By Name - get
Highlight Layer By Name - get
Internal Step - get
Last Entry ByID - get
Last Entry By Id - get
Last Material ByID - get
Last Material By Id - get
Last Mesh ByID - get
Last Mesh By Id - get
Last Skeleton ByID - get
Last Skeleton By Id - get
Last Transform Node By Id - get
Lens Flare System ByID - get
Lens Flare System By Id - get
Lens Flare System By Name - get
Light ByID - get
Light By Id - get
Light By Name - get
Light By UniqueID - get
Light By Unique Id - get
Lights By Tags - get
Material ByID - get
Material By Id - get
Material By Name - get
Material By Tags - get
Material By UniqueID - get
Mesh ByID - get
Mesh By Id - get
Mesh By Name - get
Mesh By UniqueID - get
Mesh By Unique Id - get
Meshes ByID - get
Meshes By Id - get
Meshes By Tags - get
Morph Target By Id - get
Morph Target By Name - get
Morph Target Manager By Id - get
Node ByID - get
Node By Id - get
Node By Name - get
Nodes - get
Or Add External Data With Factory - get
Outline Renderer - get
Particle System ByID - get
Particle System By Id - get
Perf Collector - get
Physics Engine - get
Pointer Over Mesh - get
Pointer Over Sprite - get
Post Process By Name - get
Projection Matrix - get
Render Id - get
Scene Uniform Buffer - get
Skeleton By Id - get
Skeleton By Name - get
Skeleton By Unique Id - get
Sound By Name - get
Step Id - get
Texture By Name - get
Texture By UniqueID - get
Texture By Unique Id - get
Total Vertices - get
Transform Matrix - get
Transform Node ByID - get
Transform Node By Id - get
Transform Node By Name - get
Transform Node By UniqueID - get
Transform Node By Unique Id - get
Transform Nodes ByID - get
Transform Nodes By Id - get
Transform Nodes By Tags - get
Unique Id - get
View Matrix - get
Waiting Items Count - get
World Extends - increment
Render Id - is
Active Mesh - is
Cached Material Invalid - is
Physics Enabled - is
Pointer Captured - is
Ready - mark
All Materials As Dirty - multi
Pick - multi
Pick Sprite - multi
Pick Sprite With Ray - multi
Pick With Ray - pick
- pick
Sprite - pick
Sprite With Ray - pick
With Bounding Info - pick
With Ray - push
Geometry - register
After Render - register
Before Render - remove
Action Manager - remove
Animation - remove
Animation Group - remove
Camera - remove
Effect Layer - remove
External Data - remove
Geometry - remove
Lens Flare System - remove
Light - remove
Material - remove
Mesh - remove
Morph Target Manager - remove
Multi Material - remove
Particle System - remove
Pending Data - remove
Reflection Probe - remove
Skeleton - remove
Texture - remove
Transform Node - render
- reset
Cached Material - reset
Draw Cache - reset
Last Animation Time Frame - set
Active Camera ByID - set
Active Camera By Id - set
Active Camera By Name - set
Default Candidate Providers - set
Pointer Over Mesh - set
Pointer Over Sprite - set
Rendering Auto Clear Depth Stencil - set
Rendering Order - set
Scene Uniform Buffer - set
Step Id - set
Transform Matrix - simulate
Pointer Down - simulate
Pointer Move - simulate
Pointer Up - sort
Active Animatables - sort
Lights By Priority - stop
All Animations - stop
Animation - switch
Active Camera - unfreeze
Active Meshes - unfreeze
Materials - unregister
After Render - unregister
Before Render - update
Transform Matrix - when
Ready Async - Add
Individual Parser - Add
Parser - Collision
Coordinator Factory - Default
Material Factory - Get
Individual Parser - Get
Parser - Parse
Constructors
constructor
Creates a new Scene
Parameters
engine: Engine
defines the engine to use to render this scene
Optional options: SceneOptions
defines the scene options
Returns Scene
Properties
_after Render Target Post Process StageSearch playground for _afterRenderTargetPostProcessStage
Defines the actions happening just after the post processing on a render target
action ManagerSearch playground for actionManager
Gets or sets the action manager associated with the scene
action ManagersSearch playground for actionManagers
ActionManagers available on the scene.
ambient ColorSearch playground for ambientColor
Defines the color used to simulate the ambient color (Default is (0, 0, 0))
animation GroupsSearch playground for animationGroups
All of the animation groups added to this scene
animation Time ScaleSearch playground for animationTimeScale
Gets or sets a general scale for animation speed
animationsSearch playground for animations
Gets a list of Animations associated with the scene
animations EnabledSearch playground for animationsEnabled
Gets or sets a boolean indicating if animations are enabled
audio EnabledSearch playground for audioEnabled
Gets or sets if audio support is enabled
audio Listener Position ProviderSearch playground for audioListenerPositionProvider
Gets or sets custom audio listener position provider
audio Listener Rotation ProviderSearch playground for audioListenerRotationProvider
Gets or sets custom audio listener rotation provider
audio Positioning Refresh RateSearch playground for audioPositioningRefreshRate
Gets or sets a refresh rate when using 3D audio positioning
auto ClearSearch playground for autoClear
Gets or sets a boolean that indicates if the scene must clear the render buffer before rendering a frame
auto Clear Depth And StencilSearch playground for autoClearDepthAndStencil
Gets or sets a boolean that indicates if the scene must clear the depth and stencil buffers before rendering a frame
camera To Use For PointersSearch playground for cameraToUseForPointers
Define this parameter if you are using multiple cameras and you want to specify which one should be used for pointer position
camerasSearch playground for cameras
All of the cameras added to this scene
clear ColorSearch playground for clearColor
Defines the color used to clear the render buffer (Default is (0.2, 0.2, 0.3, 1.0))
clip PlaneSearch playground for clipPlane
Gets or sets the active clipplane 1
clip Plane2Search playground for clipPlane2
Gets or sets the active clipplane 2
clip Plane3Search playground for clipPlane3
Gets or sets the active clipplane 3
clip Plane4Search playground for clipPlane4
Gets or sets the active clipplane 4
clip Plane5Search playground for clipPlane5
Gets or sets the active clipplane 5
clip Plane6Search playground for clipPlane6
Gets or sets the active clipplane 6
collisions EnabledSearch playground for collisionsEnabled
Gets or sets a boolean indicating if collisions are enabled on this scene
constantly Update Mesh Under PointerSearch playground for constantlyUpdateMeshUnderPointer
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
customLODSelectorSearch playground for customLODSelector
Type declaration
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
Parameters
mesh: AbstractMesh
camera: Camera
Returns Nullable<AbstractMesh>
custom Render TargetsSearch playground for customRenderTargets
The list of user defined render targets added to the scene
debug LayerSearch playground for debugLayer
Gets the debug layer (aka Inspector) associated with the scene
default CursorSearch playground for defaultCursor
Defines the HTML default cursor to use (empty by default)
delta TimeSearch playground for deltaTime
Gets the current delta time used by animation engine
depth Peeling RendererSearch playground for depthPeelingRenderer
The depth peeling renderer
disable Offline Support Exception RulesSearch playground for disableOfflineSupportExceptionRules
Use this array to add regular expressions used to disable offline support for specific urls
dispatch All Sub Meshes Of Active MeshesSearch playground for dispatchAllSubMeshesOfActiveMeshes
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)
do Not Handle CursorsSearch playground for doNotHandleCursors
Defines whether cursors are handled by the scene.
dump Next Render TargetsSearch playground for dumpNextRenderTargets
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
effect LayersSearch playground for effectLayers
The list of effect layers (highlights/glow) added to the scene
environmentBRDFTextureSearch playground for environmentBRDFTexture
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):
- For uncorrelated BRDF (pbr.brdf.useEnergyConservation = false and pbr.brdf.useSmithVisibilityHeightCorrelated = false) : https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds
- For correlated BRDF (pbr.brdf.useEnergyConservation = false and pbr.brdf.useSmithVisibilityHeightCorrelated = true) : https://assets.babylonjs.com/environments/correlatedBRDF.dds
- For correlated multi scattering BRDF (pbr.brdf.useEnergyConservation = true and pbr.brdf.useSmithVisibilityHeightCorrelated = true) : https://assets.babylonjs.com/environments/correlatedMSBRDF.dds The material properties need to be setup according to the type of texture in use.
environment IntensitySearch playground for environmentIntensity
Intensity of the environment in all pbr material. This dims or reinforces the IBL lighting overall (reflection and diffuse). As in the majority of the scene they are the same (exception for multi room and so on), this is easier to reference from here than from all the materials.
fluid RendererSearch playground for fluidRenderer
Gets or Sets the fluid renderer associated to the scene.
fog ColorSearch playground for fogColor
Gets or sets the fog color to use
fog DensitySearch playground for fogDensity
Gets or sets the fog density to use
fog EndSearch playground for fogEnd
Gets or sets the fog end distance to use
fog StartSearch playground for fogStart
Gets or sets the fog start distance to use
force Show Bounding BoxesSearch playground for forceShowBoundingBoxes
Gets or sets a boolean indicating if all bounding boxes must be rendered
gamepad ManagerSearch playground for gamepadManager
Gets the gamepad manager associated with the scene
geometriesSearch playground for geometries
The list of geometries used in the scene.
geometry Buffer RendererSearch playground for geometryBufferRenderer
Gets or Sets the current geometry buffer associated to the scene.
get Active Mesh CandidatesSearch playground for getActiveMeshCandidates
Type declaration
Lambda returning the list of potentially active meshes.
Returns ISmartArrayLike<AbstractMesh>
get Active Sub Mesh CandidatesSearch playground for getActiveSubMeshCandidates
Type declaration
Lambda returning the list of potentially active sub meshes.
Parameters
mesh: AbstractMesh
Returns ISmartArrayLike<SubMesh>
get Colliding Sub Mesh CandidatesSearch playground for getCollidingSubMeshCandidates
Type declaration
Lambda returning the list of potentially colliding sub meshes.
Parameters
mesh: AbstractMesh
collider: Collider
Returns ISmartArrayLike<SubMesh>
get Deterministic Frame TimeSearch playground for getDeterministicFrameTime
Type declaration
User updatable function that will return a deterministic frame time when engine is in deterministic lock step mode
Returns number
get Intersecting Sub Mesh CandidatesSearch playground for getIntersectingSubMeshCandidates
Type declaration
Lambda returning the list of potentially intersecting sub meshes.
Parameters
mesh: AbstractMesh
localRay: Ray
Returns ISmartArrayLike<SubMesh>
gravitySearch playground for gravity
Defines the gravity applied to this scene (used only for collisions)
headphoneSearch playground for headphone
Gets or sets if audio will be output to headphones
hover CursorSearch playground for hoverCursor
Defines the HTML cursor to use when hovering over interactive elements
imported Meshes FilesSearch playground for importedMeshesFiles
Gets the list of meshes imported to the scene through SceneLoader
layersSearch playground for layers
The list of layers (background and foreground) of the scene
lens Flare SystemsSearch playground for lensFlareSystems
The list of lens flare system added to the scene
lens Flares EnabledSearch playground for lensFlaresEnabled
Gets or sets a boolean indicating if lens flares are enabled on this scene
lightsSearch playground for lights
All of the lights added to this scene
loading Plugin NameSearch playground for loadingPluginName
Gets the name of the plugin used to load this scene (null by default)
main Sound TrackSearch playground for mainSoundTrack
The main sound track played by the scene. It contains your primary collection of sounds.
materialsSearch playground for materials
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 within the array is not significant and might change.
meshesSearch playground for meshes
All of the (abstract) meshes added to this scene
metadataSearch playground for metadata
Gets or sets user defined metadata
morph Target ManagersSearch playground for morphTargetManagers
The list of morph target managers added to the scene
multi MaterialsSearch playground for multiMaterials
All of the multi-materials added to this scene
needs Previous World MatricesSearch playground for needsPreviousWorldMatrices
Flag indicating if we need to store previous matrices when rendering
offline ProviderSearch playground for offlineProvider
Gets or sets the current offline provider to use to store scene data
on Active Camera ChangedSearch playground for onActiveCameraChanged
An event triggered when the activeCamera property is updated
on Active Cameras ChangedSearch playground for onActiveCamerasChanged
An event triggered when the activeCameras property is updated
on After Active Meshes Evaluation ObservableSearch playground for onAfterActiveMeshesEvaluationObservable
An event triggered when active meshes evaluation is done
on After Animations ObservableSearch playground for onAfterAnimationsObservable
An event triggered after animations processing
on After Camera Render ObservableSearch playground for onAfterCameraRenderObservable
An event triggered after rendering a camera This is triggered for the full rig Camera only unlike onAfterRenderCameraObservable
on After Draw Phase ObservableSearch playground for onAfterDrawPhaseObservable
An event triggered after draw calls have been sent
on After Particles Rendering ObservableSearch playground for onAfterParticlesRenderingObservable
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)
on After Physics ObservableSearch playground for onAfterPhysicsObservable
An event triggered when physic simulation has been done
on After Render Camera ObservableSearch playground for onAfterRenderCameraObservable
An event triggered after rendering the scene for an active camera (When scene.render is called this will be called after each camera) This is triggered for each "sub" camera in a Camera Rig unlike onAfterCameraRenderObservable
on After Render ObservableSearch playground for onAfterRenderObservable
An event triggered after rendering the scene
on After Render Targets Render ObservableSearch playground for onAfterRenderTargetsRenderObservable
An event triggered when render targets were rendered. Can happen multiple times per frame.
on After Rendering Group ObservableSearch playground for onAfterRenderingGroupObservable
This Observable will be triggered after rendering each renderingGroup of each rendered camera. The RenderingGroupInfo 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)
on After Sprites Rendering ObservableSearch playground for onAfterSpritesRenderingObservable
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)
on After Step ObservableSearch playground for onAfterStepObservable
An event triggered after calculating deterministic simulation step
on Animation File Imported ObservableSearch playground for onAnimationFileImportedObservable
This Observable will when an animation file has been imported into the scene.
on Before Active Meshes Evaluation ObservableSearch playground for onBeforeActiveMeshesEvaluationObservable
An event triggered when active meshes evaluation is about to start
on Before Animations ObservableSearch playground for onBeforeAnimationsObservable
An event triggered before animating the scene
on Before Camera Render ObservableSearch playground for onBeforeCameraRenderObservable
An event triggered before rendering a camera
on Before Draw Phase ObservableSearch playground for onBeforeDrawPhaseObservable
An event triggered before draw calls are ready to be sent
on Before Particles Rendering ObservableSearch playground for onBeforeParticlesRenderingObservable
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)
on Before Physics ObservableSearch playground for onBeforePhysicsObservable
An event triggered when physic simulation is about to be run
on Before Render ObservableSearch playground for onBeforeRenderObservable
An event triggered before rendering the scene (right after animations and physics)
on Before Render Targets Render ObservableSearch playground for onBeforeRenderTargetsRenderObservable
An event triggered when render targets are about to be rendered Can happen multiple times per frame.
on Before Rendering Group ObservableSearch playground for onBeforeRenderingGroupObservable
This Observable will be triggered before rendering each renderingGroup of each rendered camera. The RenderingGroupInfo 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)
on Before Sprites Rendering ObservableSearch playground for onBeforeSpritesRenderingObservable
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)
on Before Step ObservableSearch playground for onBeforeStepObservable
An event triggered before calculating deterministic simulation step
on Camera Removed ObservableSearch playground for onCameraRemovedObservable
An event triggered when a camera is removed
on Data Loaded ObservableSearch playground for onDataLoadedObservable
An event triggered when SceneLoader.Append or SceneLoader.Load or SceneLoader.ImportMesh were successfully executed
on Dispose ObservableSearch playground for onDisposeObservable
An event triggered when the scene is disposed.
on Geometry Removed ObservableSearch playground for onGeometryRemovedObservable
An event triggered when a geometry is removed
on Keyboard ObservableSearch playground for onKeyboardObservable
Observable event triggered each time an keyboard event is received from the hosting window
on Light Removed ObservableSearch playground for onLightRemovedObservable
An event triggered when a light is removed
on Material Removed ObservableSearch playground for onMaterialRemovedObservable
An event triggered when a material is removed
on Mesh Imported ObservableSearch playground for onMeshImportedObservable
This Observable will when a mesh has been imported into the scene.
on Mesh Removed ObservableSearch playground for onMeshRemovedObservable
An event triggered when a mesh is removed
on Multi Material Removed ObservableSearch playground for onMultiMaterialRemovedObservable
An event triggered when a multi material is removed
on New Camera Added ObservableSearch playground for onNewCameraAddedObservable
An event triggered when a camera is created
on New Geometry Added ObservableSearch playground for onNewGeometryAddedObservable
An event triggered when a geometry is created
on New Light Added ObservableSearch playground for onNewLightAddedObservable
An event triggered when a light is created
on New Material Added ObservableSearch playground for onNewMaterialAddedObservable
An event triggered when a material is created
on New Mesh Added ObservableSearch playground for onNewMeshAddedObservable
An event triggered when a mesh is created
on New Multi Material Added ObservableSearch playground for onNewMultiMaterialAddedObservable
An event triggered when a multi material is created
on New Skeleton Added ObservableSearch playground for onNewSkeletonAddedObservable
An event triggered when a skeleton is created
on New Texture Added ObservableSearch playground for onNewTextureAddedObservable
An event triggered when a texture is created
on New Transform Node Added ObservableSearch playground for onNewTransformNodeAddedObservable
An event triggered when a transform node is created
Optional on Pointer DownSearch playground for onPointerDown
Type declaration
Callback called when a pointer down is detected
Parameters
evt: IPointerEvent
pickInfo: PickingInfo
type: PointerEventTypes
Returns void
Optional on Pointer MoveSearch playground for onPointerMove
Type declaration
Callback called when a pointer move is detected
Parameters
evt: IPointerEvent
pickInfo: PickingInfo
type: PointerEventTypes
Returns void
on Pointer ObservableSearch playground for onPointerObservable
Observable event triggered each time an input event is received from the rendering canvas
Optional on Pointer PickSearch playground for onPointerPick
Type declaration
Callback called when a pointer pick is detected
Parameters
evt: IPointerEvent
pickInfo: PickingInfo
Returns void
Optional on Pointer UpSearch playground for onPointerUp
Type declaration
Callback called when a pointer up is detected
Parameters
evt: IPointerEvent
pickInfo: Nullable<PickingInfo>
type: PointerEventTypes
Returns void
on Pre Keyboard ObservableSearch playground for onPreKeyboardObservable
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
on Pre Pointer ObservableSearch playground for onPrePointerObservable
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
on Ready ObservableSearch playground for onReadyObservable
An event triggered when the scene is ready
on Scene Performance Priority Changed ObservableSearch playground for onScenePerformancePriorityChangedObservable
Observable triggered when the performance priority is changed
on Skeleton Removed ObservableSearch playground for onSkeletonRemovedObservable
An event triggered when a skeleton is removed
on Texture Removed ObservableSearch playground for onTextureRemovedObservable
An event triggered when a texture is removed
on Transform Node Removed ObservableSearch playground for onTransformNodeRemovedObservable
An event triggered when a transform node is removed
particle SystemsSearch playground for particleSystems
All of the particle systems added to this scene
particles EnabledSearch playground for particlesEnabled
Gets or sets a boolean indicating if particles are enabled on this scene
physics EnabledSearch playground for physicsEnabled
Gets or sets a boolean indicating if physic engines are enabled on this scene
pointer Move Triangle PredicateSearch playground for pointerMoveTrianglePredicate
Gets or sets a predicate used to select candidate faces for a pointer move event
post Process ManagerSearch playground for postProcessManager
Gets the current postprocess manager
Readonly post Process Render Pipeline ManagerSearch playground for postProcessRenderPipelineManager
Gets the postprocess render pipeline manager
post ProcessesSearch playground for postProcesses
The list of postprocesses added to the scene
post Processes EnabledSearch playground for postProcessesEnabled
Gets or sets a boolean indicating if postprocesses are enabled on this scene
pre Pass RendererSearch playground for prePassRenderer
Gets or Sets the current prepass renderer associated to the scene.
prevent Default On Pointer DownSearch playground for preventDefaultOnPointerDown
This is used to call preventDefault() on pointer down in order to block unwanted artifacts like system double clicks
prevent Default On Pointer UpSearch playground for preventDefaultOnPointerUp
This is used to call preventDefault() on pointer up in order to block unwanted artifacts like system double clicks
probes EnabledSearch playground for probesEnabled
Gets or sets a boolean indicating if probes are enabled on this scene
procedural TexturesSearch playground for proceduralTextures
The list of procedural textures added to the scene
procedural Textures EnabledSearch playground for proceduralTexturesEnabled
Gets or sets a boolean indicating if procedural textures are enabled on this scene
reflection ProbesSearch playground for reflectionProbes
The list of reflection probes added to the scene
render Targets EnabledSearch playground for renderTargetsEnabled
Gets or sets a boolean indicating if render targets are enabled on this scene
require Light SortingSearch playground for requireLightSorting
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
reserved Data StoreSearch playground for reservedDataStore
For internal use only. Please do not use.
root NodesSearch playground for rootNodes
Gets the list of root nodes (ie. nodes with no parent)
selection OctreeSearch playground for selectionOctree
Gets the octree used to boost mesh selection (picking)
simplification QueueSearch playground for simplificationQueue
Gets or sets the simplification queue attached to the scene
skeletonsSearch playground for skeletons
The list of skeletons added to the scene
sound TracksSearch playground for soundTracks
The list of sound tracks added to the scene
soundsSearch playground for sounds
The list of sounds used in the scene.
Optional sprite ManagersSearch playground for spriteManagers
All of the sprite managers added to this scene
sprites EnabledSearch playground for spritesEnabled
Gets or sets a boolean indicating if sprites are enabled on this scene
sub Surface ConfigurationSearch playground for subSurfaceConfiguration
Gets or Sets the current prepass renderer associated to the scene.
texturesSearch playground for textures
Textures to keep.
transform NodesSearch playground for transformNodes
All of the transform 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 within the array is not significant and might change.
use Constant Animation Delta TimeSearch playground for useConstantAnimationDeltaTime
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
use Delayed Texture LoadingSearch playground for useDelayedTextureLoading
Defines if texture loading must be delayed If true, textures will only be loaded when they need to be rendered
use Order Independent TransparencySearch playground for useOrderIndependentTransparency
Flag to indicate if we want to use order independent transparency, despite the performance hit
Static Readonly FOGMODE_ EXPSearch playground for FOGMODE_EXP
The fog density is following an exponential function
Static Readonly FOGMODE_ EXP2Search playground for FOGMODE_EXP2
The fog density is following an exponential function faster than FOGMODE_EXP
Static Readonly FOGMODE_ LINEARSearch playground for FOGMODE_LINEAR
The fog density is following a linear function.
Static Readonly FOGMODE_ NONESearch playground for FOGMODE_NONE
The fog is deactivated
Static Max Delta TimeSearch playground for MaxDeltaTime
Gets or sets the maximum deltatime when deterministic lock step is enabled
Static Min Delta TimeSearch playground for MinDeltaTime
Gets or sets the minimum deltatime when deterministic lock step is enabled
Accessors
active Bones Perf Counter
Gets the performance counter for active bones
Returns PerfCounter
active Camera
active Cameras
active Particles Perf Counter
Gets the performance counter for active particles
Returns PerfCounter
after Camera Render
Sets a function to be executed after rendering a camera
Parameters
callback: (() => void)
Returns void
Returns void
after Render
Sets a function to be executed after rendering this scene
Parameters
callback: Nullable<(() => void)>
Returns void
animatables
Gets all animatable attached to the scene
Returns Animatable[]
animation Properties Override
Gets or sets the animation properties override
Returns Nullable<AnimationPropertiesOverride>
Gets or sets the animation properties override
Parameters
value: Nullable<AnimationPropertiesOverride>
Returns void
before Camera Render
Sets a function to be executed before rendering a camera
Parameters
callback: (() => void)
Returns void
Returns void
before Render
Sets a function to be executed before rendering this scene
Parameters
callback: Nullable<(() => void)>
Returns void
block Material Dirty Mechanism
Gets or sets a boolean blocking all the calls to markAllMaterialsAsDirty (ie. the materials won't be updated if they are out of sync)
Returns boolean
Gets or sets a boolean blocking all the calls to markAllMaterialsAsDirty (ie. the materials won't be updated if they are out of sync)
Parameters
value: boolean
Returns void
blockfree Active Meshes And Rendering Groups
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 responsibility of the user to blockfreeActiveMeshesAndRenderingGroups back to false.
Returns boolean
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 responsibility of the user to blockfreeActiveMeshesAndRenderingGroups back to false.
Parameters
value: boolean
Returns void
default Material
environment Texture
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 reference from here than from all the materials.
Returns Nullable<BaseTexture>
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.
Parameters
value: Nullable<BaseTexture>
Returns void
fog Enabled
Gets or sets a boolean indicating if fog is enabled on this scene
Returns boolean
Gets or sets a boolean indicating if fog is enabled on this scene
Parameters
value: boolean
Returns void
fog Mode
Gets or sets the fog mode to use
Returns number
Gets or sets the fog mode to use
Parameters
value: number
Returns void
force Points Cloud
Gets or sets a boolean indicating if all rendering must be done in point cloud
Returns boolean
Gets or sets a boolean indicating if all rendering must be done in point cloud
Parameters
value: boolean
Returns void
force Wireframe
Gets or sets a boolean indicating if all rendering must be done in wireframe
Returns boolean
Gets or sets a boolean indicating if all rendering must be done in wireframe
Parameters
value: boolean
Returns void
frustum Planes
Gets the list of frustum planes (built from the active camera)
Returns Plane[]
image Processing Configuration
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.
Returns ImageProcessingConfiguration
is Disposed
Gets if the scene is already disposed
Returns boolean
is Loading
Returns a boolean indicating if the scene is still loading data
Returns boolean
lights Enabled
Gets or sets a boolean indicating if lights are enabled on this scene
Returns boolean
Gets or sets a boolean indicating if lights are enabled on this scene
Parameters
value: boolean
Returns void
mesh Under Pointer
Gets the mesh that is currently under the pointer
Returns Nullable<AbstractMesh>
on Dispose
Sets a function to be executed when this scene is disposed.
Parameters
callback: (() => void)
Returns void
Returns void
performance Priority
Gets or sets a value indicating how to treat performance relatively to ease of use and backward compatibility
Returns ScenePerformancePriority
Gets or sets a value indicating how to treat performance relatively to ease of use and backward compatibility
Parameters
value: ScenePerformancePriority
Returns void
pointer Down Fast Check
Gets or sets a predicate used to select candidate meshes for a pointer down event
Returns boolean
Gets or sets a predicate used to select candidate meshes for a pointer down event
Parameters
value: boolean
Returns void
pointer Down Predicate
Gets or sets a predicate used to select candidate meshes for a pointer down event
Returns ((Mesh: AbstractMesh) => boolean)
Gets or sets a predicate used to select candidate meshes for a pointer down event
Parameters
Mesh: AbstractMesh
Returns boolean
Gets or sets a predicate used to select candidate meshes for a pointer down event
Parameters
value: ((Mesh: AbstractMesh) => boolean)
Parameters
Mesh: AbstractMesh
Returns boolean
Returns void
pointer Move Fast Check
Gets or sets a predicate used to select candidate meshes for a pointer move event
Returns boolean
Gets or sets a predicate used to select candidate meshes for a pointer move event
Parameters
value: boolean
Returns void
pointer Move Predicate
Gets or sets a predicate used to select candidate meshes for a pointer move event
Returns ((Mesh: AbstractMesh) => boolean)
Gets or sets a predicate used to select candidate meshes for a pointer move event
Parameters
Mesh: AbstractMesh
Returns boolean
Gets or sets a predicate used to select candidate meshes for a pointer move event
Parameters
value: ((Mesh: AbstractMesh) => boolean)
Parameters
Mesh: AbstractMesh
Returns boolean
Returns void
pointer Up Fast Check
Gets or sets a predicate used to select candidate meshes for a pointer up event
Returns boolean
Gets or sets a predicate used to select candidate meshes for a pointer up event
Parameters
value: boolean
Returns void
pointer Up Predicate
Gets or sets a predicate used to select candidate meshes for a pointer up event
Returns ((Mesh: AbstractMesh) => boolean)
Gets or sets a predicate used to select candidate meshes for a pointer up event
Parameters
Mesh: AbstractMesh
Returns boolean
Gets or sets a predicate used to select candidate meshes for a pointer up event
Parameters
value: ((Mesh: AbstractMesh) => boolean)
Parameters
Mesh: AbstractMesh
Returns boolean
Returns void
pointerX
Gets or sets the current on-screen X position of the pointer
Returns number
Gets or sets the current on-screen X position of the pointer
Parameters
value: number
Returns void
pointerY
Gets or sets the current on-screen Y position of the pointer
Returns number
Gets or sets the current on-screen Y position of the pointer
Parameters
value: number
Returns void
pre Pass
Flag indicating that the frame buffer binding is handled by another component
Returns boolean
rendering Manager
Gets the scene's rendering manager
Returns RenderingManager
shadows Enabled
Gets or sets a boolean indicating if shadows are enabled on this scene
Returns boolean
Gets or sets a boolean indicating if shadows are enabled on this scene
Parameters
value: boolean
Returns void
skeletons Enabled
Gets or sets a boolean indicating if skeletons are enabled on this scene
Returns boolean
Gets or sets a boolean indicating if skeletons are enabled on this scene
Parameters
value: boolean
Returns void
skip Frustum Clipping
Gets or sets a boolean indicating if we should skip the frustum clipping part of the active meshes selection
Returns boolean
Gets or sets a boolean indicating if we should skip the frustum clipping part of the active meshes selection
Parameters
value: boolean
Returns void
skip Pointer Down Picking
Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer down event occurs.
Returns boolean
Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer down event occurs.
Parameters
value: boolean
Returns void
skip Pointer Move Picking
Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer move event occurs.
Returns boolean
Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer move event occurs.
Parameters
value: boolean
Returns void
skip Pointer Up Picking
Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer up event occurs. Off by default.
Returns boolean
Gets or sets a boolean indicating if the user want to entirely skip the picking phase when a pointer up event occurs. Off by default.
Parameters
value: boolean
Returns void
textures Enabled
Gets or sets a boolean indicating if textures are enabled on this scene
Returns boolean
Gets or sets a boolean indicating if textures are enabled on this scene
Parameters
value: boolean
Returns void
total Active Indices Perf Counter
Gets the performance counter for active indices
Returns PerfCounter
total Vertices Perf Counter
Gets the performance counter for total vertices
Returns PerfCounter
uid
Return a unique id as a string which can serve as an identifier for the scene
Returns string
un Translated Pointer
Gets the pointer coordinates without any translation (ie. straight out of the pointer event)
Returns Vector2
use Right Handed System
Gets or sets a boolean indicating if the scene must use right-handed coordinates system
Returns boolean
Gets or sets a boolean indicating if the scene must use right-handed coordinates system
Parameters
value: boolean
Returns void
Static Double Click Delay
Time in milliseconds to wait to raise long press events if button is still pressed. Default is 300 ms
Returns number
Time in milliseconds to wait to raise long press events if button is still pressed. Default is 300 ms
Parameters
value: number
Returns void
Static Drag Movement Threshold
Gets or sets the distance in pixel that you have to move to prevent some events. Default is 10 pixels
Returns number
Gets or sets the distance in pixel that you have to move to prevent some events. Default is 10 pixels
Parameters
value: number
Returns void
Static Exclusive Double Click Mode
If you need to check double click without raising a single click at first click, enable this flag
Returns boolean
If you need to check double click without raising a single click at first click, enable this flag
Parameters
value: boolean
Returns void
Static Long Press Delay
Time in milliseconds to wait to raise long press events if button is still pressed. Default is 500 ms
Returns number
Time in milliseconds to wait to raise long press events if button is still pressed. Default is 500 ms
Parameters
value: number
Returns void
Methods
add Action ManagerSearch playground for addActionManager
Adds the given action manager to this scene
Parameters
newActionManager: AbstractActionManager
The action manager to add
Returns void
add AnimationSearch playground for addAnimation
Adds the given animation to this scene
Parameters
newAnimation: Animation
The animation to add
Returns void
add Animation GroupSearch playground for addAnimationGroup
Adds the given animation group to this scene.
Parameters
newAnimationGroup: AnimationGroup
The animation group to add
Returns void
add CameraSearch playground for addCamera
Adds the given camera to this scene
Parameters
newCamera: Camera
The camera to add
Returns void
add Effect LayerSearch playground for addEffectLayer
Adds the given effect layer to this scene
Parameters
newEffectLayer: EffectLayer
defines the effect layer to add
Returns void
add External DataSearch playground for addExternalData
Add an externally 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.
Type Parameters
T extends Object
Parameters
key: string
the unique key that identifies the data
data: T
the data object to associate to the key for this Engine instance
Returns boolean
true if no such key were already present and the data was added successfully, false otherwise
add GeometrySearch playground for addGeometry
Adds the given geometry to this scene
Parameters
newGeometry: Geometry
The geometry to add
Returns void
add Lens Flare SystemSearch playground for addLensFlareSystem
Adds the given lens flare system to this scene
Parameters
newLensFlareSystem: LensFlareSystem
The lens flare system to add
Returns void
add LightSearch playground for addLight
Adds the given light to this scene
Parameters
newLight: Light
The light to add
Returns void
add MaterialSearch playground for addMaterial
Adds the given material to this scene
Parameters
newMaterial: Material
The material to add
Returns void
add MeshSearch playground for addMesh
Add a mesh to the list of scene's meshes
Parameters
newMesh: AbstractMesh
defines the mesh to add
Optional recursive: boolean
if all child meshes should also be added to the scene
Returns void
add Morph Target ManagerSearch playground for addMorphTargetManager
Adds the given morph target to this scene
Parameters
newMorphTargetManager: MorphTargetManager
The morph target to add
Returns void
add Multi MaterialSearch playground for addMultiMaterial
Adds the given multi-material to this scene
Parameters
newMultiMaterial: MultiMaterial
The multi-material to add
Returns void
add Particle SystemSearch playground for addParticleSystem
Adds the given particle system to this scene
Parameters
newParticleSystem: IParticleSystem
The particle system to add
Returns void
add Pending DataSearch playground for addPendingData
This function can help adding any object to the list of data awaited to be ready in order to check for a complete scene loading.
Parameters
data: any
defines the object to wait for
Returns void
add Reflection ProbeSearch playground for addReflectionProbe
Adds the given reflection probe to this scene.
Parameters
newReflectionProbe: ReflectionProbe
The reflection probe to add
Returns void
add SkeletonSearch playground for addSkeleton
Adds the given skeleton to this scene
Parameters
newSkeleton: Skeleton
The skeleton to add
Returns void
add TextureSearch playground for addTexture
Adds the given texture to this scene.
Parameters
newTexture: BaseTexture
The texture to add
Returns void
add Transform NodeSearch playground for addTransformNode
Add a transform node to the list of scene's transform nodes
Parameters
newTransformNode: TransformNode
defines the transform node to add
Returns void
animateSearch playground for animate
Execute all animations (for a frame)
Returns void
attach ControlSearch playground for attachControl
Attach events to the canvas (To handle actionManagers triggers and raise onPointerMove, onPointerDown and onPointerUp
Parameters
Optional attachUp: boolean
defines if you want to attach events to pointerup
Optional attachDown: boolean
defines if you want to attach events to pointerdown
Optional attachMove: boolean
defines if you want to attach events to pointermove
Returns void
begin AnimationSearch playground for beginAnimation
Will start the animation sequence of a given target
Parameters
target: any
defines the target
from: number
defines from which frame should animation start
to: number
defines until which frame should animation run.
Optional loop: boolean
defines if the animation loops
Optional speedRatio: number
defines the speed in which to run the animation (1.0 by default)
Optional onAnimationEnd: (() => void)
defines the function to be executed when the animation ends
Returns void
Optional animatable: Animatable
defines an animatable object. If not provided a new one will be created from the given params
Optional stopCurrent: boolean
defines if the current animations must be stopped first (true by default)
Optional targetMask: ((target: any) => boolean)
defines if the target should be animate if animations are present (this is called recursively on descendant animatables regardless of return value)
Parameters
target: any
Returns boolean
Optional onAnimationLoop: (() => void)
defines the callback to call when an animation loops
Returns void
Optional isAdditive: boolean
defines whether the animation should be evaluated additively (false by default)
Returns Animatable
the animatable object created for this animation
begin Direct AnimationSearch playground for beginDirectAnimation
Begin a new animation on a given node
Parameters
target: any
defines the target where the animation will take place
animations: Animation[]
defines the list of animations to start
from: number
defines the initial value
to: number
defines the final value
Optional loop: boolean
defines if you want animation to loop (off by default)
Optional speedRatio: number
defines the speed ratio to apply to all animations
Optional onAnimationEnd: (() => void)
defines the callback to call when an animation ends (will be called once per node)
Returns void
Optional onAnimationLoop: (() => void)
defines the callback to call when an animation loops
Returns void
Optional isAdditive: boolean
defines whether the animation should be evaluated additively (false by default)
Returns Animatable
the list of created animatables
begin Direct Hierarchy AnimationSearch playground for beginDirectHierarchyAnimation
Begin a new animation on a given node and its hierarchy
Parameters
target: Node
defines the root node where the animation will take place
directDescendantsOnly: boolean
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.
animations: Animation[]
defines the list of animations to start
from: number
defines the initial value
to: number
defines the final value
Optional loop: boolean
defines if you want animation to loop (off by default)
Optional speedRatio: number
defines the speed ratio to apply to all animations
Optional onAnimationEnd: (() => void)
defines the callback to call when an animation ends (will be called once per node)
Returns void
Optional onAnimationLoop: (() => void)
defines the callback to call when an animation loops
Returns void
Optional isAdditive: boolean
defines whether the animation should be evaluated additively (false by default)
Returns Animatable[]
the list of animatables created for all nodes
begin Hierarchy AnimationSearch playground for beginHierarchyAnimation
Will start the animation sequence of a given target and its hierarchy
Parameters
target: any
defines the target
directDescendantsOnly: boolean
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.
from: number
defines from which frame should animation start
to: number
defines until which frame should animation run.
Optional loop: boolean
defines if the animation loops
Optional speedRatio: number
defines the speed in which to run the animation (1.0 by default)
Optional onAnimationEnd: (() => void)
defines the function to be executed when the animation ends
Returns void
Optional animatable: Animatable
defines an animatable object. If not provided a new one will be created from the given params
Optional stopCurrent: boolean
defines if the current animations must be stopped first (true by default)
Optional targetMask: ((target: any) => boolean)
defines if the target should be animated if animations are present (this is called recursively on descendant animatables regardless of return value)
Parameters
target: any
Returns boolean
Optional onAnimationLoop: (() => void)
defines the callback to call when an animation loops
Returns void
Optional isAdditive: boolean
defines whether the animation should be evaluated additively (false by default)
Returns Animatable[]
the list of created animatables
begin Weighted AnimationSearch playground for beginWeightedAnimation
Will start the animation sequence of a given target
Parameters
target: any
defines the target
from: number
defines from which frame should animation start
to: number
defines until which frame should animation run.
weight: number
defines the weight to apply to the animation (1.0 by default)
Optional loop: boolean
defines if the animation loops
Optional speedRatio: number
defines the speed in which to run the animation (1.0 by default)
Optional onAnimationEnd: (() => void)
defines the function to be executed when the animation ends
Returns void
Optional animatable: Animatable
defines an animatable object. If not provided a new one will be created from the given params
Optional targetMask: ((target: any) => boolean)
defines if the target should be animated if animations are present (this is called recursively on descendant animatables regardless of return value)
Parameters
target: any
Returns boolean
Optional onAnimationLoop: (() => void)
defines the callback to call when an animation loops
Returns void
Optional isAdditive: boolean
defines whether the animation should be evaluated additively (false by default)
Returns Animatable
the animatable object created for this animation
bind Eye PositionSearch playground for bindEyePosition
Bind the current view position to an effect.
Parameters
effect: Nullable<Effect>
The effect to be bound
Optional variableName: string
name of the shader variable that will hold the eye position
Optional isVector3: boolean
true to indicates that variableName is a Vector3 and not a Vector4
Returns Vector4
the computed eye position
clean Cached Texture BufferSearch playground for cleanCachedTextureBuffer
This function will remove the local cached buffer data from texture. It will save memory but will prevent the texture from being rebuilt
Returns void
clear Cached Vertex DataSearch playground for clearCachedVertexData
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)
Returns void
create Default CameraSearch playground for createDefaultCamera
Creates a default camera for the scene.
Parameters
Optional createArcRotateCamera: boolean
has the default false which creates a free camera, when true creates an arc rotate camera
Optional replace: boolean
has default false, when true replaces the active camera in the scene
Optional attachCameraControls: boolean
has default false, when true attaches camera controls to the canvas.
Returns void
create Default Camera Or LightSearch playground for createDefaultCameraOrLight
Creates a default camera and a default light.
Parameters
Optional createArcRotateCamera: boolean
has the default false which creates a free camera, when true creates an arc rotate camera
Optional replace: boolean
has the default false, when true replaces the active camera/light in the scene
Optional attachCameraControls: boolean
has the default false, when true attaches camera controls to the canvas.
Returns void
create Default EnvironmentSearch playground for createDefaultEnvironment
Creates a new environment
Parameters
Optional options: Partial<IEnvironmentHelperOptions>
defines the options you can use to configure the environment
Returns Nullable<EnvironmentHelper>
the new EnvironmentHelper
create Default LightSearch playground for createDefaultLight
Creates a default light for the scene.
Parameters
Optional replace: boolean
has the default false, when true replaces the existing lights in the scene with a hemispheric light
Returns void
create Default SkyboxSearch playground for createDefaultSkybox
Creates a new sky box
Parameters
Optional environmentTexture: BaseTexture
defines the texture to use as environment texture
Optional pbr: boolean
has default false which requires the StandardMaterial to be used, when true PBRMaterial must be used
Optional scale: number
defines the overall scale of the skybox
Optional blur: number
is only available when pbr is true, default is 0, no blur, maximum value is 1
Optional setGlobalEnvTexture: boolean
has default true indicating that scene.environmentTexture must match the current skybox texture
Returns Nullable<Mesh>
a new mesh holding the sky box
create DefaultVRExperienceSearch playground for createDefaultVRExperience
Creates a new VREXperienceHelper
Parameters
Optional webVROptions: VRExperienceHelperOptions
defines the options used to create the new VREXperienceHelper
Returns VRExperienceHelper
a new VREXperienceHelper
create DefaultXRExperience AsyncSearch playground for createDefaultXRExperienceAsync
Creates a new WebXRDefaultExperience
Parameters
Optional options: WebXRDefaultExperienceOptions
experience options
Returns Promise<WebXRDefaultExperience>
a promise for a new WebXRDefaultExperience
create Or Update Selection OctreeSearch playground for createOrUpdateSelectionOctree
Creates or updates the octree used to boost selection (picking)
Parameters
Optional maxCapacity: number
defines the maximum capacity per leaf
Optional maxDepth: number
defines the maximum depth of the octree
Returns Octree<AbstractMesh>
an octree of AbstractMesh
create Picking RaySearch playground for createPickingRay
Creates a ray that can be used to pick in the scene
Parameters
x: number
defines the x coordinate of the origin (on-screen)
y: number
defines the y coordinate of the origin (on-screen)
world: Nullable<Matrix>
defines the world matrix to use if you want to pick in object space (instead of world space)
camera: Nullable<Camera>
defines the camera to use for the picking
Optional cameraViewSpace: boolean
defines if picking will be done in view space (false by default)
Returns Ray
a Ray
create Picking Ray In Camera SpaceSearch playground for createPickingRayInCameraSpace
create Picking Ray In Camera Space To RefSearch playground for createPickingRayInCameraSpaceToRef
Creates a ray that can be used to pick in the scene
Parameters
x: number
defines the x coordinate of the origin (on-screen)
y: number
defines the y coordinate of the origin (on-screen)
result: Ray
defines the ray where to store the picking ray
Optional camera: Camera
defines the camera to use for the picking
Returns Scene
the current scene
create Picking Ray To RefSearch playground for createPickingRayToRef
Creates a ray that can be used to pick in the scene
Parameters
x: number
defines the x coordinate of the origin (on-screen)
y: number
defines the y coordinate of the origin (on-screen)
world: Nullable<Matrix>
defines the world matrix to use if you want to pick in object space (instead of world space)
result: Ray
defines the ray where to store the picking ray
camera: Nullable<Camera>
defines the camera to use for the picking
Optional cameraViewSpace: boolean
defines if picking will be done in view space (false by default)
Optional enableDistantPicking: boolean
defines if picking should handle large values for mesh position/scaling (false by default)
Returns Scene
the current scene
create Scene Uniform BufferSearch playground for createSceneUniformBuffer
Creates a scene UBO
Parameters
Optional name: string
name of the uniform buffer (optional, for debugging purpose only)
Returns UniformBuffer
a new ubo
delete Compound ImpostorSearch playground for deleteCompoundImpostor
Deletes a physics compound impostor
Parameters
compound: any
defines the compound to delete
Returns void
detach ControlSearch playground for detachControl
Detaches all event handlers
Returns void
disable Depth RendererSearch playground for disableDepthRenderer
disable Fluid RendererSearch playground for disableFluidRenderer
Disables the fluid renderer associated with the scene
Returns void
disable Geometry Buffer RendererSearch playground for disableGeometryBufferRenderer
Disables the GeometryBufferRender associated with the scene
Returns void
disable Physics EngineSearch playground for disablePhysicsEngine
Disables and disposes the physics engine associated with the scene
Returns void
disable Pre Pass RendererSearch playground for disablePrePassRenderer
Disables the prepass associated with the scene
Returns void
disable Sub Surface For Pre PassSearch playground for disableSubSurfaceForPrePass
Disables the subsurface effect for prepass
Returns void
disposeSearch playground for dispose
Releases all held resources
Returns void
enable Depth RendererSearch playground for enableDepthRenderer
Creates a depth renderer a given camera which contains a depth map which can be used for post processing.
Parameters
Optional camera: Nullable<Camera>
The camera to create the depth renderer on (default: scene's active camera)
Optional storeNonLinearDepth: boolean
Defines whether the depth is stored linearly like in Babylon Shadows or directly like glFragCoord.z
Optional force32bitsFloat: boolean
Forces 32 bits float when supported (else 16 bits float is prioritized over 32 bits float if supported)
Optional samplingMode: number
The sampling mode to be used with the render target (Linear, Nearest...)
Optional storeCameraSpaceZ: boolean
Defines whether the depth stored is the Z coordinate in camera space. If true, storeNonLinearDepth has no effect. (Default: false)
Returns DepthRenderer
the created depth renderer
enable Fluid RendererSearch playground for enableFluidRenderer
Enables the fluid renderer and associates it with the scene
Returns Nullable<FluidRenderer>
the FluidRenderer
enable Geometry Buffer RendererSearch playground for enableGeometryBufferRenderer
Enables a GeometryBufferRender and associates it with the scene
Parameters
Optional ratio: number | { height: number; width: number }
defines the scaling ratio to apply to the renderer (1 by default which means same resolution). You can also directly pass a width and height for the generated textures
Optional depthFormat: number
Format of the depth texture (default: Constants.TEXTUREFORMAT_DEPTH16)
Returns Nullable<GeometryBufferRenderer>
the GeometryBufferRenderer
enable PhysicsSearch playground for enablePhysics
Enables physics to the current scene
Parameters
Optional gravity: Nullable<Vector3>
defines the scene's gravity for the physics engine. defaults to real earth gravity : (0, -9.81, 0)
Optional plugin: IPhysicsEnginePlugin | IPhysicsEnginePluginV2
defines the physics engine to be used. defaults to CannonJS.
Returns boolean
a boolean indicating if the physics engine was initialized
enable Pre Pass RendererSearch playground for enablePrePassRenderer
Enables the prepass and associates it with the scene
Returns Nullable<PrePassRenderer>
the PrePassRenderer
enable Sub Surface For Pre PassSearch playground for enableSubSurfaceForPrePass
Enables the subsurface effect for prepass
Returns Nullable<SubSurfaceConfiguration>
the SubSurfaceConfiguration
execute Once Before RenderSearch playground for executeOnceBeforeRender
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.
Parameters
func: (() => void)
The function to be executed.
Returns void
Optional timeout: number
optional delay in ms
Returns void
execute When ReadySearch playground for executeWhenReady
Registers a function to be executed when the scene is ready
Parameters
func: (() => void)
the function to be executed
Returns void
Optional checkRenderTargets: boolean
true to also check that the meshes rendered as part of a render target are ready (default: false)
Returns void
finalize Scene UboSearch playground for finalizeSceneUbo
Update the scene ubo before it can be used in rendering processing
Returns UniformBuffer
the scene UniformBuffer
free Active MeshesSearch playground for freeActiveMeshes
Clear the active meshes smart array preventing retention point in mesh dispose.
Returns void
free Processed MaterialsSearch playground for freeProcessedMaterials
Clear the processed materials smart array preventing retention point in material dispose.
Returns void
free Rendering GroupsSearch playground for freeRenderingGroups
Clear the info related to rendering groups preventing retention points during dispose.
Returns void
freeze Active MeshesSearch playground for freezeActiveMeshes
Use this function to stop evaluating active meshes. The current list will be keep alive between frames
Parameters
Optional skipEvaluateActiveMeshes: boolean
defines an optional boolean indicating that the evaluate active meshes step must be completely skipped
Optional onSuccess: (() => void)
optional success callback
Returns void
Optional onError: ((message: string) => void)
optional error callback
Parameters
message: string
Returns void
Optional freezeMeshes: boolean
defines if meshes should be frozen (true by default)
Optional keepFrustumCulling: boolean
defines if you want to keep running the frustum clipping (false by default)
Returns Scene
the current scene
freeze MaterialsSearch playground for freezeMaterials
Freeze all materials A frozen material will not be updatable but should be faster to render Note: multimaterials will not be frozen, but their submaterials will
Returns void
get Active BonesSearch playground for getActiveBones
Gets the total number of active bones rendered per frame
Returns number
the total number of active bones rendered per frame
get Active IndicesSearch playground for getActiveIndices
Gets the total number of active indices rendered per frame (You can deduce the number of rendered triangles by dividing this number by 3)
Returns number
the total number of active indices rendered per frame
get Active MeshesSearch playground for getActiveMeshes
Gets the array of active meshes
Returns SmartArray<AbstractMesh>
an array of AbstractMesh
get Active ParticlesSearch playground for getActiveParticles
Gets the total number of active particles rendered per frame
Returns number
the total number of active particles rendered per frame
get All Animatables By TargetSearch playground for getAllAnimatablesByTarget
Gets all animatables associated with a given target
Parameters
target: any
defines the target to look animatables for
Returns Animatable[]
an array of Animatables
get Animatable By TargetSearch playground for getAnimatableByTarget
Gets the animatable associated with a specific target
Parameters
target: any
defines the target of the animatable
Returns Nullable<Animatable>
the required animatable if found
get Animation Group By NameSearch playground for getAnimationGroupByName
get an animation group using its name
Parameters
name: string
defines the material's name
Returns Nullable<AnimationGroup>
the animation group or null if none found.
get Animation RatioSearch playground for getAnimationRatio
Gets the animation ratio (which is 1.0 is the scene renders at 60fps and 2 if the scene renders at 30fps, etc.)
Returns number
a number
get Auto Clear Depth Stencil SetupSearch playground for getAutoClearDepthStencilSetup
Gets the current auto clear configuration for one rendering group of the rendering manager.
Parameters
index: number
the rendering group index to get the information for
Returns IRenderingManagerAutoClearSetup
The auto clear setup for the requested rendering group
get Bone ByIDSearch playground for getBoneByID
get Bone By IdSearch playground for getBoneById
get Bone By NameSearch playground for getBoneByName
get Bounding Box RendererSearch playground for getBoundingBoxRenderer
Gets the bounding box renderer associated with the scene
Returns BoundingBoxRenderer
a BoundingBoxRenderer
get Cached EffectSearch playground for getCachedEffect
get Cached MaterialSearch playground for getCachedMaterial
get Cached VisibilitySearch playground for getCachedVisibility
Gets the cached visibility state (ie. the latest rendered one)
Returns Nullable<number>
the cached visibility state
get Camera ByIDSearch playground for getCameraByID
get Camera By IdSearch playground for getCameraById
get Camera By NameSearch playground for getCameraByName
get Camera By UniqueIDSearch playground for getCameraByUniqueID
get Camera By Unique IdSearch playground for getCameraByUniqueId
get Cameras By TagsSearch playground for getCamerasByTags
get Class NameSearch playground for getClassName
Gets a string identifying the name of the class
Returns string
"Scene" string
get EngineSearch playground for getEngine
Gets the engine associated with the scene
Returns Engine
an Engine
get External DataSearch playground for getExternalData
Get an externally attached data from its key
Type Parameters
T
Parameters
key: string
the unique key that identifies the data
Returns Nullable<T>
the associated data, if present (can be null), or undefined if not present
get Frame IdSearch playground for getFrameId
Gets an unique Id for the current frame
Returns number
a number
get GeometriesSearch playground for getGeometries
Gets the list of geometries attached to the scene
Returns Geometry[]
an array of Geometry
get Geometry ByIDSearch playground for getGeometryByID
get Geometry By IdSearch playground for getGeometryById
get Glow Layer By NameSearch playground for getGlowLayerByName
get Highlight Layer By NameSearch playground for getHighlightLayerByName
Return a the first highlight layer of the scene with a given name.
Parameters
name: string
The name of the highlight layer to look for.
Returns Nullable<HighlightLayer>
The highlight layer if found otherwise null.
get Internal StepSearch playground for getInternalStep
Gets the internal step used by deterministic lock step
Returns number
the internal step
get Last Entry ByIDSearch playground for getLastEntryByID
get Last Entry By IdSearch playground for getLastEntryById
get Last Material ByIDSearch playground for getLastMaterialByID
get Last Material By IdSearch playground for getLastMaterialById
get Last Mesh ByIDSearch playground for getLastMeshByID
Gets a the last added mesh using a given Id
Parameters
id: string
defines the Id to search for
Returns Nullable<AbstractMesh>
the found mesh or null if not found at all.
get Last Mesh By IdSearch playground for getLastMeshById
Gets a the last added mesh using a given Id
Parameters
id: string
defines the Id to search for
Returns Nullable<AbstractMesh>
the found mesh or null if not found at all.
get Last Skeleton ByIDSearch playground for getLastSkeletonByID
get Last Skeleton By IdSearch playground for getLastSkeletonById
get Last Transform Node By IdSearch playground for getLastTransformNodeById
Gets a the last transform node using a given Id
Parameters
id: string
defines the Id to search for
Returns Nullable<TransformNode>
the found mesh or null if not found at all.
get Lens Flare System ByIDSearch playground for getLensFlareSystemByID
Gets a lens flare system using its Id
Parameters
id: string
defines the Id to look for
Returns Nullable<LensFlareSystem>
the lens flare system or null if not found
get Lens Flare System By IdSearch playground for getLensFlareSystemById
Gets a lens flare system using its Id
Parameters
id: string
defines the Id to look for
Returns Nullable<LensFlareSystem>
the lens flare system or null if not found
get Lens Flare System By NameSearch playground for getLensFlareSystemByName
Gets a lens flare system using its name
Parameters
name: string
defines the name to look for
Returns Nullable<LensFlareSystem>
the lens flare system or null if not found
get Light ByIDSearch playground for getLightByID
get Light By IdSearch playground for getLightById
get Light By NameSearch playground for getLightByName
get Light By UniqueIDSearch playground for getLightByUniqueID
get Light By Unique IdSearch playground for getLightByUniqueId
get Lights By TagsSearch playground for getLightsByTags
get Material ByIDSearch playground for getMaterialByID
get Material By IdSearch playground for getMaterialById
get Material By NameSearch playground for getMaterialByName
get Material By TagsSearch playground for getMaterialByTags
get Material By UniqueIDSearch playground for getMaterialByUniqueID
get Mesh ByIDSearch playground for getMeshByID
Gets the first added mesh found of a given Id
Parameters
id: string
defines the Id to search for
Returns Nullable<AbstractMesh>
the mesh found or null if not found at all
get Mesh By IdSearch playground for getMeshById
Gets the first added mesh found of a given Id
Parameters
id: string
defines the Id to search for
Returns Nullable<AbstractMesh>
the mesh found or null if not found at all
get Mesh By NameSearch playground for getMeshByName
Gets a mesh using a given name
Parameters
name: string
defines the name to search for
Returns Nullable<AbstractMesh>
the found mesh or null if not found at all.
get Mesh By UniqueIDSearch playground for getMeshByUniqueID
Gets a mesh with its auto-generated unique Id
Parameters
uniqueId: number
defines the unique Id to search for
Returns Nullable<AbstractMesh>
the found mesh or null if not found at all.
get Mesh By Unique IdSearch playground for getMeshByUniqueId
Gets a mesh with its auto-generated unique Id
Parameters
uniqueId: number
defines the unique Id to search for
Returns Nullable<AbstractMesh>
the found mesh or null if not found at all.
get Meshes ByIDSearch playground for getMeshesByID
Gets a list of meshes using their Id
Parameters
id: string
defines the Id to search for
Returns AbstractMesh[]
a list of meshes
get Meshes By IdSearch playground for getMeshesById
Gets a list of meshes using their Id
Parameters
id: string
defines the Id to search for
Returns AbstractMesh[]
a list of meshes
get Meshes By TagsSearch playground for getMeshesByTags
Get a list of meshes by tags
Parameters
tagsQuery: string
defines the tags query to use
Optional filter: ((mesh: AbstractMesh) => boolean)
defines a predicate used to filter results
Parameters
mesh: AbstractMesh
Returns boolean
Returns Mesh[]
an array of Mesh
get Morph Target By IdSearch playground for getMorphTargetById
Gets a morph target using a given id (if many are found, this function will pick the first one)
Parameters
id: string
defines the id to search for
Returns Nullable<MorphTarget>
the found morph target or null if not found at all.
get Morph Target By NameSearch playground for getMorphTargetByName
Gets a morph target using a given name (if many are found, this function will pick the first one)
Parameters
name: string
defines the name to search for
Returns Nullable<MorphTarget>
the found morph target or null if not found at all.
get Morph Target Manager By IdSearch playground for getMorphTargetManagerById
Gets a morph target manager using a given id (if many are found, this function will pick the last one)
Parameters
id: number
defines the id to search for
Returns Nullable<MorphTargetManager>
the found morph target manager or null if not found at all.
get Node ByIDSearch playground for getNodeByID
get Node By IdSearch playground for getNodeById
get Node By NameSearch playground for getNodeByName
get NodesSearch playground for getNodes
Returns Node[]
all meshes, lights, cameras, transformNodes and bones
get Or Add External Data With FactorySearch playground for getOrAddExternalDataWithFactory
Get an externally attached data from its key, create it using a factory if it's not already present
Type Parameters
T extends Object
Parameters
key: string
the unique key that identifies the data
factory: ((k: string) => T)
the factory that will be called to create the instance if and only if it doesn't exists
Parameters
k: string
Returns T
Returns T
the associated data, can be null if the factory returned null.
get Outline RendererSearch playground for getOutlineRenderer
Gets the outline renderer associated with the scene
Returns OutlineRenderer
a OutlineRenderer
get Particle System ByIDSearch playground for getParticleSystemByID
Gets a particle system by Id
Parameters
id: string
defines the particle system Id
Returns Nullable<IParticleSystem>
the corresponding system or null if none found
get Particle System By IdSearch playground for getParticleSystemById
Gets a particle system by Id
Parameters
id: string
defines the particle system Id
Returns Nullable<IParticleSystem>
the corresponding system or null if none found
get Perf CollectorSearch playground for getPerfCollector
This method gets the performance collector belonging to the scene, which is generally shared with the inspector.
Returns PerformanceViewerCollector
the perf collector belonging to the scene.
get Physics EngineSearch playground for getPhysicsEngine
Gets the current physics engine
Returns Nullable<IPhysicsEngine>
a IPhysicsEngine or null if none attached
get Pointer Over MeshSearch playground for getPointerOverMesh
Gets the mesh under the pointer
Returns Nullable<AbstractMesh>
a Mesh or null if no mesh is under the pointer
get Pointer Over SpriteSearch playground for getPointerOverSprite
get Post Process By NameSearch playground for getPostProcessByName
Gets a post process using a given name (if many are found, this function will pick the first one)
Parameters
name: string
defines the name to search for
Returns Nullable<PostProcess>
the found post process or null if not found at all.
get Projection MatrixSearch playground for getProjectionMatrix
Gets the current projection matrix
Returns Matrix
a Matrix
get Render IdSearch playground for getRenderId
Gets an unique Id for the current render phase
Returns number
a number
get Scene Uniform BufferSearch playground for getSceneUniformBuffer
Gets the uniform buffer used to store scene data
Returns UniformBuffer
a UniformBuffer
get Skeleton By IdSearch playground for getSkeletonById
get Skeleton By NameSearch playground for getSkeletonByName
get Skeleton By Unique IdSearch playground for getSkeletonByUniqueId
get Sound By NameSearch playground for getSoundByName
get Step IdSearch playground for getStepId
Gets the step Id used by deterministic lock step
Returns number
the step Id
get Texture By NameSearch playground for getTextureByName
Gets a texture using its name
Parameters
name: string
defines the texture's name
Returns Nullable<BaseTexture>
the texture or null if none found.
get Texture By UniqueIDSearch playground for getTextureByUniqueID
Get a texture using its unique id
Parameters
uniqueId: number
defines the texture's unique id
Returns Nullable<BaseTexture>
the texture or null if none found.
get Texture By Unique IdSearch playground for getTextureByUniqueId
Get a texture using its unique id
Parameters
uniqueId: number
defines the texture's unique id
Returns Nullable<BaseTexture>
the texture or null if none found.
get Total VerticesSearch playground for getTotalVertices
Gets the total number of vertices rendered per frame
Returns number
the total number of vertices rendered per frame
get Transform MatrixSearch playground for getTransformMatrix
Gets the current transform matrix
Returns Matrix
a Matrix made of View * Projection
get Transform Node ByIDSearch playground for getTransformNodeByID
Gets the first added transform node found of a given Id
Parameters
id: string
defines the Id to search for
Returns Nullable<TransformNode>
the found transform node or null if not found at all.
get Transform Node By IdSearch playground for getTransformNodeById
Gets the first added transform node found of a given Id
Parameters
id: string
defines the Id to search for
Returns Nullable<TransformNode>
the found transform node or null if not found at all.
get Transform Node By NameSearch playground for getTransformNodeByName
Gets a transform node using a given name
Parameters
name: string
defines the name to search for
Returns Nullable<TransformNode>
the found transform node or null if not found at all.
get Transform Node By UniqueIDSearch playground for getTransformNodeByUniqueID
Gets a transform node with its auto-generated unique Id
Parameters
uniqueId: number
defines the unique Id to search for
Returns Nullable<TransformNode>
the found transform node or null if not found at all.
get Transform Node By Unique IdSearch playground for getTransformNodeByUniqueId
Gets a transform node with its auto-generated unique Id
Parameters
uniqueId: number
defines the unique Id to search for
Returns Nullable<TransformNode>
the found transform node or null if not found at all.
get Transform Nodes ByIDSearch playground for getTransformNodesByID
Gets a list of transform nodes using their Id
Parameters
id: string
defines the Id to search for
Returns TransformNode[]
a list of transform nodes
get Transform Nodes By IdSearch playground for getTransformNodesById
Gets a list of transform nodes using their Id
Parameters
id: string
defines the Id to search for
Returns TransformNode[]
a list of transform nodes
get Transform Nodes By TagsSearch playground for getTransformNodesByTags
Get a list of transform nodes by tags
Parameters
tagsQuery: string
defines the tags query to use
Optional filter: ((transform: TransformNode) => boolean)
defines a predicate used to filter results
Parameters
transform: TransformNode
Returns boolean
Returns TransformNode[]
an array of TransformNode
get Unique IdSearch playground for getUniqueId
Gets an unique (relatively to the current scene) Id
Returns number
an unique number for the scene
get View MatrixSearch playground for getViewMatrix
Gets the current view matrix
Returns Matrix
a Matrix
get Waiting Items CountSearch playground for getWaitingItemsCount
Returns the number of items waiting to be loaded
Returns number
the number of items waiting to be loaded
get World ExtendsSearch playground for getWorldExtends
Get the world extend vectors with an optional filter
Parameters
Optional filterPredicate: ((mesh: AbstractMesh) => boolean)
the predicate - which meshes should be included when calculating the world size
Parameters
mesh: AbstractMesh
Returns boolean
Returns { max: Vector3; min: Vector3 }
min and max vectors
increment Render IdSearch playground for incrementRenderId
Call this function if you want to manually increment the render Id
Returns void
is Active MeshSearch playground for isActiveMesh
Gets a boolean indicating if the given mesh is active
Parameters
mesh: AbstractMesh
defines the mesh to look for
Returns boolean
true if the mesh is in the active list
is Cached Material InvalidSearch playground for isCachedMaterialInvalid
Gets a boolean indicating if the current material / effect / visibility must be bind again
Parameters
material: Material
defines the current material
effect: Effect
defines the current effect
Optional visibility: number
defines the current visibility state
Returns boolean
true if one parameter is not cached
is Physics EnabledSearch playground for isPhysicsEnabled
Gets a boolean indicating if there is an active physics engine
Returns boolean
a boolean indicating if there is an active physics engine
is Pointer CapturedSearch playground for isPointerCaptured
Gets a boolean indicating if the current pointer event is captured (meaning that the scene has already handled the pointer down)
Parameters
Optional pointerId: number
defines the pointer id to use in a multi-touch scenario (0 by default)
Returns boolean
true if the pointer was captured
is ReadySearch playground for isReady
This function will check if the scene can be rendered (textures are loaded, shaders are compiled) Delay loaded resources are not taking in account
Parameters
Optional checkRenderTargets: boolean
true to also check that the meshes rendered as part of a render target are ready (default: true)
Returns boolean
true if all required resources are ready
mark All Materials As DirtySearch playground for markAllMaterialsAsDirty
Will flag all materials as dirty to trigger new shader compilation
Parameters
flag: number
defines the flag used to specify which material part must be marked as dirty
Optional predicate: ((mat: Material) => boolean)
If not null, it will be used to specify if a material has to be marked as dirty
Parameters
mat: Material
Returns boolean
Returns void
multi PickSearch playground for multiPick
Launch a ray to try to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides, irrespective of orientation.
Parameters
x: number
X position on screen
y: number
Y position on screen
Optional predicate: ((mesh: AbstractMesh) => boolean)
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
Parameters
mesh: AbstractMesh
Returns boolean
Optional camera: Camera
camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
Optional trianglePredicate: TrianglePickingPredicate
defines an optional predicate used to select faces when a mesh intersection is detected
Returns Nullable<PickingInfo[]>
an array of PickingInfo
multi Pick SpriteSearch playground for multiPickSprite
Launch a ray to try to pick sprites in the scene
Parameters
x: number
position on screen
y: number
position on screen
Optional predicate: ((sprite: Sprite) => boolean)
Predicate function used to determine eligible sprites. Can be set to null. In this case, a sprite must have isPickable set to true
Parameters
sprite: Sprite
Returns boolean
Optional camera: Camera
camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
Returns Nullable<PickingInfo[]>
a PickingInfo array
multi Pick Sprite With RaySearch playground for multiPickSpriteWithRay
Use the given ray to pick sprites in the scene
Parameters
ray: Ray
The ray (in world space) to use to pick meshes
Optional predicate: ((sprite: Sprite) => boolean)
Predicate function used to determine eligible sprites. Can be set to null. In this case, a sprite must have isPickable set to true
Parameters
sprite: Sprite
Returns boolean
Optional camera: Camera
camera to use. Can be set to null. In this case, the scene.activeCamera will be used
Returns Nullable<PickingInfo[]>
a PickingInfo array
multi Pick With RaySearch playground for multiPickWithRay
Launch a ray to try to pick a mesh in the scene
Parameters
ray: Ray
Ray to use
Optional predicate: ((mesh: AbstractMesh) => boolean)
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
Parameters
mesh: AbstractMesh
Returns boolean
Optional trianglePredicate: TrianglePickingPredicate
defines an optional predicate used to select faces when a mesh intersection is detected
Returns Nullable<PickingInfo[]>
an array of PickingInfo
pickSearch playground for pick
Launch a ray to try to pick a mesh in the scene
Parameters
x: number
position on screen
y: number
position on screen
Optional predicate: ((mesh: AbstractMesh) => boolean)
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
Parameters
mesh: AbstractMesh
Returns boolean
Optional fastCheck: boolean
defines if the first intersection will be used (and not the closest)
Optional camera: Nullable<Camera>
to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
Optional trianglePredicate: TrianglePickingPredicate
defines an optional predicate used to select faces when a mesh intersection is detected
Returns PickingInfo
a PickingInfo
pick SpriteSearch playground for pickSprite
Launch a ray to try to pick a sprite in the scene
Parameters
x: number
position on screen
y: number
position on screen
Optional predicate: ((sprite: Sprite) => boolean)
Predicate function used to determine eligible sprites. Can be set to null. In this case, a sprite must have isPickable set to true
Parameters
sprite: Sprite
Returns boolean
Optional fastCheck: boolean
defines if the first intersection will be used (and not the closest)
Optional camera: Camera
camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
Returns Nullable<PickingInfo>
a PickingInfo
pick Sprite With RaySearch playground for pickSpriteWithRay
Use the given ray to pick a sprite in the scene
Parameters
ray: Ray
The ray (in world space) to use to pick meshes
Optional predicate: ((sprite: Sprite) => boolean)
Predicate function used to determine eligible sprites. Can be set to null. In this case, a sprite must have isPickable set to true
Parameters
sprite: Sprite
Returns boolean
Optional fastCheck: boolean
defines if the first intersection will be used (and not the closest)
Optional camera: Camera
camera to use. Can be set to null. In this case, the scene.activeCamera will be used
Returns Nullable<PickingInfo>
a PickingInfo
pick With Bounding InfoSearch playground for pickWithBoundingInfo
Launch a ray to try to pick a mesh in the scene using only bounding information of the main mesh (not using submeshes)
Parameters
x: number
position on screen
y: number
position on screen
Optional predicate: ((mesh: AbstractMesh) => boolean)
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
Parameters
mesh: AbstractMesh
Returns boolean
Optional fastCheck: boolean
defines if the first intersection will be used (and not the closest)
Optional camera: Nullable<Camera>
to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
Returns Nullable<PickingInfo>
a PickingInfo (Please note that some info will not be set like distance, bv, bu and everything that cannot be capture by only using bounding infos)
pick With RaySearch playground for pickWithRay
Use the given ray to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides, irrespective of orientation.
Parameters
ray: Ray
The ray to use to pick meshes
Optional predicate: ((mesh: AbstractMesh) => boolean)
Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true
Parameters
mesh: AbstractMesh
Returns boolean
Optional fastCheck: boolean
defines if the first intersection will be used (and not the closest)
Optional trianglePredicate: TrianglePickingPredicate
defines an optional predicate used to select faces when a mesh intersection is detected
Returns Nullable<PickingInfo>
a PickingInfo
push GeometrySearch playground for pushGeometry
Add a new geometry to this scene
Parameters
geometry: Geometry
defines the geometry to be added to the scene.
Optional force: boolean
defines if the geometry must be pushed even if a geometry with this id already exists
Returns boolean
a boolean defining if the geometry was added or not
register After RenderSearch playground for registerAfterRender
Registers a function to be called after every frame render
Parameters
func: (() => void)
defines the function to register
Returns void
Returns void
register Before RenderSearch playground for registerBeforeRender
Registers a function to be called before every frame render
Parameters
func: (() => void)
defines the function to register
Returns void
Returns void
remove Action ManagerSearch playground for removeActionManager
Removes the given action manager from this scene.
Parameters
toRemove: AbstractActionManager
The action manager to remove
Returns number
The index of the removed action manager
remove AnimationSearch playground for removeAnimation
Remove a animation for the list of scene's animations
Parameters
toRemove: Animation
defines the animation to remove
Returns number
the index where the animation was in the animation list
remove Animation GroupSearch playground for removeAnimationGroup
Removes the given animation group from this scene.
Parameters
toRemove: AnimationGroup
The animation group to remove
Returns number
The index of the removed animation group
remove CameraSearch playground for removeCamera
Remove a camera for the list of scene's cameras
Parameters
toRemove: Camera
defines the camera to remove
Returns number
the index where the camera was in the camera list
remove Effect LayerSearch playground for removeEffectLayer
Removes the given effect layer from this scene.
Parameters
toRemove: EffectLayer
defines the effect layer to remove
Returns number
the index of the removed effect layer
remove External DataSearch playground for removeExternalData
Remove an externally attached data from the Engine instance
Parameters
key: string
the unique key that identifies the data
Returns boolean
true if the data was successfully removed, false if it doesn't exist
remove GeometrySearch playground for removeGeometry
Removes an existing geometry
Parameters
geometry: Geometry
defines the geometry to be removed from the scene
Returns boolean
a boolean defining if the geometry was removed or not
remove Lens Flare SystemSearch playground for removeLensFlareSystem
Removes the given lens flare system from this scene.
Parameters
toRemove: LensFlareSystem
The lens flare system to remove
Returns number
The index of the removed lens flare system
remove LightSearch playground for removeLight
Remove a light for the list of scene's lights
Parameters
toRemove: Light
defines the light to remove
Returns number
the index where the light was in the light list
remove MaterialSearch playground for removeMaterial
Removes the given material from this scene.
Parameters
toRemove: Material
The material to remove
Returns number
The index of the removed material
remove MeshSearch playground for removeMesh
Remove a mesh for the list of scene's meshes
Parameters
toRemove: AbstractMesh
defines the mesh to remove
Optional recursive: boolean
if all child meshes should also be removed from the scene
Returns number
the index where the mesh was in the mesh list
Represents a scene to be rendered by the engine.
https://doc.babylonjs.com/features/featuresDeepDive/scene