Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Primitives for 3D Rendering

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages