Skip to main content

threejs-viewer-assets

CI PyPI

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.

Access the static files through Python and serve them over HTTP to your viewer.

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.

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 uncompressed glTF models 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. Its files list includes the complete module dependency closure for those entries.

Use a browser with ES modules, import maps, and WebGL2, and supply your application's models and textures.

Versions and compatibility

Package versions follow the bundled Three.js version; .postN denotes packaging revisions of the same upstream files. Pin a version tested with your application and review the Three.js release notes when upgrading.

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; compatibility with JavaScript supplied elsewhere is managed by your application.

Maintainer guide · MIT license · Three.js license

Metadata

Release files for threejs-viewer-assets 0.187.0

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.187.0
File Size Uploaded Provenance Actions
threejs_viewer_assets-0.187.0.tar.gz 596.0 kB With provenance Details for threejs_viewer_assets-0.187.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / threejs_viewer_assets-0.187.0.tar.gz

Download URL threejs_viewer_assets-0.187.0.tar.gz
Size 596.0 kB
Tags Source
SHA-256 checksum
How to use checksums
40561b77f4f19c69b3cf3d1b7061304330d357d2bef25d1136afb15f374ecf15
BLAKE2b-256 checksum
How to use checksums
f74f49667a66bb70164a516a7e754c97cc6c075dffb0b8576d02863098347903
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 31, 2026.

Transparency log

Release files / threejs_viewer_assets-0.187.0-py3-none-any.whl

Download URL threejs_viewer_assets-0.187.0-py3-none-any.whl
Size 516.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3d2b51d08a4f2f709a2c88b7a20bf526637c24646815330e300a0d1dfc8f8ef
BLAKE2b-256 checksum
How to use checksums
dbdda4205e79a9519b4dd322d19c94b5ea148cfceea12f80aa8abbfea7781683
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 31, 2026.

Transparency log

Security for threejs-viewer-assets 0.187.0

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.187.0.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 31, 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