geo-piecering

1.0.2 • Public • Published

geo-piecering

render experimental

Creates a ring cut into piece 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 geoPieceRing = require('geo-piecering');
 
// geo will be a Object will two properties:
// positions - the vertices
// cells - the indices to draw the piece ring
var geo = geoPieceRing( {
    cellSize: 3, // 1 == points, 2 == lines, 3 == triangles
    x: 0, // x position of the center of the piece ring
    y: 0, // y position of the center of the piece ring
    z: 0 // z position of the center of the piece ring
    radius: 200, // the radius of the piece ring
    pieceSize: Math.PI * 0.15, // size of the pieces
    startRadian: 0, // radian to start drawing pieces from
    numPieces: 8, // how many pieces to place
    quadsPerPiece: 5, // how many times the piece is split
    height: 10, // the height of the ring
    drawOutline: true // if cellSize == 2 draw only the outside of the shape 
});

License

MIT, see LICENSE.md for details.

Package Sidebar

Install

npm i geo-piecering

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • mikkoh