https://github.com/edap/leafgeometry
Low-poly palm's leaf geometry for Three.js
https://github.com/edap/leafgeometry
3d algorithmic-botany geometry threejs
Last synced: 8 months ago
JSON representation
Low-poly palm's leaf geometry for Three.js
- Host: GitHub
- URL: https://github.com/edap/leafgeometry
- Owner: edap
- License: mit
- Created: 2017-01-29T17:14:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T23:44:52.000Z (over 9 years ago)
- Last Synced: 2025-07-31T01:56:07.273Z (10 months ago)
- Topics: 3d, algorithmic-botany, geometry, threejs
- Language: JavaScript
- Homepage: http://davideprati.com/demo/LeafGeometry/
- Size: 553 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository contains a [demo](http://davideprati.com/demo/LeafGeometry) that uses the LeafGeometry.
For now it is es6 only, to use it in your project, download the file `src/LeafGeometry.js`, include it in your application and use this geometry to create a mesh, for example:
```javascript
import LeafGeometry from './leafGeometry.js';
let opt = {
length: gui.params.length,
length_stem: gui.params.length_stem,
width_stem: gui.params.width_stem,
leaf_width: gui.params.leaf_width,
leaf_up: gui.params.leaf_up,
density: gui.params.density,
curvature: gui.params.curvature,
curvature_border: gui.params.curvature_border,
leaf_inclination: gui.params.leaf_inclination
};
let geometry = new LeafGeometry(opt);
object = new THREE.Mesh(geometry, new THREE.MeshPhongMaterial({color: 0x2194CE}));
scene.add(object);
```
To try out this example, clone the repository and:
```javascript
npm install
npm start
npm build
```



