AssetContainer

Container with a set of assets that can be added or removed from a scene.

Hierarchy

Index

Constructors

constructor

Find examples in Playground
  • Instantiates an AssetContainer.

    Parameters

    • scene: Scene

      The scene the AssetContainer belongs to.

    Returns AssetContainer

Properties

actionManagers

Find examples in Playground
actionManagers: ActionManager[]

ActionManagers available on the scene.

animationGroups

Find examples in Playground
animationGroups: AnimationGroup[]

All of the animation groups added to this scene

see

http://doc.babylonjs.com/how_to/group

animations

Find examples in Playground
animations: Animation[]

Gets a list of Animations associated with the scene

cameras

Find examples in Playground
cameras: Camera[]

All of the cameras added to this scene

see

http://doc.babylonjs.com/babylon101/cameras

effectLayers

Find examples in Playground
effectLayers: Array<EffectLayer>

The list of effect layers (highlights/glow) added to the scene

see

http://doc.babylonjs.com/how_to/highlight_layer

see

http://doc.babylonjs.com/how_to/glow_layer

geometries

Find examples in Playground
geometries: Geometry[]

The list of geometries used in the scene.

layers

Find examples in Playground
layers: Array<Layer>

The list of layers (background and foreground) of the scene

lensFlareSystems

Find examples in Playground
lensFlareSystems: Array<LensFlareSystem>

The list of lens flare system added to the scene

see

http://doc.babylonjs.com/how_to/how_to_use_lens_flares

lights

Find examples in Playground
lights: Light[]

All of the lights added to this scene

see

http://doc.babylonjs.com/babylon101/lights

materials

Find examples in Playground
materials: Material[]

All of the materials added to this scene

see

http://doc.babylonjs.com/babylon101/materials

meshes

Find examples in Playground
meshes: AbstractMesh[]

All of the (abstract) meshes added to this scene

morphTargetManagers

Find examples in Playground
morphTargetManagers: MorphTargetManager[]

The list of morph target managers added to the scene

see

http://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh

multiMaterials

Find examples in Playground
multiMaterials: MultiMaterial[]

All of the multi-materials added to this scene

see

http://doc.babylonjs.com/how_to/multi_materials

particleSystems

Find examples in Playground
particleSystems: IParticleSystem[]

All of the particle systems added to this scene

see

http://doc.babylonjs.com/babylon101/particles

proceduralTextures

Find examples in Playground
proceduralTextures: Array<ProceduralTexture>

The list of procedural textures added to the scene

see

http://doc.babylonjs.com/how_to/how_to_use_procedural_textures

rootNodes

Find examples in Playground
rootNodes: Node[]

Gets the list of root nodes (ie. nodes with no parent)

scene

Find examples in Playground
scene: Scene

The scene the AssetContainer belongs to.

skeletons

Find examples in Playground
skeletons: Skeleton[]

The list of skeletons added to the scene

see

http://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons

sounds

Find examples in Playground
sounds: Nullable<Array<Sound>>

The list of sounds used in the scene.

textures

Find examples in Playground
textures: BaseTexture[]

Textures to keep.

transformNodes

Find examples in Playground
transformNodes: TransformNode[]

All of the tranform nodes added to this scene

see

http://doc.babylonjs.com/how_to/transformnode

Methods

addAllToScene

Find examples in Playground
  • addAllToScene(): void
  • Adds all the assets from the container to the scene.

    Returns void

addEffectLayer

Find examples in Playground

addLensFlareSystem

Find examples in Playground

createRootMesh

Find examples in Playground
  • createRootMesh(): Mesh
  • 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

getGlowLayerByName

Find examples in Playground
  • 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<GlowLayer>

    The highlight layer if found otherwise null.

getHighlightLayerByName

Find examples in Playground

getLensFlareSystemByID

Find examples in Playground

getLensFlareSystemByName

Find examples in Playground

moveAllFromScene

Find examples in Playground
  • 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

removeAllFromScene

Find examples in Playground
  • removeAllFromScene(): void
  • Removes all the assets in the container from the scene

    Returns void

removeEffectLayer

Find examples in Playground
  • 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

removeLensFlareSystem

Find examples in Playground

Static AddIndividualParser

Find examples in Playground

Static AddParser

Find examples in Playground
  • 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 GetIndividualParser

Find examples in Playground

Static GetParser

Find examples in Playground

Static Parse

Find examples in Playground
  • 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

Generated using TypeDoc