babylon-voxel-clouds
v1.0.0
Published
Clouds for Babylon.js
Downloads
5
Maintainers
Readme
Babylon Voxel Clouds
Voxel clouds for Babylon.js
Clouds for Babylon.js.
Best when used with Noa-Engine.
Example
let cloud_generator = require('babylon-voxel-clouds')();
// If the block is above the clouds level and below the maximum clouds altitude, then set it
if (y >= clouds_generator.get_cloud_level() && y <= clouds_generator.get_cloud_altitude()) {
let cloud = clouds_generator.get_cloud_index(x, y, z);
if (y < clouds_generator.get_cloud_level() + 10) {
cloud *= (y - clouds_generator.get_cloud_level()) / 10;
}
if (cloud > clouds_generator.get_cloud_cutoff()) {
// SET BLOCK AS CLOUD
block.set(x, y, z, 'cloud');
}
}
Run the Example
git clone git://github.com/Nesh108/babylon-voxel-clouds && cd babylon-voxel-clouds
npm install
npm start
Install
With npm do:
npm install --save babylon-voxel-clouds
Release History
- 1.0.0 - initial release
License
Copyright (c) 2017 Nesh108
Licensed under the MIT license.