3D engine that AI agents drive
Merge pull request #618 from codepawl/feat/604-607-mcp-camera-lights
Nguyen Xuan An16805027b2d7
diff --cc src/agent-scene.jsindex 008f8e42,e3f83d64..bf27cf27--- a/src/agent-scene.js+++ b/src/agent-scene.js@@@ -23,13 -23,10 +23,13 @@@ const MAX_MESH_REPORTS = 16// Terrain meshes carry one more float for each vertex (sky visibility) than the 56 bytes the budget estimates.const TERRAIN_SKY_VISIBILITY_BYTES = 4;const CAMERA_DEFAULTS = Object.freeze({ eye: [4, 3, 5], target: [0, 0, 0], up: [0, 1, 0], fov: 45, near: 0.1, far: 1000 });-const NODE_FIELDS = ['translation', 'rotation', 'scale', 'parent', 'label', 'geometry', 'material', 'skin', 'relations', 'asset', 'vegetation', 'decal', 'depthLayer', 'blend'];+// Per-node render flags: `visible` hides a node and its children; the rest become renderer part flags of a mesh node.+const RENDER_FLAG_FIELDS = ['visible', 'castShadow', 'receiveShadow', 'holdout', 'shadowCatcher'];+const PART_FLAG_FIELDS = RENDER_FLAG_FIELDS.slice(1);+const NODE_FIELDS = ['translation', 'rotation', 'scale', 'parent', 'label', 'geometry', 'material', 'skin', 'relations', 'asset', 'vegetation', 'decal', 'depthLayer', 'blend', ...RENDER_FLAG_FIELDS];const MATERIAL_FIELDS = ['color', 'metallic', 'roughness', 'emission', 'emissiveColor', 'opacity', 'alphaMode', 'doubleSided', 'pattern', 'map', 'subsurface', 'snippet', 'waterPreset', 'absorption', 'turbidity', ...MATERIAL_LAYER_FIELDS];const PATTERN_TEXTURE_FIELDS = ['map', 'normalMap', 'metallicRoughnessMap', 'emissiveMap', 'boxMapScale', 'boxMapAxis'];- const CAMERA_FIELDS = Object.keys(CAMERA_DEFAULTS);+ const CAMERA_FIELDS = [...Object.keys(CAMERA_DEFAULTS), ...CAMERA_LENS_FIELDS];const LOOK_OPERATION_FIELDS = Object.freeze({'set-environment': 'environment','set-effects': 'effects',