|
9 years ago | |
---|---|---|
.. | ||
babylon.fireMaterial.ts | 9 years ago | |
fire.fragment.fx | 9 years ago | |
fire.vertex.fx | 9 years ago | |
readme.md | 9 years ago |
The fire material works with 3 textures:
Note: The fire material doesn't work with lighting. So, shadow maps are also disabled.
var fireMaterial = new BABYLON.FireMaterial("fireMaterial", scene);
fireMaterial.diffuseTexture = new BABYLON.Texture("diffuse.png", scene);
fireMaterial.distortionTexture = new BABYLON.Texture("distortion.png", scene);
fireMaterial.opacityTexture = new BABYLON.Texture("opacity.png", scene);
var plane = BABYLON.Mesh.CreatePlane("fireplane", 1.0, scene);
plane.material = fire;
The speed of fire flames can be customized like:
fireMaterial.speed = 5.0; // Default is 1.0