Angular component for rendering a STL model
npm install angular-stl-model-viewerangular-stl-model-viewer
==
This is an angular component to render stl-models with THREE.js.
Installation
==
- yarn add angular-stl-model-viewer
- npm install angular-stl-model-viewer
Usage
==
- import StlModelViewerModule to your app module
- use stl-model-viewer component in your html
- alternatively use [stlModelFiles]="['stlFileContent']"
Example
=
The working basic example can be found in our [live demo][live-demo].
Configuration
==
| Attr | Type | Default | Details |
| ------------- | -------------------- | ------------------------------- | --------------------------------------- |
| castShadow | boolean | true | Gets rendered into shadow map |
| position | THREE.Vector3 | THREE.Vector3( 0, 0, 0 ) | Object's local position |
| receiveShadow | boolean | true | Material gets baked in shadow receiving |
| scale | THREE.Vector3 | THREE.Vector3( 0.03, 0.03, 0.03 ) | Object's local scale |
| up | THREE.Vector3 | - | Up direction |
| userData | {[key: string]: any} | - | An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned |
| visible | boolean | - | Object gets rendered if true |
Contributing
===
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using npm run lint and npm run test.
[live-demo]: https://codaline-io.github.io/angular-stl-model-viewer