Sitelet https://github.com/BabylonJS/Extensions/tree/master/TreeGenerators/QuickTreeGenerator
Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

readme.md

Quick Tree Generator

The function QuickTreeGenerator uses a sphere with randomized vertices to generate a tree.

How to use it.

After importing into your BJS project simply add

const tree = QuickTreeGenerator(sizeBranch, sizeTrunk, radius, trunkMaterial, leafMaterial);

Parameters

sizeBranch - sphere radius used for branches and leaves 15 to 20.

sizeTrunk - height of trunk 10 to 15.

radius - radius of trunk 1 to 5.

trunkMaterial - material used for trunk.

leafMaterial - material for canopies.