Skip to content

mikkoh/geo-star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Creates a 2d star type shape in 3d space

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published