[x3d-public] X3DJSAIL still broken! XML actually

John Carlson yottzumm at gmail.com
Fri Jul 2 05:02:35 PDT 2021


Holger, here is the method in X3DJSAIL that's causing the problem with 
ComposedCubeMapTexture.  The patch has been shipped to the stylesheet.   
Waiting for repair!

But yeah, removing ....Texture and synonyms from X3DUOM might be easier. 
Otherwise, we'll be patching everyone's code...


John

On 7/1/21 3:29 PM, John Carlson wrote:
> Actually, I believe *XML* export is failing from X3DJSAIL.  XML output 
> causes the X3dToJson.xslt to produce bad results.
>
> See below code.
>
> See pretty printed code attached from X3DJSAIL export.  Search for 
> multiple versions of backTexture causing the JSON generation to get 
> messed up.
>
> Perhaps we should add a schematron hint for when backTexture, etc. is 
> repeated in a ComposedCubeMapTexture?
>
> Java looks fine. Your Java looks good too.
>
> x3d/stylesheets/java/src/org/web3d/x3d/jsail/CubeMapTexturing/ComposedCubeMapTexture.java 
>
>> /**
>>          * Utility method to adjust field synonyms
>>          * @see <a
>> href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges">X3D 
>>
>> Scene Authoring Hints: X3D4 Field name changes for improved
>> consistency</a>
>>      */
>>     private void handleFieldSynonyms()
>>     {
>>         String correctedContainerField;
>>         if (hasAncestorX3D() &&
>> findAncestorX3D().getVersion().startsWith("3"))
>>              correctedContainerField = "back";
>>         else correctedContainerField = "backTexture";
>>
>>         if      (getBackTexture() != null)
>>                  ((X3DConcreteNode)
>> getBackTexture()).setContainerFieldOverride(correctedContainerField);
>>         else if (getBackTextureProtoInstance() != null)
>>                  ((X3DConcreteNode)
>> getBackTextureProtoInstance()).setContainerFieldOverride(correctedContainerField); 
>>
>>
>>         if      (getBottomTexture() != null)
>>                  ((X3DConcreteNode)
>> getBottomTexture()).setContainerFieldOverride(correctedContainerField);
>>         else if (getBottomTextureProtoInstance() != null)
>>                  ((X3DConcreteNode)
>> getBottomTextureProtoInstance()).setContainerFieldOverride(correctedContainerField); 
>>
>>
>>         if      (getFrontTexture() != null)
>>                  ((X3DConcreteNode)
>> getFrontTexture()).setContainerFieldOverride(correctedContainerField);
>>         else if (getFrontTextureProtoInstance() != null)
>>                  ((X3DConcreteNode)
>> getFrontTextureProtoInstance()).setContainerFieldOverride(correctedContainerField); 
>>
>>
>>         if      (getLeftTexture() != null)
>>                  ((X3DConcreteNode)
>> getLeftTexture()).setContainerFieldOverride(correctedContainerField);
>>         else if (getLeftTextureProtoInstance() != null)
>>                  ((X3DConcreteNode)
>> getLeftTextureProtoInstance()).setContainerFieldOverride(correctedContainerField); 
>>
>>
>>         if      (getRightTexture() != null)
>>                  ((X3DConcreteNode)
>> getRightTexture()).setContainerFieldOverride(correctedContainerField);
>>         else if (getRightTextureProtoInstance() != null)
>>                  ((X3DConcreteNode)
>> getRightTextureProtoInstance()).setContainerFieldOverride(correctedContainerField); 
>>
>>
>>         if      (getTopTexture() != null)
>>                  ((X3DConcreteNode)
>> getTopTexture()).setContainerFieldOverride(correctedContainerField);
>>         else if (getTopTextureProtoInstance() != null)
>>                  ((X3DConcreteNode)
>> getTopTextureProtoInstance()).setContainerFieldOverride(correctedContainerField); 
>>
>>         } 



More information about the x3d-public mailing list