[x3d-public] John being a clown, except first sentence. For I entertainment purposes only

John Carlson yottzumm at gmail.com
Wed May 15 07:52:58 PDT 2024


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.

The rest of the message is tech entertainment.

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:

https://github.com/coderextreme/jaminate/tree/main/Jaminate/app/src/main/java/net/coderextreme/remove


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:

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/graaljs/net/remove/data/X3DautoclassNew.js


But since I don’t even reference the new autoclass file from Jaminate, it
hasn’t been adequately tested or tested at all?????

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?

Despite that, if you want to implement your own remove package for
JavaScript-X3DJSAIL from X3DUOM, look here:

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/classesNew.py

But yeah, it’s currently *really* untested.  Use at your own risk, Instead,
I recommend garbage collection on the scenegraph, if even possible.

This is the extent of my testing:

Remove rem = new Remove();
rem.removeChildren(X3D0.getScene().getChildren(), oldroutes);
rem.removeChildren(X3D0.getScene().getChildren(), oldois);
rem.removeChildren(X3D0.getScene().getChildren(), oldsensors); }

I’m not convinced it ever worked.

RemoveChildren could be better termed removeDescendents???

What a clown I am!

Here’s my one and only test file

https://raw.githubusercontent.com/coderextreme/X3DJSONLD/master/src/main/graaljs/net/remove/data/Leif8Final.js

OH!  I get it!  The autoclass file is prepended to the front of the file,
such that it no longer needs to be loaded.

Duh!  I probably have tested this a bit!  So one must use this serializer
to get the right JavaScript scenegraph:

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/JavaScriptSerializerNew.js

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!

I don’t actually think that removing items from a live scenegraph is
possible, but here’s the prototype for X3DJSAIL!

Finale!

John

On Wed, May 15, 2024 at 7:40 AM John Carlson <yottzumm at gmail.com> wrote:

> Hmm.  Well, I added start stop Routes based on Jin.txt:
>
>
> https://github.com/coderextreme/jaminate/blob/main/Jaminate/app/src/main/javascript/Jin.txt
>
> 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.
>
> Created a new shiny timesensor with proximity sensor.  Hooked up new
> OrientationInterpolators with concatenated names.
>
> Optionally cleaned up cruft.  I’m not sure this works.
>
> Set old active time sensor cycleInterval to 0.  Optionally also set other
> old time sensors’ cycleintervals to 0.
>
> 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.
>
> 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.
>
> The lucky thing was, jin had everything completely filled in, otherwise
> would be a mess.  None of this is in the importer yet.
>
> 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.
>
> 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.
>
> 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.
>
>
> This worked for Jin, and Jin only.
>
> John
>
>
> On Wed, May 15, 2024 at 12:02 AM Joe D Williams <joedwil at earthlink.net>
> wrote:
>
>> Yes,
>>
>> JinConcat10h.x3d
>>
>> putting the jin  animations together in a quick, but complete sequence is
>> a nice demo feature.
>>
>> We add a Demo button for that operation.
>>
>> Setting record for longest DEF name.
>>
>> How about a couple of sentences to tell how you did it?
>>
>> Thanks,
>>
>> Joe
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: John Carlson <yottzumm at gmail.com>
>> Sent: May 14, 2024 3:39 PM
>> To: Joe D Williams <joedwil at earthlink.net>, Carol McDonald <
>> cemd2 at comcast.net>, Nicholas Polys <npolys at vt.edu>, Katy Schildmeyer KS
>> APPAREL DESIGN <katy at ksappareldesign.com>, GPU Group <gpugroup at gmail.com>,
>> Michalis Kamburelis <michalis.kambi at gmail.com>, Don Brutzman <
>> brutzman at nps.edu>
>> Subject: Here you go!
>>
>>
>> Jin as GLB, no animation.
>>
>> Probably there's some issue with shapes not being imported. I will send a
>> list.
>>
>> Maybe remove the image texture.
>>
>> Original and GLB attached.
>>
>> Kind of boring.
>>
>> Let me know what you want to change in the importer.  All HAnim should be
>> a Transform, let me know if not.
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240515/6bc71a39/attachment.html>


More information about the x3d-public mailing list