Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge origin/main into feat/648-schema-diet

Nguyen Xuan An014373ec114c
diff --cc scripts/mcp-server.mjs
index 6b99252b,4b89fb7e..1ac640e8
--- a/scripts/mcp-server.mjs
+++ b/scripts/mcp-server.mjs
@@@ -204,15 -192,9 +204,16 @@@ const volumeFog = z.strictObject(
contrast: bounded(0, 4).optional(),
profileSoftness: bounded(0, 0.95).optional(),
keyScattering: bounded(0, 10).optional(),
+ heightFalloff: finite.optional(),
+ scatterOctaves: finite.optional(),
+ multiScatter: finite.optional(),
+ multiExtinction: finite.optional(),
+ multiAnisotropy: finite.optional(),
+ keyTransmittance: finite.optional(),
+ surfaceTransmittance: finite.optional(),
});
const affects = z.array(z.string()).optional();
+ const iesProfile = z.any().optional();
const lines = z.record(z.string(), z.unknown()).describe('Outlines, toon light and polylines as plain JSON; fields and limits in scene_capabilities lineArt. null clears.');
const environment = z.strictObject({
world: z.boolean().optional().describe('Draw the sky and apply surface fog.'),
@@@ -293,9 -283,8 +298,9 @@@ const effects = z.strictObject(
radius: bounded(0.1, 4).optional(),
}).optional(),
depthOfField: z.strictObject({ blur: unit.optional(), focusDistance: bounded(0.01, 100000).optional() }).optional().describe('Lens blur: blur 0 to 1, focusDistance metres.'),
- motionBlur: z.strictObject({ shutter: bounded(0, 0.5).optional() }).optional().describe('Camera motion smear, shutter in seconds.'),
+ motionBlur: z.strictObject({ shutter: bounded(0, 0.5).optional(), objects: bounded(0, 1).optional() }).optional().describe('Motion smear, shutter in seconds. objects 0 to 1 also smears each moving part along its own motion (off at 0).'),
});
+const effectsListed = listed('effects', effects, 'Post effects: exposure, saturation, contrast, temperature, vignette, grain, ambientOcclusion, ambientOcclusionRadius, bloom {strength, threshold, radius}, depthOfField {blur, focusDistance}, motionBlur {shutter}; see scene_capabilities effects.', coreOf(effects.shape, ['exposure']));
const shadow = z.strictObject({
target: boundedVector(-1e6, 1e6).optional(),
extent: bounded(0.01, 1e5).optional(),
diff --cc src/agent-look.js
index 3b3c63ba,5000462e..0d958f9e
--- a/src/agent-look.js
+++ b/src/agent-look.js
@@@ -19,14 -20,13 +20,14 @@@ const ENVIRONMENT_FIELDS =
const EFFECT_FIELDS = ['exposure', 'saturation', 'contrast', 'temperature', 'vignette', 'grain', 'ambientOcclusion', 'ambientOcclusionRadius', 'bloom', 'depthOfField', 'motionBlur'];
const SHADOW_FIELDS = ['target', 'extent', 'distance', 'near', 'far'];
const POINT_LIGHT_FIELDS = ['position', 'color', 'intensity', 'radius', 'range', 'castShadow', 'affects'];
- const SPOT_LIGHT_FIELDS = ['position', 'direction', 'angle', 'penumbra', 'color', 'intensity', 'radius', 'range', 'castShadow', 'affects'];
- const AREA_LIGHT_FIELDS = ['position', 'direction', 'up', 'width', 'height', 'color', 'intensity', 'affects'];
+ const SPOT_LIGHT_FIELDS = ['position', 'direction', 'angle', 'penumbra', 'color', 'intensity', 'radius', 'range', 'castShadow', 'ies', 'affects'];
+ const AREA_LIGHT_FIELDS = ['position', 'direction', 'up', 'width', 'height', 'color', 'intensity', 'castShadow', 'ies', 'affects'];
const VOLUME_VECTOR_FIELDS = ['minimum', 'maximum', 'color', 'ambient', 'drift'];
const VOLUME_NUMBER_FIELDS = ['density', 'steps', 'anisotropy', 'noiseAmount', 'noiseScale', 'maxDistance', 'shadowAmbient', 'heightFalloff', 'detailOctaves', 'detailAmount', 'warp', 'contrast', 'profileSoftness', 'keyScattering', 'scatterOctaves', 'multiScatter', 'multiExtinction', 'multiAnisotropy', 'keyTransmittance', 'surfaceTransmittance'];
+export const VOLUME_FOG_FIELDS = Object.freeze([...VOLUME_VECTOR_FIELDS, ...VOLUME_NUMBER_FIELDS]);
const BLOOM_FIELDS = ['strength', 'threshold', 'radius'];
const DEPTH_OF_FIELD_FIELDS = ['blur', 'focusDistance'];
- const MOTION_BLUR_FIELDS = ['shutter'];
+ const MOTION_BLUR_FIELDS = ['shutter', 'objects'];
const MAXIMUM_SHADOW_CASCADES = 4;
const MAXIMUM_AFFECTED_NODES = 1024;
diff --cc src/agent-scene.js
index 21fbb6c0,7dda81a6..4d5e6592
--- a/src/agent-scene.js
+++ b/src/agent-scene.js
@@@ -1,8 -1,8 +1,8 @@@
import { mat4, mat3 } from 'gl-matrix';
- import { box, cylinder, grid, sphere, torus } from './geometry.js';
+ import { box, circle, cone, cylinder, grid, icoSphere, sphere, torus } from './geometry.js';
import { createSceneGraph } from './scene-graph.js';
import { applyProjection, validateCameraShift, CAMERA_LENS_FIELDS } from './camera.js';
-import { normalizeAgentLook, environmentPatchWithSetup, environmentLinksLights, agentEnvironmentMap } from './agent-look.js';
+import { normalizeAgentLook, environmentPatchWithSetup, environmentLinksLights, agentEnvironmentMap, VOLUME_FOG_FIELDS } from './agent-look.js';
import { agentSceneModule, agentSceneModuleLoaded } from './agent-scene-modules.js';
import { MESH_SMOOTH_ANGLE_DEFAULT, CURVE_TEXT_LIMITS, AGENT_SCENE_CAPABILITIES, AGENT_SCENE_DEFAULT_LIMITS, MAX_MATERIAL_PATTERNS, RECIPE_ALPHA_MODES } from './agent-scene-capabilities.js';
import { ALL_LIGHTS_MASK, MATERIAL_LAYER_FIELDS, validateMaterialLayers } from './material-layers.js';