[x3d-public] setting TouchSensor DEF in initialize() and adding a ROUTE doesn't work
John Carlson
yottzumm at gmail.com
Fri Jan 3 09:44:09 PST 2025
Are there any examples of adding to a right mouse button (RMB) context menu
in the archives?
I’m thinking of including a list of animations in the X_ITE menu.
What I envision is right click to bring up body parts, then a submenu for
animations, which will toggle the checkboxes on my main grid. So both will
be possible.
John
On Thu, Jan 2, 2025 at 11:09 PM John Carlson <yottzumm at gmail.com> wrote:
> I'm trying to achieve a large checkbox menu, with animations on the X axis
> and body parts on the Y axis, plus a row for all body parts for convenience.
>
> (sorry, large image)
>
> [image: image.png]
>
> My guess is that a PROTO with ProtoInstance code generation will be the
> best way to achieve this (no, I don't want to type all that in)!
>
> Source code is available for interested parties.
>
> It would be OK, if people told me to do this in HTML, but I would probably
> switch to X_ITE or X_ITE vscode.
>
> John
>
> On Thu, Jan 2, 2025 at 10:47 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> 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/20250103/f0038473/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 232226 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250103/f0038473/attachment-0001.png>
More information about the x3d-public
mailing list