Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Keep one name per renderer: Glaze and Cook, with pathTracer as the job type

Nguyen Xuan An805b02fbf1c0
diff --git a/scripts/agent-render-jobs.mjs b/scripts/agent-render-jobs.mjs
index c6a7ab6b..6ec721a9 100644
--- a/scripts/agent-render-jobs.mjs
+++ b/scripts/agent-render-jobs.mjs
@@ -29,7 +29,7 @@ const PATH_TRACE_OVERHEAD_MS = 60 * 1000;
export function jobDeadlineMs({ frameCount, width, height, renderer }, maximumMs = MAXIMUM_JOB_DEADLINE_MS) {
const sizeScale = Math.max(1, (width * height) / REFERENCE_FRAME_PIXELS);
const frameDeadline = Math.ceil(BASE_DEADLINE_MS + frameCount * FRAME_ALLOWANCE_MS * sizeScale);
- const traceDeadline = (renderer?.type === 'pathTracer' || renderer?.type === 'trace67') ? Math.ceil(renderer.maxSeconds * 1000) + PATH_TRACE_OVERHEAD_MS : 0;
+ const traceDeadline = renderer?.type === 'pathTracer' ? Math.ceil(renderer.maxSeconds * 1000) + PATH_TRACE_OVERHEAD_MS : 0;
return Math.min(maximumMs, Math.max(frameDeadline, traceDeadline));
}
const MAXIMUM_JSON_BYTES = 1024 ** 2;
@@ -149,7 +149,7 @@ const FRACTIONAL_RENDERER_FIELDS = new Set(['maxSeconds', 'noiseThreshold']);
function rendererFrom(renderer, kind, passes) {
objectKeys(renderer, ['type', 'samples', 'bounces', 'denoise', 'seed', 'maxSeconds', 'noiseThreshold'], 'renderer');
- if (renderer.type !== 'pathTracer' && renderer.type !== 'trace67') throw new TypeError('renderer.type must be trace67 or pathTracer.');
+ if (renderer.type !== 'pathTracer') throw new TypeError('renderer.type must be pathTracer.');
if (kind !== 'image') throw new RangeError('The path tracer renders one image: use kind image.');
if (passes !== undefined) throw new RangeError('The path tracer writes the lit image only: leave passes out.');
const denoise = renderer.denoise ?? true;
diff --git a/scripts/mcp-server.mjs b/scripts/mcp-server.mjs
index 7a393bd5..483c8eb3 100644
--- a/scripts/mcp-server.mjs
+++ b/scripts/mcp-server.mjs
@@ -670,7 +670,7 @@ const renderSettings = z.strictObject({
animation: z.strictObject({ clip: z.number().int().min(0), start: z.number().min(0).max(3600).optional() }).optional(),
motion: z.strictObject({ start: z.number().min(0).max(3600).optional() }).optional(),
rendererTime: z.strictObject({ start: z.number().min(0).max(3600).optional(), rate: z.number().min(-16).max(16).optional() }).optional(),
- renderer: z.strictObject({ type: z.enum(['pathTracer', 'trace67']), samples: z.number().optional(), bounces: z.number().optional(), denoise: z.union([z.boolean(), z.enum(['wavelet', 'oidn', 'none'])]).optional(), seed: z.number().optional(), maxSeconds: z.number().optional(), noiseThreshold: z.number().optional() }).optional().describe('image only: path tracer; see scene_capabilities pathTracer.'),
+ renderer: z.strictObject({ type: z.literal('pathTracer'), samples: z.number().optional(), bounces: z.number().optional(), denoise: z.union([z.boolean(), z.enum(['wavelet', 'oidn', 'none'])]).optional(), seed: z.number().optional(), maxSeconds: z.number().optional(), noiseThreshold: z.number().optional() }).optional().describe('image only: path tracer; see scene_capabilities pathTracer.'),
timeline: z.strictObject({ start: z.number().min(0).max(60).optional() }).optional().describe('Play the recipe timeline from start (default 0); duration defaults to the rest of it. It owns the motion clock, so leave motion and animation out.'),
audio: z.strictObject({ file: z.string().max(68), offset: z.number().min(0).max(3600).optional(), track: z.enum(['aac', 'pcm']).optional() }).optional().describe('Video only: a file name in the --audio folder (.wav, .mp3, .ogg, .flac) mixed in from offset seconds.'),
encoder: z.enum(VIDEO_ENCODERS).optional().describe('Video only: cpu (default) or nvenc.'),
diff --git a/skills/render-67js-media/SKILL.md b/skills/render-67js-media/SKILL.md
index 4248f384..99489a9c 100644
--- a/skills/render-67js-media/SKILL.md
+++ b/skills/render-67js-media/SKILL.md
@@ -17,7 +17,7 @@ For procedural motion, read `docs/agent-motion.md` and select `settings.motion.s
For imported character motion from `0.8.0`, read `docs/agent-character-motion.md`. Use independent `settings.animation` and `settings.motion` clocks.
-For an offline path-traced still with **Cook** (glass refraction, soft multi-bounce indirect light, subsurface random walk, many lights), read `docs/path-tracer.md` and submit an `image` job with `settings.renderer: { type: "cook" }` (or `"pathTracer"`). It is slow, bounded and offline: read `scene_capabilities` `pathTracer` for its limits and what it skips, and keep rasterizer jobs for video and passes.
+For an offline path-traced still with **Cook** (glass refraction, soft multi-bounce indirect light, subsurface random walk, many lights), read `docs/path-tracer.md` and submit an `image` job with `settings.renderer: { type: "pathTracer" }`. It is slow, bounded and offline: read `scene_capabilities` `pathTracer` for its limits and what it skips, and keep rasterizer jobs for video and passes.
## Choose and render
diff --git a/src/index.js b/src/index.js
index d6371d72..3de6898f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,5 +1,5 @@
export { VERSION } from './version.js';
-export { Renderer67, Glaze, Mog } from './renderer.js';
+export { Renderer67, Glaze } from './renderer.js';
export { box, cylinder, sphere, torus } from './geometry.js';
export { exportGlb } from './export.js';
export { createAnimationMixer } from './animation-mixer.js';
diff --git a/src/path-tracer-capabilities.js b/src/path-tracer-capabilities.js
index 41b694fd..8a50f0b0 100644
--- a/src/path-tracer-capabilities.js
+++ b/src/path-tracer-capabilities.js
@@ -16,7 +16,7 @@ export const PATH_TRACER_DENOISERS = Object.freeze(['wavelet', 'oidn', 'none']);
export const OIDN_DEFAULT_SAMPLES = 16;
export const PATH_TRACER_CAPABILITIES = Object.freeze({
- setting: 'settings.renderer { type: "trace67" | "pathTracer", samples, bounces, denoise (true | false | "wavelet" | "oidn" | "none"), seed, maxSeconds, noiseThreshold }; image jobs only, no passes. Past maxSeconds the job fails.',
+ setting: 'settings.renderer { type: "pathTracer", samples, bounces, denoise (true | false | "wavelet" | "oidn" | "none"), seed, maxSeconds, noiseThreshold }; image jobs only, no passes. Past maxSeconds the job fails.',
noiseThreshold: 'Default 0 draws every sample. Above 0 a pixel stops once its standard error relative to its mean is under the value, checked from 16 samples on: faster and noisier, and it cost quality on spot-area (score 0.0658 at 0, 0.0900 at 0.03). docs/path-tracer.md has the table.',
traces: 'emissive maps and strength; volume fog as a uniform medium (density, colour, anisotropy, box; noise, drift and ambient are not used); the material subsurface block as a bounded random walk on the cpu and gpu backends (at most 32 scattering events, mean free path radius times scale in metres), and a card with nothing behind it as thin translucency.',
skips: 'occlusion maps, liquids, anisotropy, iridescence, sheen, caustics, depth of field, bloom; metrics.pathTracer.ignored in the job result lists what the scene asked for.',
diff --git a/src/path-tracer.js b/src/path-tracer.js
index 53a777c1..06976be3 100644
--- a/src/path-tracer.js
+++ b/src/path-tracer.js
@@ -1069,5 +1069,5 @@ export async function renderPathTracedImage({ parts, environment = {}, camera },
};
}
+// Cook is the public name of the path tracer.
export const Cook = renderPathTracedImage;
-export const Trace67 = renderPathTracedImage;
diff --git a/src/renderer.js b/src/renderer.js
index 44f579e0..f3d62893 100644
--- a/src/renderer.js
+++ b/src/renderer.js
@@ -2304,4 +2304,5 @@ export class Renderer67 {
}
}
-export { Renderer67 as Glaze, Renderer67 as Mog };
+// Glaze is the public name of the real-time renderer; Renderer67 stays for existing code.
+export { Renderer67 as Glaze };