API

Cell material

Toon material

Cell material can be found here: https://cdn.babylonjs.com/materialsLibrary/babylon.cellMaterial.js

A demo can be found here: PG: Cell Material

You can customize some of the material's special properties:

import { Texture } from "@babylonjs/core/Materials/Textures/texture";
import { Color3 } from "@babylonjs/core/Maths/math.color";
import { CellMaterial } from "@babylonjs/materials/cell/cellMaterial";
// Create a new cell material
var cell = new CellMaterial("cell", scene);
// Set up the diffuse texture
cell.diffuseTexture = new Texture("textures/amiga.jpg", scene);
// Set up diffuse color
cell.diffuseColor = new Color3(1, 0.5, 0);
// Set the material to be high level (default value is true)
// The high level can compute until 5 different lighting levels
// If false, only two levels are available
cell.computeHighLevel = true;