[x3d-public] setting TouchSensor DEF in initialize() and adding a ROUTE doesn't work

John Carlson yottzumm at gmail.com
Thu Jan 2 20:47:53 PST 2025


I want to use a TouchSensor in a ROUTE that I am adding in Sunrize
ECMAScript (SAI, embedded scripts), but I can't seem to set the DEF, so I
can't really add the ROUTE.

I can't use createX3DFromString(), perhaps, because I might not be able to
access DEF to get the DEF value.  I don't have experience using the result
from createX3DFromString().

I am creating TouchSensors in a double loop, and it appears the only way to
do it is with  code generation.

Hmm.  AFAIK, setting DEF is super simple in Java and Python, especially in
DOM.

I don't really feel like code generation is reasonable, because I will have
to rewrite my code.

This is where I through my hands up and use something like raylib or HTML.

Using a PROTO might be much more reasonable.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250102/ddc2fe1d/attachment.html>


More information about the x3d-public mailing list