Skip to main content

Class: PlumAssetContainer

Defined in: packages/core/sdk/src/manager/PlumAssetContainer.ts:7

Extends

  • AssetContainer

Constructors

Constructor

new PlumAssetContainer(viewer): PlumAssetContainer

Defined in: packages/core/sdk/src/manager/PlumAssetContainer.ts:10

Parameters

viewer

Viewer

Returns

PlumAssetContainer

Overrides

AssetContainer.constructor

Properties

_environmentTexture

protected _environmentTexture: BaseTexture

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:108

Internal

Inherited from

AssetContainer._environmentTexture


actionManagers

actionManagers: AbstractActionManager[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:102

ActionManagers available on the scene.

Deprecated

Inherited from

AssetContainer.actionManagers


animationGroups

animationGroups: AnimationGroup[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:67

All of the animation groups added to this scene

See

https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations

Inherited from

AssetContainer.animationGroups


animations

animations: Animation[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:62

Gets a list of Animations associated with the scene

Inherited from

AssetContainer.animations


cameras

cameras: Camera[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:39

All of the cameras added to this scene

See

https://doc.babylonjs.com/features/featuresDeepDive/cameras

Inherited from

AssetContainer.cameras


effectLayers

effectLayers: EffectLayer[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:127

The list of effect layers added to the scene

Inherited from

AssetContainer.effectLayers


geometries

geometries: Geometry[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:89

The list of geometries used in the scene.

Inherited from

AssetContainer.geometries


layers

layers: Layer[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:131

The list of layers added to the scene

Inherited from

AssetContainer.layers


lensFlareSystems

lensFlareSystems: LensFlareSystem[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:139

The list of lens flare systems added to the scene

Inherited from

AssetContainer.lensFlareSystems


lights

lights: Light[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:44

All of the lights added to this scene

See

https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction

Inherited from

AssetContainer.lights


materials

materials: Material[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:80

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.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction

Inherited from

AssetContainer.materials


meshes

meshes: AbstractMesh[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:48

All of the (abstract) meshes added to this scene

Inherited from

AssetContainer.meshes


morphTargetManagers

morphTargetManagers: MorphTargetManager[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:85

The list of morph target managers added to the scene

See

https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph

Inherited from

AssetContainer.morphTargetManagers


multiMaterials

multiMaterials: MultiMaterial[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:72

All of the multi-materials added to this scene

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials

Inherited from

AssetContainer.multiMaterials


particleSystems

particleSystems: IParticleSystem[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:58

All of the particle systems added to this scene

See

https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro

Inherited from

AssetContainer.particleSystems


postProcesses

postProcesses: PostProcess[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:119

The list of postprocesses added to the scene

Inherited from

AssetContainer.postProcesses


proceduralTextures

proceduralTextures: ProceduralTexture[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:143

The list of procedural textures added to the scene

Inherited from

AssetContainer.proceduralTextures


reflectionProbes

reflectionProbes: ReflectionProbe[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:135

The list of reflection probes added to the scene

Inherited from

AssetContainer.reflectionProbes


rootNodes

rootNodes: Node[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:35

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

Inherited from

AssetContainer.rootNodes


scene

scene: Scene

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:184

The scene the AssetContainer belongs to.

Inherited from

AssetContainer.scene


skeletons

skeletons: Skeleton[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:53

The list of skeletons added to the scene

See

https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons

Inherited from

AssetContainer.skeletons


sounds

sounds: Sound[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:123

The list of sounds

Inherited from

AssetContainer.sounds


textures

textures: BaseTexture[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:106

Textures to keep.

Inherited from

AssetContainer.textures


transformNodes

transformNodes: TransformNode[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:97

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.

See

https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/transform_node

Inherited from

AssetContainer.transformNodes


viewer

viewer: Viewer

Defined in: packages/core/sdk/src/manager/PlumAssetContainer.ts:8

Accessors

environmentTexture

Get Signature

get environmentTexture(): BaseTexture

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:114

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

BaseTexture

Set Signature

set environmentTexture(value): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:115

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

BaseTexture

Returns

void

Inherited from

AssetContainer.environmentTexture

Methods

addAllAssetsToContainer()

addAllAssetsToContainer(root): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:275

Parameters

root

Node

root node

Returns

void

Since

6.26.0 Given a root asset, this method will traverse its hierarchy and add it, its children and any materials/skeletons/animation groups to the container.

Inherited from

AssetContainer.addAllAssetsToContainer


addAllToScene()

addAllToScene(): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:225

Adds all the assets from the container to the scene.

Returns

void

Inherited from

AssetContainer.addAllToScene


addToScene()

addToScene(predicate?): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:230

Adds assets from the container to the scene.

Parameters

predicate?

(entity) => boolean

defines a predicate used to select which entity will be added (can be null)

Returns

void

Inherited from

AssetContainer.addToScene


createRootMesh()

createRootMesh(): Mesh

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:254

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

Inherited from

AssetContainer.createRootMesh


dispose()

dispose(): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:243

Disposes all the assets in the container

Returns

void

Inherited from

AssetContainer.dispose


getCamerasByTags()

getCamerasByTags(tagsQuery, filter?): Camera[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:297

Get a list of cameras by tags

Parameters

tagsQuery

string

defines the tags query to use

filter?

(camera) => boolean

defines a predicate used to filter results

Returns

Camera[]

an array of Camera

Inherited from

AssetContainer.getCamerasByTags


getLightsByTags()

getLightsByTags(tagsQuery, filter?): Light[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:304

Get a list of lights by tags

Parameters

tagsQuery

string

defines the tags query to use

filter?

(light) => boolean

defines a predicate used to filter results

Returns

Light[]

an array of Light

Inherited from

AssetContainer.getLightsByTags


getMaterialsByTags()

getMaterialsByTags(tagsQuery, filter?): Material[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:311

Get a list of materials by tags

Parameters

tagsQuery

string

defines the tags query to use

filter?

(material) => boolean

defines a predicate used to filter results

Returns

Material[]

an array of Material

Inherited from

AssetContainer.getMaterialsByTags


getMeshesByTags()

getMeshesByTags(tagsQuery, filter?): AbstractMesh[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:290

Get a list of meshes by tags

Parameters

tagsQuery

string

defines the tags query to use

filter?

(mesh) => boolean

defines a predicate used to filter results

Returns

AbstractMesh[]

an array of Mesh

Inherited from

AssetContainer.getMeshesByTags


getNodes()

getNodes(): Node[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:147

Returns

Node[]

all meshes, lights, cameras, transformNodes and bones

Inherited from

AssetContainer.getNodes


getTransformNodesByTags()

getTransformNodesByTags(tagsQuery, filter?): TransformNode[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:318

Get a list of transform nodes by tags

Parameters

tagsQuery

string

defines the tags query to use

filter?

(transform) => boolean

defines a predicate used to filter results

Returns

TransformNode[]

an array of TransformNode

Inherited from

AssetContainer.getTransformNodesByTags


instantiateModelsToScene()

instantiateModelsToScene(nameFunction?, cloneMaterials?, options?): InstantiatedEntries

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:218

Instantiate or clone all meshes and add the new ones to the scene. Skeletons and animation groups will all be cloned

Parameters

nameFunction?

(sourceName) => string

defines an optional function used to get new names for clones

cloneMaterials?

boolean

defines an optional boolean that defines if materials must be cloned as well (false by default)

options?

defines an optional list of options to control how to instantiate / clone models

doNotInstantiate?

boolean | (node) => boolean

defines if the model must be instantiated or just cloned

predicate?

(entity) => boolean

defines a predicate used to filter whih mesh to instantiate/clone

Returns

InstantiatedEntries

a list of rootNodes, skeletons and animation groups that were duplicated

Inherited from

AssetContainer.instantiateModelsToScene


mergeAnimationsTo()

mergeAnimationsTo(scene, animatables, targetConverter?): AnimationGroup[]

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:262

Merge animations (direct and animation groups) from this asset container into a scene

Parameters

scene

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

targetConverter?

(target) => 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)

Inherited from

AssetContainer.mergeAnimationsTo


moveAllFromScene()

moveAllFromScene(keepAssets?): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:249

Removes all the assets contained in the scene and adds them to the container.

Parameters

keepAssets?

KeepAssets

Set of assets to keep in the scene. (default: empty)

Returns

void

Inherited from

AssetContainer.moveAllFromScene


populateRootNodes()

populateRootNodes(): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:269

Returns

void

Since

6.15.0 This method checks for any node that has no parent and is not in the rootNodes array, and adds the node there, if so.

Inherited from

AssetContainer.populateRootNodes


removeAllFromScene()

removeAllFromScene(): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:234

Removes all the assets in the container from the scene

Returns

void

Inherited from

AssetContainer.removeAllFromScene


removeFromScene()

removeFromScene(predicate?): void

Defined in: node_modules/@babylonjs/core/assetContainer.d.ts:239

Removes assets in the container from the scene

Parameters

predicate?

(entity) => boolean

defines a predicate used to select which entity will be added (can be null)

Returns

void

Inherited from

AssetContainer.removeFromScene