Package Exports
- @egjs/tiny-3d
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@egjs/tiny-3d) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@egjs/tiny-3d
Yet another 3d model viewer
Getting Started
@egjs/tiny-3d requires one canvas element to be initialized.
<!-- Wrapper element -->
<div id="some-wrapper">
<!-- Tiny3D needs one canvas element to render a 3d model -->
<!-- You don't have to set width / height attribute of it, as Tiny3D will manage that for you. -->
<!-- Just set its size with CSS, then Tiny3D will use it -->
<canvas id="my-canvas"></canvas>
<!-- Other UI elements of your choice here -->
</div>
<!-- Here's some sample CSS style for the reference -->
<style>
#some-wrapper {
width: 100vw;
height: 100vh;
}
#my-canvas {
width: 100%;
height: 100%;
}
</style>Then you can use it like
import Tiny3D from "@egjs/tiny-3d";
const canvasEl = document.querySelector("#my-canvas");
const tiny3d = new Tiny3D(canvasEl);
// or just
const tiny3d = new Tiny3D("#my-canvas");See more info at our tutorials / documentations page.
Browser Coverage
IE11+
License
MIT