3D engine that AI agents drive
Remove the film demo from the npm package
Nguyen Xuan Anb812f202bc1d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 977a5121..f285f5ef 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,7 @@## Unreleased+- Remove `67js/addons/film` from the npm package. It held the 187-second trailer demo with its baked physics recording, 75 KB gzip of the archive. Nothing else in the package used it. To keep using it, copy `src/film.js`, `src/film-rig.js`, `src/film-character.js`, `src/film-physics-definition.js` and `src/film-physics-clip.json` from the repository, or read the trailer on the site at `/film.html`. The archive goes from 901,314 to 829,085 bytes- Load glTF without Three.js: the addon has its own GLB and glTF parser, node sampler and animation clips, so a box with the addon drops from 159,422 to 67,467 bytes gzip. Draco, meshopt and KTX2 still come from the decoders you pass in `options.decoders`. Only the default scene is decoded, and a node outside it is decoded only when a skin or an animation names it- Update the bundled `zod` to 4.6.7, which fixes a memory exhaustion advisory in the validation of oversized collections- Make the MCP preview server reject requests with another Host header, which closes DNS rebindingdiff --git a/ROADMAP.md b/ROADMAP.mdindex 463ea150..73b01c54 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -50,3 +50,7 @@ Evaluate WebGPU after collecting WebGL2 bottleneck measurements.Extend deformation with surface bindings, remeshing and authored humanoid rigs.Improve character assets and cinematic environments through measured rendering and inspected reference frames.Blender is the visual quality reference for authored scenes. Rendering parity and universal speed advantages remain goals that need evidence.++## Package size++Large features that carry data or a heavy dependency should ship as separate optional packages (for example `@codepawlhq/67js-film`), not as more entries of the main archive. Lazy loading alone does not help here: a lazy chunk still sits in the same npm archive, so it saves page weight but not the 1 MiB archive budget. A separate package does both, and users who never import it never download it. The cost is a second version to release and a peer range to keep in step, so small code-only addons (a few tens of KB gzip) stay in the main package. The film demo left the main archive for this reason. Three.js is still bundled into the `modeling`, `surface`, `shrinkwrap` and `mesh-query` addons and into the MCP preview (about 54 KB gzip each place it is copied); making it an optional peer would save that space and is the next candidate.diff --git a/docs/guide.md b/docs/guide.mdindex a9363a3e..c4231526 100644--- a/docs/guide.md+++ b/docs/guide.md@@ -530,7 +530,7 @@ Core exports are available from `67js`:`planRenderSize` accepts width, height, pixelRatio, samples, memoryBudgetMiB, geometryBytes, textureBytes, hdr, bloom, shadowResolution and maximumSize. It returns actual dimensions, estimatedBytes and reduced status. `estimateFrameBytes(width, height, samples, shadowResolution, { hdr, bloom })` estimates target storage. Neither function measures total VRAM.-`67js/addons/model`: createModel. `67js/addons/nature`: createNatureWorld. `67js/addons/film`: deterministic film recipes. `67js/addons/motion`: createMotionScene.+`67js/addons/model`: createModel. `67js/addons/nature`: createNatureWorld. `67js/addons/motion`: createMotionScene.`67js/addons/canvas2d`: 2D recipes. `67js/addons/gltf`: optional asset decoding. These are separate imports to keep the core smaller.diff --git a/package.json b/package.jsonindex 235842e2..1074a1a5 100644--- a/package.json+++ b/package.json@@ -12,6 +12,7 @@},"files": ["build",+ "!build/film.js","bin","README.md","LICENSE",@@ -73,7 +74,6 @@".": "./build/67.module.js","./addons/model": "./build/model.js","./addons/nature": "./build/nature.js",- "./addons/film": "./build/film.js","./addons/motion": "./build/motion.js","./addons/canvas2d": "./build/canvas2d.js","./addons/gltf": "./build/gltf.js",diff --git a/scripts/smoke-package.mjs b/scripts/smoke-package.mjsindex a85e6852..e0b50360 100644--- a/scripts/smoke-package.mjs+++ b/scripts/smoke-package.mjs@@ -45,7 +45,6 @@ const example = `import assert from 'node:assert/strict';import { VERSION, Renderer67, box, assemblyOffset, cameraView, fitPerspectiveDistance, createAnimationClip, sampleAnimationClip, EFFECT_PRESETS, createMorphPose, MAX_MORPH_TARGETS, exportGlb } from '67js';import { createModel } from '67js/addons/model';import * as nature from '67js/addons/nature';-import * as film from '67js/addons/film';import { createMotionScene } from '67js/addons/motion';import { createCanvas2D } from '67js/addons/canvas2d';import { parseGltf } from '67js/addons/gltf';@@ -202,13 +201,12 @@ const parts = createModel();assert.equal(parts.length, 574);assert.ok(parts.every(part => assemblyOffset(part, 1).some(value => value !== 0)));assert.ok(Object.keys(nature).length > 0);-assert.ok(Object.keys(film).length > 0);+await assert.rejects(() => import('67js/addons/film'), { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' });assert.equal(cameraView('top').projection, 'orthographic');const fitBounds = { minimum: [-1, -1, -1], maximum: [1, 1, 1] };const fitView = { eye: [0, 0, 5], target: [0, 0, 0], fov: 45, far: 100 };const fitDistance = fitPerspectiveDistance(fitBounds, fitView, 0.5, 1);assert.ok(Math.abs(fitDistance - (1 + 2 / Math.tan(Math.PI / 8))) < 1e-10);-assert.ok(film.sampleFilm(162, { aspect: 0.5 }).camera.eye.every(Number.isFinite));assert.ok(EFFECT_PRESETS.cinematic.bloom.strength > 0);const clip = createAnimationClip({ duration: 2, tracks: [{ target: 'cube', property: 'value', keyframes: [{ time: 0, value: 0 }, { time: 2, value: 2 }] }] });assert.equal(sampleAnimationClip(clip, 1)[0].value, 1);