Interactive webcomponent that chaotically flips and spins c-base around. Drag to spin it!
- JavaScript 83.5%
- HTML 16.5%
| index.html | ||
| README.md | ||
| station-flipper.js | ||
| station.stl | ||
Station Flipper
A zero-dependency web component that renders an interactive 3D STL model of the c-base space station. Drag to spin, it auto-spins and occasionally does flips.
Demo
You should be able to check this out here: (BROKEN CURRENTLY)
https://riot.code.c-base.org/station-flipper
Usage
<station-flipper src="station.stl" spin-speed="1"></station-flipper>
<script type="module" src="station-flipper.js"></script>
Attributes
| Attribute | Default | Description |
|---|---|---|
src |
— | Path to an STL file to render |
placeholder |
— | Image to show when 3D is unavailable |
spin-speed |
1 |
Rotation speed multiplier (0–3) |
scale |
1 |
Model scale multiplier (0.1–3) |
force-3d |
— | Force 3D mode even on mobile |
Notes
⚠️ CDN dependency — Three.js is loaded from esm.sh at runtime. This component requires an internet connection to work and currently fetches from an external CDN. Pin the Three.js version in your own repo to avoid upstream breakage.