Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
babylon.cellMaterial.js
babylon.cellMaterial.js.map
babylon.cellMaterial.min.js
babylon.customMaterial.js
babylon.customMaterial.js.map
babylon.customMaterial.min.js
babylon.fireMaterial.js
babylon.fireMaterial.js.map
babylon.fireMaterial.min.js
babylon.furMaterial.js
babylon.furMaterial.js.map
babylon.furMaterial.min.js
babylon.gradientMaterial.js
babylon.gradientMaterial.js.map
babylon.gradientMaterial.min.js
babylon.gridMaterial.js
babylon.gridMaterial.js.map
babylon.gridMaterial.min.js
babylon.lavaMaterial.js
babylon.lavaMaterial.js.map
babylon.lavaMaterial.min.js
babylon.mixMaterial.js
babylon.mixMaterial.js.map
babylon.mixMaterial.min.js
babylon.normalMaterial.js
babylon.normalMaterial.js.map
babylon.normalMaterial.min.js
babylon.shadowOnlyMaterial.js
babylon.shadowOnlyMaterial.js.map
babylon.shadowOnlyMaterial.min.js
babylon.simpleMaterial.js
babylon.simpleMaterial.js.map
babylon.simpleMaterial.min.js
babylon.skyMaterial.js
babylon.skyMaterial.js.map
babylon.skyMaterial.min.js
babylon.terrainMaterial.js
babylon.terrainMaterial.js.map
babylon.terrainMaterial.min.js
babylon.triPlanarMaterial.js
babylon.triPlanarMaterial.js.map
babylon.triPlanarMaterial.min.js
babylon.waterMaterial.js
babylon.waterMaterial.js.map
babylon.waterMaterial.min.js
babylonjs.materials.d.ts
babylonjs.materials.js
babylonjs.materials.js.map
babylonjs.materials.min.js
babylonjs.materials.module.d.ts
package.json
readme-es6.md
readme.md

readme.md

Babylon.js Materials Library

For usage documentation please visit http://doc.babylonjs.com/extensions and choose "materials library".

Installation instructions

CDN

Compiled js files (minified and source) are offered on our public CDN here:

NPM

To install using npm :

npm install --save babylonjs babylonjs-materials

If using TypeScript, the typing needs to be added to tsconfig.json:

    ....
    "types": [
        "babylonjs",
        "babylonjs-materials",
        "oneMoreDependencyThatIReallyNeed"
    ],
    ....

Afterwards it can be imported to the project using:

import * as BABYLON from 'babylonjs';
import 'babylonjs-materials';

This will extend Babylon's namespace with the materials available:

// Some awesome code
let skyMaterial = new BABYLON.SkyMaterial("skyMaterial", scene);
skyMaterial.backFaceCulling = false;
// Some more awesome code

Using webpack to package your project will use the minified js file.

You can’t perform that action at this time.