Here are some physics examples, originally from the archive. There is still a little bit to do in X3DJSAIL, and one example, CarDemoMain has some strange Sensors with WHEEL and GAMEPAD DEFs.
The X3dtoJson.xslt has a couple of tweaks; you can review with JSON output.
$ for i in *.x3d; do echo $i; java -cp ~/X3DJSONLD/X3DJSAIL.4.0.full.jar org.web3d.x3d.jsail.CommandLine -validate $i; done 2>&1|grep Cast|sort -u
Results:
[error] X3DLoaderDOM: Incorrectly handled X3DJSAIL object construction, current elementObject=CollidableShape (CollidableShape), child="Shape", containerField="shape", java.lang.ClassCastException: class org.web3d.x3d.jsail.RigidBodyPhysics.CollidableShape cannot be cast to class org.web3d.x3d.sai.Grouping.X3DGroupingNode (org.web3d.x3d.jsail.RigidBodyPhysics.CollidableShape and org.web3d.x3d.sai.Grouping.X3DGroupingNode are in unnamed module of loader 'app')
java.lang.ClassCastException: class org.web3d.x3d.jsail.RigidBodyPhysics.CollidableShape cannot be cast to class org.web3d.x3d.sai.Grouping.X3DGroupingNode (org.web3d.x3d.jsail.RigidBodyPhysics.CollidableShape and org.web3d.x3d.sai.Grouping.X3DGroupingNode are in unnamed module of loader 'app')
Don't be surprised if there's a huge log of these. It just boils down to allowing a containerField=shape in the Shape node (to fit in CollidalbeShape.shape field).
The example JSON should guide you to implemented needed changes in RigidBody.geometry (it's an MFNode).
I will download latest X3DJSAIL now.
John
Diff:
Here's one more X3DJSAIL unique log message. Looks related to above.
[error] X3DLoaderDOM: Parent-child node relationship not found! (parent CollidableShape, child Shape, containerField='shape')
Diff: