InstancedLinesMesh

Creates an instance based on a source LinesMesh

Hierarchy

Index

Constructors

constructor

Find examples in Playground

Properties

_positions

Find examples in Playground
_positions: Nullable<Vector3[]>

instancedBuffers

Find examples in Playground
instancedBuffers: object

Object used to store instanced buffers defined by user

see

https://doc.babylonjs.com/how_to/how_to_use_instances#custom-buffers

Type declaration

  • [key: string]: any

intersectionThreshold

Find examples in Playground
intersectionThreshold: number

The intersection Threshold is the margin applied when intersection a segment of the LinesMesh with a Ray. This margin is expressed in world space coordinates, so its value may vary. Initilized with the intersectionThreshold value of the source LinesMesh

isAnInstance

Find examples in Playground
isAnInstance: boolean

lightSources

Find examples in Playground
lightSources: Light[]

Gets the list of lights affecting that mesh

material

Find examples in Playground
material: Nullable<Material>

The material of the source mesh

receiveShadows

Find examples in Playground
receiveShadows: boolean

If the source mesh receives shadows

renderingGroupId

Find examples in Playground
renderingGroupId: number

Rendering ground id of the source mesh

skeleton

Find examples in Playground
skeleton: Nullable<Skeleton>

Skeleton of the source mesh

sourceMesh

Find examples in Playground
sourceMesh: Mesh

The source mesh of the instance

visibility

Find examples in Playground
visibility: number

Visibility of the source mesh

Methods

_removeLightSource

Find examples in Playground
  • _removeLightSource(light: Light, dispose: boolean): void

_resyncLighSource

Find examples in Playground
  • _resyncLighSource(light: Light): void

_resyncLightSources

Find examples in Playground
  • _resyncLightSources(): void

clone

Find examples in Playground
  • Creates a new InstancedMesh from the current mesh.

    • name (string) : the cloned mesh name
    • newParent (optional Node) : the optional Node to parent the clone to.
    • doNotCloneChildren (optional boolean, default false) : if true the model children aren't cloned.

    Returns the clone.

    Parameters

    • name: string
    • Optional newParent: Nullable<Node>
    • Optional doNotCloneChildren: boolean

    Returns Nullable<AbstractMesh>

dispose

Find examples in Playground
  • dispose(doNotRecurse?: boolean, disposeMaterialAndTextures?: boolean): void
  • Disposes the InstancedMesh. Returns nothing.

    Parameters

    • Optional doNotRecurse: boolean
    • Optional disposeMaterialAndTextures: boolean

    Returns void

enableEdgesRendering

Find examples in Playground
  • enableEdgesRendering(epsilon?: number, checkVerticesInsteadOfIndices?: boolean): InstancedLinesMesh
  • Enables the edge rendering mode on the mesh. This mode makes the mesh edges visible

    see

    https://www.babylonjs-playground.com/#19O9TU#0

    Parameters

    • Optional epsilon: number

      defines the maximal distance between two angles to detect a face

    • Optional checkVerticesInsteadOfIndices: boolean

      indicates that we should check vertex list directly instead of faces

    Returns InstancedLinesMesh

    the current InstancedLinesMesh

getClassName

Find examples in Playground
  • getClassName(): string

getIndices

Find examples in Playground

getLOD

Find examples in Playground

getTotalIndices

Find examples in Playground
  • getTotalIndices(): number
  • Returns a positive integer : the total number of indices in this mesh geometry.

    Returns number

    the numner of indices or zero if the mesh has no geometry.

getTotalVertices

Find examples in Playground
  • getTotalVertices(): number

getVerticesData

Find examples in Playground
  • Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.

    Parameters

    • kind: string

      kind of verticies to retreive (eg. positons, normals, uvs, etc.)

    • Optional copyWhenShared: boolean

      If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.

    Returns Nullable<FloatArray>

    a float array or a Float32Array of the requested kind of data : positons, normals, uvs, etc.

