geo-asterisk
Creates a 2d asterisk type shape in 3d space
Last updated 6 years ago by mikkoh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install geo-asterisk 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.3                                ...           latest (6 years ago)

2 Versions

  • 1.0.3                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |