super-three: JavaScript 3D Library (Abandoned Fork)
`super-three` is a JavaScript 3D graphics library, initially based on the widely adopted `three.js` project, designed for rendering interactive 3D content in web browsers using WebGL and WebGPU. While the provided metadata indicates version `0.181.0`, public NPM data shows this package was last updated approximately two years ago, making it an effectively abandoned fork. In contrast, the official `three` package (which `super-three` is derived from) is actively maintained with frequent updates (e.g., `0.183.2` as of April 2026). `super-three` aimed to leverage the `three.js` API for creating scenes, cameras, lights, and objects, supporting various geometries, materials, and post-processing effects. Its original differentiators would have been alignment with `three.js`'s ease of use, broad browser compatibility, and access to a rich ecosystem. However, due to its abandonment, it lacks current features, performance improvements, and critical bug fixes found in the actively maintained `three.js` library.
Common errors
-
Uncaught TypeError: THREE is not defined
cause Attempting to access `THREE` globally or from a CommonJS `require` call in an environment where it's not exposed, or when using ES Modules without the correct `import * as THREE` statement.fixFor ES Modules, use `import * as THREE from 'super-three';`. If using CommonJS, `const THREE = require('super-three');` (though ES Modules are the preferred and modern approach). Ensure your build system correctly bundles `super-three`. -
Failed to resolve module specifier "super-three". Relative references must start with "./", "../", or "/".
cause A browser environment trying to resolve a bare module specifier (`super-three`) without a module map or import map, or a build system not correctly configured to resolve modules from `node_modules`.fixEnsure your bundler (Webpack, Rollup, Vite) is correctly configured to resolve `super-three` from `node_modules`. For direct browser use without a bundler, consider using an import map or a CDN version that exposes `THREE` globally. -
WebGL: Context Lost
cause GPU drivers crashing, browser tab being backgrounded for too long, or excessive memory/resource usage leading to the browser discarding the WebGL context.fixImplement `webglcontextlost` and `webglcontextrestored` event listeners on `renderer.domElement` to gracefully handle context loss and attempt to reinitialize the scene. Optimize resource usage (geometries, textures, shaders) to reduce GPU pressure. -
Property 'someProperty' does not exist on type 'Mesh<...>'
cause TypeScript compiler error indicating an attempt to access a property or method not declared in the `three.js` (or `super-three`) type definitions for the specific object. This often happens when properties are dynamically added, or type casting is missing.fixEnsure you have `@types/three` installed and that its version is compatible with the `super-three` version (or the `three.js` version it was forked from). Use type assertions (e.g., `(mesh as any).someProperty`) if you are intentionally extending types or adding dynamic properties, or declare custom interfaces to extend `three.js` types properly.
Warnings
- breaking This `super-three` package is an abandoned fork based on an older version of `three.js` (0.181.0, last updated ~2 years ago). It will not receive updates, security patches, or new features present in the actively maintained `three.js` library (e.g., 0.183.2+). Using it means missing out on performance improvements, bug fixes, and critical updates, and may introduce compatibility issues with newer ecosystems.
- gotcha `three.js` (and thus `super-three`) strongly encourages and primarily ships ES Modules. Importing CommonJS builds or older UMD bundles can lead to larger bundle sizes, broken tree-shaking, and compatibility issues with modern build tools.
- gotcha `three.js` objects like `Geometry`, `Material`, and `Texture` allocate resources on the GPU. If not explicitly disposed of when no longer needed, they can lead to significant memory leaks, especially in single-page applications or long-running experiences. This behavior applies to `super-three` as well.
- gotcha Loaders (e.g., `GLTFLoader`) and other examples/add-ons are located in `super-three/examples/jsm/`. Incorrect paths or attempting to `require` them can lead to module resolution errors due to differences in module systems or file extensions.
Install
-
npm install super-three -
yarn add super-three -
pnpm add super-three
Imports
- THREE (namespace)
const THREE = require('super-three');import * as THREE from 'super-three';
- Named exports (e.g., Scene, WebGLRenderer)
import { WebGLRenderer } from 'super-three/build/super-three.module.js';import { Scene, PerspectiveCamera, WebGLRenderer, BoxGeometry, MeshNormalMaterial, Mesh } from 'super-three'; - Add-ons / Examples (e.g., GLTFLoader)
import { GLTFLoader } from 'super-three/src/loaders/GLTFLoader.js';import { GLTFLoader } from 'super-three/examples/jsm/loaders/GLTFLoader.js';
Quickstart
import * as THREE from 'super-three';
const width = window.innerWidth, height = window.innerHeight;
// init
const camera = new THREE.PerspectiveCamera( 70, width / height, 0.01, 10 );
camera.position.z = 1;
const scene = new THREE.Scene();
const geometry = new THREE.BoxGeometry( 0.2, 0.2, 0.2 );
const material = new THREE.MeshNormalMaterial();
const mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
const renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setSize( width, height );
renderer.setAnimationLoop( animate );
document.body.appendChild( renderer.domElement );
// animation
function animate( time ) {
mesh.rotation.x = time / 2000;
mesh.rotation.y = time / 1000;
renderer.render( scene, camera );
}