
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@botanicastudios/stl-viewer
Advanced tools
A simple and lightweight STL file viewer web component built with Three.js and bundled with Vite.
# Install from npm
npm install @botanicastudios/stl-viewer
# Or include directly from jsDelivr
<script src="https://cdn.jsdelivr.net/npm/@botanicastudios/stl-viewer@0.0.1/dist/stl-viewer.iife.js"></script>
For development:
# Clone repository and install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
After installing, include the script in your HTML and use the custom element. There are two ways to use this component:
This approach automatically registers the custom element, making it simpler to use:
<!DOCTYPE html>
<html>
<head>
<style>
stl-viewer {
width: 500px;
height: 500px;
display: block;
}
</style>
<!-- Include the IIFE build which auto-registers the component -->
<script src="node_modules/@botanicastudios/stl-viewer/dist/stl-viewer.iife.js"></script>
</head>
<body>
<!-- Use the component with a path to your STL file -->
<stl-viewer
model="path/to/your/model.stl"
autorotate="initial"
></stl-viewer>
</body>
</html>
This approach gives you more control and is better for modern build systems:
<!DOCTYPE html>
<html>
<head>
<style>
stl-viewer {
width: 500px;
height: 500px;
display: block;
}
</style>
</head>
<body>
<!-- Create a container for the viewer -->
<div id="stl-container"></div>
<!-- Import as an ES module -->
<script type="module">
import { STLViewer } from "./node_modules/@botanicastudios/stl-viewer/dist/stl-viewer.js";
// Register the element if not already registered
if (!customElements.get("stl-viewer")) {
customElements.define("stl-viewer", STLViewer);
}
// Create and use the element
const viewer = document.createElement("stl-viewer");
viewer.setAttribute("model", "path/to/your/model.stl");
viewer.setAttribute("autorotate", "initial");
viewer.style.width = "100%";
viewer.style.height = "100%";
document.getElementById("stl-container").appendChild(viewer);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
stl-viewer {
width: 500px;
height: 500px;
display: block;
}
</style>
<!-- Include the IIFE version from jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/@botanicastudios/stl-viewer@0.0.1/dist/stl-viewer.iife.js"></script>
</head>
<body>
<!-- Use the component with a path to your STL file -->
<stl-viewer
model="path/to/your/model.stl"
autorotate="initial"
></stl-viewer>
</body>
</html>
model: (Required) Path to the STL file to display.autorotate: (Optional) Enable auto-rotation of the model. Options:
autorotate or autorotate="1": Always rotate the modelautorotate="2" (or any number): Rotate at specified speedautorotate="initial": Rotate until the user interacts with the modelFAQs
A simple and lightweight STL file viewer web component
We found that @botanicastudios/stl-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.