Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace BABYLON

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

BabylonFileParser

BabylonFileParser: (parsedData: any, scene: Scene, container: AssetContainer, rootUrl: string) => void

Defines how the parser contract is defined. These parsers are used to parse a list of specific assets (like particle systems, etc..)

Type declaration

CameraStageAction

CameraStageAction: (camera: Camera) => void

Strong typing of a Camera related stage step action

Type declaration

    • Parameters

      Returns void

CameraStageFrameBufferAction

CameraStageFrameBufferAction: (camera: Camera) => boolean

Strong typing of a Camera Frame buffer related stage step action

Type declaration

    • Parameters

      Returns boolean

DataArray

DataArray: number[] | ArrayBuffer | ArrayBufferView

Alias for types that can be used by a Buffer or VertexBuffer.

DeepImmutable

DeepImmutable<T>: T extends Primitive ? T : T extends Array<infer U> ? DeepImmutableArray<U> : DeepImmutableObject<T>

Type modifier to make all the properties of an object Readonly recursively

Type parameters

  • T

DeepImmutableObject

DeepImmutableObject<T>: {}

Type modifier to make object properties readonly.

Type parameters

  • T

Type declaration

DeviceInput

DeviceInput<T>: T extends Keyboard | Generic ? number : T extends Mouse | Touch ? PointerInput : T extends DualShock ? DualShockInput : T extends Xbox ? XboxInput : T extends Switch ? SwitchInput : never

Type to handle enforcement of inputs

Type parameters

EvaluateSubMeshStageAction

EvaluateSubMeshStageAction: (mesh: AbstractMesh, subMesh: SubMesh) => void

Strong typing of a Evaluate Sub Mesh related stage step action

Type declaration

FloatArray

FloatArray: number[] | Float32Array

Alias type for number array or Float32Array

IFresnelParametersCreationOptions

IFresnelParametersCreationOptions: { bias?: number; isEnabled?: boolean; leftColor?: Color3; power?: number; rightColor?: Color3 }

Options to be used when creating a FresnelParameters.

Type declaration

  • Optional bias?: number

    Define bias applied to computed fresnel term

  • Optional isEnabled?: boolean

    Define if the fresnel effect is enable or not.

  • Optional leftColor?: Color3

    Define the color used on edges (grazing angle)

  • Optional power?: number

    Defined the power exponent applied to fresnel term

  • Optional rightColor?: Color3

    Define the color used on center

IFresnelParametersSerialized

IFresnelParametersSerialized: { bias: number; isEnabled: boolean; leftColor: number[]; power?: number; rightColor: number[] }

Serialized format for FresnelParameters.

Type declaration

  • bias: number

    Define bias applied to computed fresnel term

  • isEnabled: boolean

    Define if the fresnel effect is enable or not.

  • leftColor: number[]

    Define the color used on edges (grazing angle) [as an array]

  • Optional power?: number

    Defined the power exponent applied to fresnel term

  • rightColor: number[]

    Define the color used on center [as an array]

Immutable

Immutable<T>: T extends Primitive ? T : T extends Array<infer U> ? ReadonlyArray<U> : DeepImmutable<T>

Type modifier to make all the properties of an object Readonly

Type parameters

  • T

IndicesArray

IndicesArray: number[] | Int32Array | Uint32Array | Uint16Array

Alias type for number array or Float32Array or Int32Array or Uint32Array or Uint16Array

IndividualBabylonFileParser

IndividualBabylonFileParser: (parsedData: any, scene: Scene, rootUrl: string) => any

Defines how the individual parser contract is defined. These parser can parse an individual asset

Type declaration

    • (parsedData: any, scene: Scene, rootUrl: string): any
    • Parameters

      • parsedData: any
      • scene: Scene
      • rootUrl: string

      Returns any

MeshLoadOptions

MeshLoadOptions: { ComputeNormals: boolean; ImportVertexColors: boolean; InvertTextureY: boolean; InvertY: boolean; MaterialLoadingFailsSilently: boolean; OptimizeWithUV: boolean; SkipMaterials: boolean; UVScaling: Vector2 }

Options for loading OBJ/MTL files

