<div dir="ltr">"extending concrete nodes" good question, yes exactly that's what I meant by builtin, opposite of abstract, but your term concrete seems better, thanks.<div>It seems like what's stopping extensibility of concrete types through protos, is some way to declare / signal the concrete type being extended, in such a way the browser code dealing with concrete types can treat the extended proto the same way as the concrete type it's extending.</div><div>Then if the extended proto has extra fields, they can be routed to in the main scene, or if the proto body has a Script node, it can play with the regular fields on each frame. </div><div><br></div><div>-Doug</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Nov 9, 2025 at 3:22 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">My perhaps misunderstanding is that only abstract nodes can be extended.</div><div dir="auto"><br></div><div dir="auto">I think OO inheritance has been deprecated except for interfaces, and wrapping (delegating) ends up being a better choice for most cases.</div><div dir="auto"><br></div><div dir="auto">Doug, are you considering extending of concrete nodes?</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 9, 2025 at 8:23 AM GPU Group via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Builtin - nodes defined in x3d specs</div><div>Q. how to declare / detect what builtin node type a ProtoDeclare extends?</div><div>Thanks,</div><div>-Doug Sanden</div><div>Normally if we want to change parameters on a builtin node, we tinker directly with the builtin node in the scene with routes and scripts.</div>In theory builtin nodes are extensible -- a ProtoDeclare can wrap a builtin, IS all the fields, and add some spice with a Script node inside the proto that updates some fields on each frame. But how is the x3d browser code supposed to detect what builtin node type is being extended?<div>For example, Shape.appearance.material can take different types of material nodes: UnlitMaterial, Material, PhysicalMaterial. In browser application code there's different handling of each type:</div><div>if mat.type == UNLIT then</div><div>...</div><div>else if mat.type == MATERIAL then</div><div>...</div><div>else if mat.type == PHYSICAL then</div><div>...</div><div>endif</div><div>But a ProtoInstance has a ProtoDeclare type which doesn't give a hint as to which builtin type the ProtoDeclare is extending.</div><div>Q1. How is the code supposed to detect which builtin type to process?</div><div>Q2. If a ProtoDeclare extends a previous ProtoDeclare, which extends a builtin type, and assuming single-inheritance chain from builtin, how can browser code detect the original bultin being extnded?</div><div><br></div></div>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>
</blockquote></div>