1.1.3 • Published 6 years ago

primitives.js v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

primitives.js

Primitives for 3D Rendering.

Install

npm install primitives.js

Usage

let meshData = window.primitives.box(1, 1, 1, {
  widthSegments: 10,
  heightSegments: 10,
  lengthSegments: 10
});

Documentation

  • Shapes
    • primitives.box(width, height, lenght, opts)
    • primitives.cone(radius, height, opts)
    • primitives.cylinder(radiusTop, radiusBottom, height, opts)
    • primitives.plane(width, length, opts)
    • primitives.quad()
    • primitives.sphere(radius, opts)
    • primitives.torus(radius, tube, opts)
  • Utils
    • primitives.wireframe(indices)
    • primitives.normals(positions, normals, length)

License

MIT © 2017 Johnny Wu

1.1.3

6 years ago

1.1.2

6 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago