@s25studio/sinth
v1.0.4
Published
Sinth — a real-time 3D pattern engine for the web. Drop-in <script> embed, split Three.js build, and ESM library.
Maintainers
Readme
@s25studio/sinth
Sinth 1.0.4 — build snapshot v53.
Real-time 3D pattern engine for the web. Every release is published under a new version, so a URL you pin today serves the same bytes forever.
Three.js is never bundled in. Sinth and Three are always loaded as two files, so a page that already has Three does not download a second copy, and the two can be cached and upgraded independently.
Modules — the recommended route
Three is a peer dependency: this build imports it, so your project's own copy is the only copy on the page.
npm i @s25studio/sinth [email protected]import { createSinthEmbed } from '@s25studio/sinth';With no build step, name Three in an import map — this is the route that takes Three straight from Three's own package:
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/[email protected]/build/three.module.js"
}
}
</script>
<script type="module">
import { createSinthEmbed } from 'https://unpkg.com/@s25studio/[email protected]/dist/esm/sinth.js';
createSinthEmbed({ container: document.querySelector('#hero'), preset: 'waves' });
</script>The import map must appear before any module script that uses it, and a page
can only carry one — if the site already has an import map, add the three
entry to it rather than adding a second.
Plain script tags — when the page cannot use modules
<script src="https://unpkg.com/@s25studio/[email protected]/dist/three-0.184.0.min.js"></script>
<script src="https://unpkg.com/@s25studio/[email protected]/dist/sinth-1.0.4.min.js"></script>Three first — sinth.min.js reads the global THREE that three.min.js
installs, and refuses to run with a console error if it is missing.
Why Three comes from this package here and not from three. Three.js
dropped its UMD build in r150. unpkg.com/[email protected]/build/ contains
three.module.js, three.core.js, three.cjs and the WebGPU variants —
ES modules and CommonJS, nothing a plain <script src> can execute. So there
is no Three URL to link to for this route. three-0.184.0.min.js is Three
0.184.0 exactly, wrapped in an IIFE that assigns window.THREE; it is
stamped with Three's version rather than Sinth's for that reason. Use the import
map above whenever you can, and this pair only when you cannot.
Text geometry fonts
The text primitive loads its twelve library typefaces from the Sinth CDN on demand — nothing to host, nothing in this package. To serve them yourself (offline, a locked-down CSP, your own mirror), copy them anywhere and say so before the first text object is built:
window.Sinth.setFontBaseUrl('/assets/sinth-fonts/');Or set window.SINTH_FONT_BASE before the script tag. Sinth.fontBaseUrl()
reports the one in force.
The typefaces are OFL 1.1 and Apache 2.0; OFL.txt and APACHE-2.0.txt sit
next to them in that CDN directory.
Licence
Sinth is commercial software, licensed — not sold — under LICENSE.md. You may load and host unmodified copies to display your own scenes, on any site you own or build for a client. You may not modify it, reverse engineer it, or redistribute it as a file, package or template.
Bundled open-source components (three.js, opentype.js) keep their own licences: THIRD-PARTY-NOTICES.md.
Terms this does not cover — redistribution, white-labelling, enterprise self-hosting — are available: [email protected]