getWorldMatrix

Find examples in Playground

isReady

Find examples in Playground
  • isReady(completeCheck?: boolean): boolean
  • Is this node ready to be used/rendered

    Parameters

    • Optional completeCheck: boolean

      defines if a complete check (including materials and lights) has to be done (false by default)

    Returns boolean

    is it ready

isVerticesDataPresent

Find examples in Playground
  • isVerticesDataPresent(kind: string): boolean

refreshBoundingInfo

Find examples in Playground
  • This method recomputes and sets a new BoundingInfo to the mesh unless it is locked. This means the mesh underlying bounding box and sphere are recomputed.

    Parameters

    • Optional applySkeleton: boolean

      defines whether to apply the skeleton before computing the bounding info

    Returns InstancedMesh

    the current mesh

setIndices

Find examples in Playground
  • Sets the mesh indices. Expects an array populated with integers or a typed array (Int32Array, Uint32Array, Uint16Array). If the mesh has no geometry, a new Geometry object is created and set to the mesh. This method creates a new index buffer each call. Returns the Mesh.

    Parameters

    Returns Mesh

setVerticesData

Find examples in Playground
  • Sets the vertex data of the mesh geometry for the requested kind. If the mesh has no geometry, a new Geometry object is set to the mesh and then passed this vertex data. The data are either a numeric array either a Float32Array. The parameter updatable is passed as is to the underlying Geometry object constructor (if initianilly none) or updater. The parameter stride is an optional positive integer, it is usually automatically deducted from the kind (3 for positions or normals, 2 for UV, etc). Note that a new underlying VertexBuffer object is created each call. If the kind is the PositionKind, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed.

    Possible kind values :

    • VertexBuffer.PositionKind
    • VertexBuffer.UVKind
    • VertexBuffer.UV2Kind
    • VertexBuffer.UV3Kind
    • VertexBuffer.UV4Kind
    • VertexBuffer.UV5Kind
    • VertexBuffer.UV6Kind
    • VertexBuffer.ColorKind
    • VertexBuffer.MatricesIndicesKind
    • VertexBuffer.MatricesIndicesExtraKind
    • VertexBuffer.MatricesWeightsKind
    • VertexBuffer.MatricesWeightsExtraKind

    Returns the Mesh.

    Parameters

    • kind: string
    • data: FloatArray
    • Optional updatable: boolean
    • Optional stride: number

    Returns AbstractMesh

updateVerticesData

Find examples in Playground
  • updateVerticesData(kind: string, data: FloatArray, updateExtends?: boolean, makeItUnique?: boolean): Mesh
  • Updates the existing vertex data of the mesh geometry for the requested kind. If the mesh has no geometry, it is simply returned as it is. The data are either a numeric array either a Float32Array. No new underlying VertexBuffer object is created. If the kind is the PositionKind and if updateExtends is true, the mesh BoundingInfo is renewed, so the bounding box and sphere, and the mesh World Matrix is recomputed. If the parameter makeItUnique is true, a new global geometry is created from this positions and is set to the mesh.

    Possible kind values :

    • VertexBuffer.PositionKind
    • VertexBuffer.UVKind
    • VertexBuffer.UV2Kind
    • VertexBuffer.UV3Kind
    • VertexBuffer.UV4Kind
    • VertexBuffer.UV5Kind
    • VertexBuffer.UV6Kind
    • VertexBuffer.ColorKind
    • VertexBuffer.MatricesIndicesKind
    • VertexBuffer.MatricesIndicesExtraKind
    • VertexBuffer.MatricesWeightsKind
    • VertexBuffer.MatricesWeightsExtraKind

    Returns the Mesh.

    Parameters

    • kind: string
    • data: FloatArray
    • Optional updateExtends: boolean
    • Optional makeItUnique: boolean

    Returns Mesh

Generated using TypeDoc