1.0.1 • Published 9 years ago

geo-star v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

geo-star

render experimental

Creates a 2d star type shape in 3d space.

Usage

NPM

Example

An example can be found at ./test/index.js. You can run this test by calling:

$ npm test

A simple usage example with default values being passed as settings:

var geoStar = require('geo-star');

// geo will be a Object will two properties:
// positions - the vertices
// cells - the indices to draw the star
var geo = geoStar( {
    cellSize: 3, // 1 == points, 2 == lines, 3 == triangles
    x: 0, // x position of the center of the star
    y: 0, // y position of the center of the star
    z: 0, // z position of the center of the star
    startRadian: 0, // this will rotate the star
    innerRadius: 50, // inner radius of the star
    outerRadius: 140, // the outer radius for the star
    numSlices: 10 // how many "points" there will be on the star
});

License

MIT, see LICENSE.md for details.