Skip to content

mikkoh/geo-asterisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geo-asterisk

render experimental

Creates a 2d asterisk 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 geoAsterisk = require('geo-asterisk');

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

License

MIT, see LICENSE.md for details.

About

Creates a 2d asterisk type shape in 3d space

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published