AssetContainer

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

Hierarchy

Index

Constructors

constructor

  • Instantiates an AssetContainer.

    Parameters

    • scene: Scene

      The scene the AssetContainer belongs to.

    Returns AssetContainer

Properties

actionManagers

actionManagers: ActionManager[]

ActionManagers available on the scene.

animationGroups

animationGroups: AnimationGroup[]

All of the animation groups added to this scene

see

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

animations

animations: Animation[]

Gets a list of Animations associated with the scene

cameras

cameras: Camera[]

All of the cameras added to this scene

see

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

geometries

geometries: Geometry[]

The list of geometries used in the scene.

lights

lights: Light[]

All of the lights added to this scene

see

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

materials

materials: Material[]

All of the materials added to this scene

see

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

meshes

meshes: AbstractMesh[]

All of the (abstract) meshes added to this scene

morphTargetManagers

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

multiMaterials: MultiMaterial[]

All of the multi-materials added to this scene

see

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

particleSystems

particleSystems: IParticleSystem[]

All of the particle systems added to this scene

see

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

scene

scene: Scene

The scene the AssetContainer belongs to.

skeletons

skeletons: Skeleton[]

The list of skeletons added to the scene

see

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

sounds

sounds: Sound[]

Sounds to keep.

textures

textures: BaseTexture[]

Textures to keep.

transformNodes

transformNodes: TransformNode[]

All of the tranform nodes added to this scene

see

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

Static effectLayers

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

Static layers

layers: Array<Layer>

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

Static lensFlareSystems

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

Methods

addAllToScene

  • addAllToScene(): void
  • Adds all the assets from the container to the scene.

    Returns void

createRootMesh

  • 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

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

removeAllFromScene

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

    Returns void

Static AddIndividualParser

Static 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 GetIndividualParser

Static GetParser

Static 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

Static addEffectLayer

Static addLensFlareSystem

Static getGlowLayerByName

  • 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.

Static getHighlightLayerByName

Static getLensFlareSystemByID

Static getLensFlareSystemByName

Static 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

Static removeLensFlareSystem

Generated using TypeDoc