<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>Color fields work exactly like all other fields and have been extensively tested. It is always important to use the field objects with SF* or MF* when assigning values. For example: material.emissiveColor = new SFColor(r, g, b). </div><div><br></div><div>In ECMAScript within the Script node, you don’t need to set the X3D namespace for a class, but you do need to do so outside of it—that is, in external JavaScript files. So, in the example above, it becomes material.emissiveColor = new X3D.SFColor(r,g,b). As Len already mentioned, this is to avoid polluting the global namespace.</div><div><br></div><div>I’ve created a simple example that show the use of the SFColor values, click the Box:</div><div><br></div><div>Script node solution:</div><div><a href="https://create3000.github.io/x_ite/playground/?url=https://create3000.github.io/Library/Tests/Components/Core/Colors.x3d">https://create3000.github.io/x_ite/playground/?url=https://create3000.github.io/Library/Tests/Components/Core/Colors.x3d</a></div><div><br></div><div>External Script HTML Page</div><div><a href="https://create3000.github.io/Library/Tests/Components/Core/Colors.html">https://create3000.github.io/Library/Tests/Components/Core/Colors.html</a></div><div><br></div><div>## Answers to Questions</div><div><br></div><div>1. If there is an assignment to a field, this will automatically trigger an update of the node and the whole scene will be redrawn.</div><div><br></div><div>You can use material.emissiveColor or because emissiveColor is an inputOutput field material.set_emissive color, I would prefer the shorter version.</div><div><br></div><div>2. This is done automatically, everything that needs to be updated, will automatically be updated..</div><div><br></div><div>3. You include the x_ite.js in you HTML and there will be only one global variable X3D exposed by X_ITE to the global namespace. All classes you need are then accessible through this X3D object. So you will do: new X3D.SFColor ().</div><div><br></div><div><a href="https://create3000.github.io/x_ite/reference/ecmascript-object-and-function-definitions/#x3d-object">https://create3000.github.io/x_ite/reference/ecmascript-object-and-function-definitions/#x3d-object</a></div><div><br></div><div>## </div><div><br></div><div>My assumption is the scripting elements were maybe used incorrectly somehow. Is material of class Material, and is really a SFColor used? Were there typos? Is the material assigned to a visible object?</div><div><br></div><div>You can do material.toVRMLString() to debug a node, you can do color.toString() to debug a value or field. You can even do scene.toVRMLString() to debug a whole scene.</div><div><br></div><div>But without a test file that does not work I cannot say more.</div><div><br></div><div>Best regards,</div><div>Holger</div><div><br></div><div>
<meta charset="UTF-8"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="text-align: start; text-indent: 0px; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;">—</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;">Holger Seelig<br>holger.seelig@yahoo.de<br><br></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
<div><br><blockquote type="cite"><div>Am 21.04.2026 um 03:19 schrieb Len Bullard via x3d-public <x3d-public@web3d.org>:</div><br class="Apple-interchange-newline"><div><div>All,<br><br>We are developing MCCF (Multi-Channel Coherence Field), an open-source<br>simulation system that uses X3D 4.0 as its spatial visualization layer.<br>Repository: https://github.com/artistinprocess/mccf<br><br>We have been working through X_ITE 11.6.6 external SAI behavior and have<br>reached a point where we need clarification before proceeding further.<br>John Carlson has been helpful and we are grateful. This post summarizes<br>our findings and asks for precise documentation or correction.<br><br>---<br><br>## What We Have Confirmed Working<br><br>Through systematic testing, the following external SAI patterns produce<br>correct visual results in X_ITE 11.6.6 (Firefox and Edge, Windows 11):<br><br>```javascript<br>// Scalar fields — requires X3D. typed constructor<br>node.intensity = new X3D.SFFloat(0.9); // ✓ visual update confirmed<br>node.transparency = new X3D.SFFloat(0.3); // ✓ visual update confirmed<br><br>// Vector fields — requires X3D. typed constructor<br>node.translation = new X3D.SFVec3f(x, y, z); // ✓ visual update confirmed<br><br>// String fields — plain array works<br>node.string = ["text"]; // ✓ visual update confirmed<br>```<br><br>John Carlson confirmed the `X3D.` namespace prefix requirement for external<br>SAI. This diverges from the W3C SAI specification which defines global<br>constructors (`new SFColor(r,g,b)` etc.) but is consistent with X_ITE's<br>approach of namespacing its types to avoid global namespace pollution.<br><br>---<br><br>## What Does Not Work<br><br>The following assignments are accepted without error, the internal object<br>state updates (confirmed via console inspection of Symbol-keyed properties<br>including `X_ITE.Color3.r/g/b`), but **no visual update occurs**:<br><br>```javascript<br>// Color fields — value stored internally but no visual redraw<br>mat.emissiveColor = new X3D.SFColor(r, g, b); // ✗ no visual update<br>mat.diffuseColor = new X3D.SFColor(r, g, b); // ✗ no visual update<br>mat.set_emissiveColor = new X3D.SFColor(r, g, b); // ✗ no visual update<br><br>// Light color — same behavior<br>light.color = [r, g, b]; // ✗ no visual update<br>light.color = new X3D.SFColor(r, g, b); // ✗ no visual update<br><br>// Light intensity — value stored, no visual update<br>light.intensity = new X3D.SFFloat(0.9); // ✗ darkens scene instead<br>```<br><br>Console inspection confirms the color values ARE stored in the X_ITE<br>internal object (`Symbol("X_ITE.Color3.r"): 0.588` etc.) but the<br>renderer does not update. Our hypothesis is that external SAI color<br>assignments do not propagate the dirty flag to the parent Shape or<br>Appearance node, so the render loop does not know to redraw.<br><br>---<br><br>## Our Questions<br><br>**1. Is there a documented external SAI pattern for color field updates<br>that triggers a visual redraw in X_ITE?**<br><br>We have tried `emissiveColor`, `set_emissiveColor`, plain arrays, and<br>`X3D.SFColor`. All store the value without visual effect. Is there a<br>correct approach we are missing, or is this a known limitation?<br><br>**2. Does X_ITE require the parent Appearance or Shape node to be marked<br>dirty for Material property changes to render?**<br><br>If so, is there a documented way to trigger that from external SAI — for<br>example, a touch() method, a scene refresh call, or a property on the<br>Appearance node that forces a render pass?<br><br>**3. Is the `X3D.` prefix requirement for typed constructors documented<br>anywhere in X_ITE's documentation or source?**<br><br>We found it through testing and John's guidance, but we cannot find it in<br>X_ITE's GitHub or the Web3D documentation. A canonical reference would<br>help other developers and would help us understand what other type<br>differences exist between spec SAI and X_ITE external SAI.<br><br>---<br><br>## The Script Node Workaround — and Why It Does Not Scale<br><br>We are aware that internal X3D Script nodes can update Material color<br>properties and trigger correct visual updates. We have tested this approach<br>and it works.<br><br>However, for our use case — a narrative simulation system that generates<br>multiple X3D scenes programmatically with different geometry and character<br>configurations — the Script Node approach introduces a significant<br>maintenance burden:<br><br>- Every generated scene must include the same Script Node boilerplate<br>- The Script Node must be aware of all Material DEF names in that scene<br>- As scenes become more complex (H-Anim humanoids, richer environments)<br> the Script Node grows proportionally<br>- Programmatic scene generation (we use Python/Flask with the x3d PyPI<br> package) must maintain the Script Node in sync with scene content<br><br>We are not opposed to the Script Node pattern if it is the correct<br>architectural approach. But before committing to it across our entire<br>scene generation pipeline we want to confirm there is no cleaner path<br>through external SAI that we have missed.<br><br>---<br><br>## Summary<br><br>We have an open-source system that is working well in most respects.<br>The field simulation, HotHouse dynamics, constitutional arc, and avatar<br>positioning all work correctly via external SAI. The one remaining gap<br>is Material color updates driven by simulation state.<br><br>We are pausing development of the color update path until we have<br>clarification. We would rather wait for the right answer than build on<br>an undocumented workaround.<br><br>Any guidance — including confirmation that external SAI color updates<br>simply do not work in the current X_ITE version and are on the roadmap —<br>would be valuable.<br><br>Full technical documentation of our findings is in `X3D_KNOWN_ISSUES.md`<br>in the repository: https://github.com/artistinprocess/mccf<br><br>Thank you for your time and for maintaining X_ITE and the X3DJSONLD tools.<br><br>Len Bullard<br>with Claude (Anthropic)<br>https://github.com/artistinprocess/mccf<br><br>_______________________________________________<br>x3d-public mailing list<br>x3d-public@web3d.org<br>http://web3d.org/mailman/listinfo/x3d-public_web3d.org<br></div></div></blockquote></div><br></body></html>