Catalog npm
Back to packageRELEASE DETAILS

0.1.10

npm

9th.js

A modern 3D JavaScript library for creating interactive graphics and visualizations

3danimationcameragraphicsjavascriptlibrarylightmaterialmeshrenderingshadertexturethree-dimensionaltypescriptvisualizationwebgl
All keywords (21)
gltfpbrscene-graphgame-enginethree.js
Published11 Nov 2025
Direct dependencies36
Transitive dependenciesNot calculated

README

Current package documentation

9th.js

A WebGL library for building interactive 3D scenes in the browser.

npm License: MIT

9th.js gives you a scene graph, cameras, meshes, lights, materials, loaders, and controls — so you can render 3D content with a clear, object-oriented API and ship it to the web.

Maintained by digitalcloud.

Features

  • Scene graph — Scene, Object3D, Mesh, hierarchy, transforms (Euler + quaternion)
  • Cameras — perspective and orthographic
  • Geometry — box, sphere, plane, and more → BufferGeometry
  • Materials — unlit and PBR (MeshBasicMaterial, MeshStandardMaterial, and related)
  • Lights — ambient, directional, point, spot
  • Picking — Raycaster + Mesh.raycast
  • Instancing — InstancedMesh for batched draws
  • Render targets — offscreen RenderTarget + composer-friendly renderer APIs
  • Extras — post-processing passes, tween helpers, game-loop utilities (experimental WebGPU preview)
  • Controls — OrbitControls for explore / inspect UIs
  • Loaders — GLTF, OBJ, and related asset pipelines
  • Engine helper — optional loop, pause/resume, and performance hooks
  • Builds — ESM + UMD, TypeScript typings on npm

Install

npm install 9th.js
yarn add 9th.js
pnpm add 9th.js

Quick start

import {
  WebGLRenderer,
  Scene,
  PerspectiveCamera,
  BoxGeometry,
  MeshBasicMaterial,
  Mesh
} from '9th.js';

const canvas = document.querySelector('#canvas');
const renderer = new WebGLRenderer({ canvas, antialias: true });
const scene = new Scene();
const camera = new PerspectiveCamera(60, innerWidth / innerHeight, 0.1, 100);
camera.position.set(0, 1.5, 4);

const cube = new Mesh(
  new BoxGeometry(1, 1, 1),
  new MeshBasicMaterial({ color: '#4fc3f7' })
);
scene.add(cube);

function frame() {
  requestAnimationFrame(frame);
  cube.rotation.y += 0.01;
  renderer.setSize(innerWidth, innerHeight);
  camera.aspect = innerWidth / innerHeight;
  camera.updateProjectionMatrix();
  renderer.render(scene, camera);
}
frame();

Lit scene + orbit

import {
  WebGLRenderer, Scene, PerspectiveCamera,
  BoxGeometry, MeshStandardMaterial, Mesh,
  AmbientLight, DirectionalLight, OrbitControls
} from '9th.js';

const canvas = document.querySelector('#canvas');
const renderer = new WebGLRenderer({ canvas, antialias: true });
const scene = new Scene();
const camera = new PerspectiveCamera(60, innerWidth / innerHeight, 0.1, 100);
camera.position.set(2, 2, 4);

scene.add(new AmbientLight(0xffffff, 0.35));
const sun = new DirectionalLight(0xffffff, 1.2);
sun.position.set(3, 5, 2);
scene.add(sun);

scene.add(new Mesh(
  new BoxGeometry(1, 1, 1),
  new MeshStandardMaterial({ color: '#4fc3f7', metalness: 0.2, roughness: 0.4 })
));

const controls = new OrbitControls(camera, canvas);

function frame() {
  requestAnimationFrame(frame);
  controls.update();
  renderer.setSize(innerWidth, innerHeight);
  camera.aspect = innerWidth / innerHeight;
  camera.updateProjectionMatrix();
  renderer.render(scene, camera);
}
frame();

CDN

<script src="https://unpkg.com/9th.js@1.0.7/dist/umd/9th.umd.min.js"></script>

Also on jsDelivr: https://cdn.jsdelivr.net/npm/9th.js@1.0.7/dist/umd/9th.umd.min.js

Examples

Live gallery (after npm run build, serve the repo root):

examples/ → open examples/index.html

Previews

Hello cubeLit + orbit
Hello cubeLit cube
Unlit MeshBasicMaterialPBR + lights + OrbitControls
PrimitivesMaterials
PrimitivesMaterials
Box, sphere, cylinder, coneMetalness / roughness row
LightsGLTF
LightsGLTF
Ambient + directional + pointsGLTFLoader → scene
npm run build
npx serve .
# open http://localhost:3000/examples/

Docs & roadmap

License

MIT © digitalcloud

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 37

