Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@justinribeiro/stl-part-viewer
Advanced tools
A web component that displays an STL model with three.js and Lit.
A web component that displays an STL model with three.js and Lit.
This web component is built with Polymer 3 and ES modules in mind and is available on NPM:
Install stl-part-viewer:
npm i @justinribeiro/stl-part-viewer
# or
yarn add @justinribeiro/stl-part-viewer
After install, import into your project:
import 'stl-part-viewer';
Finally, use as required:
<stl-part-viewer src="part.stl"></stl-part-viewer>
The web component allows certain attributes to be give a little additional flexibility.
Name | Description | Default |
---|---|---|
src | Location of the STL file you want the viewer to load | `` |
fullscreen | Text value of the full screen button | Full Screen |
backgroundcolor | Set the background color of the scene; rgb(), hsl(), or X11 color string | 0xf1f1f1 |
floorcolor | Set the floor plane color; rgb(), hsl(), or X11 color string | 0x666666 |
modelcolor | Set the model color; rgb(), hsl(), or X11 color string | 0xfffe57 |
stl-part-viewer
utilizes Custom Elements and Shadow DOM (Web Components), and Intersection Observer. You may need the Lit polyfill-support depending on what you're trying to target.
Within your project, you can load them as such:
<script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script src="../node_modules/lit/platform-support.js">
<script src="../node_modules/intersection-observer/intersection-observer.js"></script>
FAQs
A web component that displays an STL model with three.js and Lit.
The npm package @justinribeiro/stl-part-viewer receives a total of 11 weekly downloads. As such, @justinribeiro/stl-part-viewer popularity was classified as not popular.
We found that @justinribeiro/stl-part-viewer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.