Class AssetContainer
Hierarchy
- AbstractScene
- AssetContainer
Index
Constructors
Properties
- action
Managers - animation
Groups - animations
- cameras
- effect
Layers - fluid
Renderer - geometries
- layers
- lens
Flare Systems - lights
- materials
- meshes
- morph
Target Managers - multi
Materials - particle
Systems - post
Processes - pre
Pass Renderer - procedural
Textures - reflection
Probes - root
Nodes - scene
- skeletons
- sounds
- sub
Surface Configuration - textures
- transform
Nodes
Accessors
Methods
- add
All To Scene - add
Effect Layer - add
Lens Flare System - add
Reflection Probe - add
To Scene - create
Root Mesh - disable
Fluid Renderer - disable
Pre Pass Renderer - disable
Sub Surface For Pre Pass - dispose
- enable
Fluid Renderer - enable
Pre Pass Renderer - enable
Sub Surface For Pre Pass - get
Glow Layer By Name - get
Highlight Layer By Name - get
Lens Flare System ByID - get
Lens Flare System By Id - get
Lens Flare System By Name - get
Nodes - instantiate
Models To Scene - merge
Animations To - move
All From Scene - remove
All From Scene - remove
Effect Layer - remove
From Scene - remove
Lens Flare System - remove
Reflection Probe - Add
Individual Parser - Add
Parser - Get
Individual Parser - Get
Parser - Parse
Constructors
constructor
Instantiates an AssetContainer.
Parameters
Returns AssetContainer
Properties
action ManagersSearch playground for actionManagers
ActionManagers available on the scene.
animation GroupsSearch playground for animationGroups
All of the animation groups added to this scene
animationsSearch playground for animations
Gets a list of Animations associated with the scene
camerasSearch playground for cameras
All of the cameras added to this scene
effect LayersSearch playground for effectLayers
The list of effect layers (highlights/glow) added to the scene
fluid RendererSearch playground for fluidRenderer
Gets or Sets the fluid renderer associated to the scene.
geometriesSearch playground for geometries
The list of geometries used in the scene.
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
lightsSearch playground for lights
All of the lights added to this scene
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
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
particle SystemsSearch playground for particleSystems
All of the particle systems added to this scene
post ProcessesSearch playground for postProcesses
The list of postprocesses added to the scene
pre Pass RendererSearch playground for prePassRenderer
Gets or Sets the current prepass renderer associated to the scene.
procedural TexturesSearch playground for proceduralTextures
The list of procedural textures added to the scene
reflection ProbesSearch playground for reflectionProbes
The list of reflection probes added to the scene
root NodesSearch playground for rootNodes
Gets the list of root nodes (ie. nodes with no parent)
sceneSearch playground for scene
The scene the AssetContainer belongs to.
skeletonsSearch playground for skeletons
The list of skeletons added to the scene
soundsSearch playground for sounds
The list of sounds used in the 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.
Accessors
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 reference from here than from all the materials.
Parameters
value: Nullable<BaseTexture>
Returns void
Methods
add All To SceneSearch playground for addAllToScene
Adds all the assets from the container to the scene.
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 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 Reflection ProbeSearch playground for addReflectionProbe
Adds the given reflection probe to this scene.
Parameters
newReflectionProbe: ReflectionProbe
The reflection probe to add
Returns void
add To SceneSearch playground for addToScene
Adds assets from the container to the scene.
Parameters
Optional predicate: Nullable<((entity: any) => boolean)>
defines a predicate used to select which entity will be added (can be null)
Returns void
create Root MeshSearch playground for createRootMesh
Adds all meshes in the asset container to a root mesh that can be used to position all the contained meshes. The root mesh is then added to the front of the meshes in the assetContainer.
Returns Mesh
the root mesh
disable Fluid RendererSearch playground for disableFluidRenderer
Disables the fluid renderer 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
Disposes all the assets in the container
Returns void
enable Fluid RendererSearch playground for enableFluidRenderer
Enables the fluid renderer and associates it with the scene
Returns Nullable<FluidRenderer>
the FluidRenderer
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
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 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 NodesSearch playground for getNodes
Returns Node[]
all meshes, lights, cameras, transformNodes and bones
instantiate Models To SceneSearch playground for instantiateModelsToScene
Instantiate or clone all meshes and add the new ones to the scene. Skeletons and animation groups will all be cloned
Parameters
Optional nameFunction: ((sourceName: string) => string)
defines an optional function used to get new names for clones
Parameters
sourceName: string
Returns string
Optional cloneMaterials: boolean
defines an optional boolean that defines if materials must be cloned as well (false by default)
Optional options: { doNotInstantiate?: boolean | ((node: Node) => boolean); predicate?: any }
defines an optional list of options to control how to instantiate / clone models
Optional do
Not Instantiate?: boolean | ((node: Node) => boolean) defines if the model must be instantiated or just cloned
predicate?:function
defines a predicate used to filter whih mesh to instantiate/clone
Parameters
entity: any
Returns boolean
Returns InstantiatedEntries
a list of rootNodes, skeletons and animation groups that were duplicated
merge Animations ToSearch playground for mergeAnimationsTo
Merge animations (direct and animation groups) from this asset container into a scene
Parameters
scene: undefined | Nullable<Scene>
is the instance of BABYLON.Scene to append to (default: last created scene)
animatables: Animatable[]
set of animatables to retarget to a node from the scene
Optional targetConverter: Nullable<((target: any) => Nullable<Node>)>
defines a function used to convert animation targets from the asset container to the scene (default: search node by name)
Returns AnimationGroup[]
an array of the new AnimationGroup added to the scene (empty array if none)
move All From SceneSearch playground for moveAllFromScene
Removes all the assets contained in the scene and adds them to the container.
Parameters
Optional keepAssets: KeepAssets
Set of assets to keep in the scene. (default: empty)
Returns void
remove All From SceneSearch playground for removeAllFromScene
Removes all the assets in the container from the scene
Returns void
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 From SceneSearch playground for removeFromScene
Removes assets in the container from the scene
Parameters
Optional predicate: Nullable<((entity: any) => boolean)>
defines a predicate used to select which entity will be added (can be null)
Returns void
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 Reflection ProbeSearch playground for removeReflectionProbe
Removes the given reflection probe from this scene.
Parameters
toRemove: ReflectionProbe
The reflection probe to remove
Returns number
The index of the removed reflection probe
Static Add Individual ParserSearch playground for AddIndividualParser
Adds n individual parser in the list of available ones
Parameters
name: string
Defines the name of the parser
parser: IndividualBabylonFileParser
Defines the parser to add
Returns void
Static Add ParserSearch playground for AddParser
Adds a parser in the list of available ones
Parameters
name: string
Defines the name of the parser
parser: BabylonFileParser
Defines the parser to add
Returns void
Static Get Individual ParserSearch playground for GetIndividualParser
Gets an individual parser from the list of available ones
Parameters
name: string
Defines the name of the parser
Returns Nullable<IndividualBabylonFileParser>
the requested parser or null
Static Get ParserSearch playground for GetParser
Gets a general parser from the list of available ones
Parameters
name: string
Defines the name of the parser
Returns Nullable<BabylonFileParser>
the requested parser or null
Static ParseSearch playground for Parse
Parser json data and populate both a scene and its associated container object
Parameters
jsonData: any
Defines the data to parse
scene: Scene
Defines the scene to parse the data for
container: AssetContainer
Defines the container attached to the parsing sequence
rootUrl: string
Defines the root url of the data
Returns void
Container with a set of assets that can be added or removed from a scene.