Type declaration

  • ComputeNormals: boolean

    Compute the normals for the model, even if normals are present in the file.

  • ImportVertexColors: boolean

    Include in meshes the vertex colors available in some OBJ files. This is not part of OBJ standard.

  • InvertTextureY: boolean

    Invert Y-Axis of referenced textures on load

  • InvertY: boolean

    Invert model on y-axis (does a model scaling inversion)

  • MaterialLoadingFailsSilently: boolean

    When a material fails to load OBJ loader will silently fail and onSuccess() callback will be triggered.

  • OptimizeWithUV: boolean

    Defines if UVs are optimized by default during load.

  • SkipMaterials: boolean

    Skip loading the materials even if defined in the OBJ file (materials are ignored).

  • UVScaling: Vector2

    Defines custom scaling of UV coordinates of loaded meshes.

MeshStageAction

MeshStageAction: (mesh: AbstractMesh, hardwareInstancedRendering: boolean) => boolean

Strong typing of a Mesh related stage step action

Type declaration

    • (mesh: AbstractMesh, hardwareInstancedRendering: boolean): boolean
    • Parameters

      Returns boolean

MotionControllerComponentStateType

MotionControllerComponentStateType: "default" | "touched" | "pressed"

The state of a controller component

MotionControllerComponentType

MotionControllerComponentType: "trigger" | "squeeze" | "touchpad" | "thumbstick" | "button"

The type of components available in motion controllers. This is not the name of the component.

MotionControllerConstructor

MotionControllerConstructor: (xrInput: XRInputSource, scene: Scene) => WebXRAbstractMotionController

A construction function type to create a new controller based on an xrInput object

Type declaration

MotionControllerHandedness

MotionControllerHandedness: "none" | "left" | "right"

Handedness type in xrInput profiles. These can be used to define layouts in the Layout Map.

NodeConstructor

NodeConstructor: (name: string, scene: Scene, options?: any) => () => Node

Defines how a node can be built from a string name.

Type declaration

    • (name: string, scene: Scene, options?: any): () => Node
    • Parameters

      • name: string
      • scene: Scene
      • Optional options: any

      Returns () => Node

Nullable

Nullable<T>: T | null

Alias type for value that can be null

Type parameters

  • T

PointerMoveStageAction

PointerMoveStageAction: (unTranslatedPointerX: number, unTranslatedPointerY: number, pickResult: Nullable<PickingInfo>, isMeshPicked: boolean, element: HTMLElement) => Nullable<PickingInfo>

Strong typing of a pointer move action.

Type declaration

PointerUpDownStageAction

PointerUpDownStageAction: (unTranslatedPointerX: number, unTranslatedPointerY: number, pickResult: Nullable<PickingInfo>, evt: PointerEvent) => Nullable<PickingInfo>

Strong typing of a pointer up/down action.

Type declaration

PostProcessOptions

PostProcessOptions: { height: number; width: number }

Size options for a post process

Type declaration

  • height: number
  • width: number

PreActiveMeshStageAction

PreActiveMeshStageAction: (mesh: AbstractMesh) => void

Strong typing of a pre active Mesh related stage step action

Type declaration

Primitive

Primitive: undefined | null | boolean | string | number | Function

Alias type for primitive types

ignorenaming

RenderTargetStageAction

RenderTargetStageAction: (renderTarget: RenderTargetTexture) => void

Strong typing of a Render Target related stage step action

Type declaration

RenderTargetTextureSize

RenderTargetTextureSize: number | { height: number; layers?: number; width: number }

Type used to define a render target texture size (either with a number or with a rect width and height)

RenderTargetsStageAction

RenderTargetsStageAction: (renderTargets: SmartArrayNoDuplicate<RenderTargetTexture>) => void

Strong typing of a render target action.

Type declaration

RenderingGroupStageAction

RenderingGroupStageAction: (renderingGroupId: number) => void

Strong typing of a RenderingGroup related stage step action

Type declaration

    • (renderingGroupId: number): void
    • Parameters

      • renderingGroupId: number

      Returns void

RenderingMeshStageAction

RenderingMeshStageAction: (mesh: Mesh, subMesh: SubMesh, batch: _InstancesBatch, effect: Nullable<Effect>) => void

Strong typing of a Mesh Render related stage step action

Type declaration

SceneLoaderSuccessCallback

SceneLoaderSuccessCallback: (meshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[], transformNodes: TransformNode[], geometries: Geometry[], lights: Light[]) => void

Type used for the success callback of ImportMesh

Type declaration

SimpleStageAction

SimpleStageAction: () => void

Strong typing of a simple stage step action

Type declaration

    • (): void
    • Returns void

TrianglePickingPredicate

