extensions

Simple Pine Generator


Table of contents

Simple Pine Tree Generator

Generated Tree

The function simplePineGenerator uses a tube to generate a tree.

It is based on playgrounds from this forum topic http://www.html5gamedevs.com/topic/21484-simple-pine-trees/

A demo can be found at: https://www.babylonjs-playground.com/#LG3GS#106 -


How to use it.

Clone or copy the file https://github.com/BabylonJS/Extensions/tree/master/TreeGenerators/SimplePineGenerator

call the function

var tree = simplePineGenerator(canopies, height, trunkMaterial, leafMaterial, scene);

Parameters

canopies - number of leaf sections.

height - height of tree.

trunkMaterial - material used for trunk.

leafMaterial - material for canopies.

scene - BABYLON scene.