Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Keep the liquid pass message and accept the goal growth (#926)

Nguyen Xuan An15e9876507d4
diff --git a/changes/926-shadow-only-nodes.size.md b/changes/926-shadow-only-nodes.size.md
index 22a77c44..e77645a6 100644
--- a/changes/926-shadow-only-nodes.size.md
+++ b/changes/926-shadow-only-nodes.size.md
@@ -3,3 +3,6 @@
- scene:lit-box: same change as scene:agent-scene.
- scene:gltf-box: same change as scene:agent-scene.
- scene:gltf-box+lazy: same change as scene:agent-scene.
+- goal:lit-box: a node can cast a shadow while staying out of the picture, which a gobo outside the shot needs and no existing flag gives (#926); the growth is under 0.1 percent of the scene.
+- goal:gltf-box: a node can cast a shadow while staying out of the picture, which a gobo outside the shot needs and no existing flag gives (#926); the growth is under 0.1 percent of the scene.
+- goal:agent-scene: a node can cast a shadow while staying out of the picture, which a gobo outside the shot needs and no existing flag gives (#926); the growth is under 0.1 percent of the scene.
diff --git a/src/renderer.js b/src/renderer.js
index c298bc4c..0833f9ff 100644
--- a/src/renderer.js
+++ b/src/renderer.js
@@ -1528,7 +1528,7 @@ export class Renderer67 {
if (part.skin || part.morph) this.updatePartIdentities.add(part);
validatePartFlags(part);
if (castsShadow(part) !== location.batch.castShadow) throw new Error(`Shadow casting changes require a new renderer: ${part.name}`);
- if (receivesShadow(part) !== location.batch.receivesShadow || partPass(part) !== batchPass(location.batch) || compositeModeOf(part) !== location.batch.compositeMode) throw new Error(`receiveShadow, holdout, shadowCatcher and shadowOnly changes require replaceParts: ${part.name}`);
+ if (receivesShadow(part) !== location.batch.receivesShadow || (part.shadowOnly === true) !== (batchPass(location.batch) === 'shadowOnly') || compositeModeOf(part) !== location.batch.compositeMode) throw new Error(`receiveShadow, holdout, shadowCatcher and shadowOnly changes require replaceParts: ${part.name}`);
if (depthLayerOf(part) !== (location.batch.depthLayer ?? 0)) throw new Error(`depthLayer changes require replaceParts: ${part.name}`);
// A material whose fields still equal the ones that passed the full checks below needs none of them again.
const materialUnchanged = location.materialSnapshot?.matches(part.material) === true;