A Typescript library loosely based on three.js
threeify is a Typescript 3D library loosely based on three.js.
- Modern: Typescript, Tree Shakable, Small Build Files
- Rendering: WebGL 1, WebGL 2 (coming soon) and WebGPU (coming soon)
- Materials: Physically based materials
- Post Effects: DOF (coming soon), Motion Blur ((coming soon)), SOA (coming soon), TRAA (coming soon)
- Animation: Clips (coming soon), Mixer (coming soon)
- Assets: glTF (coming soon), Draco (coming soon) and Basis (coming soon)
- XR: Augmented Reality and Virtual Reality via WebXR (coming soon)
- Documented (TSDocs) and Tested (Jest)
In Development, Not Yet Ready for Use of Any Kind
This library is currently in alpha and in midst of significant development. It may not even compile properly. You have been warned.
Install and Import
Threeify and its modules are published on npm with full typing support. To install, use:
npm install threeify --save
yarn add threeify
This will allow you to import Threeify entirely using:
; // NOT YET SUPPORTED
or individual classes using:
This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a
WebGL renderer context for the scene and camera, and it adds that viewport to the
document.body element. Finally, it animates the cube within the scene for the camera.
;;;;;;;;camera.position.x = 1;;;material.outputs = MaterialOutputs.Normal;;;scene.children.addmesh;;;document.body.appendChildcanvasFramebuffer.canvas;animate;
- Check out the git repository
- Install node.js & npm as appropriate for your platform.
- Run npm install to install all the required node modules from package.json
- To run the automatic typescript builder and dev server go:
Then open a web server to the address displayed in the console. Usually this will be http://localhost:8000.
If you have docker and docker-compose available do:
docker-compose up -d
threeify supports the theia-ide so you can start coding immediately. theia-ide is available at http://localhost:3000. Perform step 3 and 4 in the theia-ide terminal.
This project exists thanks to all the people who contribute.