babylon-voxel-clouds

1.0.0 • Public • Published

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 (>= clouds_generator.get_cloud_level() && y  <= clouds_generator.get_cloud_altitude()) {
    let cloud = clouds_generator.get_cloud_index(x, y, z);
    if (< clouds_generator.get_cloud_level() + 10) {
        cloud *= (- 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

  1. git clone git://github.com/Nesh108/babylon-voxel-clouds && cd babylon-voxel-clouds
  2. npm install
  3. 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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    0

Package Sidebar

Install

npm i babylon-voxel-clouds

Weekly Downloads

0

Version

1.0.0

License

none

Last publish

Collaborators

  • nesh108