<div dir="auto">I couldn’t have done any of this without X3DJSAIL. The below *might* work to remove items from a JavaScript-X3DJSAIL scenegraph. My testing has been incomplete to non-existent, I’m now discovering.</div><div dir="auto"><br></div><div dir="auto">The rest of the message is tech entertainment.</div><div dir="auto"><br></div><div dir="auto">Here’s my Java extensions to X3DJSAIL (sorry, no stylesheet) to remove items from the scenegraph. If you don’t want to remove anything from the scenegraph, these additions are not needed. Indeed, you can get/set to remove items from the scenegraph, just like these extensions do:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/jaminate/tree/main/Jaminate/app/src/main/java/net/coderextreme/remove">https://github.com/coderextreme/jaminate/tree/main/Jaminate/app/src/main/java/net/coderextreme/remove</a></div><br></div><div dir="auto"><br></div><div dir="auto">See Remove.java which brings it all together, thanks to an experimental Java feature. But yeah, just read XML in, and not removing anything should work too for a previous private message (included) describing Interpolator concatenation. I prototyped with a JavaScript-X3DJSAIL scenegraph, powered by X3DJSONLD:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/graaljs/net/remove/data/X3DautoclassNew.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/graaljs/net/remove/data/X3DautoclassNew.js</a></div><br></div><div dir="auto"><br></div><div dir="auto">But since I don’t even reference the new autoclass file from Jaminate, it hasn’t been adequately tested or tested at all?????</div><div dir="auto"><br></div><div dir="auto">Hilarious. No wonder I went with XML input into X3DJSAIL instead of JavaScript. At least Jin still has hair. I presume the large stack size fixes that?</div><div dir="auto"><br></div><div dir="auto">Despite that, if you want to implement your own remove package for JavaScript-X3DJSAIL from X3DUOM, look here:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/classesNew.py">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/classesNew.py</a></div><div dir="auto"><br></div><div dir="auto">But yeah, it’s currently *really* untested. Use at your own risk, Instead, I recommend garbage collection on the scenegraph, if even possible.</div><div dir="auto"><br></div><div dir="auto">This is the extent of my testing:</div><div dir="auto"><br></div><div dir="auto"><div>Remove rem = new Remove();
rem.removeChildren(X3D0.getScene().getChildren(), oldroutes);
rem.removeChildren(X3D0.getScene().getChildren(), oldois);
rem.removeChildren(X3D0.getScene().getChildren(), oldsensors);
}</div></div><div dir="auto"><br></div><div dir="auto">I’m not convinced it ever worked.</div><div dir="auto"><br></div><div dir="auto">RemoveChildren could be better termed removeDescendents???</div></div><div dir="auto"><br></div><div dir="auto">What a clown I am!</div><div dir="auto"><br></div><div dir="auto">Here’s my one and only test file</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://raw.githubusercontent.com/coderextreme/X3DJSONLD/master/src/main/graaljs/net/remove/data/Leif8Final.js">https://raw.githubusercontent.com/coderextreme/X3DJSONLD/master/src/main/graaljs/net/remove/data/Leif8Final.js</a></div><br></div><div dir="auto">OH! I get it! The autoclass file is prepended to the front of the file, such that it no longer needs to be loaded.</div><div dir="auto"><br></div><div dir="auto">Duh! I probably have tested this a bit! So one must use this serializer to get the right JavaScript scenegraph:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/JavaScriptSerializerNew.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/JavaScriptSerializerNew.js</a></div><br></div><div dir="auto">So now this actually makes sense! I tested JavaScript with Leif, not with Jin! I have 2 concatenation routines, one for JavaScript and one for XML! Using a JavaScript-X3DJSAIL scenegraph plus special autoclass file could potentially work quite well to remove scene elements!</div><div dir="auto"><br></div><div dir="auto">I don’t actually think that removing items from a live scenegraph is possible, but here’s the prototype for X3DJSAIL!</div><div dir="auto"><br></div><div dir="auto">Finale!</div><div dir="auto"><br></div><div dir="auto">John </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 15, 2024 at 7:40 AM 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-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">Hmm. Well, I added start stop Routes based on Jin.txt:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/jaminate/blob/main/Jaminate/app/src/main/javascript/Jin.txt" target="_blank">https://github.com/coderextreme/jaminate/blob/main/Jaminate/app/src/main/javascript/Jin.txt</a></div><br></div><div dir="auto">Then I went through all the routes and pulled out TimeSensor-OrientationInterpolator, OrientationInterpolator-Joint, TimeSensor-TimeSensor pairs, filling up data structures. Followed the TimeSensor chain, appending OrientationInterpolators to new OrientationInterpolator for each Joint, dividing keys by number of OrientationInterpolators per joint (roughly)—or number of TimeSensors.</div><div dir="auto"><br></div><div dir="auto">Created a new shiny timesensor with proximity sensor. Hooked up new OrientationInterpolators with concatenated names.</div><div dir="auto"><br></div><div dir="auto">Optionally cleaned up cruft. I’m not sure this works.</div><div dir="auto"><br></div><div dir="auto">Set old active time sensor cycleInterval to 0. Optionally also set other old time sensors’ cycleintervals to 0.</div><div dir="auto"><br></div><div dir="auto">So pardon me, I don’t know where 146 time sensors came from except Michalis looked at the .glb. And they appeared in view3dscene and output from tovrml.</div><div dir="auto"><br></div><div dir="auto">I still don’t grok the python to combine Blender actions, but I will investigate old blender importer. We might be able to get rid of the above. Also I will look online some more.</div><div dir="auto"><br></div><div dir="auto">The lucky thing was, jin had everything completely filled in, otherwise would be a mess. None of this is in the importer yet.</div><div dir="auto"><br></div><div dir="auto">The code is in JustHumans/Jaminate, previously mentioned. Not all of it is automated, and it probably should be done in python. I can give specifics, if desired.</div><div dir="auto"><br></div><div dir="auto">If this is not done, all interpolators start at time = 0 in Blender and it’s a mess. This is my experience, it may not be the same in the old importer. The old importer did not have armature.</div><div dir="auto"><br></div><div dir="auto">Setting bindTime may help on TimeSensors, but AFAIK, non-standard. So now you know why I was confused why bindTime didn’t work in WS.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">This worked for Jin, and Jin only.</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 15, 2024 at 12:02 AM Joe D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="font-family:arial,sans-serif;font-size:12pt;color:rgb(0,0,0)"><p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">Yes, </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">JinConcat10h.x3d </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">putting the jin animations together in a quick, but complete sequence is a nice demo feature. </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">We add a Demo button for that operation. </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">Setting record for longest DEF name. </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">How about a couple of sentences to tell how you did it? </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">Thanks,</p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif" dir="auto">Joe</p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif"> </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif"> </p>
</div>
<div style="border-left-width:1px;border-left-style:solid;box-sizing:border-box;padding:10px 0px 10px 15px;margin:0px;border-left-color:rgb(170,170,170)">
<p>-----Original Message-----<br>From: John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>><br>Sent: May 14, 2024 3:39 PM<br>To: Joe D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>>, Carol McDonald <<a href="mailto:cemd2@comcast.net" target="_blank">cemd2@comcast.net</a>>, Nicholas Polys <<a href="mailto:npolys@vt.edu" target="_blank">npolys@vt.edu</a>>, Katy Schildmeyer KS APPAREL DESIGN <<a href="mailto:katy@ksappareldesign.com" target="_blank">katy@ksappareldesign.com</a>>, GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>>, Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>>, Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br>Subject: Here you go!</p>
<p style="margin:0.1rem 0px;line-height:1"> </p>
<div dir="ltr">Jin as GLB, no animation.
<div> </div>
<div>Probably there's some issue with shapes not being imported. I will send a list.</div>
<div> </div>
<div>Maybe remove the image texture.</div>
<div> </div>
<div>Original and GLB attached.</div>
<div> </div>
<div>Kind of boring.</div>
<div> </div>
<div>Let me know what you want to change in the importer. All HAnim should be a Transform, let me know if not.</div>
</div>
</div>
<p style="margin:0.1rem 0px;line-height:1"> </p></blockquote></div></div>
</blockquote></div></div>