<div dir="ltr">What I really think I want to do is send a set_fraction = 0 event to all ScalarInterpolators, and have that controlled by a menu selection.<div><br></div><div>John</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Feb 1, 2025 at 8:44 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">I think what I will do is create a reset button to send startTime to all TimeSensors, enabled or not.</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, Feb 1, 2025 at 5:55 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@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="ltr"><div dir="ltr">Both x-ite and x3dom behave the same. Each animation is independent and resets individually after it is stopped and then restarted.<div><br></div><div>It seems you aim for another behaviour with some dependency between animations.</div></div></div><div dir="ltr"><div dir="ltr"><div><br></div><div>-Andreas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 1, 2025 at 4:35 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">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="ltr"><table cellpadding="0" id="m_-8603790590610147419m_-7683390039877972900m_511967527990857350gmail-undefined" style="width:1050px;table-layout:fixed;border-spacing:0px"><tbody><tr><td style="width:1050px;vertical-align:top;height:100px"><div id="m_-8603790590610147419m_-7683390039877972900m_511967527990857350gmail-:gb" style="border-radius:1px;box-sizing:border-box;padding:0px 0px 16px;border:0px;margin:0px"><div></div></div></td></tr></tbody></table>I'm trying very hard to look at this, but I'm not seeing the animation reset when one turns an animation off.  Perhaps I should try X3DOM?<div><br></div><div><a href="https://create3000.github.io/x_ite/playground/?url=https://gist.githubusercontent.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89/raw/c02637b602f9241c9ea73b5ad859ab330c071e25/toggleReset.x3d" target="_blank">https://create3000.github.io/x_ite/playground/?url=https://gist.githubusercontent.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89/raw/c02637b602f9241c9ea73b5ad859ab330c071e25/toggleReset.x3d</a></div><div><br></div><div>Trying to compare with:</div><div><a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89/raw/c02637b602f9241c9ea73b5ad859ab330c071e25/toggleReset.x3d" target="_blank">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89/raw/c02637b602f9241c9ea73b5ad859ab330c071e25/toggleReset.x3d</a></div><div><br></div><div><br></div><div>If I click multiple checkboxes, AFAICT, the whole animation doesn't reset.  I want ALL animations to reset when a button is pressed in, and when any button is unpressed.</div><div><br></div><div>This is a better link for mine:</div><div><br></div><div><a href="https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d" target="_blank">https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d</a></div><div><br></div><div>So probably there needs to be a global start/stop time for all enabled TimeSensors?</div><div><br></div><div>I see you have two ProtoDeclares and I only have one.  I might be able to do something like that.</div><div><br></div><div>Hmm!</div><div><br></div><div>John</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 1, 2025 at 2:35 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@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="ltr">Hi John,<div><br></div><div><a href="https://gist.githubusercontent.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89/raw/c02637b602f9241c9ea73b5ad859ab330c071e25/toggleReset.x3d" target="_blank">https://gist.githubusercontent.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89/raw/c02637b602f9241c9ea73b5ad859ab330c071e25/toggleReset.x3d</a></div><div><br></div><div>resets the animation everytime it is restarted after stopping.</div><div><br></div><div>The only change is replacing resumeTime and pauseTime with startTime and stopTime .</div><div>Instead of a toggle button, it would be possible to have two separate buttons, one for stopping and one for resetting.</div><div><br></div><div>This may be what you are looking for, -Andreas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 1, 2025 at 6:16 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">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="ltr"><div dir="ltr">Andreas,<div><br></div><div>For extra credit, reset the animation each time a toggle button is pressed.  So far, it looks dubious without scripting.</div><div><br></div><div>Got a reliable solution for resetting the animations?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 11, 2024 at 3:08 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@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">Hi John, group,<br>
<br>
Exploring how far one could get without X3D scripts and only using<br>
event utilities, let me share an example of a panel of individually<br>
controlled toggle buttons which then drive a simple assemblage of<br>
individually animated spheres:<br>
<br>
<a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89/raw/37f94755f763ecc9a0439a0dab2f32441e8b12aa/toggleButtonExample.x3d" rel="noreferrer" target="_blank">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89/raw/37f94755f763ecc9a0439a0dab2f32441e8b12aa/toggleButtonExample.x3d</a><br>
<br>
<a href="https://gist.github.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89" rel="noreferrer" target="_blank">https://gist.github.com/andreasplesch/6fd2fd0b0f745b3549b74150b7752d89</a><br>
<br>
There are two sections, one for the control panel and one for the<br>
controlled assemblage. Each section has a Proto as the main building<br>
block for simple reuse. The toggle button Proto is based on wrapping,<br>
synced Integer and BooleanSequencers for color toggling and outputting<br>
useful events corresponding to the state of the button. This is<br>
probably the most useful and interesting part. Everything else is more<br>
for demonstration.<br>
There is also an animatedBlob Proto which shows how animations might<br>
be controlled by routing events from a toggle button.<br>
The animations all start out in sync after being enabled by a button<br>
but then can be individually paused and resumed for arbitrarily<br>
pulsating patterns.<br>
<br>
Event utilities generally turn out to require verbose declarative<br>
code, compared to logic in scripts but that can be mitigated to a good<br>
extent by Protos which also help with scene structure.<br>
<br>
There is one standard related question which came up for me and I<br>
think that may have been raised before. The question is what the<br>
value_changed should be after a Sequencer receives a first 'next'<br>
event without ever having received a set_fraction or other event. In<br>
this case there is not a next value because there was never any value<br>
in the first place. Both x3dom and x_ite currently output the first<br>
keyValue and set the first key as the current key in this case.<br>
<br>
x_ite and x3dom work almost the same with the example. x_ite<br>
immediately starts the animations where x3dom waits as intended until<br>
the related Timesensors receive a first 'enabled' event. There may be<br>
a simple fix for x_ite use but I could not find it.<br>
<br>
Thanks, -Andreas<br>
<br>
On Sat, Dec 7, 2024 at 4:37 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
><br>
> So here’s an interesting question:  If I have the same ROUTE in two different choices in a Switch, is one of them ignored?<br>
><br>
> Not that I’m going to do that.<br>
><br>
> I’m probably going to try using a Switch unless someone says that ROUTEs are always active in a Switch, disagreeing with the AI.<br>
><br>
> John<br>
><br>
> On Sat, Dec 7, 2024 at 3:29 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>><br>
>> From X3D4:<br>
>><br>
>><br>
>> 4.4.8.2 Routes<br>
>><br>
>> Routes are not nodes.<br>
>><br>
>> [snip]<br>
>><br>
>> Redundant routing is ignored. If an X3D file repeats a routing path, the second and subsequent identical routes are ignored. This also applies for routes created dynamically using the X3D SAI.<br>
>><br>
>><br>
>> Can someone clarify how statements are affected by Switches?  Can I have different choices of a PROTO inside a Switch?  Effectively changing ProtoBody content at run-time???<br>
>><br>
>> John<br>
>><br>
>><br>
>><br>
>> On Sat, Dec 7, 2024 at 2:40 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>>><br>
>>> Would it be possible to put an animation’s ROUTEs in a Switch that could be toggled on and off with a boolean toggle?<br>
>>><br>
>>> Google AI says:<br>
>>><br>
>>> Yes, you can absolutely put "ROUTE" nodes within a "Switch" node in X3D; in fact, it's a common practice to use them together to dynamically control which set of connections (via ROUTE) are active depending on which child node of the Switch is currently selected.<br>
>>><br>
>>> I didn’t realize that statements were affected by Switch.<br>
>>><br>
>>> John<br>
>>><br>
>>> On Sat, Dec 7, 2024 at 1:43 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>>>><br>
>>>> We are dealing with multiple facial animations.  The thing we want to do is combine animations using HAnimDisplacers.  Currently, our animations go from key = 0 to key = 1, (weight = 0 to weight = 1) and each animation is controlled by a single TimeSensor that we enable or disable.  What we want to do is enable multiple facial animations, yet retain a single TimeSensor.  I have done something with enabling multiple time sensors all at the same time.  So, ideally, we could toggle each facial animation individually.<br>
>>>><br>
>>>> Note that one can have multiple simultaneous HAnimDisplacer animations on a single Coordinate, they all add up just fine.  There’s no single animation per body part requirement as there is in other places in X3D (according to Michalis, from my understanding).<br>
>>>><br>
>>>> I don’t currently know how to individually toggle multiple animations without toggling multiple TimeSensors, so assistance is welcome!  Indeed, a multiple toggle button X3D example would be welcome (hopefully, something we can put in a scenegraph).<br>
>>>><br>
>>>> Here’s what we currently have<br>
>>>> <a href="https://github.com/coderextreme/ci2had/blob/main/resources/SingleMenuJin.x3d" rel="noreferrer" target="_blank">https://github.com/coderextreme/ci2had/blob/main/resources/SingleMenuJin.x3d</a><br>
>>>><br>
>>>> As you can see, lots of duplication.<br>
>>>><br>
>>>> Viewed best in FreeWRL and Sunrize/X_ITE.<br>
>>>><br>
>>>> John<br>
<br>
<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
</blockquote></div>
</div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>
</blockquote></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div>
</blockquote></div></div>
</blockquote></div>