API

Brick Procedural Texture

Brick Procedural texture

Using the Brick procedural texture

Brick procedural texture can be found here:

A demo can be found here: Brick Procedural Texture

This texture has 4 parameters:

  • numberOfBricksHeight controls the number of bricks vertically (Int)
  • numberOfBricksWidth controls the number of bricks horizontally (Int)
  • jointColor changes the color of the joint between bricks (BABYLON.Color3/4)
  • brickColor changes the color for the brick itself (BABYLON.Color3/4)
import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial";
import { BrickProceduralTexture } from "@babylonjs/procedural-textures/brick/brickProceduralTexture";
var brickMaterial = new StandardMaterial("brickMat", scene);
var brickTexture = new BrickProceduralTexture("brickTex", 512, scene);
brickTexture.numberOfBricksHeight = 6;
brickTexture.numberOfBricksWidth = 10;
brickMaterial.diffuseTexture = brickTexture;