Class AssetContainer
Hierarchy
-
AbstractScene
- AssetContainer
Index
Constructors
Properties
- action
Managers - animation
Groups - animations
- cameras
- effect
Layers - 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 ToScene - add
Effect Layer - add
Lens Flare System - add
Reflection Probe - create
Root Mesh - disable
Pre Pass Renderer - disable
Sub Surface For Pre Pass - dispose
- enable
Pre Pass Renderer - enable
Sub Surface For Pre Pass - get
Glow Layer ByName - get
Highlight Layer ByName - get
Lens Flare System ByID - get
Lens Flare System ByName - get
Nodes - instantiate
Models ToScene - merge
Animations To - move
All From Scene - remove
All From Scene - remove
Effect Layer - remove
Lens Flare System - remove
Reflection Probe - Add
Individual Parser - Add
Parser - Get
Individual Parser - Get
Parser - Parse
Constructors
constructor
-
Instantiates an AssetContainer.
Parameters
-
scene: Scene
The scene the AssetContainer belongs to.
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
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 tranform nodes added to this scene In the context of a Scene, it is not supposed to be modified manually. Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods. Note also that the order of the TransformNode wihin the array is not significant and might change.
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 any
-
Methods
add All ToSceneSearch 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
-
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 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 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 ByNameSearch playground for getGlowLayerByName
get Highlight Layer ByNameSearch 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 ByNameSearch 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 Array<Node>
all meshes, lights, cameras, transformNodes and bones
instantiate Models ToSceneSearch 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)
Returns InstantiatedEntries
a list of rootNodes, skeletons and aniamtion 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: Scene | null | undefined
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 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 avaialble 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 avaialble 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.