@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.
53 lines (52 loc) • 2.09 kB
TypeScript
import { NodeMaterialBlock } from "../../nodeMaterialBlock.js";
import { type NodeMaterialBuildState } from "../../nodeMaterialBuildState.js";
import { NodeMaterialBlockTargets } from "../../Enums/nodeMaterialBlockTargets.js";
import { type NodeMaterialConnectionPoint } from "../../nodeMaterialBlockConnectionPoint.js";
import { type Effect } from "../../../effect.js";
import { type NodeMaterial, type NodeMaterialDefines } from "../../nodeMaterial.js";
import { type Mesh } from "../../../../Meshes/mesh.js";
import { type AbstractMesh } from "../../../../Meshes/abstractMesh.js";
/**
* Block used to implement clip planes
*/
export declare class ClipPlanesBlock extends NodeMaterialBlock {
/**
* Create a new ClipPlanesBlock
* @param name defines the block name
*/
constructor(name: string);
/**
* Gets the current class name
* @returns the class name
*/
getClassName(): string;
/**
* Initialize the block and prepare the context for build
* @param state defines the state that will be used for the build
*/
initialize(state: NodeMaterialBuildState): void;
private _initShaderSourceAsync;
/**
* Gets the worldPosition input component
*/
get worldPosition(): NodeMaterialConnectionPoint;
/** {@inheritDoc} */
get target(): NodeMaterialBlockTargets;
/** {@inheritDoc} */
set target(value: NodeMaterialBlockTargets);
/**
* Prepares the shader defines related to clip planes for the given mesh
* @param defines - the material defines
* @param nodeMaterial - the node material
* @param mesh - the mesh to prepare for
*/
prepareDefines(defines: NodeMaterialDefines, nodeMaterial: NodeMaterial, mesh?: AbstractMesh): void;
/**
* Bind data to effect
* @param effect - the effect to bind to
* @param nodeMaterial - the node material
* @param mesh - the mesh to bind for
*/
bind(effect: Effect, nodeMaterial: NodeMaterial, mesh?: Mesh): void;
protected _buildBlock(state: NodeMaterialBuildState): this | undefined;
}