@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.
67 lines (66 loc) • 2.4 kB
TypeScript
import { NodeMaterialBlock } from "../../nodeMaterialBlock.js";
import { type NodeMaterialConnectionPoint } from "../../nodeMaterialBlockConnectionPoint.js";
import { type NodeMaterialBuildState } from "../../nodeMaterialBuildState.js";
import { type AbstractMesh } from "../../../../Meshes/abstractMesh.js";
import { type NodeMaterial, type NodeMaterialDefines } from "../../nodeMaterial.js";
import { type SubMesh } from "../../../../Meshes/subMesh.js";
/**
* Block used to add support for instances
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/copies/instances
*/
export declare class InstancesBlock extends NodeMaterialBlock {
/**
* Creates a new InstancesBlock
* @param name defines the block name
*/
constructor(name: string);
/**
* Gets the current class name
* @returns the class name
*/
getClassName(): string;
/**
* Gets the first world row input component
*/
get world0(): NodeMaterialConnectionPoint;
/**
* Gets the second world row input component
*/
get world1(): NodeMaterialConnectionPoint;
/**
* Gets the third world row input component
*/
get world2(): NodeMaterialConnectionPoint;
/**
* Gets the forth world row input component
*/
get world3(): NodeMaterialConnectionPoint;
/**
* Gets the world input component
*/
get world(): NodeMaterialConnectionPoint;
/**
* Gets the output component
*/
get output(): NodeMaterialConnectionPoint;
/**
* Gets the instanceID component
*/
get instanceID(): NodeMaterialConnectionPoint;
/**
* Auto configure the block based on the material
* @param material - the node material
* @param additionalFilteringInfo - additional filtering info
*/
autoConfigure(material: NodeMaterial, additionalFilteringInfo?: (node: NodeMaterialBlock) => boolean): void;
/**
* Prepare the list of defines
* @param defines - the list of defines
* @param nodeMaterial - the node material
* @param mesh - the mesh
* @param useInstances - whether to use instances
* @param subMesh - the sub mesh
*/
prepareDefines(defines: NodeMaterialDefines, nodeMaterial: NodeMaterial, mesh?: AbstractMesh, useInstances?: boolean, subMesh?: SubMesh): void;
protected _buildBlock(state: NodeMaterialBuildState): this;
}