1.0.1 • Published 9 years ago

csg-rotate v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

csg-rotate

rotate a csg.js solid over an {x, y, z } origin by a { x, y, z } vector.

stability: experimental. expect it not to work.

install

with npm, do:

npm i --save csg-rotate

usage

var csg = require('csg')
var rotate = require('csg-rotate')

var cube = csg.cube({
  center: [0, 0, 0],
  radius: [1, 2, 3]
})
var rCube = rotate(
  // solid
  cube,
  // origin
  { x: 10, y: 10, z: 10 },
  // rotation
  { x: 90, y: 90, z: 90 }
)
console.log(JSON.stringify(rCube, null, 2))

license

ISC