aframe-mountain-component
Mountain component and primitive for A-Frame.
Uses Perlin noise to create a height map, create a shaded texture from that
height map using a <canvas>
, and using the height map to create vertices on a
BufferGeometry.
Properties
Property | Description | Default Value |
---|---|---|
color | Base color of mountain. | rgb(92, 32, 0) |
shadowColor | Diffuse color of mountain. | rgb(128, 96, 96) |
sunPosition | Sun position to shade mountain. | 1, 1, 1 |
Usage
Browser Installation
Install and use by directly including the browser files:
My A-Frame Scene <!-- <a-entity mountain="color: red"></a-entity> -->
NPM Installation
Install via NPM:
npm install aframe-mountain-component
Then register and use.
;;