Skip to main content

threejs-viewer-assets

CI

Offline Three.js WebGL resources for Python applications that build interactive 3D viewers. Bundles the official core and selected addons for camera navigation, model display, labels, and outline highlighting, with no Python runtime dependencies and no Node.js build step, npm, or CDN required by consumers.

Your application supplies the viewer logic and HTTP serving. This package distributes static assets; it does not provide a ready-made viewer or Python bindings.

Python 3.9+ · Windows, Linux, macOS · Independent of the Three.js project

Install

pip install threejs-viewer-assets
# or: uv add threejs-viewer-assets

Use

from importlib.resources import files

assets = files("threejs_viewer_assets").joinpath("assets")
module = assets.joinpath("build").joinpath("three.module.js")
javascript = module.read_text(encoding="utf-8")

Serve the asset directory at /assets/ with its directory structure intact, then use an import map:

<script type="importmap">
{
  "imports": {
    "three": "/assets/build/three.module.js",
    "three/addons/": "/assets/examples/jsm/"
  }
}
</script>
<script type="module">
  import * as THREE from "three";
  import { OrbitControls } from "three/addons/controls/OrbitControls.js";
</script>

For a working example, run uv run python examples/serve.py from this checkout and open http://127.0.0.1:8000. Use HTTP, not file://.

Viewer scope

The supported entries are build/three.module.js, build/three.core.js, and the addons below. Addon names refer to their matching .js modules under three/addons/, using the upstream directory structure.

Viewer task Included addons
Rotate, zoom, and navigate orientation OrbitControls, TrackballControls, ViewHelper
Display geometry and wide line segments BufferGeometryUtils, LineSegments2, LineSegmentsGeometry, LineMaterial
Load glTF models that need no extra decoders GLTFLoader
Add HTML labels CSS2DRenderer
Highlight objects with outlines EffectComposer, RenderPass, OutlinePass, OutputPass

Upstream files are unmodified. The manifest records the version, source, hashes, and supported entrypoints. Additional modules are included to satisfy their imports; those dependency-only files may change with upstream and are not independently supported entry points.

Requires ES modules, import maps, and WebGL2. Supply your own models and textures; Draco, Meshopt, and KTX2/Basis decoders, WebGPU/TSL, and addons outside the list above are not included. Selection focuses on basic viewing tasks; editor tools, physics, and game controls are outside the scope.

Versions and compatibility

Package versions follow the bundled Three.js version; .postN denotes packaging revisions of the same upstream files. Packaging revisions preserve supported entry points. Three.js upgrades may change APIs or require entry point changes; check the release notes and pin a version tested with your application.

Use the bundled core and addons together. When integrating other Three.js components, coordinate their versions and import maps so shared components use the same core module. pip/uv resolves Python package requirements but cannot check compatibility with JavaScript supplied elsewhere. This package's browser tests cover its viewer example, not every downstream application.

Migrating from threejs-assets

Starting with threejs-viewer-assets 0.186.1.post1, replace the threejs-assets dependency with threejs-viewer-assets and change Python imports and files("threejs_assets") calls to threejs_viewer_assets. Refresh your lockfile. The two distribution names are separate packages; installing the new name does not upgrade or remove the old package automatically.

The bundled Three.js version remains 0.186.1, with the same resource selection and bytes. Browser imports (three, three/addons/) and paths relative to assets/ are unchanged. Existing releases under the old name remain available; future releases use the new name.

Maintainer guide · MIT license · Three.js license

Metadata

Release files for threejs-viewer-assets 0.186.1.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for threejs-viewer-assets 0.186.1.post1
File Size Uploaded Provenance Actions
threejs_viewer_assets-0.186.1.post1.tar.gz 594.6 kB With provenance Details for threejs_viewer_assets-0.186.1.post1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for threejs-viewer-assets 0.186.1.post1
File Interpreter ABI Platform Actions
threejs_viewer_assets-0.186.1.post1-py3-none-any.whl Python 3 none any Details for threejs_viewer_assets-0.186.1.post1-py3-none-any.whl

Total release size: 1.1 MB

Release files / threejs_viewer_assets-0.186.1.post1.tar.gz

Download URL threejs_viewer_assets-0.186.1.post1.tar.gz
Size 594.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fc5f856cc22268ac06daf0c2b3b5a8ac92ee285f244f804b69bed20e33e69bf8
BLAKE2b-256 checksum
How to use checksums
2c09b6761bb87e79ff9356ea652d4f7d871e2bb96ecd8c171c81b8606d8c9aa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / threejs_viewer_assets-0.186.1.post1-py3-none-any.whl

Download URL threejs_viewer_assets-0.186.1.post1-py3-none-any.whl
Size 514.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
693c7b2847775c96af26c9fd7342d654bef15378cc6ae556e258d1b377b001da
BLAKE2b-256 checksum
How to use checksums
98d190bf2367f844800a13f9000886e919cad75af62771d6ca2aa4ee4d32f091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for threejs-viewer-assets 0.186.1.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for threejs_viewer_assets-0.186.1.post1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page