@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
144 lines (143 loc) • 5.72 kB
TypeScript
import type { Nullable } from "./types.js";
import type { AbstractMesh } from "./Meshes/abstractMesh.js";
import type { TransformNode } from "./Meshes/transformNode.js";
import type { Geometry } from "./Meshes/geometry.js";
import type { Skeleton } from "./Bones/skeleton.js";
import type { MorphTargetManager } from "./Morph/morphTargetManager.js";
import type { IParticleSystem } from "./Particles/IParticleSystem.js";
import type { AnimationGroup } from "./Animations/animationGroup.js";
import type { BaseTexture } from "./Materials/Textures/baseTexture.js";
import type { Material } from "./Materials/material.js";
import type { MultiMaterial } from "./Materials/multiMaterial.js";
import type { AbstractActionManager } from "./Actions/abstractActionManager.js";
import type { Camera } from "./Cameras/camera.js";
import type { Light } from "./Lights/light.js";
import type { Node } from "./node.js";
import type { PostProcess } from "./PostProcesses/postProcess.js";
import type { Animation } from "./Animations/animation.js";
import type { Sound } from "./Audio/sound.js";
import type { Layer } from "./Layers/layer.js";
import type { EffectLayer } from "./Layers/effectLayer.js";
import type { ReflectionProbe } from "./Probes/reflectionProbe.js";
import type { LensFlareSystem } from "./LensFlares/lensFlareSystem.js";
import type { ProceduralTexture } from "./Materials/Textures/Procedurals/proceduralTexture.js";
/**
* Interface defining container for the different elements composing a scene.
* This class is dynamically extended by the different components of the scene increasing
* flexibility and reducing coupling
*/
export interface IAssetContainer {
/**
* Gets the list of root nodes (ie. nodes with no parent)
*/
rootNodes: Node[];
/** All of the cameras added to this scene
* @see https://doc.babylonjs.com/features/featuresDeepDive/cameras
*/
cameras: Camera[];
/**
* All of the lights added to this scene
* @see https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction
*/
lights: Light[];
/**
* All of the (abstract) meshes added to this scene
*/
meshes: AbstractMesh[];
/**
* The list of skeletons added to the scene
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons
*/
skeletons: Skeleton[];
/**
* All of the particle systems added to this scene
* @see https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro
*/
particleSystems: IParticleSystem[];
/**
* Gets a list of Animations associated with the scene
*/
animations: Animation[];
/**
* All of the animation groups added to this scene
* @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations
*/
animationGroups: AnimationGroup[];
/**
* All of the multi-materials added to this scene
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials
*/
multiMaterials: MultiMaterial[];
/**
* 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
*/
materials: Material[];
/**
* The list of morph target managers added to the scene
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph
*/
morphTargetManagers: MorphTargetManager[];
/**
* The list of geometries used in the scene.
*/
geometries: Geometry[];
/**
* 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
*/
transformNodes: TransformNode[];
/**
* ActionManagers available on the scene.
* @deprecated
*/
actionManagers: AbstractActionManager[];
/**
* Textures to keep.
*/
textures: 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.
*/
environmentTexture: Nullable<BaseTexture>;
/**
* The list of postprocesses added to the scene
*/
postProcesses: PostProcess[];
/**
* The list of sound added to the scene
*/
sounds: Nullable<Sound[]>;
/**
* The list of effect layers added to the scene
*/
effectLayers: EffectLayer[];
/**
* The list of layers added to the scene
*/
layers: Layer[];
/**
* The list of reflection probes added to the scene
*/
reflectionProbes: ReflectionProbe[];
/**
* The list of lens flare system added to the scene
*/
lensFlareSystems: LensFlareSystem[];
/**
* The list of procedural textures added to the scene
*/
proceduralTextures: ProceduralTexture[];
/**
* @returns all meshes, lights, cameras, transformNodes and bones
*/
getNodes(): Array<Node>;
}