Function CreateDecal
-
CreateDecal(
name: string,
sourceMesh: AbstractMesh,
options: {
angle?: number;
captureUVS?: boolean;
cullBackFaces?: boolean;
localMode?: boolean;
normal?: Vector3;
position?: Vector3;
size?: Vector3;
},
): MeshParameters
- name: string
defines the name of the mesh
- sourceMesh: AbstractMesh
defines the mesh where the decal must be applied
- options: {
angle?: number;
captureUVS?: boolean;
cullBackFaces?: boolean;
localMode?: boolean;
normal?: Vector3;
position?: Vector3;
size?: Vector3;
}defines the options used to create the mesh
Returns Mesh
the decal mesh
- name: string
Creates a decal mesh. A decal is a mesh usually applied as a model onto the surface of another mesh. So don't forget the parameter
sourceMeshdepicting the decalposition(Vector3, default(0, 0, 0)) sets the position of the decal in World coordinatesnormal(Vector3, defaultVector3.Up) sets the normal of the mesh where the decal is applied onto in World coordinatessize(Vector3, default(1, 1, 1)) sets the decal scalingangle(float in radian, default 0) sets the angle to rotate the decalcaptureUVSdefines if we need to capture the uvs or compute themcullBackFacesdefines if the back faces should be removed from the decal meshlocalModedefines that the computations should be done with the local mesh coordinates instead of the world space coordinates.