@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.
63 lines (62 loc) • 2.32 kB
TypeScript
import { NodeMaterialBlock } from "../nodeMaterialBlock.js";
import type { NodeMaterialBuildState } from "../nodeMaterialBuildState.js";
import type { NodeMaterialConnectionPoint } from "../nodeMaterialBlockConnectionPoint.js";
import type { Scene } from "../../../scene.js";
import type { AbstractMesh } from "../../../Meshes/abstractMesh.js";
import type { NodeMaterial, NodeMaterialDefines } from "../nodeMaterial.js";
/**
* Block used to transform a vector (2, 3 or 4) with a matrix. It will generate a Vector4
*/
export declare class TransformBlock extends NodeMaterialBlock {
/**
* Defines the value to use to complement W value to transform it to a Vector4
*/
complementW: number;
/**
* Defines the value to use to complement z value to transform it to a Vector4
*/
complementZ: number;
/**
* Boolean indicating if the transformation is made for a direction vector and not a position vector
* If set to true the complementW value will be set to 0 else it will be set to 1
*/
get transformAsDirection(): boolean;
set transformAsDirection(value: boolean);
/**
* Creates a new TransformBlock
* @param name defines the block name
*/
constructor(name: string);
/**
* Gets the current class name
* @returns the class name
*/
getClassName(): string;
/**
* Gets the vector input
*/
get vector(): NodeMaterialConnectionPoint;
/**
* Gets the output component
*/
get output(): NodeMaterialConnectionPoint;
/**
* Gets the xyz output component
*/
get xyz(): NodeMaterialConnectionPoint;
/**
* Gets the matrix transform input
*/
get transform(): NodeMaterialConnectionPoint;
protected _buildBlock(state: NodeMaterialBuildState): this;
/**
* Update defines for shader compilation
* @param defines defines the material defines to update
* @param nodeMaterial defines the node material requesting the update
* @param mesh defines the mesh to be rendered
*/
prepareDefines(defines: NodeMaterialDefines, nodeMaterial: NodeMaterial, mesh?: AbstractMesh): void;
serialize(): any;
_deserialize(serializationObject: any, scene: Scene, rootUrl: string): void;
protected _dumpPropertiesCode(): string;
}