@pacem/pacem-3d
v1.0.4
Published
[](https://www.npmjs.com/package/@pacem/pacem-3d) [](https://github.com/pacem-it/pacem/blob/main/LICENSE)
Readme
@pacem/pacem-3d
3D scenes for the Pacem JS ecosystem: a pacem-3d stage with three.js/WebGPU adapters, an orbit camera, a WGSL script element, and geometric primitives (box, cone, cylinder, sphere, torus, plane, and the platonic solids) — 17 custom elements in total, plus a Drawing3D namespace of geometry helpers.
Depends on @pacem/pacem-foundation, @pacem/pacem-core, and @pacem/pacem-numerical.
Part of the Pacem JS ecosystem. Install @pacem/pacem instead if you want every package bundled together.
Installation
npm install @pacem/pacem-3dUsage
As an ES module
import { Components, Drawing3D } from '@pacem/pacem-3d';In the browser, without a bundler
<script src="node_modules/@pacem/pacem-foundation/dist/browser/pacem-foundation.min.js"></script>
<script src="node_modules/@pacem/pacem-numerical/dist/browser/pacem-numerical.min.js"></script>
<script src="node_modules/@pacem/pacem-core/dist/browser/pacem-core.min.js"></script>
<script src="node_modules/@pacem/pacem-3d/dist/browser/pacem-3d.min.js"></script>
<pacem-3d>
<pacem-3d-primitive-box width="1" height="1" depth="1"></pacem-3d-primitive-box>
</pacem-3d>TypeScript
Typings ship in typings/index.d.ts and are resolved automatically via the package's exports field — both for the ES module import style and for the ambient Pacem global used by the plain <script> include above.
Custom elements
pacem-3d, pacem-3d-three-adapter, pacem-3d-webgpu-adapter, pacem-3d-wgsl-script, pacem-3d-orbit-camera, and the pacem-3d-primitive-* shapes (box, cone, cylinder, sphere, torus, plane, line, tetrahedron, hexahedron, octahedron, dodecahedron, icosahedron) — see @pacem/pacem's dist/vscode.html-custom.json for attributes and editor IntelliSense support.
