API

Wood Procedural Texture

Wood Procedural texture

Using the Wood procedural texture

Wood procedural texture can be found here:

A demo can be found here: Wood Procedural Texture Demo

This texture has 2 parameters:

  • woodColor changes the color of the wood in the texture (BABYLON.Color3/4)
  • ampScale changes the wave amplitude in the wood (BABYLON.Vector2)
import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial";
import { WoodProceduralTexture } from "@babylonjs/procedural-textures/wood/woodProceduralTexture";
var woodMaterial = new StandardMaterial("woodMat", scene);
var woodTexture = new WoodProceduralTexture("woodTex", 1024, scene);
woodTexture.ampScale = 80.0;
woodMaterial.diffuseTexture = woodTexture;