Native requirements
36 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^29.6.2development
husky
Environment
{
  "local_name": "husky",
  "alias": false,
  "peer_metadata": null
}
^8.0.3development
jsdom
Environment
{
  "local_name": "jsdom",
  "alias": false,
  "peer_metadata": null
}
^22.1.0development
canvas
Environment
{
  "local_name": "canvas",
  "alias": false,
  "peer_metadata": null
}
^2.11.2development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^8.47.0development
rollup
Environment
{
  "local_name": "rollup",
  "alias": false,
  "peer_metadata": null
}
3.29.5development
ts-jest
Environment
{
  "local_name": "ts-jest",
  "alias": false,
  "peer_metadata": null
}
^29.1.1development
typedoc
Environment
{
  "local_name": "typedoc",
  "alias": false,
  "peer_metadata": null
}
^0.25.0development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^3.0.3development
cross-env
Environment
{
  "local_name": "cross-env",
  "alias": false,
  "peer_metadata": null
}
^7.0.3development
puppeteer
Environment
{
  "local_name": "puppeteer",
  "alias": false,
  "peer_metadata": null
}
^21.5.0development
commitizen
Environment
{
  "local_name": "commitizen",
  "alias": false,
  "peer_metadata": null
}
^4.3.0development
playwright
Environment
{
  "local_name": "playwright",
  "alias": false,
  "peer_metadata": null
}
^1.40.0development
size-limit
Environment
{
  "local_name": "size-limit",
  "alias": false,
  "peer_metadata": null
}
^11.0.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.1.6development
@types/jest
Environment
{
  "local_name": "@types/jest",
  "alias": false,
  "peer_metadata": null
}
^29.5.5development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^20.5.0development
lint-staged
Environment
{
  "local_name": "lint-staged",
  "alias": false,
  "peer_metadata": null
}
^14.0.1development
concurrently
Environment
{
  "local_name": "concurrently",
  "alias": false,
  "peer_metadata": null
}
^8.2.0development
@commitlint/cli
Environment
{
  "local_name": "@commitlint/cli",
  "alias": false,
  "peer_metadata": null
}
^17.7.2development
semantic-release
Environment
{
  "local_name": "semantic-release",
  "alias": false,
  "peer_metadata": null
}
^21.1.1development
canvas-5-polyfill
Environment
{
  "local_name": "canvas-5-polyfill",
  "alias": false,
  "peer_metadata": null
}
^0.1.5development
eslint-plugin-node
Environment
{
  "local_name": "eslint-plugin-node",
  "alias": false,
  "peer_metadata": null
}
^11.1.0development
rollup-plugin-html
Environment
{
  "local_name": "rollup-plugin-html",
  "alias": false,
  "peer_metadata": null
}
^0.2.1development
eslint-plugin-import
Environment
{
  "local_name": "eslint-plugin-import",
  "alias": false,
  "peer_metadata": null
}
^2.28.1development
rollup-plugin-terser
Environment
{
  "local_name": "rollup-plugin-terser",
  "alias": false,
  "peer_metadata": null
}
^7.0.2development
eslint-plugin-promise
Environment
{
  "local_name": "eslint-plugin-promise",
  "alias": false,
  "peer_metadata": null
}
^6.1.1development
@rollup/plugin-replace
Environment
{
  "local_name": "@rollup/plugin-replace",
  "alias": false,
  "peer_metadata": null
}
^5.0.2development
rollup-plugin-commonjs
Environment
{
  "local_name": "rollup-plugin-commonjs",
  "alias": false,
  "peer_metadata": null
}
^10.1.0development
rollup-plugin-filesize
Environment
{
  "local_name": "rollup-plugin-filesize",
  "alias": false,
  "peer_metadata": null
}
^10.0.0development
rollup-plugin-visualizer
Environment
{
  "local_name": "rollup-plugin-visualizer",
  "alias": false,
  "peer_metadata": null
}
^5.9.3development
@typescript-eslint/parser
Environment
{
  "local_name": "@typescript-eslint/parser",
  "alias": false,
  "peer_metadata": null
}
^6.4.0development
rollup-plugin-typescript2
Environment
{
  "local_name": "rollup-plugin-typescript2",
  "alias": false,
  "peer_metadata": null
}
^0.35.0development
@rollup/plugin-node-resolve
Environment
{
  "local_name": "@rollup/plugin-node-resolve",
  "alias": false,
  "peer_metadata": null
}
16.0.3development
@commitlint/config-conventional
Environment
{
  "local_name": "@commitlint/config-conventional",
  "alias": false,
  "peer_metadata": null
}
^17.7.0development
@typescript-eslint/eslint-plugin
Environment
{
  "local_name": "@typescript-eslint/eslint-plugin",
  "alias": false,
  "peer_metadata": null
}
^6.4.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": {
    "optional": true
  }
}
>=4.5.0peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "52ad7ffd8aa54df002892234a5bdd597c4905b10",
  "tarball": "https://registry.npmjs.org/9th.js/-/9th.js-0.1.10.tgz",
  "fileCount": 68,
  "integrity": "sha512-8wOxb0tKkVYrjrMRB1kQvj/UeyqZdNUtHMiAobqXIiammbroj6CR+15wvaU+3xbUtlW4vk372PlynIbTnqMs9g==",
  "signatures": [
    {
      "sig": "MEYCIQC3wruCjsJfhyGpJsJZ0gxEUjAzymtdhPD8cNpHOEMbCgIhAIXnOMEWXxwcBqCk5/hfbDOt3S3frJJ8+pFyU4uZsVKW",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 10119064
}

Repository

PENDING
9thjs/9th.js

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
syedrazaalino/9th.js

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
username/9th.js

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:42 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:488088eae1920e7c9d311b54844ded355f515c06d4efde6ff511f96fa61a7222

Other collected versions

1.0.724 Jul1.0.620 Jul1.0.519 Jul1.0.419 Jul1.0.319 Jul1.0.219 JulView all collected versions →