[x3d-public] X3D 4.0 specification problem: TextureProjectorparallel.fieldOfView
John Carlson
yottzumm at gmail.com
Wed Dec 18 22:10:42 PST 2024
Summary, pending updates from Don.
ProtoInstance with USE field should not contain a name field in Holger's
Library examples. Previously discussed, with no change evident.
X3dToJson.xslt produces an MFString for NavigationInfo at type, should be
array of strings, per Don's suggestion. I will try to reapply a patch.
X3dToJson.xslt: Appearance-pointProperties should be an object, not an
array.
X3DToJava.xslt OrthoViewpoint.setFieldOfView has 4 parameters, probably
should be one parameter, or X3DJSAIL should provide a 4 parameter option.
John needs to fix VolumeEmitter.java.
There seems to be some package conflict with X3DJSAIL and Holger's
VolumeEmitter example. I am not sure.
I will repeat the JSON tests with Holger's x3d-tidy.
Details:
I changed the X3DUOM+X_ITE field type of OrthoViewpoint.fieldOfView
temporarily, and ran my fieldTypesGenerator.py in X3DJSONLD: My
fieldTypes.js had this change in git diff:
"centerOfRotation" : "SFVec3f",
"description" : "SFString",
"farDistance" : "SFFloat",
- "fieldOfView" : "MFFloat",
+ "fieldOfView" : "SFVec3f",
"IS" : "SFNode",
"isBound" : "SFBool",
"jump" : "SFBool",
Plus others from Holger's X_ITE component. I have not tried any
serialization of X3D JSON versions of glTF samples yet.
Then I ran ```bash local.sh``` in X3DJSONLD/src/main/shell
json2all.js produced no changes to my serialized files. There were only
changes to date in my JSON files. I elide the date when producing
serialized files, otherwise, I would get loads of change that I would have
to check in with no real modifications to the file. What this means is the
serialized files reflect the source XML, not the intermediate JSON.
I went looking for more examples. Since I couldn't find any in the email
(is there one?) I pursued the sourceforge archives.
The only one I found in the sourceforge archives was this:
Basic/development/TestSchematronDiagnostics.x3d:
<OrthoViewpoint DEF='NoSpacesInDescription'
description='NeedToPutSpacesInDescription'/>
No ConformanceNist? Frustrated, I decided to do a svn update. There were
many updates.
No OrthoViewpoint search result updates. I'm not sure what to use for
fieldOfView to test my serializers?
I will do a search on Holger's Library:
Found two;, great!
./Tests/Components/ParticleSystems/VolumeEmitter.x3d
./Tests/Components/Shape/Connectors.x3d
Moved those to my data folder.
Try to run several.sh
Apparently, the X3DJSONLD install had failed. Reinstalled.
Reran.
Ran into issues with iri and iri-reference in X3D JSON schema. I had not
upgraded X3DJSONLD.
Fixed ajv configuration.
Ajv reports:
Adding schema: 4.0
Suppressing @USE missing property. Use $ node x3dvalidate.js --fullreport
../data/Connectors.json ... to reveal possibly confusing errors
Suppressing NavigationInfo.type as array. Use $ node x3dvalidate.js
--fullreport ../data/Connectors.json file ... to reveal possibly confusing
errors
Suppressing null passingSchemas. Use $ node x3dvalidate.js --fullreport
../data/Connectors.json file ... to reveal possibly confusing errors
Success validating ../data/Connectors.json
chopped rejoined "\"PLANE_create3000.de\", \"ANY\""
Suppressing @USE missing property. Use $ node x3dvalidate.js --fullreport
../data/VolumeEmitter.json ... to reveal possibly confusing errors
Suppressing null passingSchemas. Use $ node x3dvalidate.js --fullreport
../data/VolumeEmitter.json file ... to reveal possibly confusing errors
Success validating ../data/VolumeEmitter.json
```$ npx x3dvalidate --fullreport ../data/Connectors.json``` reports:
keyword: type
location in document: /X3D/Scene/-children/4/NavigationInfo/@type
message: must be array
params: {"type":"array"}
file: ../data/Connectors.json
version: 4.0
The JSON code looks like:
{ "NavigationInfo":
{
"@type":"\"PLANE_create3000.de\", \"ANY\""
}
},
@type should be an array, as Don says, but he doesn't change the
stylesheet. I guess I will look for stylesheet updates. I don't see
anything relevant, updating anyway.
I will propose a patch again.
I guess I'm still arguing with Don about this.
```$ npx x3dvalidate --fullreport ../data/VolumeEmitter.json``` reports:
keyword: type
location in document:
/X3D/Scene/-children/4/ParticleSystem/-appearance/Appearance/-pointProperties
message: must be object
params: {"type":"object"}
file: ../data/VolumeEmitter.json
version: 4.0
This one is more interesting and indicates a problem with X3dToJson.xslt or
X3D JSON schema.
Relevant code:
"-appearance":
{ "Appearance":
{
"-pointProperties":[
{ "PointProperties":
{
"@pointSizeScaleFactor":2,
"@pointSizeMaxValue":2
}
}
]
}
}
XML looks like:
<Appearance>
<PointProperties
pointSizeScaleFactor='2'
pointSizeMaxValue='2'/>
</Appearance>
Web3d is down, so I can't reference the standard. X_ITE's website
indicates Appearance.pointProperties is an SFNode:
SFNode [in, out] *pointProperties* NULL [PointProperties]
<https://create3000.github.io/x_ite/components/shape/appearance/#sfnode-in-out-pointproperties-null-pointproperties>
Single contained PointProperties
<https://create3000.github.io/x_ite/components/shape/pointproperties/> node
that can specify additional visual attributes applied to corresponding
point geometry.
X3DOM's website says:
pointProperties SFNode PointProperties
<https://doc.x3dom.org/developer/x3dom/nodeTypes/PointProperties.html> The
pointProperties field, if specified, shall contain a PointProperties node.
If pointProperties is NULL or unspecified, the pointProperties field has no
effect.
So it appears like pointProperties should be an object,and not an array. I
am currently using X3dToJson.xslt, which is incorrect from the point of
view of X3DOM and X_ITE, and X3D JSON schema is correct. This is a new
fiinding for me, and I will try to patch the stylesheet.
My suggestion is to review X3dToJson.xslt and have a correct X3D JSON
schema to test the results.
Continuing with several.sh:
My java is can mostly compile, see compilation:
javac -proc:full -J-Xss1g -J-Xmx4g Connectors.java
~/X3DJSONLD/src/main/shell
~/X3DJSONLD/src/main/java/net/coderextreme/data ~/X3DJSONLD/src/main/shell
javac -proc:full -J-Xss1g -J-Xmx4g VolumeEmitter.java
VolumeEmitter.java:85: error: cannot find symbol
.setEmitter(new VolumeEmitter().setDirection(new double[]
{0,0,0}).setMass(0.01).setSurfaceArea(0.01)
^
symbol: method setDirection(double[])
location: class VolumeEmitter
1 error
There's issues with Don's, probably pending X3dToJava.xslt. Will attempt
to update stylesheet:
compiling
~/X3DJSONLD/src/main/java ~/X3DJSONLD/src/main/shell
.\net\x3djsonld\data\VolumeEmitter.java:110: error: no suitable method
found for setFieldOfView(double,double,double,double)
.addChild(new
OrthoViewpoint().setDescription("OrthoViewpoint").setFieldOfView(-1.5,-1.5,1.5,1.5))
^
method OrthoViewpoint.setFieldOfView(float[]) is not applicable
(actual and formal argument lists differ in length)
method OrthoViewpoint.setFieldOfView(MFFloat) is not applicable
(actual and formal argument lists differ in length)
method OrthoViewpoint.setFieldOfView(ArrayList<Float>) is not applicable
(actual and formal argument lists differ in length)
method OrthoViewpoint.setFieldOfView(int[]) is not applicable
(actual and formal argument lists differ in length)
method OrthoViewpoint.setFieldOfView(double[]) is not applicable
(actual and formal argument lists differ in length)
.\net\x3djsonld\data\VolumeEmitter.java:113: error: cannot find symbol
.setEmitter(new /*avoid name collision with file name by defining
full
package*/org.web3d.x3d.jsail.VolumeEmitter().setDirection(0.0,0.0,0.0).setMass(0.01).setSurfaceArea(0.01)
^
symbol: class VolumeEmitter
location: package org.web3d.x3d.jsail
2 errors
More work with Java stylesheet. Holger needs to update his ProtoInstances:
BEGIN ../data/Connectors.x3d > java, *** Error: found ProtoInstance
USE='N1' with unnecessary name='Node' included, need to remove name field
from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N1' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N1' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N2' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N3' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N6' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N4' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N5' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N7' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N6' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N7' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N8' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N1' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N2' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N3' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N4' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N5' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N6' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N7' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
*** Error: found ProtoInstance USE='N8' with unnecessary name='Node'
included, need to remove name field from ProtoInstance USE nodes
END ../data/Connectors.x3d
I'm guessing even though X3dToJava.xslt stylesheet is updated, X3DJSAIL
still needs to be updated: (these are fresh downloads from sourceforge,
with my own build of X3DJSAIL, which are probably not released):
Same errors as above:
.\net\x3djsonld\data\VolumeEmitter.java:110: error: no suitable method
found for setFieldOfView(double,double,double,double)
.addChild(new
OrthoViewpoint().setDescription("OrthoViewpoint").setFieldOfView(-1.5,-1.5,1.5,1.5))
^
method OrthoViewpoint.setFieldOfView(float[]) is not applicable
(actual and formal argument lists differ in length)
method OrthoViewpoint.setFieldOfView(MFFloat) is not applicable
(actual and formal argument lists differ in length)
method OrthoViewpoint.setFieldOfView(ArrayList<Float>) is not applicable
(actual and formal argument lists differ in length)
method OrthoViewpoint.setFieldOfView(int[]) is not applicable
(actual and formal argument lists differ in length)
method OrthoViewpoint.setFieldOfView(double[]) is not applicable
(actual and formal argument lists differ in length)
.\net\x3djsonld\data\VolumeEmitter.java:113: error: cannot find symbol
.setEmitter(new /*avoid name collision with file name by defining
full
package*/org.web3d.x3d.jsail.VolumeEmitter().setDirection(0.0,0.0,0.0).setMass(0.01).setSurfaceArea(0.01)
^
symbol: class VolumeEmitter
location: package org.web3d.x3d.jsail
More stuff on Holger's side with stylesheet conversion. with
X3dToES5.xslt. I will look for stylesheet updates. The stylesheet up to
date, but still errors:
$ ../../../../shell/jjs.sh Connectors.js 2>&1 |grep Exception|sort -u
org.web3d.x3d.sai.InvalidProtoException: *** ProtoInstance has name field,
which is not included in a ProtoInstance USE node.
It does look like Don has done a great deal of work on the stylesheets
overall, further investigation and updates are needed on my part.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20241219/5f99e14f/attachment-0001.html>
More information about the x3d-public
mailing list