extensions

Brick


Brick Procedural texture

Brick Procedural texture

Using the Brick procedural texture

Brick procedural texture can be found here:

A demo can be found here: https://www.babylonjs-playground.com/#1CL0BO -


This texture has 4 parameters :

  • numberOfBricksHeight controls the number of bricks in height (Int)
  • numberOfBricksWidth controls the number of bricks in width (Int)
  • jointColor changes the color for the joint between bricks (BABYLON.Color3/4)
  • brickColor changes the color for the brick itself (BABYLON.Color3/4)
    var brickMaterial = new BABYLON.StandardMaterial(name, scene);
    var brickTexture = new BABYLON.BrickProceduralTexture(name + "text", 512, scene);
    brickTexture.numberOfBricksHeight = 6;
    brickTexture.numberOfBricksWidth = 10;
    brickMaterial.diffuseTexture = brickTexture;