TrianglePickingPredicate: (p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray) => boolean

Type used to define predicate used to select faces when a mesh intersection is detected

Type declaration

WebXRFeatureConstructor

WebXRFeatureConstructor: (xrSessionManager: WebXRSessionManager, options?: any) => () => IWebXRFeature

Defining the constructor of a feature. Used to register the modules.

Type declaration

double

double: number

Alias type for number that are doubles.

ignorenaming

float

float: number

Alias type for number that are floats

ignorenaming

int

int: number

Alias type for number that are integer

ignorenaming

Variables

Let Epsilon

Epsilon: number

Constant used to define the minimal number value in Babylon.js

ignorenaming

Const ToGammaSpace

ToGammaSpace: number

Constant used to convert a value to gamma space

ignorenaming

Const ToLinearSpace

ToLinearSpace: 2.2 = 2.2

Constant used to convert a value to linear space

ignorenaming

Functions

className

  • className(name: string, module?: string): (target: Object) => void
  • Use this className as a decorator on a given class definition to add it a name and optionally its module. You can then use the Tools.getClassName(obj) on an instance to retrieve its class name. This method is the only way to get it done in all cases, even if the .js file declaring the class is minified

    Parameters

    • name: string

      The name of the class, case should be preserved

    • Optional module: string

      The name of the Module hosting the class, optional, but strongly recommended to specify if possible. Case should be preserved.

    Returns (target: Object) => void

      • (target: Object): void
      • Parameters

        • target: Object

        Returns void

editableInPropertyPage

  • Decorator that flags a property in a node material block as being editable

    Parameters

    Returns (target: any, propertyKey: string) => void

      • (target: any, propertyKey: string): void
      • Parameters

        • target: any
        • propertyKey: string

        Returns void

expandToProperty

  • expandToProperty(callback: string, targetKey?: Nullable<string>): (target: any, propertyKey: string) => void
  • Parameters

    • callback: string
    • Optional targetKey: Nullable<string>

    Returns (target: any, propertyKey: string) => void

      • (target: any, propertyKey: string): void
      • Parameters

        • target: any
        • propertyKey: string

        Returns void

extractMinAndMax

  • Extracts minimum and maximum values from a list of positions

    Parameters

    • positions: FloatArray

      defines the positions to use

    • start: number

      defines the start index in the positions array

    • count: number

      defines the number of positions to handle

    • Optional bias: Nullable<Vector2>

      defines bias value to add to the result

    • Optional stride: number

      defines the stride size to use (distance between two positions in the positions array)

    Returns { maximum: Vector3; minimum: Vector3 }

    minimum and maximum values

extractMinAndMaxIndexed

  • Extracts minimum and maximum values from a list of indexed positions

    Parameters

    • positions: FloatArray

      defines the positions to use

    • indices: IndicesArray

      defines the indices to the positions

    • indexStart: number

      defines the start index

    • indexCount: number

      defines the end index

    • Optional bias: Nullable<Vector2>

      defines bias value to add to the result

    Returns { maximum: Vector3; minimum: Vector3 }

    minimum and maximum values

serialize

  • serialize(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsCameraReference

  • serializeAsCameraReference(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Decorator used to define property that can be serialized as reference to a camera

    Parameters

    • Optional sourceName: string

      defines the name of the property to decorate

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsColor3

  • serializeAsColor3(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsColor4

  • serializeAsColor4(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsColorCurves

  • serializeAsColorCurves(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsFresnelParameters

  • serializeAsFresnelParameters(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsImageProcessingConfiguration

  • serializeAsImageProcessingConfiguration(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsMatrix

  • serializeAsMatrix(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsMeshReference

  • serializeAsMeshReference(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsQuaternion

  • serializeAsQuaternion(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsTexture

  • serializeAsTexture(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsVector2

  • serializeAsVector2(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

serializeAsVector3

  • serializeAsVector3(sourceName?: string): (target: any, propertyKey: string | symbol) => void
  • Parameters

    • Optional sourceName: string

    Returns (target: any, propertyKey: string | symbol) => void

      • (target: any, propertyKey: string | symbol): void
      • Parameters

        • target: any
        • propertyKey: string | symbol

        Returns void

setAndStartTimer

  • A simple version of the timer. Will take options and start the timer immediately after calling it

    Parameters

    • options: ITimerOptions<any>

      options with which to initialize this timer

    Returns Nullable<Observer<any>>

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method