|
|
hace 3 años | |
|---|---|---|
| .github/workflows | hace 3 años | |
| .idea | hace 3 años | |
| examples | hace 3 años | |
| plugins | hace 3 años | |
| src | hace 3 años | |
| .eslintignore | hace 3 años | |
| .eslintrc.cjs | hace 3 años | |
| .gitignore | hace 3 años | |
| .npmignore | hace 3 años | |
| LICENSE | hace 3 años | |
| Readme.md | hace 3 años | |
| package-lock.json | hace 3 años | |
| package.json | hace 3 años | |
| rollup.config.mjs | hace 3 años | |
| tsconfig.json | hace 3 años | |
| typedoc.json | hace 3 años | |
A new way to work with three.js, 3D models and rendering on the web.
ThreePipe — Github — Examples — Docs — WebGi
ThreePipe is a 3D framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.
Key features include:
npm install threepipe
First, create a canvas element in your HTML page:
<canvas id="three-canvas" style="width: 800px; height: 600px;"></canvas>
Then, import the viewer and create a new instance:
import {ThreeViewer} from 'threepipe'
import {IObject3D} from './IObject'
// Create a viewer
const viewer = new ThreeViewer({canvas: document.getElementById('three-canvas') as HTMLCanvasElement})
// Load an environment map
await viewer.setEnvironmentMap('https://threejs.org/examples/textures/equirectangular/venice_sunset_1k.hdr')
// Load a model
const result = await viewer.load<IObject3D>('https://threejs.org/examples/models/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf', {
autoCenter: true,
autoScale: true,
})
That’s it! You should now see a 3D model on your page.
The viewer initializes with a Scene, Camera, Camera controls(orbit controls), several importers, exporters and a default rendering pipeline. Additional functionality can be added with plugins.
Check out the GLTF Load example to see it in action or to check the JS equivalent code: https://threepipe.org/examples/gltf-load/
The core framework(src, dist, examples folders) and any plugins without a separate license are licensed under the MIT license.
Some plugins(in the plugins folder) might have different licenses. Check the individual plugin documentation and the source folder/files for more details.
Check out all the examples here: https://threepipe.org/examples/
The project is in alpha stage and under active development. Many features will be added but the core API will not change significantly in future releases.
Check out WebGi for a production ready solution for e-commerce and jewelry applications.
Check the list of all functions, classes and types in the API documentation.
Check out WebGi - Premium Photo-realistic 3D rendering framework and tools for web applications and online commerce: Homepage — Docs
Contributions to ThreePipe are welcome and encouraged! Feel free to open issues and pull requests on the GitHub repository.