From yottzumm at gmail.com Sun Apr 1 02:04:09 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 05:04:09 -0400
Subject: [x3d-public] possible issue with X_ITE with Edge;
CDATA sections not showing up inEdge XML textareas.
In-Reply-To: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
Message-ID: <5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
More info. When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
So likely there?s a problem with my XML and CDATA. But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
Holger, there may be an issue with:
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
This is with 4.1.5.
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 02:06:23 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 05:06:23 -0400
Subject: [x3d-public] where is the constructor for MFVec3f standardized?
In-Reply-To:
References: <5abff6e2.559d370a.d5e45.6cb3@mx.google.com>
Message-ID: <5ac0a10d.17e1370a.1e9ef.bf12@mx.google.com>
Looks my way is non-standard. It?s basically how I got it to work however.
John
Sent from Mail for Windows 10
From: GPU Group
Sent: Saturday, March 31, 2018 6:26 PM
To: John Carlson
Cc: x3d-public at web3d.org
Subject: Re: [x3d-public] where is the constructor for MFVec3f standardized?
http://www.web3d.org/documents/specifications/19777-1/V3.3/Part1/functions.html#MFVec3f
PS I did get the list parameter working with duktape javascript engine - will take me a few days or weeks to publish the freewrl executable .msi - but basically the list [] is an object and the internal code can use the javscript api to test if its an array type or has length > 1 or some other way to inspect the key,values, and if so and the SAI function parameter list is variable or some other set of conditions, then I can split the list up to use like regular varargs.
C = new MFVec3f(A,B);? //the old conventional varargs way
C = new MFVec3f( [A,B] ); //Carlson's new 1 param list way, got working with duktape in freewrl
On Sat, Mar 31, 2018 at 3:00 PM, John Carlson wrote:
Where is the constructor for MFVec3f standardized?
?
Thanks,
?
John
?
Sent from Mail for Windows 10
?
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 02:51:57 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 05:51:57 -0400
Subject: [x3d-public] possible issue with X_ITE with Edge;
CDATA sections not showingup inEdge XML textareas.
In-Reply-To: <5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
Message-ID: <5ac0abbc.aa24c80a.974af.009d@mx.google.com>
The only issue now is the color of the ProtoInstances (passed as parameters to the Protos) in the XML. I will put into a URL and test.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:04 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingup inEdge XML textareas.
More info.? When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).??
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
So likely there?s a problem with my XML and CDATA.? But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
Holger, there may be an issue with:
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
This is with 4.1.5.
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 03:05:58 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 06:05:58 -0400
Subject: [x3d-public] possible issue with X_ITE with Edge;
CDATA sections not showingupinEdge XML textareas.
In-Reply-To: <5ac0abbc.aa24c80a.974af.009d@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
<5ac0abbc.aa24c80a.974af.009d@mx.google.com>
Message-ID: <5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
The color has been fixed by changing the type from SFVec3f to SFColor (whew).
https://coderextreme.net/X3DJSONLD/src/main/html/x_ite.xhtml
Thanks!
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:51 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingupinEdge XML textareas.
The only issue now is the color of the ProtoInstances (passed as parameters to the Protos) in the XML.? I will put into a URL and test.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:04 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingup inEdge XML textareas.
More info.? When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).??
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
So likely there?s a problem with my XML and CDATA.? But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
Holger, there may be an issue with:
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
This is with 4.1.5.
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flowers2.x3d
Type: application/octet-stream
Size: 6211 bytes
Desc: not available
URL:
From yottzumm at gmail.com Sun Apr 1 04:44:47 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 07:44:47 -0400
Subject: [x3d-public] possible issue with X_ITE with Edge;
CDATA sections notshowingupinEdge XML textareas. Problem with other
browsers.
In-Reply-To: <5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
<5ac0abbc.aa24c80a.974af.009d@mx.google.com>
<5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
Message-ID: <5ac0c62d.ef32c80a.ca4cb.6ec9@mx.google.com>
1. XML5656: Illegal qualified name character.
2. [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:203:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:201:2) at loadXmlBrowsers (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:80:4) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:289:8) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:437:3)"}
Still having an issue or two with createX3DFromString in Edge, but either the initial XML load works, or the XML -> My JSON -> XML conversion works, but the JSON -> XML conversion does not work. The JSON load (of Don?s JSON) does not produces a good XML string for createX3DFromString or something. I will verify, but there?s no issue loading JSON with importJS that I can tell?it?s the best at loading ?. Or URLs work too. Don?s XML is attached as don.txt and my XML is attached as john.txt. So I think the don.txt is failing. I will test them as URLs.
However the file doesn?t load in the other browsers besides web browser, and I?m wondering why. I think it?s because coordIndex cannot be initialized from a script, or the MFVec3f constructor ? Can some tell me how to add an SFVec3f to an MFVec3f in the general case? Should I add the SFVec3f to MFVec3f after creating it by doing a push()?
Other vendors, let me know. Attached is the file. I now believe the JSON file produces the above error
I?m thinking the standard may not be flexible enough for non-declarative graphics, which is unfortunate?but I didn?t look at MF field methods in general.
Doug, also see if you can get this file working in FreeWRL.
I do recall an older version of this file working with other browsers, so I know it?s possible!
Thanks,
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 6:05 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections notshowingupinEdge XML textareas.
The color has been fixed by changing the type from SFVec3f to SFColor (whew).
https://coderextreme.net/X3DJSONLD/src/main/html/x_ite.xhtml
Thanks!
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:51 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingupinEdge XML textareas.
The only issue now is the color of the ProtoInstances (passed as parameters to the Protos) in the XML.? I will put into a URL and test.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:04 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingup inEdge XML textareas.
More info.? When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).??
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
So likely there?s a problem with my XML and CDATA.? But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
Holger, there may be an issue with:
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
This is with 4.1.5.
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flowers2.json
Type: application/json
Size: 16923 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flowers2.x3d
Type: application/octet-stream
Size: 6474 bytes
Desc: not available
URL:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: don.txt
URL:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: john.txt
URL:
From yottzumm at gmail.com Sun Apr 1 05:09:55 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 08:09:55 -0400
Subject: [x3d-public] possible issue with X_ITE with Edge;
CDATA sectionsnotshowingupinEdge XML textareas. Problem with other
browsers.
In-Reply-To: <5ac0c62d.ef32c80a.ca4cb.6ec9@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
<5ac0abbc.aa24c80a.974af.009d@mx.google.com>
<5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
<5ac0c62d.ef32c80a.ca4cb.6ec9@mx.google.com>
Message-ID: <5ac0cc12.042aed0a.b6b06.59df@mx.google.com>
Both serialized XML versions load work from URLs after adding CDATA sections to XML. Otherwise, the script isn?t run in Edge. Andreas, do you have some magic for adding CDATA sections in Edge? Thanks!
I also replaced the < when hand editing the CDATA sections. So that may be an issue as well
Attached.
Getting closer.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 7:44 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATA sectionsnotshowingupinEdge XML textareas. Problem with other browsers.
1. XML5656: Illegal qualified name character.
2. [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:203:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:201:2) at loadXmlBrowsers (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:80:4) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:289:8) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:437:3)"}
Still having an issue or two with createX3DFromString in Edge, but either the initial XML load works, or the XML -> My JSON -> XML conversion works, but the JSON -> XML conversion does not work.? The JSON load (of Don?s JSON) does not produces a good XML string for createX3DFromString or something.? I will verify, but there?s no issue loading JSON with importJS that I can tell?it?s the best at loading ?. Or URLs work too. Don?s XML is attached as don.txt and my XML is attached as john.txt.? So I think the don.txt is failing.? I will test them as URLs.
However the file doesn?t load in the other browsers besides web browser, and I?m wondering why.? I think it?s because coordIndex cannot be initialized from a script, or the MFVec3f constructor ?? Can some tell me how to add an SFVec3f to an MFVec3f in the general case?? Should I add the SFVec3f to MFVec3f after creating it by doing a push()?
Other vendors, let me know.? Attached is the file.? I now believe the JSON file produces the above error
I?m thinking the standard may not be flexible enough for non-declarative graphics, which is unfortunate?but I didn?t look at MF field methods in general.
Doug, also see if you can get this file working in FreeWRL.
I do recall an older version of this file working with other browsers, so I know it?s possible!
Thanks,
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 6:05 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections notshowingupinEdge XML textareas.
The color has been fixed by changing the type from SFVec3f to SFColor (whew).
https://coderextreme.net/X3DJSONLD/src/main/html/x_ite.xhtml
Thanks!
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:51 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingupinEdge XML textareas.
The only issue now is the color of the ProtoInstances (passed as parameters to the Protos) in the XML.? I will put into a URL and test.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:04 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingup inEdge XML textareas.
More info.? When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).??
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
So likely there?s a problem with my XML and CDATA.? But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
Holger, there may be an issue with:
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
This is with 4.1.5.
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: don.x3d
Type: application/octet-stream
Size: 6190 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: john.x3d
Type: application/octet-stream
Size: 9555 bytes
Desc: not available
URL:
From yottzumm at gmail.com Sun Apr 1 05:13:01 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 08:13:01 -0400
Subject: [x3d-public] possible issue with X_ITE with Edge;
CDATAsectionsnotshowingupinEdge XML textareas. Problem with other
browsers.
In-Reply-To: <5ac0cc12.042aed0a.b6b06.59df@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
<5ac0abbc.aa24c80a.974af.009d@mx.google.com>
<5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
<5ac0c62d.ef32c80a.ca4cb.6ec9@mx.google.com>
<5ac0cc12.042aed0a.b6b06.59df@mx.google.com>
Message-ID: <5ac0cccb.84d1370a.91202.d99d@mx.google.com>
Loading JSON definitely prevents animation from happening in the X_ITE XML text section in Edge. That?s the CDATA section I think. Load bubs.json for example.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 8:09 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATAsectionsnotshowingupinEdge XML textareas. Problem with other browsers.
Both serialized XML versions load work from URLs after adding CDATA sections to XML.? Otherwise, the script isn?t run in Edge. Andreas, do you have some magic for adding CDATA sections in Edge?? Thanks!
I also replaced the < when hand editing the CDATA sections.? So that may be an issue as well
Attached.
Getting closer.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 7:44 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATA sectionsnotshowingupinEdge XML textareas. Problem with other browsers.
1. XML5656: Illegal qualified name character.
2. [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:203:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:201:2) at loadXmlBrowsers (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:80:4) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:289:8) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:437:3)"}
Still having an issue or two with createX3DFromString in Edge, but either the initial XML load works, or the XML -> My JSON -> XML conversion works, but the JSON -> XML conversion does not work.? The JSON load (of Don?s JSON) does not produces a good XML string for createX3DFromString or something.? I will verify, but there?s no issue loading JSON with importJS that I can tell?it?s the best at loading ?. Or URLs work too. Don?s XML is attached as don.txt and my XML is attached as john.txt.? So I think the don.txt is failing.? I will test them as URLs.
However the file doesn?t load in the other browsers besides web browser, and I?m wondering why.? I think it?s because coordIndex cannot be initialized from a script, or the MFVec3f constructor ?? Can some tell me how to add an SFVec3f to an MFVec3f in the general case?? Should I add the SFVec3f to MFVec3f after creating it by doing a push()?
Other vendors, let me know.? Attached is the file.? I now believe the JSON file produces the above error
I?m thinking the standard may not be flexible enough for non-declarative graphics, which is unfortunate?but I didn?t look at MF field methods in general.
Doug, also see if you can get this file working in FreeWRL.
I do recall an older version of this file working with other browsers, so I know it?s possible!
Thanks,
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 6:05 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections notshowingupinEdge XML textareas.
The color has been fixed by changing the type from SFVec3f to SFColor (whew).
https://coderextreme.net/X3DJSONLD/src/main/html/x_ite.xhtml
Thanks!
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:51 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingupinEdge XML textareas.
The only issue now is the color of the ProtoInstances (passed as parameters to the Protos) in the XML.? I will put into a URL and test.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:04 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingup inEdge XML textareas.
More info.? When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).??
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
So likely there?s a problem with my XML and CDATA.? But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
Holger, there may be an issue with:
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
This is with 4.1.5.
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 05:39:37 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 08:39:37 -0400
Subject: [x3d-public] CDATA sections not showing up in Edge. X3DJSONLD.
In-Reply-To: <5ac0cccb.84d1370a.91202.d99d@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
<5ac0abbc.aa24c80a.974af.009d@mx.google.com>
<5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
<5ac0c62d.ef32c80a.ca4cb.6ec9@mx.google.com>
<5ac0cc12.042aed0a.b6b06.59df@mx.google.com>
<5ac0cccb.84d1370a.91202.d99d@mx.google.com>
Message-ID: <5ac0d307.87a4370a.b5259.3187@mx.google.com>
So it looks like:
xmlDoc.createCDATASection("This is an element");
is the standard way of creating a CDATA section, and this works in X3DJSONLD server side. Can we use this in Edge with the other hack to get CDATA sections in place? Or will using the HTML document variable throw us off? I guess we should be using an XML document and definitely not the HTML document, eh?
Looks like the way to get an XML document in the browser is:
var documentType = document.implementation.createDocumentType(qualifiedNameStr, publicId, systemId)
var xmlDoc = document.implementation.createDocument(namespaceURI, qualifiedNameStr, documentType);
Can anyone confirm? I?d like to get this into X3DJSONLD GUI asap. It?s already in my server side code with xmldom.
Probably I?ll start working on this now. I?m not sure what putting an xml document in HTML will do however, when I put it in a textarea, so?help!
Thanks,
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 8:12 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge;CDATAsectionsnotshowingupinEdge XML textareas. Problem with other browsers.
Loading JSON definitely prevents animation from happening in the X_ITE XML text section in Edge.? That?s the CDATA section I think.? Load bubs.json for example.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 8:09 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATAsectionsnotshowingupinEdge XML textareas. Problem with other browsers.
Both serialized XML versions load work from URLs after adding CDATA sections to XML.? Otherwise, the script isn?t run in Edge. Andreas, do you have some magic for adding CDATA sections in Edge?? Thanks!
I also replaced the < when hand editing the CDATA sections.? So that may be an issue as well
Attached.
Getting closer.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 7:44 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATA sectionsnotshowingupinEdge XML textareas. Problem with other browsers.
1. XML5656: Illegal qualified name character.
2. [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:203:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:201:2) at loadXmlBrowsers (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:80:4) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:289:8) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:437:3)"}
Still having an issue or two with createX3DFromString in Edge, but either the initial XML load works, or the XML -> My JSON -> XML conversion works, but the JSON -> XML conversion does not work.? The JSON load (of Don?s JSON) does not produces a good XML string for createX3DFromString or something.? I will verify, but there?s no issue loading JSON with importJS that I can tell?it?s the best at loading ?. Or URLs work too. Don?s XML is attached as don.txt and my XML is attached as john.txt.? So I think the don.txt is failing.? I will test them as URLs.
However the file doesn?t load in the other browsers besides web browser, and I?m wondering why.? I think it?s because coordIndex cannot be initialized from a script, or the MFVec3f constructor ?? Can some tell me how to add an SFVec3f to an MFVec3f in the general case?? Should I add the SFVec3f to MFVec3f after creating it by doing a push()?
Other vendors, let me know.? Attached is the file.? I now believe the JSON file produces the above error
I?m thinking the standard may not be flexible enough for non-declarative graphics, which is unfortunate?but I didn?t look at MF field methods in general.
Doug, also see if you can get this file working in FreeWRL.
I do recall an older version of this file working with other browsers, so I know it?s possible!
Thanks,
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 6:05 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections notshowingupinEdge XML textareas.
The color has been fixed by changing the type from SFVec3f to SFColor (whew).
https://coderextreme.net/X3DJSONLD/src/main/html/x_ite.xhtml
Thanks!
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:51 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingupinEdge XML textareas.
The only issue now is the color of the ProtoInstances (passed as parameters to the Protos) in the XML.? I will put into a URL and test.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:04 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingup inEdge XML textareas.
More info.? When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).??
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
So likely there?s a problem with my XML and CDATA.? But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
Holger, there may be an issue with:
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
This is with 4.1.5.
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 07:37:37 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 10:37:37 -0400
Subject: [x3d-public] CDATA sections not showing up in Edge. X3DJSONLD.
In-Reply-To: <5ac0d307.87a4370a.b5259.3187@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
<5ac0abbc.aa24c80a.974af.009d@mx.google.com>
<5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
<5ac0c62d.ef32c80a.ca4cb.6ec9@mx.google.com>
<5ac0cc12.042aed0a.b6b06.59df@mx.google.com>
<5ac0cccb.84d1370a.91202.d99d@mx.google.com>
<5ac0d307.87a4370a.b5259.3187@mx.google.com>
Message-ID: <5ac0eeaf.84d1370a.91202.e609@mx.google.com>
Everything is working now, I replaced Andreas? hack with createCDATASection();
And my code is getting smaller, thank god! I can probably remove a lot of duplicated code!
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 8:39 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: CDATA sections not showing up in Edge. X3DJSONLD.
So it looks like:
xmlDoc.createCDATASection("This is an element");
is the standard way of creating a CDATA section, and this works in X3DJSONLD server side.? Can we use this in Edge with the other hack to get CDATA sections in place?? Or will using the HTML document variable throw us off? ?I guess we should be using an XML document and definitely not the HTML document, eh?
Looks like the way to get an XML document in the browser is:
var documentType = document.implementation.createDocumentType(qualifiedNameStr, publicId, systemId)
var xmlDoc = document.implementation.createDocument(namespaceURI, qualifiedNameStr, documentType);
Can anyone confirm?? I?d like to get this into X3DJSONLD GUI asap. It?s already in my server side code with xmldom.
Probably I?ll start working on this now.? I?m not sure what putting an xml document in HTML will do however, when I put it in a textarea, so?help!
Thanks,
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 8:12 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge;CDATAsectionsnotshowingupinEdge XML textareas. Problem with other browsers.
Loading JSON definitely prevents animation from happening in the X_ITE XML text section in Edge.? That?s the CDATA section I think.? Load bubs.json for example.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 8:09 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATAsectionsnotshowingupinEdge XML textareas. Problem with other browsers.
Both serialized XML versions load work from URLs after adding CDATA sections to XML.? Otherwise, the script isn?t run in Edge. Andreas, do you have some magic for adding CDATA sections in Edge?? Thanks!
I also replaced the < when hand editing the CDATA sections.? So that may be an issue as well
Attached.
Getting closer.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 7:44 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATA sectionsnotshowingupinEdge XML textareas. Problem with other browsers.
1. XML5656: Illegal qualified name character.
2. [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:203:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:201:2) at loadXmlBrowsers (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:80:4) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:289:8) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:437:3)"}
Still having an issue or two with createX3DFromString in Edge, but either the initial XML load works, or the XML -> My JSON -> XML conversion works, but the JSON -> XML conversion does not work.? The JSON load (of Don?s JSON) does not produces a good XML string for createX3DFromString or something.? I will verify, but there?s no issue loading JSON with importJS that I can tell?it?s the best at loading ?. Or URLs work too. Don?s XML is attached as don.txt and my XML is attached as john.txt.? So I think the don.txt is failing.? I will test them as URLs.
However the file doesn?t load in the other browsers besides web browser, and I?m wondering why.? I think it?s because coordIndex cannot be initialized from a script, or the MFVec3f constructor ?? Can some tell me how to add an SFVec3f to an MFVec3f in the general case?? Should I add the SFVec3f to MFVec3f after creating it by doing a push()?
Other vendors, let me know.? Attached is the file.? I now believe the JSON file produces the above error
I?m thinking the standard may not be flexible enough for non-declarative graphics, which is unfortunate?but I didn?t look at MF field methods in general.
Doug, also see if you can get this file working in FreeWRL.
I do recall an older version of this file working with other browsers, so I know it?s possible!
Thanks,
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 6:05 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections notshowingupinEdge XML textareas.
The color has been fixed by changing the type from SFVec3f to SFColor (whew).
https://coderextreme.net/X3DJSONLD/src/main/html/x_ite.xhtml
Thanks!
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:51 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingupinEdge XML textareas.
The only issue now is the color of the ProtoInstances (passed as parameters to the Protos) in the XML.? I will put into a URL and test.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:04 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingup inEdge XML textareas.
More info.? When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).??
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
So likely there?s a problem with my XML and CDATA.? But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
Holger, there may be an issue with:
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
This is with 4.1.5.
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brutzman at nps.edu Sun Apr 1 08:12:03 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Sun, 1 Apr 2018 08:12:03 -0700
Subject: [x3d-public] Which of these are necessary containerFields in
XML? CADFace field 'shape' is irregular, Mantis issue submitted
In-Reply-To:
References: <5ab37b84.5448370a.f1133.1249@mx.google.com>
<5ab3847a.1717c80a.3b83a.e034@mx.google.com>
Message-ID: <9e2a0126-ef17-3b3e-867a-68a34572f2c7@nps.edu>
Mantis issue regarding CADFace submitted for comment and resolution by Design Printing Scanning (CAD) working group.
On 3/27/2018 8:37 PM, Don Brutzman wrote:
> Hi John.? I took some time last year to work through all of the containerField variations, in order to offer only valid choices within X3D-Edit node editors.
>
> The summary of issues and ambiguous children (i.e. child nodes that might have varied relationships to parents) is online as follows.? If you see additional candidates, please advise.
>
> ===========================================================================
> ===========================================================================
> X3D Scene Authoring Hints: containerField
> http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#containerField
> [...]
>
> Of note, looking ahead to potential abstract specification improvements in X3D v4:
>
> a. we might make the special case of CADFace? go away in X3D v4 by sticking to conventional default 'children' field.
http://www.web3d.org/member-only/mantis/view.php?id=1234
========================================================
Summary 0001234: CADFace field 'shape' has unusual name and causes unnecessary complexity
Description: CADFace node includes a field 'shape' which can contain either Shape or LOD. The name 'shape' is unusual and causes unnecessary complexity when handling children nodes.
As with other nodes containing child nodes Shape and LOD, the field should get renamed as 'children'. This might be considered a correction to X3D v3 specification.
Impact of this change on existing content and implementations is small, once changes to DTD and Schema defaults are made. XML .x3d scenes should change Shape or LOD nodes within a CADFace to containerField='children' or no containerField value. Use of the 'shape' field has (unsurprisingly) been inconsistent, so this modification might have a beneficial effect on making legacy content more valid.
Additional Information CAD node functionality is a responsibility of the Design Printing Scanning (formerly CAD) Working Group.
See thread "Which of these are necessary containerFields in XML?"
http://web3d.org/pipermail/x3d-public_web3d.org/2018-March/008509.html
========================================================
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From brutzman at nps.edu Sun Apr 1 08:17:19 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Sun, 1 Apr 2018 08:17:19 -0700
Subject: [x3d-public] X3DJSAIL, null pointer exception,
not sure if setting material containerField did this or not. I
think this Java file has same error.
In-Reply-To: <5a4bf721.c589370a.8438.1226@mx.google.com>
References: <5a4bf721.c589370a.8438.1226@mx.google.com>
Message-ID: <6796f9e0-f8dd-bd09-fbb7-54d0968be4a2@nps.edu>
Thanks for an excellent .java test case John. The X3DJSAIL bug with findAncestor() handling is now fixed (antipattern occurred in 8 places), checked in and deployed. Attachment CameraExamples.java runs successfully.
On 1/2/2018 1:18 PM, John Carlson wrote:
> Exception in thread "main" java.lang.NullPointerException
>
> ??????? at org.web3d.x3d.jsail.Core.ProtoInstanceObject.getNodeType(ProtoInstanceObject.java:771)
>
> ??????? at org.web3d.x3d.jsail.Core.ProtoInstanceObject.validate(ProtoInstanceObject.java:1140)
>
> ??????? at org.web3d.x3d.jsail.Core.fieldValueObject.validate(fieldValueObject.java:971)
>
> ??????? at org.web3d.x3d.jsail.Core.ProtoInstanceObject.addFieldValue(ProtoInstanceObject.java:1222)
>
> ??????? at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$927$268435454A$CameraExamples_sail$cu1$restOf.:program$:split(../nashorn/net/coderextreme/data/CameraExamples.sail.js:333)
>
> ??????? at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1$CameraExamples_sail.:program(../nashorn/net/coderextreme/data/CameraExamples.sail.js)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:652)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:517)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.apply(Shell.java:519)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.runScripts(Shell.java:448)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.run(Shell.java:186)
>
> ??????? at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:104)
>
> ??????? at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:80)
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
//package net.coderextreme.data;
import org.web3d.x3d.jsail.*;
import org.web3d.x3d.jsail.CADGeometry.*;
import org.web3d.x3d.jsail.Core.*;
import org.web3d.x3d.jsail.CubeMapTexturing.*;
import org.web3d.x3d.jsail.DIS.*;
import org.web3d.x3d.jsail.EnvironmentalEffects.*;
import org.web3d.x3d.jsail.EnvironmentalSensor.*;
import org.web3d.x3d.jsail.EventUtilities.*;
import org.web3d.x3d.jsail.Followers.*;
import org.web3d.x3d.jsail.Geometry2D.*;
import org.web3d.x3d.jsail.Geometry3D.*;
import org.web3d.x3d.jsail.Geospatial.*;
import org.web3d.x3d.jsail.Grouping.*;
import org.web3d.x3d.jsail.HAnim.*;
import org.web3d.x3d.jsail.Interpolation.*;
import org.web3d.x3d.jsail.KeyDeviceSensor.*;
import org.web3d.x3d.jsail.Layering.*;
import org.web3d.x3d.jsail.Layout.*;
import org.web3d.x3d.jsail.Lighting.*;
import org.web3d.x3d.jsail.NURBS.*;
import org.web3d.x3d.jsail.Navigation.*;
import org.web3d.x3d.jsail.Networking.*;
import org.web3d.x3d.jsail.ParticleSystems.*;
import org.web3d.x3d.jsail.Picking.*;
import org.web3d.x3d.jsail.PointingDeviceSensor.*;
import org.web3d.x3d.jsail.Rendering.*;
import org.web3d.x3d.jsail.RigidBodyPhysics.*;
import org.web3d.x3d.jsail.Scripting.*;
import org.web3d.x3d.jsail.Shaders.*;
import org.web3d.x3d.jsail.Shape.*;
import org.web3d.x3d.jsail.Sound.*;
import org.web3d.x3d.jsail.Text.*;
import org.web3d.x3d.jsail.Texturing3D.*;
import org.web3d.x3d.jsail.Texturing.*;
import org.web3d.x3d.jsail.Time.*;
import org.web3d.x3d.jsail.VolumeRendering.*;
import org.web3d.x3d.jsail.fields.*;
import org.web3d.x3d.sai.*;
import org.web3d.x3d.sai.CADGeometry.*;
import org.web3d.x3d.sai.Core.*;
import org.web3d.x3d.sai.CubeMapTexturing.*;
import org.web3d.x3d.sai.DIS.*;
import org.web3d.x3d.sai.EnvironmentalEffects.*;
import org.web3d.x3d.sai.EnvironmentalSensor.*;
import org.web3d.x3d.sai.EventUtilities.*;
import org.web3d.x3d.sai.Followers.*;
import org.web3d.x3d.sai.Geometry2D.*;
import org.web3d.x3d.sai.Geometry3D.*;
import org.web3d.x3d.sai.Geospatial.*;
import org.web3d.x3d.sai.Grouping.*;
import org.web3d.x3d.sai.HAnim.*;
import org.web3d.x3d.sai.Interpolation.*;
import org.web3d.x3d.sai.KeyDeviceSensor.*;
import org.web3d.x3d.sai.Layering.*;
import org.web3d.x3d.sai.Layout.*;
import org.web3d.x3d.sai.Lighting.*;
import org.web3d.x3d.sai.NURBS.*;
import org.web3d.x3d.sai.Navigation.*;
import org.web3d.x3d.sai.Networking.*;
import org.web3d.x3d.sai.ParticleSystems.*;
import org.web3d.x3d.sai.Picking.*;
import org.web3d.x3d.sai.PointingDeviceSensor.*;
import org.web3d.x3d.sai.Rendering.*;
import org.web3d.x3d.sai.RigidBodyPhysics.*;
import org.web3d.x3d.sai.Scripting.*;
import org.web3d.x3d.sai.Shaders.*;
import org.web3d.x3d.sai.Shape.*;
import org.web3d.x3d.sai.Sound.*;
import org.web3d.x3d.sai.Text.*;
import org.web3d.x3d.sai.Texturing3D.*;
import org.web3d.x3d.sai.Texturing.*;
import org.web3d.x3d.sai.Time.*;
import org.web3d.x3d.sai.VolumeRendering.*;
public class CameraExamples {
public static void main(String[] args) {
ConfigurationProperties.setShowDefaultAttributes(true);
ConfigurationProperties.setXsltEngine(ConfigurationProperties.XSLT_ENGINE_NATIVE_JAVA);
ConfigurationProperties.setDeleteIntermediateFiles(false);
new CameraExamples().initialize().toFileJSON("CameraExamples.new.json");
}
public X3DObject initialize() {
ProtoInstanceObject ProtoInstance0 = null;
ProtoInstanceObject ProtoInstance1 = null;
ProtoInstanceObject ProtoInstance2 = null;
ProtoInstanceObject ProtoInstance3 = null;
ProtoInstanceObject ProtoInstance4 = null;
ProtoInstanceObject ProtoInstance5 = null;
ProtoInstanceObject ProtoInstance6 = null;
ProtoInstanceObject ProtoInstance7 = null;
ProtoInstanceObject ProtoInstance8 = null;
ProtoInstanceObject ProtoInstance9 = null;
ProtoInstanceObject ProtoInstance10 = null;
ProtoInstanceObject ProtoInstance11 = null;
ProtoInstanceObject ProtoInstance12 = null;
ProtoInstanceObject ProtoInstance13 = null;
ProtoInstanceObject ProtoInstance14 = null;
ProtoInstanceObject ProtoInstance15 = null;
ProtoInstanceObject ProtoInstance16 = null;
ProtoInstanceObject ProtoInstance17 = null;
ProtoInstanceObject ProtoInstance18 = null;
ProtoInstanceObject ProtoInstance19 = null;
ProtoInstanceObject ProtoInstance20 = null;
ProtoInstanceObject ProtoInstance21 = null;
ProtoInstanceObject ProtoInstance22 = null;
ProtoInstanceObject ProtoInstance23 = null;
ProtoInstanceObject ProtoInstance24 = null;
ProtoInstanceObject ProtoInstance25 = null;
ProtoInstanceObject ProtoInstance26 = null;
ProtoInstanceObject ProtoInstance27 = null;
ProtoInstanceObject ProtoInstance28 = null;
ProtoInstanceObject ProtoInstance29 = null;
ProtoInstanceObject ProtoInstance30 = null;
ProtoInstanceObject ProtoInstance31 = null;
ProtoInstanceObject ProtoInstance32 = null;
ProtoInstanceObject ProtoInstance33 = null;
ProtoInstanceObject ProtoInstance34 = null;
X3DObject X3D0 = new X3DObject().setProfile("Immersive").setVersion("3.3")
.setHead(new headObject()
.addMeta(new metaObject().setName("title").setContent("CameraExamples.x3d"))
.addMeta(new metaObject().setName("description").setContent("Camera, CameraShot and CameraMove examples that demonstrate storyboard capabilities and precise camera operation. This is a developmental effort for potential X3D Specification improvement."))
.addMeta(new metaObject().setName("documentation").setContent("Two demos are found in the scene, click the \"red text\"on left or right to start. (a) SimpleShotsTest shows Zoom in/out, Pan left/right, Boom up/down, Tilt left/right, with each is defined by a CameraShot collecting a series of CameraMovements. (b) AimPointTest gradually slews the camera view to look at the sliding cube, then follows it around before returning to original viewpoint."))
.addMeta(new metaObject().setName("creator").setContent("Don Brutzman and Jeff Weekley"))
.addMeta(new metaObject().setName("created").setContent("18 June 2009"))
.addMeta(new metaObject().setName("modified").setContent("12 January 2014"))
.addMeta(new metaObject().setName("TODO").setContent("Schematron rules, backed up by initialize() checks"))
.addMeta(new metaObject().setName("reference").setContent("BeyondViewpointCameraNodesWeb3D2009.pdf"))
.addMeta(new metaObject().setName("MovingImage").setContent("CameraExamplesDemo.mp4"))
.addMeta(new metaObject().setName("reference").setContent("http://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/navigation.html"))
.addMeta(new metaObject().setName("subject").setContent("Camera nodes for Viewpoint navigation control"))
.addMeta(new metaObject().setName("reference").setContent("CameraPrototypes.x3d"))
.addMeta(new metaObject().setName("reference").setContent("CameraExamplesConsoleLog.txt"))
.addMeta(new metaObject().setName("reference").setContent("http://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/development/CameraExamples.avi"))
.addMeta(new metaObject().setName("reference").setContent("http://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/gridBack.x3d"))
.addMeta(new metaObject().setName("identifier").setContent("http://www.web3d.org/x3d/content/examples/Basic/development/CameraExamples.x3d"))
.addMeta(new metaObject().setName("identifier").setContent("http://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/development/CameraExamples.x3d"))
.addMeta(new metaObject().setName("generator").setContent("X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"))
.addMeta(new metaObject().setName("license").setContent("../license.html"))
.addComments(new CommentsBlock("TODO warn if more than one identifier present")))
.setScene(new SceneObject()
.addComments(new CommentsBlock("=============== Camera =============="))
.addChild(new ExternProtoDeclareObject().setName("Camera").setAppinfo("Camera node provides direct control of scene view to enable cinematic camera animation shot by shot and move by move along with still digital-photography settings for offline rendering of camera images").setUrl(new MFStringObject(new MFString0().getArray()))
.addComments(new CommentsBlock("Viewpoint-related fields, NavigationInfo-related fields and Camera-unique fields"))
.addField(new fieldObject().setType("SFString").setName("description").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Text description to be displayed for this Camera"))
.addField(new fieldObject().setType("SFVec3f").setName("position").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Camera position in local transformation frame, which is default prior to first CameraShot initialPosition getting activated"))
.addField(new fieldObject().setType("SFRotation").setName("orientation").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Camera rotation in local transformation frame, which is default prior to first CameraShot initialPosition getting activated"))
.addField(new fieldObject().setType("SFFloat").setName("fieldOfView").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("pi/4"))
.addField(new fieldObject().setType("SFFloat").setName("set_fraction").setAccessType(fieldObject.ACCESSTYPE_INPUTONLY).setAppinfo("input fraction drives interpolators"))
.addField(new fieldObject().setType("SFBool").setName("set_bind").setAccessType(fieldObject.ACCESSTYPE_INPUTONLY).setAppinfo("input event binds or unbinds this Camera"))
.addField(new fieldObject().setType("SFTime").setName("bindTime").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("output event indicates when this Camera is bound"))
.addField(new fieldObject().setType("SFBool").setName("isBound").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("output event indicates whether this Camera is bound or unbound"))
.addField(new fieldObject().setType("SFFloat").setName("nearClipPlane").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Vector distance to near clipping plane corresponds to NavigationInfo.avatarSize[0]"))
.addField(new fieldObject().setType("SFFloat").setName("farClipPlane").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Vector distance to far clipping plane corresponds to NavigationInfo.visibilityLimit"))
.addField(new fieldObject().setType("MFNode").setName("shots").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Array of CameraShot nodes which in turn contain CameraMovement nodes"))
.addField(new fieldObject().setType("SFBool").setName("headlight").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Whether camera headlight is on or off"))
.addField(new fieldObject().setType("SFColor").setName("headlightColor").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Camera headlight color"))
.addField(new fieldObject().setType("SFFloat").setName("headlightIntensity").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Camera headlight intensity"))
.addField(new fieldObject().setType("SFColor").setName("filterColor").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Camera filter color that modifies virtual lens capture"))
.addField(new fieldObject().setType("SFFloat").setName("filterTransparency").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Camera filter transparency that modifies virtual lens capture"))
.addField(new fieldObject().setType("SFVec3f").setName("upVector").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("upVector changes modify camera orientation (and possibly vice versa)"))
.addField(new fieldObject().setType("SFFloat").setName("fStop").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Focal length divided effective aperture diameter indicating width of focal plane"))
.addField(new fieldObject().setType("SFFloat").setName("focusDistance").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Distance to focal plane of sharpest focus"))
.addField(new fieldObject().setType("SFBool").setName("isActive").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("Mark start/stop with true/false output respectively useful to trigger external animations"))
.addField(new fieldObject().setType("SFTime").setName("totalDuration").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("Total duration of contained enabled CameraShot (and thus CameraMovement) move durations"))
.addField(new fieldObject().setType("SFNode").setName("offlineRender").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("OfflineRender node"))
.addField(new fieldObject().setType("SFBool").setName("traceEnabled").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("enable console output to trace script computations and prototype progress")))
.addComments(new CommentsBlock("=============== CameraShot =============="))
.addChild(new ExternProtoDeclareObject().setName("CameraShot").setAppinfo("CameraShot collects a specific set of CameraMovement animations that make up an individual shot").setUrl(new MFStringObject(new MFString1().getArray()))
.addField(new fieldObject().setType("SFString").setName("description").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Text description to be displayed for this CameraShot"))
.addField(new fieldObject().setType("SFBool").setName("enabled").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Whether this CameraShot can be activated"))
.addField(new fieldObject().setType("MFNode").setName("moves").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Set of CameraMovement nodes")
.addComments(new CommentsBlock("initializing CameraMovement nodes are inserted here by scene author using ProtoInstance")))
.addField(new fieldObject().setType("SFVec3f").setName("initialPosition").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Setup to reinitialize camera position for this shot"))
.addField(new fieldObject().setType("SFRotation").setName("initialOrientation").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Setup to reinitialize camera rotation for this shot"))
.addField(new fieldObject().setType("SFVec3f").setName("initialAimPoint").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Setup to reinitialize aimpoint (relative location for camera direction) for this shot"))
.addField(new fieldObject().setType("SFFloat").setName("initialFieldOfView").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("pi/4"))
.addField(new fieldObject().setType("SFFloat").setName("initialFStop").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Focal length divided effective aperture diameter indicating width of focal plane"))
.addField(new fieldObject().setType("SFFloat").setName("initialFocusDistance").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Distance to focal plane of sharpest focus"))
.addField(new fieldObject().setType("SFTime").setName("shotDuration").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("Subtotal duration of contained CameraMovement move durations"))
.addField(new fieldObject().setType("SFBool").setName("isActive").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("Mark start/stop with true/false output respectively useful to trigger external animations"))
.addField(new fieldObject().setType("SFBool").setName("traceEnabled").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("enable console output to trace script computations and prototype progress")))
.addComments(new CommentsBlock("=============== CameraMovement =============="))
.addChild(new ExternProtoDeclareObject().setName("CameraMovement").setAppinfo("CameraMovement defines a single camera movement animation").setUrl(new MFStringObject(new MFString2().getArray()))
.addField(new fieldObject().setType("SFString").setName("description").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Text description to be displayed for this CameraMovement"))
.addField(new fieldObject().setType("SFBool").setName("enabled").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Whether this CameraMovement can be activated"))
.addField(new fieldObject().setType("SFFloat").setName("duration").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Duration in seconds for this move"))
.addField(new fieldObject().setType("SFVec3f").setName("goalPosition").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Goal camera position for this move"))
.addField(new fieldObject().setType("SFRotation").setName("goalOrientation").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Goal camera rotation for this move"))
.addField(new fieldObject().setType("SFBool").setName("tracking").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Whether or not camera direction is tracking towards the aimPoint"))
.addField(new fieldObject().setType("SFVec3f").setName("goalAimPoint").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Goal aimPoint for this move, ignored if tracking=false"))
.addField(new fieldObject().setType("SFFloat").setName("goalFieldOfView").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Goal fieldOfView for this move"))
.addField(new fieldObject().setType("SFFloat").setName("goalFStop").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Focal length divided effective aperture diameter indicating width of focal plane"))
.addField(new fieldObject().setType("SFFloat").setName("goalFocusDistance").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Distance to focal plane of sharpest focus"))
.addField(new fieldObject().setType("SFBool").setName("isActive").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("Mark start/stop with true/false output respectively useful to trigger external animations"))
.addField(new fieldObject().setType("SFBool").setName("traceEnabled").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("enable console output to trace script computations and prototype progress")))
.addComments(new CommentsBlock("=============== OfflineRender =============="))
.addChild(new ExternProtoDeclareObject().setName("OfflineRender").setAppinfo("OfflineRender defines a parameters for offline rendering of Camera animation output to a movie file (or possibly a still shot)").setUrl(new MFStringObject(new MFString3().getArray()))
.addComments(new CommentsBlock("TODO non-photorealistic rendering (NPR) parameters"))
.addField(new fieldObject().setType("SFString").setName("description").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Text description to be displayed for this OfflineRender"))
.addField(new fieldObject().setType("SFBool").setName("enabled").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Whether this OfflineRender can be activated"))
.addField(new fieldObject().setType("SFFloat").setName("frameRate").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Frames per second recorded for this rendering"))
.addField(new fieldObject().setType("SFVec2f").setName("frameSize").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Size of frame in number of pixels width and height"))
.addField(new fieldObject().setType("SFFloat").setName("pixelAspectRatio").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Relative dimensions of pixel height/width typically 1.33 or 1"))
.addField(new fieldObject().setType("SFTime").setName("set_startTime").setAccessType(fieldObject.ACCESSTYPE_INPUTONLY).setAppinfo("Begin render operation"))
.addField(new fieldObject().setType("SFFloat").setName("progress").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("Progress performing render operation (0..1)"))
.addField(new fieldObject().setType("SFTime").setName("renderCompleteTime").setAccessType(fieldObject.ACCESSTYPE_OUTPUTONLY).setAppinfo("Render operation complete"))
.addField(new fieldObject().setType("MFString").setName("movieFormat").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Format of rendered output movie (mpeg mp4 etc.), use first supported format"))
.addField(new fieldObject().setType("MFString").setName("imageFormat").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Format of rendered output images (png jpeg gif tiff etc.) use first supported format"))
.addField(new fieldObject().setType("SFBool").setName("traceEnabled").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("enable console output to trace script computations and prototype progress")))
.addComments(new CommentsBlock("=============== Lights, camera, action! =============="))
.addChild(new DirectionalLightObject().setDirection(new float[] {0f,-1f,0f}).setGlobal(true).setIntensity(0.8f))
.addChild(new NavigationInfoObject().setType(new java.lang.String[] {"EXAMINE","FLY","ANY"}))
.addChild(new ViewpointObject().setDescription("Camera test scene entry view").setPosition(new float[] {0f,2f,12f}))
.addChild(new ViewpointObject().setDescription("Camera test scene from above").setOrientation(new float[] {1f,0f,0f,-1.57079f}).setPosition(new float[] {0f,150f,0f}))
.addComments(new CommentsBlock("Keep prototype instances in same file while developing, then move later"))
.addComments(new CommentsBlock("We will create examples matching those in the paper"))
.addComments(new CommentsBlock("=============== Camera.SimpleShotsTest =============="))
.addChild(ProtoInstance0 = new ProtoInstanceObject().setName("Camera").setDEF("Camera.SimpleShotsTest"))
.addChild(new GroupObject().setDEF("AnimationGroup.SimpleShots")
.addChild(new TimeSensorObject().setDEF("CameraTimer.SimpleShots"))
.addComments(new CommentsBlock("initialize clock to match totalDuration of combined Shot Moves"))
.addChild(new ROUTEObject().setFromField("totalDuration").setFromNode("Camera.SimpleShotsTest").setToField("cycleInterval").setToNode("CameraTimer.SimpleShots"))
.addComments(new CommentsBlock("TimeSensor animates the CameraClock since that maintains the computed PositionInterpolator and OrientationInterpolator"))
.addChild(new ROUTEObject().setFromField("fraction_changed").setFromNode("CameraTimer.SimpleShots").setToField("set_fraction").setToNode("Camera.SimpleShotsTest"))
.addChild(new TransformObject().setDEF("Trigger.SimpleShots").setTranslation(new float[] {-4f,4f,0f})
.addChild(new BooleanFilterObject().setDEF("TextTouchActive.SimpleShotsFilter"))
.addChild(new TouchSensorObject().setDEF("TextTouch.SimpleShots").setDescription("touch to animate Camera SimpleShotsTest"))
.addChild(new ROUTEObject().setFromField("inputTrue").setFromNode("TextTouchActive.SimpleShotsFilter").setToField("set_bind").setToNode("Camera.SimpleShotsTest"))
.addChild(new ROUTEObject().setFromField("isActive").setFromNode("TextTouch.SimpleShots").setToField("set_boolean").setToNode("TextTouchActive.SimpleShotsFilter"))
.addChild(new ROUTEObject().setFromField("touchTime").setFromNode("TextTouch.SimpleShots").setToField("startTime").setToNode("CameraTimer.SimpleShots"))
.addChild(new ShapeObject()
.setGeometry(new TextObject().setString(new MFStringObject(new MFString4().getArray()))
.setFontStyle(new FontStyleObject().setJustify(new MFStringObject(new MFString5().getArray()))))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject().setDEF("ArtDeco5").setAmbientIntensity(0.24f).setDiffuseColor(new float[] {0.945455f,0.318988f,0.321717f}).setShininess(0.01f).setSpecularColor(new float[] {0.072727f,0.021705f,0.010732f})
.addComments(new CommentsBlock("Universal Media Library: ArtDeco 5")))))
.addComments(new CommentsBlock("Simplify intersection test for user selecting text"))
.addChild(new ShapeObject().setDEF("TransparentBox")
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject().setTransparency(1f)))
.setGeometry(new BoxObject().setSize(new float[] {6f,2f,0.0001f})))))
.addChild(new GroupObject().setDEF("SimpleShotsTargets")
.addChild(new TransformObject().setDEF("TargetBoxZoom").setTranslation(new float[] {-50f,1f,-20f})
.addChild(new ShapeObject()
.setGeometry(new BoxObject())
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())
.setTexture(new ImageTextureObject().setUrl(new MFStringObject(new MFString6().getArray())))))
.addChild(new TransformObject().setTranslation(new float[] {0f,2f,0f})
.addChild(new ShapeObject()
.setGeometry(new TextObject().setString(new MFStringObject(new MFString7().getArray()))
.setFontStyle(new FontStyleObject().setJustify(new MFStringObject(new MFString8().getArray()))))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())))))
.addChild(new TransformObject().setDEF("TargetBoxDolly").setTranslation(new float[] {-40f,1f,-20f})
.addChild(new ShapeObject()
.setGeometry(new BoxObject())
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())
.setTexture(new ImageTextureObject().setUrl(new MFStringObject(new MFString9().getArray())))))
.addChild(new TransformObject().setTranslation(new float[] {0f,2f,0f})
.addChild(new ShapeObject()
.setGeometry(new TextObject().setString(new MFStringObject(new MFString10().getArray()))
.setFontStyle(new FontStyleObject().setJustify(new MFStringObject(new MFString11().getArray()))))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())))))
.addChild(new TransformObject().setDEF("TargetBoxPan").setTranslation(new float[] {-30f,1f,-20f})
.addChild(new ShapeObject()
.setGeometry(new BoxObject())
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())
.setTexture(new ImageTextureObject().setUrl(new MFStringObject(new MFString12().getArray())))))
.addChild(new TransformObject().setTranslation(new float[] {0f,2f,0f})
.addChild(new ShapeObject()
.setGeometry(new TextObject().setString(new MFStringObject(new MFString13().getArray()))
.setFontStyle(new FontStyleObject().setJustify(new MFStringObject(new MFString14().getArray()))))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())))))
.addChild(new TransformObject().setDEF("TargetBoxBoom").setTranslation(new float[] {-20f,1f,-20f})
.addChild(new ShapeObject()
.setGeometry(new BoxObject())
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())
.setTexture(new ImageTextureObject().setUrl(new MFStringObject(new MFString15().getArray())))))
.addChild(new TransformObject().setTranslation(new float[] {0f,2f,0f})
.addChild(new ShapeObject()
.setGeometry(new TextObject().setString(new MFStringObject(new MFString16().getArray()))
.setFontStyle(new FontStyleObject().setJustify(new MFStringObject(new MFString17().getArray()))))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())))))
.addChild(new TransformObject().setDEF("TargetBoxTilt").setTranslation(new float[] {-10f,1f,-20f})
.addChild(new ShapeObject()
.setGeometry(new BoxObject())
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())
.setTexture(new ImageTextureObject().setUrl(new MFStringObject(new MFString18().getArray())))))
.addChild(new TransformObject().setTranslation(new float[] {0f,2f,0f})
.addChild(new ShapeObject()
.setGeometry(new TextObject().setString(new MFStringObject(new MFString19().getArray()))
.setFontStyle(new FontStyleObject().setJustify(new MFStringObject(new MFString20().getArray()))))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject()))))))
.addComments(new CommentsBlock("=============== Camera.AimPointTest =============="))
.addChild(ProtoInstance26 = new ProtoInstanceObject().setName("Camera").setDEF("Camera.AimPointTest"))
.addChild(new GroupObject().setDEF("AnimationGroup.AimPointTest")
.addChild(new TimeSensorObject().setDEF("CameraTimer.AimPointTest"))
.addComments(new CommentsBlock("initialize clock to match totalDuration of combined Shot Moves"))
.addChild(new ROUTEObject().setFromField("totalDuration").setFromNode("Camera.AimPointTest").setToField("cycleInterval").setToNode("CameraTimer.AimPointTest"))
.addComments(new CommentsBlock("TimeSensor animates the CameraClock since that maintains the computed PositionInterpolator and OrientationInterpolator"))
.addChild(new ROUTEObject().setFromField("fraction_changed").setFromNode("CameraTimer.AimPointTest").setToField("set_fraction").setToNode("Camera.AimPointTest"))
.addChild(new TransformObject().setDEF("Trigger.AimPointTest").setTranslation(new float[] {4f,4f,0f})
.addChild(new BooleanFilterObject().setDEF("TextTouchActive.AimPointFilter"))
.addChild(new TouchSensorObject().setDEF("TextTouch.AimPointTest").setDescription("touch to animate Camera AimPointTest"))
.addChild(new ROUTEObject().setFromField("inputTrue").setFromNode("TextTouchActive.AimPointFilter").setToField("set_bind").setToNode("Camera.AimPointTest"))
.addChild(new ROUTEObject().setFromField("isActive").setFromNode("TextTouch.AimPointTest").setToField("set_boolean").setToNode("TextTouchActive.AimPointFilter"))
.addChild(new ROUTEObject().setFromField("touchTime").setFromNode("TextTouch.AimPointTest").setToField("startTime").setToNode("CameraTimer.AimPointTest"))
.addChild(new ShapeObject()
.setGeometry(new TextObject().setString(new MFStringObject(new MFString21().getArray()))
.setFontStyle(new FontStyleObject().setJustify(new MFStringObject(new MFString22().getArray()))))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject().setUSE("ArtDeco5"))))
.addChild(new ShapeObject().setUSE("TransparentBox"))))
.addComments(new CommentsBlock("TODO build a test once implemented"))
.addChild(ProtoInstance32 = new ProtoInstanceObject().setName("OfflineRender"))
.addComments(new CommentsBlock("=============== animate a camera shape to visualize view changes =============="))
.addChild(new TransformObject().setDEF("CameraShapeTransform").setTranslation(new float[] {0f,0.5f,0f})
.addComments(new CommentsBlock("move CameraShape using active Camera"))
.addChild(new ROUTEObject().setFromField("position_changed").setFromNode("Camera.SimpleShotsTest").setToField("translation").setToNode("CameraShapeTransform"))
.addChild(new ROUTEObject().setFromField("orientation_changed").setFromNode("Camera.SimpleShotsTest").setToField("rotation").setToNode("CameraShapeTransform"))
.addChild(new ROUTEObject().setFromField("position").setFromNode("Camera.AimPointTest").setToField("translation").setToNode("CameraShapeTransform"))
.addChild(new ROUTEObject().setFromField("orientation_changed").setFromNode("Camera.AimPointTest").setToField("rotation").setToNode("CameraShapeTransform"))
.addChild(new TransformObject().setDEF("CameraOffsetTransform").setTranslation(new float[] {0f,0f,0.25f})
.addChild(new TouchSensorObject().setDEF("CameraShapeTouched"))
.addChild(new InlineObject().setDEF("CameraShape").setUrl(new MFStringObject(new MFString23().getArray())))
.addChild(new ShapeObject().setDEF("SightLine")
.setGeometry(new IndexedLineSetObject().setCoordIndex(new MFInt32Object(new MFInt3224().getArray()))
.setCoord(new CoordinateObject().setPoint(new MFVec3fObject(new MFVec3f25().getArray()))))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject().setEmissiveColor(new float[] {0.8f,0.8f,0.4f})))))
.addComments(new CommentsBlock("Display frustum to show camera view within the scene, toggled by user selecting CameraShape"))
.addChild(new ExternProtoDeclareObject().setName("ViewFrustum").setAppinfo("Display view frustum associated with a given pair of Viewpoint NavigationInfo nodes").setUrl(new MFStringObject(new MFString26().getArray()))
.addField(new fieldObject().setType("SFNode").setName("ViewpointNode").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("required: insert Viewpoint DEF or USE node for view of interest"))
.addField(new fieldObject().setType("SFNode").setName("NavigationInfoNode").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("required: insert NavigationInfo DEF or USE node of interest"))
.addField(new fieldObject().setType("SFBool").setName("visible").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("whether or not frustum geometry is rendered"))
.addField(new fieldObject().setType("SFColor").setName("lineColor").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("RGB color of ViewFrustum outline, default value 0.9 0.9 0.9"))
.addField(new fieldObject().setType("SFColor").setName("frustumColor").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("RGB color of ViewFrustum hull geometry, default value 0.8 0.8 0.8"))
.addField(new fieldObject().setType("SFFloat").setName("transparency").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("transparency of ViewFrustum hull geometry, default value 0.5"))
.addField(new fieldObject().setType("SFFloat").setName("aspectRatio").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("assumed ratio height/width, default value 0.75"))
.addField(new fieldObject().setType("SFBool").setName("trace").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("debug support, default false")))
.addChild(ProtoInstance33 = new ProtoInstanceObject().setName("ViewFrustum").setDEF("ViewFrustumNode"))
.addChild(new BooleanToggleObject().setDEF("ViewFrustumToggle"))
.addChild(new ROUTEObject().setFromField("isActive").setFromNode("CameraShapeTouched").setToField("set_boolean").setToNode("ViewFrustumToggle"))
.addChild(new ROUTEObject().setFromField("toggle").setFromNode("ViewFrustumToggle").setToField("set_visible").setToNode("ViewFrustumNode")))
.addComments(new CommentsBlock("=============== add checkerboard, axes and other things to look at while animating =============="))
.addChild(new BackgroundObject().setSkyColor(new MFColorObject(new MFColor28().getArray())))
.addChild(new TransformObject().setRotation(new float[] {1f,0f,0f,-1.57079f}).setScale(new float[] {10f,10f,10f})
.addChild(new ShapeObject()
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject().setAmbientIntensity(0.01f).setDiffuseColor(new float[] {1f,1f,1f}).setShininess(0.05f)))
.setGeometry(new IndexedFaceSetObject().setColorIndex(new MFInt32Object(new MFInt3229().getArray())).setColorPerVertex(false).setCoordIndex(new MFInt32Object(new MFInt3230().getArray())).setNormalPerVertex(false).setSolid(false)
.setCoord(new CoordinateObject().setPoint(new MFVec3fObject(new MFVec3f31().getArray())))
.setColor(new ColorObject().setColor(new MFColorObject(new MFColor32().getArray()))))))
.addChild(new TransformObject().setScale(new float[] {3f,3f,3f}).setTranslation(new float[] {0f,0.25f,0f})
.addChild(new InlineObject().setDEF("CoordinateAxes").setUrl(new MFStringObject(new MFString33().getArray()))))
.addChild(new TransformObject().setDEF("MovingBoxTransform")
.addChild(new PositionInterpolatorObject().setDEF("BoxPath").setKey(new MFFloatObject(new MFFloat34().getArray())).setKeyValue(new MFVec3fObject(new MFVec3f35().getArray())))
.addChild(new TimeSensorObject().setDEF("BoxTimer").setCycleInterval(10d).setLoop(true))
.addChild(new ROUTEObject().setFromField("value_changed").setFromNode("BoxPath").setToField("translation").setToNode("MovingBoxTransform"))
.addChild(new ROUTEObject().setFromField("value_changed").setFromNode("BoxPath").setToField("goalAimPoint").setToNode("MoveAimPoint3.1"))
.addChild(new ROUTEObject().setFromField("value_changed").setFromNode("BoxPath").setToField("goalAimPoint").setToNode("MoveAimPoint3.2"))
.addChild(new ROUTEObject().setFromField("value_changed").setFromNode("BoxPath").setToField("goalAimPoint").setToNode("MoveAimPoint3.3"))
.addChild(new ROUTEObject().setFromField("fraction_changed").setFromNode("BoxTimer").setToField("set_fraction").setToNode("BoxPath"))
.addChild(new ShapeObject()
.setGeometry(new BoxObject())
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject())
.setTexture(new ImageTextureObject().setUrl(new MFStringObject(new MFString36().getArray()))))))
.addComments(new CommentsBlock("================ CrossHair visualization for center of screen ================"))
.addChild(new ExternProtoDeclareObject().setName("CrossHair").setAppinfo("CrossHair prototype provides a heads-up display (HUD) crosshair at the view center, which is useful for assessing NavigationInfo lookAt point").setUrl(new MFStringObject(new MFString37().getArray()))
.addField(new fieldObject().setType("SFBool").setName("enabled").setAccessType(fieldObject.ACCESSTYPE_INITIALIZEONLY).setAppinfo("whether CrissHair orititype is enabled or not"))
.addField(new fieldObject().setType("SFBool").setName("set_enabled").setAccessType(fieldObject.ACCESSTYPE_INPUTONLY).setAppinfo("control whether enabled/disabled"))
.addField(new fieldObject().setType("SFColor").setName("markerColor").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("color of CrossHair marker"))
.addField(new fieldObject().setType("SFVec3f").setName("scale").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("size of CrossHair in meters"))
.addField(new fieldObject().setType("SFVec3f").setName("positionOffsetFromCamera").setAccessType(fieldObject.ACCESSTYPE_INPUTOUTPUT).setAppinfo("distance in front of HUD viewpoint")))
.addChild(ProtoInstance34 = new ProtoInstanceObject().setName("CrossHair").setDEF("CrossHairInstance"))
.addComments(new CommentsBlock("turn on CrossHairInstance when animated camera viewpoints are bound"))
.addChild(new ROUTEObject().setFromField("isBound").setFromNode("Camera.SimpleShotsTest").setToField("set_enabled").setToNode("CrossHairInstance"))
.addChild(new ROUTEObject().setFromField("isBound").setFromNode("Camera.AimPointTest").setToField("set_enabled").setToNode("CrossHairInstance"))
.addComments(new CommentsBlock("turn off CrossHairInstance when animated camera viewpoints are unbound "))
.addComments(new CommentsBlock("=============== TODO Launch Prototype Example =============="))
.addChild(new AnchorObject().setDescription("launch CameraExample scene").setParameter(new MFStringObject(new MFString38().getArray())).setUrl(new MFStringObject(new MFString39().getArray()))
.addChild(new TransformObject().setTranslation(new float[] {0f,-3f,0f})
.addChild(new ShapeObject()
.setGeometry(new TextObject().setString(new MFStringObject(new MFString40().getArray()))
.setFontStyle(new FontStyleObject().setJustify(new MFStringObject(new MFString41().getArray())).setSize(0.5f)))
.setAppearance(new AppearanceObject()
.setMaterial(new MaterialObject().setDiffuseColor(new float[] {1f,1f,0.2f}))))))) ;
ProtoInstance0
.addFieldValue(new fieldValueObject().setName("description").setValue("SimpleShotsTest for camera Zoom Dolly Pan Boom and Tilt"));
ProtoInstance0
.addFieldValue(new fieldValueObject().setName("headlight").setValue("true"));
ProtoInstance0
.addFieldValue(new fieldValueObject().setName("position").setValue("-4 4 10"));
ProtoInstance0
.addFieldValue(new fieldValueObject().setName("shots")
.addChild(ProtoInstance1 = new ProtoInstanceObject().setName("CameraShot").setDEF("Zoom"))
.addChild(ProtoInstance5 = new ProtoInstanceObject().setName("CameraShot").setDEF("Dolly"))
.addChild(ProtoInstance9 = new ProtoInstanceObject().setName("CameraShot").setDEF("Pan"))
.addChild(ProtoInstance14 = new ProtoInstanceObject().setName("CameraShot").setDEF("CameraBoom"))
.addChild(ProtoInstance18 = new ProtoInstanceObject().setName("CameraShot").setDEF("CameraTilt")));
ProtoInstance1
.addFieldValue(new fieldValueObject().setName("description").setValue("Simple shot of Camera Zoom"));
ProtoInstance1
.addFieldValue(new fieldValueObject().setName("initialPosition").setValue("-50 1 -10"));
ProtoInstance1
.addFieldValue(new fieldValueObject().setName("initialOrientation").setValue("0 1 0 0"));
ProtoInstance1
.addFieldValue(new fieldValueObject().setName("moves")
.addChild(ProtoInstance2 = new ProtoInstanceObject().setName("CameraMovement"))
.addChild(ProtoInstance3 = new ProtoInstanceObject().setName("CameraMovement"))
.addChild(ProtoInstance4 = new ProtoInstanceObject().setName("CameraMovement")));
ProtoInstance2
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Zoom In"));
ProtoInstance2
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance2
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-50 1 -15"));
ProtoInstance2
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance3
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Zoom Out"));
ProtoInstance3
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance3
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-50 1 -10"));
ProtoInstance3
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance4
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Pause"));
ProtoInstance4
.addFieldValue(new fieldValueObject().setName("duration").setValue("1"));
ProtoInstance4
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-50 1 -10"));
ProtoInstance4
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance5
.addFieldValue(new fieldValueObject().setName("description").setValue("Simple shot of Camera Dolly"));
ProtoInstance5
.addFieldValue(new fieldValueObject().setName("initialPosition").setValue("-40 1 -10"));
ProtoInstance5
.addFieldValue(new fieldValueObject().setName("initialOrientation").setValue("0 1 0 0"));
ProtoInstance5
.addFieldValue(new fieldValueObject().setName("moves")
.addChild(ProtoInstance6 = new ProtoInstanceObject().setName("CameraMovement").setDEF("DollyMove1"))
.addChild(ProtoInstance7 = new ProtoInstanceObject().setName("CameraMovement"))
.addChild(ProtoInstance8 = new ProtoInstanceObject().setName("CameraMovement")));
ProtoInstance6
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Dolly from Right to Left"));
ProtoInstance6
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance6
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-45 1 -10"));
ProtoInstance6
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance7
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Dolly from Left to Right"));
ProtoInstance7
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance7
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-40 1 -10"));
ProtoInstance7
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance8
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Pause"));
ProtoInstance8
.addFieldValue(new fieldValueObject().setName("duration").setValue("1"));
ProtoInstance8
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-40 1 -10"));
ProtoInstance8
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance9
.addFieldValue(new fieldValueObject().setName("description").setValue("Simple shot of Camera Pan left right and back to center"));
ProtoInstance9
.addFieldValue(new fieldValueObject().setName("initialPosition").setValue("-30 1 -10"));
ProtoInstance9
.addFieldValue(new fieldValueObject().setName("initialOrientation").setValue("0 1 0 0"));
ProtoInstance9
.addFieldValue(new fieldValueObject().setName("moves")
.addChild(ProtoInstance10 = new ProtoInstanceObject().setName("CameraMovement").setDEF("PanLeft"))
.addChild(ProtoInstance11 = new ProtoInstanceObject().setName("CameraMovement").setDEF("PanRight"))
.addChild(ProtoInstance12 = new ProtoInstanceObject().setName("CameraMovement"))
.addChild(ProtoInstance13 = new ProtoInstanceObject().setName("CameraMovement")));
ProtoInstance10
.addFieldValue(new fieldValueObject().setName("description").setValue("Pan Left"));
ProtoInstance10
.addFieldValue(new fieldValueObject().setName("duration").setValue("2"));
ProtoInstance10
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-30 1 -10"));
ProtoInstance10
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0.4"));
ProtoInstance11
.addFieldValue(new fieldValueObject().setName("description").setValue("Pan Right"));
ProtoInstance11
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance11
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-30 1 -10"));
ProtoInstance11
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 -0.4"));
ProtoInstance12
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Pan back to Center"));
ProtoInstance12
.addFieldValue(new fieldValueObject().setName("duration").setValue("2"));
ProtoInstance12
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-30 1 -10"));
ProtoInstance12
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance13
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Pause"));
ProtoInstance13
.addFieldValue(new fieldValueObject().setName("duration").setValue("2"));
ProtoInstance13
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-30 1 -10"));
ProtoInstance13
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance14
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Boom"));
ProtoInstance14
.addFieldValue(new fieldValueObject().setName("initialPosition").setValue("-20 1 -10"));
ProtoInstance14
.addFieldValue(new fieldValueObject().setName("initialOrientation").setValue("0 1 0 0"));
ProtoInstance14
.addFieldValue(new fieldValueObject().setName("moves")
.addChild(ProtoInstance15 = new ProtoInstanceObject().setName("CameraMovement").setDEF("CameraBoomUp"))
.addChild(ProtoInstance16 = new ProtoInstanceObject().setName("CameraMovement").setDEF("BoomDown"))
.addChild(ProtoInstance17 = new ProtoInstanceObject().setName("CameraMovement").setDEF("BoomPause")));
ProtoInstance15
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Boom Up"));
ProtoInstance15
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance15
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-20 5 -10"));
ProtoInstance15
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance16
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Boom Down"));
ProtoInstance16
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance16
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-20 1 -10"));
ProtoInstance16
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance17
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Pause"));
ProtoInstance17
.addFieldValue(new fieldValueObject().setName("duration").setValue("2"));
ProtoInstance17
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-20 1 -10"));
ProtoInstance17
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance18
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Tilt"));
ProtoInstance18
.addFieldValue(new fieldValueObject().setName("initialPosition").setValue("-10 1 -10"));
ProtoInstance18
.addFieldValue(new fieldValueObject().setName("initialOrientation").setValue("0 0 1 0"));
ProtoInstance18
.addFieldValue(new fieldValueObject().setName("traceEnabled").setValue("true"));
ProtoInstance18
.addFieldValue(new fieldValueObject().setName("moves")
.addChild(ProtoInstance19 = new ProtoInstanceObject().setName("CameraMovement"))
.addChild(ProtoInstance20 = new ProtoInstanceObject().setName("CameraMovement").setDEF("TiltDown"))
.addChild(ProtoInstance21 = new ProtoInstanceObject().setName("CameraMovement").setDEF("TiltPause"))
.addChild(ProtoInstance22 = new ProtoInstanceObject().setName("CameraMovement"))
.addChild(ProtoInstance23 = new ProtoInstanceObject().setName("CameraMovement"))
.addChild(ProtoInstance24 = new ProtoInstanceObject().setName("CameraMovement").setDEF("TiltReset"))
.addChild(ProtoInstance25 = new ProtoInstanceObject().setName("CameraMovement").setDEF("TiltUp")));
ProtoInstance19
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Tilt Pause"));
ProtoInstance19
.addFieldValue(new fieldValueObject().setName("duration").setValue("1"));
ProtoInstance19
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-10 1 -10"));
ProtoInstance19
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 0 1 0"));
ProtoInstance20
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Tilt Left"));
ProtoInstance20
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance20
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-10 1 -10"));
ProtoInstance20
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 0 1 0.785"));
ProtoInstance21
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Tilt Pause"));
ProtoInstance21
.addFieldValue(new fieldValueObject().setName("duration").setValue("1"));
ProtoInstance21
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-10 1 -10"));
ProtoInstance21
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 0 1 0.785"));
ProtoInstance22
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Tilt Right"));
ProtoInstance22
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance22
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-10 1 -10"));
ProtoInstance22
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 0 1 -0.785"));
ProtoInstance23
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Tilt Pause"));
ProtoInstance23
.addFieldValue(new fieldValueObject().setName("duration").setValue("1"));
ProtoInstance23
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-10 1 -10"));
ProtoInstance23
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 0 1 -0.785"));
ProtoInstance24
.addFieldValue(new fieldValueObject().setName("description").setValue("Camera Tilt Reset"));
ProtoInstance24
.addFieldValue(new fieldValueObject().setName("duration").setValue("1"));
ProtoInstance24
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("-10 1 -10"));
ProtoInstance24
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 0 1 0"));
ProtoInstance25
.addFieldValue(new fieldValueObject().setName("description").setValue("Return to home"));
ProtoInstance25
.addFieldValue(new fieldValueObject().setName("duration").setValue("2"));
ProtoInstance25
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("0 2 12"));
ProtoInstance25
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 0 1 0"));
ProtoInstance26
.addFieldValue(new fieldValueObject().setName("description").setValue("AimPointTest for moving camera tracking moving target"));
ProtoInstance26
.addFieldValue(new fieldValueObject().setName("position").setValue("4 4 10"));
ProtoInstance26
.addFieldValue(new fieldValueObject().setName("shots")
.addChild(ProtoInstance27 = new ProtoInstanceObject().setName("CameraShot").setDEF("Shot5")));
ProtoInstance27
.addFieldValue(new fieldValueObject().setName("description").setValue("#3 Tracking shot"));
ProtoInstance27
.addFieldValue(new fieldValueObject().setName("initialPosition").setValue("6 6 10"));
ProtoInstance27
.addFieldValue(new fieldValueObject().setName("initialOrientation").setValue("0 1 0 0"));
ProtoInstance27
.addFieldValue(new fieldValueObject().setName("moves")
.addChild(ProtoInstance28 = new ProtoInstanceObject().setName("CameraMovement").setDEF("MoveAimPoint3.1")
.addComments(new CommentsBlock("goalAimPoint modified by ROUTE to match moving Box")))
.addChild(ProtoInstance29 = new ProtoInstanceObject().setName("CameraMovement").setDEF("MoveAimPoint3.2")
.addComments(new CommentsBlock("goalAimPoint modified by ROUTE to match moving Box")))
.addChild(ProtoInstance30 = new ProtoInstanceObject().setName("CameraMovement").setDEF("MoveAimPoint3.3")
.addComments(new CommentsBlock("goalAimPoint modified by ROUTE to match moving Box")))
.addChild(ProtoInstance31 = new ProtoInstanceObject().setName("CameraMovement").setDEF("MoveAimPoint3.4")
.addComments(new CommentsBlock("can test tracking or not using following values"))));
ProtoInstance28
.addFieldValue(new fieldValueObject().setName("description").setValue("AimPoint 3.1 moving BoxPath"));
ProtoInstance28
.addFieldValue(new fieldValueObject().setName("tracking").setValue("true"));
ProtoInstance28
.addFieldValue(new fieldValueObject().setName("duration").setValue("8"));
ProtoInstance28
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("6 6 10"));
ProtoInstance29
.addFieldValue(new fieldValueObject().setName("description").setValue("AimPoint 3.2 pan right while tracking"));
ProtoInstance29
.addFieldValue(new fieldValueObject().setName("tracking").setValue("true"));
ProtoInstance29
.addFieldValue(new fieldValueObject().setName("duration").setValue("8"));
ProtoInstance29
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("40 6 12"));
ProtoInstance30
.addFieldValue(new fieldValueObject().setName("description").setValue("AimPoint 3.3 boom up while tracking"));
ProtoInstance30
.addFieldValue(new fieldValueObject().setName("tracking").setValue("true"));
ProtoInstance30
.addFieldValue(new fieldValueObject().setName("duration").setValue("3"));
ProtoInstance30
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("40 20 13"));
ProtoInstance31
.addFieldValue(new fieldValueObject().setName("description").setValue("AimPoint 3.4 restore camera back to home"));
ProtoInstance31
.addFieldValue(new fieldValueObject().setName("tracking").setValue("true"));
ProtoInstance31
.addFieldValue(new fieldValueObject().setName("duration").setValue("5"));
ProtoInstance31
.addFieldValue(new fieldValueObject().setName("goalPosition").setValue("4 4 10"));
ProtoInstance31
.addFieldValue(new fieldValueObject().setName("goalAimPoint").setValue("4 4 0"));
ProtoInstance31
.addFieldValue(new fieldValueObject().setName("goalOrientation").setValue("0 1 0 0"));
ProtoInstance33
.addFieldValue(new fieldValueObject().setName("ViewpointNode")
.addChild(new ViewpointObject().setDEF("FrustumViewpoint").setDescription("viewpoint for ViewFrustum").setPosition(new float[] {0f,0f,0f})));
ProtoInstance33
.addFieldValue(new fieldValueObject().setName("NavigationInfoNode")
.addChild(new NavigationInfoObject().setDEF("TestNavigationInfo").setTransitionType(new MFStringObject(new MFString27().getArray())).setVisibilityLimit(100f)));
ProtoInstance33
.addFieldValue(new fieldValueObject().setName("visible").setValue("false"));
ProtoInstance33
.addFieldValue(new fieldValueObject().setName("lineColor").setValue("0.9 0.9 0.9"));
ProtoInstance33
.addFieldValue(new fieldValueObject().setName("frustumColor").setValue("0.8 0.8 0.8"));
ProtoInstance33
.addFieldValue(new fieldValueObject().setName("transparency").setValue("0.95"));
ProtoInstance34
.addFieldValue(new fieldValueObject().setName("enabled").setValue("true"));
ProtoInstance34
.addFieldValue(new fieldValueObject().setName("markerColor").setValue("1 0.5 0"));
ProtoInstance34
.addFieldValue(new fieldValueObject().setName("scale").setValue("1 1 1"));
ProtoInstance34
.addFieldValue(new fieldValueObject().setName("positionOffsetFromCamera").setValue("0 0 -6"));
return X3D0;
}
protected class MFString0 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"CameraPrototypes.x3d#Camera".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d#Camera".replaceAll("\"", "\\\""),"CameraPrototypes.wrl#Camera".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.wrl#Camera".replaceAll("\"", "\\\"")});
}
}
protected class MFString1 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"CameraPrototypes.x3d#CameraShot".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d#CameraShot".replaceAll("\"", "\\\""),"CameraPrototypes.wrl#CameraShot".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.wrl#CameraShot".replaceAll("\"", "\\\"")});
}
}
protected class MFString2 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"CameraPrototypes.x3d#CameraMovement".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d#CameraMovement".replaceAll("\"", "\\\""),"CameraPrototypes.wrl#CameraMovement".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.wrl#CameraMovement".replaceAll("\"", "\\\"")});
}
}
protected class MFString3 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"CameraPrototypes.x3d#OfflineRender".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d#OfflineRender".replaceAll("\"", "\\\""),"CameraPrototypes.wrl#OfflineRender".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.wrl#OfflineRender".replaceAll("\"", "\\\"")});
}
}
protected class MFString4 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"Click to animate".replaceAll("\"", "\\\""),"SimpleShotsTest".replaceAll("\"", "\\\"")});
}
}
protected class MFString5 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"MIDDLE".replaceAll("\"", "\\\""),"MIDDLE".replaceAll("\"", "\\\"")});
}
}
protected class MFString6 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"images/CameraMoveZoom.png".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/images/CameraMoveZoom.png".replaceAll("\"", "\\\"")});
}
}
protected class MFString7 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"Zoom in, out".replaceAll("\"", "\\\"")});
}
}
protected class MFString8 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"MIDDLE".replaceAll("\"", "\\\""),"MIDDLE".replaceAll("\"", "\\\"")});
}
}
protected class MFString9 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"images/CameraMoveDolly.png".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/images/CameraMoveDolly.png".replaceAll("\"", "\\\"")});
}
}
protected class MFString10 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"Dolly left, right".replaceAll("\"", "\\\"")});
}
}
protected class MFString11 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"MIDDLE".replaceAll("\"", "\\\""),"MIDDLE".replaceAll("\"", "\\\"")});
}
}
protected class MFString12 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"images/CameraMovePan.png".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/images/CameraMovePan.png".replaceAll("\"", "\\\"")});
}
}
protected class MFString13 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"Pan left, right".replaceAll("\"", "\\\"")});
}
}
protected class MFString14 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"MIDDLE".replaceAll("\"", "\\\""),"MIDDLE".replaceAll("\"", "\\\"")});
}
}
protected class MFString15 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"images/CameraMoveBoom.png".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/images/CameraMoveBoom.png".replaceAll("\"", "\\\"")});
}
}
protected class MFString16 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"Boom up, down".replaceAll("\"", "\\\"")});
}
}
protected class MFString17 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"MIDDLE".replaceAll("\"", "\\\""),"MIDDLE".replaceAll("\"", "\\\"")});
}
}
protected class MFString18 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"images/CameraMoveTilt.png".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/images/CameraMoveTilt.png".replaceAll("\"", "\\\"")});
}
}
protected class MFString19 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"Tilt left, right".replaceAll("\"", "\\\"")});
}
}
protected class MFString20 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"MIDDLE".replaceAll("\"", "\\\""),"MIDDLE".replaceAll("\"", "\\\"")});
}
}
protected class MFString21 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"Click to animate".replaceAll("\"", "\\\""),"AimPointTest".replaceAll("\"", "\\\"")});
}
}
protected class MFString22 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"MIDDLE".replaceAll("\"", "\\\""),"MIDDLE".replaceAll("\"", "\\\"")});
}
}
protected class MFString23 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"CameraShape.x3d".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraShape.x3d".replaceAll("\"", "\\\"")});
}
}
protected class MFInt3224 {
protected MFInt32Object getArray() {
return new MFInt32Object(new int[] {0,1});
}
}
protected class MFVec3f25 {
protected MFVec3fObject getArray() {
return new MFVec3fObject(new float[] {0f,0f,0f,0f,0f,-100f});
}
}
protected class MFString26 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"../../X3dForWebAuthors/Chapter14Prototypes/ViewFrustumPrototype.x3d#ViewFrustum".replaceAll("\"", "\\\""),"http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ViewFrustumPrototype.x3d#ViewFrustum".replaceAll("\"", "\\\""),"../../X3dForWebAuthors/Chapter14Prototypes/ViewFrustumPrototype.wrl#ViewFrustum".replaceAll("\"", "\\\""),"http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/ViewFrustumPrototype.wrl#ViewFrustum".replaceAll("\"", "\\\"")});
}
}
protected class MFString27 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"ANIMATE".replaceAll("\"", "\\\"")});
}
}
protected class MFColor28 {
protected MFColorObject getArray() {
return new MFColorObject(new float[] {0.282353f,0.380392f,0.470588f});
}
}
protected class MFInt3229 {
protected MFInt32Object getArray() {
return new MFInt32Object(new int[] {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0});
}
}
protected class MFInt3230 {
protected MFInt32Object getArray() {
return new MFInt32Object(new int[] {0,8,9,1,-1,1,9,10,2,-1,2,10,11,3,-1,3,11,12,4,-1,4,12,13,5,-1,5,13,14,6,-1,6,14,15,7,-1,8,16,17,9,-1,9,17,18,10,-1,10,18,19,11,-1,11,19,20,12,-1,12,20,21,13,-1,13,21,22,14,-1,14,22,23,15,-1,16,24,25,17,-1,17,25,26,18,-1,18,26,27,19,-1,19,27,28,20,-1,20,28,29,21,-1,21,29,30,22,-1,22,30,31,23,-1,24,32,33,25,-1,25,33,34,26,-1,26,34,35,27,-1,27,35,36,28,-1,28,36,37,29,-1,29,37,38,30,-1,30,38,39,31,-1,32,40,41,33,-1,33,41,42,34,-1,34,42,43,35,-1,35,43,44,36,-1,36,44,45,37,-1,37,45,46,38,-1,38,46,47,39,-1,40,48,49,41,-1,41,49,50,42,-1,42,50,51,43,-1,43,51,52,44,-1,44,52,53,45,-1,45,53,54,46,-1,46,54,55,47,-1,48,56,57,49,-1,49,57,58,50,-1,50,58,59,51,-1,51,59,60,52,-1,52,60,61,53,-1,53,61,62,54,-1,54,62,63,55,-1});
}
}
protected class MFVec3f31 {
protected MFVec3fObject getArray() {
return new MFVec3fObject(new float[] {-5.25f,5.25f,0f,-3.75f,5.25f,0f,-2.25f,5.25f,0f,-0.75f,5.25f,0f,0.75f,5.25f,0f,2.25f,5.25f,0f,3.75f,5.25f,0f,5.25f,5.25f,0f,-5.25f,3.75f,0f,-3.75f,3.75f,0f,-2.25f,3.75f,0f,-0.75f,3.75f,0f,0.75f,3.75f,0f,2.25f,3.75f,0f,3.75f,3.75f,0f,5.25f,3.75f,0f,-5.25f,2.25f,0f,-3.75f,2.25f,0f,-2.25f,2.25f,0f,-0.75f,2.25f,0f,0.75f,2.25f,0f,2.25f,2.25f,0f,3.75f,2.25f,0f,5.25f,2.25f,0f,-5.25f,0.75f,0f,-3.75f,0.75f,0f,-2.25f,0.75f,0f,-0.75f,0.75f,0f,0.75f,0.75f,0f,2.25f,0.75f,0f,3.75f,0.75f,0f,5.25f,0.75f,0f,-5.25f,-0.75f,0f,-3.75f,-0.75f,0f,-2.25f,-0.75f,0f,-0.75f,-0.75f,0f,0.75f,-0.75f,0f,2.25f,-0.75f,0f,3.75f,-0.75f,0f,5.25f,-0.75f,0f,-5.25f,-2.25f,0f,-3.75f,-2.25f,0f,-2.25f,-2.25f,0f,-0.75f,-2.25f,0f,0.75f,-2.25f,0f,2.25f,-2.25f,0f,3.75f,-2.25f,0f,5.25f,-2.25f,0f,-5.25f,-3.75f,0f,-3.75f,-3.75f,0f,-2.25f,-3.75f,0f,-0.75f,-3.75f,0f,0.75f,-3.75f,0f,2.25f,-3.75f,0f,3.75f,-3.75f,0f,5.25f,-3.75f,0f,-5.25f,-5.25f,0f,-3.75f,-5.25f,0f,-2.25f,-5.25f,0f,-0.75f,-5.25f,0f,0.75f,-5.25f,0f,2.25f,-5.25f,0f,3.75f,-5.25f,0f,5.25f,-5.25f,0f});
}
}
protected class MFColor32 {
protected MFColorObject getArray() {
return new MFColorObject(new float[] {0.435294f,0.741176f,0f,0f,0.560784f,0.580392f});
}
}
protected class MFString33 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d".replaceAll("\"", "\\\""),"../../Savage/Tools/Authoring/CoordinateAxes.x3d".replaceAll("\"", "\\\""),"http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d".replaceAll("\"", "\\\""),"https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d".replaceAll("\"", "\\\""),"../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl".replaceAll("\"", "\\\""),"../../Savage/Tools/Authoring/CoordinateAxes.wrl".replaceAll("\"", "\\\""),"http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl".replaceAll("\"", "\\\""),"https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl".replaceAll("\"", "\\\"")});
}
}
protected class MFFloat34 {
protected MFFloatObject getArray() {
return new MFFloatObject(new float[] {0f,0.25f,0.5f,0.75f,1f});
}
}
protected class MFVec3f35 {
protected MFVec3fObject getArray() {
return new MFVec3fObject(new float[] {-5f,1f,5f,45f,1f,5f,45f,1f,-45f,-5f,1f,-45f,-5f,1f,5f});
}
}
protected class MFString36 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"../earth-topo.png".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/earth-topo.png".replaceAll("\"", "\\\"")});
}
}
protected class MFString37 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"../../Savage/Tools/HeadsUpDisplays/CrossHairPrototype.x3d#CrossHair".replaceAll("\"", "\\\""),"https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairPrototype.x3d#CrossHair".replaceAll("\"", "\\\""),"../../Savage/Tools/HeadsUpDisplays/CrossHairPrototype.wrl#CrossHair".replaceAll("\"", "\\\""),"https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CrossHairPrototype.wrl#CrossHair".replaceAll("\"", "\\\"")});
}
}
protected class MFString38 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"target=_blank".replaceAll("\"", "\\\"")});
}
}
protected class MFString39 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"CameraExample.x3d".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraExample.x3d".replaceAll("\"", "\\\""),"CameraExample.wrl".replaceAll("\"", "\\\""),"http://www.web3d.org/x3d/content/examples/Basic/development/CameraExample.wrl".replaceAll("\"", "\\\"")});
}
}
protected class MFString40 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"CameraPrototype".replaceAll("\"", "\\\""),"defines a prototype".replaceAll("\"", "\\\""),"".replaceAll("\"", "\\\""),"Click on this text to see".replaceAll("\"", "\\\""),"CameraExample scene".replaceAll("\"", "\\\"")});
}
}
protected class MFString41 {
protected MFStringObject getArray() {
return new MFStringObject(new java.lang.String[] {"MIDDLE".replaceAll("\"", "\\\""),"MIDDLE".replaceAll("\"", "\\\"")});
}
}
}
From brutzman at nps.edu Sun Apr 1 08:25:31 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Sun, 1 Apr 2018 08:25:31 -0700
Subject: [x3d-public] Upcoming feature of X3DJSAIL. A Java based
X3DJSONLD!
In-Reply-To: <5a6fa533.1610c80a.19f65.27b3@mx.google.com>
References: <5a6fa533.1610c80a.19f65.27b3@mx.google.com>
Message-ID: <06ceb3ff-e7d0-476c-a46a-cc43506e8746@nps.edu>
John, this emerging X3D interoperability between java/javascript/.x3d/.json seems really significant. Can we make sure that it is properly & consistently documented in X3DJSAIL to correspond with X3DJSONLD?
Alternately a few more TODO items will emerge... probably crafting and exposing a few examples that deliberately try to "ring all the bells at once" will be a useful exercise to share.
Thanks for your efforts.
On 1/29/2018 2:50 PM, John Carlson wrote:
> I can now put this at the bottom of a Nashorn file, say? HelloWorldProgramOutput.Nashorn.js:
>
> ??? X3D0.toFileJSON("Nashorn.json");
>
> ??? var X3DJSONLD = Java.type("net.coderextreme.X3DJSONLD")
>
> ??? var loader = new X3DJSONLD();
>
> ??? var File = Java.type("java.io.File")
>
> ??? var jsobj = loader.readJsonFile(new File("Nashorn.json"));
>
> ??? var document = loader.loadJsonIntoDocument(jsobj);
>
> ??? print(loader.serializeDOM(loader.getX3DVersion(jsobj), document));
>
> Then run to get XML output:
>
> $ jjs -J-Djava.class.path=../../jars/X3DJSAIL.3.3.full.jar";../../classes"? HelloWorldProgramOutput.Nashorn.js > Nashorn0.x3d
>
> Nothing has been validated yet, but output is attached!? I think it may still be messy, but I?m mildly pleased I got as far as I did.
>
> The real amazing thing is you don?t need javax.json on the classpath, as far as I can tell!? I did put it under java/lib for compiling.
>
> Source code:
>
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/java/net/coderextreme/X3DJSONLD.java
>
> License is under main repository.
>
> Next: tying DOM document into main X3DJSAIL.
>
> If you add these line to the end of the JavaScript, you can create an X3D from the DOM you loaded in another way:
>
> ??? var X3DLoaderObject = Java.type("org.web3d.x3d.jsail.X3DLoaderObject")
>
> ??? var xmlLoader = new X3DLoaderObject();
>
> ??? X3D0 = xmlLoader.toX3dObjectTree(document);
>
> ??? X3D0.toFileX3D("./examples/Nashorn.x3d");
>
> Have fun with X3DJSONLD!
>
> John
>
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From brutzman at nps.edu Sun Apr 1 08:28:40 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Sun, 1 Apr 2018 08:28:40 -0700
Subject: [x3d-public] JSON import added to X3DJSAIL. Take off TODO
In-Reply-To: <5a92a96b.531bc80a.31e4e.57ad@mx.google.com>
References: <5a92a96b.531bc80a.31e4e.57ad@mx.google.com>
Message-ID: <85117d5a-1f41-3719-e0db-4b89482b0ad0@nps.edu>
Similar request: let's build a few examples, then help me document X3DJSAIL correctly/consistently with X3DJSONLD.
Perhaps we should plan a special breakout teleconference on these techniques? Or stick to monthly X3D Working Group teleconference focus? Whatever works. Again thanks.
On 2/25/2018 4:17 AM, John Carlson wrote:
> With net/coderextreme/X3DJSONLD.java, JSON import has been taken of the TODO list for X3DJSAIL. Please update:
>
> http://www.web3d.org/specifications/java/X3DJSAIL.html
>
> It still needs to be tested more? extensively, but initial versions are working under java/nashorn/examples.
>
> Thanks,
>
> John
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From yottzumm at gmail.com Sun Apr 1 14:13:16 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 17:13:16 -0400
Subject: [x3d-public] [x3dom-users] Using different textures for
multipleinstancesofthe same inline
In-Reply-To: <5ac12f6a.a819c80a.8ed98.f748@mx.google.com>
References: <371569768.369488.1522599198322.ref@mail.yahoo.com>
<371569768.369488.1522599198322@mail.yahoo.com>
<5ac12d58.1c2ec80a.fc9f2.5862@mx.google.com>
<5ac12f6a.a819c80a.8ed98.f748@mx.google.com>
Message-ID: <5ac14b6a.2c24ed0a.20c33.3959@mx.google.com>
It?s not a direct answer to your question, but you may be able to use the protoExpander with a Proto with an Inline.
Here?s a better example:
https://coderextreme.net/X3DJSONLD/src/main/html/flowers2.html
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 3:13 PM
To: x3dom mlist
Subject: RE: [x3dom-users] Using different textures for multipleinstancesofthe same inline
I?ve confirmed these links work now.? There was a small issue with prototype.html (case sensitive windows hid it).
https://coderextreme.net/X3DJSONLD/src/main/html/prototypes.html should work properly
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 3:04 PM
To: x3dom mlist
Subject: RE: [x3dom-users] Using different textures for multiple instancesofthe same inline
Apparently mailers don?t allow you to edit existing URLs
https://coderextreme.net/X3DJSONLD/src/main/html/prototype.html
https://coderextreme.net/X3DJSONLD/src/main/html/flipper.html
Features of X3DJSONLD 2.0 beta.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 14:38:57 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 17:38:57 -0400
Subject: [x3d-public] X3DJSON prototypes and scripts for X3DOM, X_ITE.
Message-ID: <5ac1516f.4207c80a.d207f.d186@mx.google.com>
Introducing: ?The X3D JSON Loader (2.0 beta), X3DOM JSON Prototype Expander (2.0 beta), X3DOM JSONScript (0.1 alpha) ? Your solution for XMLDOM -> X3D JSON -> XMLDOM JavaScript development for X3DOM and X_ITE.
For a Quick Start, edit flowers2.html and replace ../data/flowers2.json with your X3D JSON URL and put flowers2.html, following JavaScript on your web server. Then open flowers2.html in your web browser.
[ also you may want to add my versions of x_ite (maybe not?should be the same) and x3dom (definitely) for full functionality ]
There are more complex cases of multi JSON files in the same scene in prototypes.html.
Good luck.
I still have extra stuff in the global scope of JavaScript?let people know this. ?Pull requests and forks are welcome, as long as you agree to the license.
License is here:?https://github.com/coderextreme/X3DJSONLD/blob/master/LICENSE
Repository is here:?https://github.com/coderextreme/X3DJSONLD/
For a web browser,?a live, development version of the X3D JSON loader (I?recommend downloading locally or forking) in your HTML, put:
somewhere in the script (see index.html),
call
loadX3DJS(document.implementation, json, url, xml, NS, loadSchema, doValidate, function(element, xmlDoc) {
Then append the element to your DOM:
document.querySelector(selector).appendChild(element);
x3dom.reload();
}
selector is the CSS selector which you want to append the X3DOM HTML code to.
json is the X3D JSON you want to display.
url is used for resolving URLs in the X3D JSON. ?Should be similar or the same as the URL you passed to retrieve the JSON from the server.
xml is the array or LOG for inclusion into X_ITE via createX3DFromString, this would normally work something like:
var browser = X3D.getBrowser(?X3D");
browser.replaceWorld(browser.createX3DFromString(xml.join("\n"));
?X3D? is the CSS query selector.
NS is the namespace to use when creating elements in the DOM for the XML Serializer. http://www.w3.org/1999/xhtml normally works for X3DOM and http://www.web3d.org/specifications/x3d-namespace normally works for X_ITE. Leaving NS off is also acceptable, but may lead to results you don't like.
Sample code for X_ITE where #x_ite is the id of your X3DCanvas :
var content = xml.join("\n");
X3D(function() {
var browser = X3D.getBrowser("#x_ite");
browser.replaceWorld(browser.createX3DFromString(content);
});
For the prototype expander a live, development version (I?recommend downloading locally or forking) in your HTML, put:
then call (does not modify extern protos yet, use the included server as `node app.js`--works in some cases?does this on the server):
json = protoExpander.prototypeExpander(url, json);
json = flattener(json);
json is the X3DJSON you want to expand protos for (also modifies the parameter as output)
The server-side code for running the prototype expander is (you may have to add the flattener as well):
var PROTOS = require('./src/main/node/PrototypeExpander')
PROTOS.setLoadURLs(loadURLs);
json = PROTOS.externalPrototypeExpander(url, json);
You may wish to try this on the client to see if it works. I haven?t gotten it to work yet in all cases.
There is a lot of useful code in loaderJQuery.js. index.html (for protos), flipper.html (for the base loader, subscenes), prototypes.html (scripts, prototypes, subscenes), prototypes2.html (JSON loading into X_ITE) are good examples.
To enable JSONScript scripting, put this on your web page:
Use JSONScript in X3DOM?
And put this in your JavaScript where the selector is an X3DOM scene:
if ($('#scripting').is(':checked')) {
loadScripts(json, selector);
}
To run XML -> JSON conversions, put your .x3d file in src/main/data, and cd to src/main/shell and run `sh several.sh ../data/file.x3d` You will find output in data, nashorn, java, and python folders (way down low for the latter).
To run the proto expander on the server, put your .json and .x3d files in src/main/data and cd to src/main/shell and run `sh runppp.sh` The XML will be in src/main/shell/data and the JSON will be in src/main/ppp. Good luck!
You may start a local file browser by cd?ing to X3DJSONLD and running `node app.js` This will allow you to use ExternProtoDeclare in JSON at least, and search for JSON, WRL, X3D, STL, and PLY files from the web browser.
TODO: Bring X_ITE and XML selectors to API.
John Carlson
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 14:55:02 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 17:55:02 -0400
Subject: [x3d-public] X3DJSON prototypes and scripts for X3DOM, X_ITE.
In-Reply-To: <5ac1516f.4207c80a.d207f.d186@mx.google.com>
References: <5ac1516f.4207c80a.d207f.d186@mx.google.com>
Message-ID: <5ac15534.4e19c80a.d4958.46f5@mx.google.com>
https://coderextreme.net/X3DJSONLD/src/main/html/flowers2.html
https://coderextreme.net/X3DJSONLD/src/main/html/
https://coderextreme.net/X3DJSONLD/src/main/html/
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:38 PM
To: x3d-public at web3d.org; x3dom mlist
Subject: X3DJSON prototypes and scripts for X3DOM, X_ITE.
Introducing: ?The X3D JSON Loader (2.0 beta), X3DOM JSON Prototype Expander (2.0 beta), X3DOM JSONScript (0.1 alpha) ? Your solution for XMLDOM -> X3D JSON -> XMLDOM JavaScript development for X3DOM and X_ITE.
For a Quick Start, edit flowers2.html and replace ../data/flowers2.json with your X3D JSON URL and put flowers2.html, following JavaScript on your web server.? Then open flowers2.html in your web browser.
???
???
???
???
???
[ also you may want to add my versions of x_ite (maybe not?should be the same) and x3dom (definitely) for full functionality ]
There are more complex cases of multi JSON files in the same scene in prototypes.html.
Good luck.
I still have extra stuff in the global scope of JavaScript?let people know this. ?Pull requests and forks are welcome, as long as you agree to the license.
License is here:?https://github.com/coderextreme/X3DJSONLD/blob/master/LICENSE
Repository is here:?https://github.com/coderextreme/X3DJSONLD/
For a web browser,?a live, development version of the X3D JSON loader (I?recommend downloading locally or forking) in your HTML, put:
somewhere in the script (see index.html),
call
loadX3DJS(document.implementation, json, url, xml, NS, loadSchema, doValidate, function(element, xmlDoc) {
Then append the element to your DOM:
???? document.querySelector(selector).appendChild(element);
x3dom.reload();
}
selector is the CSS selector which you want to append the X3DOM HTML code to.
json is the X3D JSON you want to display.
url is used for resolving URLs in the X3D JSON. ?Should be similar or the same as the URL you passed to retrieve the JSON from the server.
xml is the array or LOG for inclusion into X_ITE via createX3DFromString, this would normally work something like:
?????? var browser = X3D.getBrowser(?X3D");
?????? browser.replaceWorld(browser.createX3DFromString(xml.join("\n"));
?X3D? is the CSS query selector.
NS is the namespace to use when creating elements in the DOM for the XML Serializer.? http://www.w3.org/1999/xhtml normally works for X3DOM and http://www.web3d.org/specifications/x3d-namespace normally works for X_ITE.? Leaving NS off is also acceptable, but may lead to results you don't like.
Sample code for X_ITE where #x_ite is the id of your X3DCanvas :
var content = xml.join("\n");
X3D(function() {
???? var browser = X3D.getBrowser("#x_ite");
browser.replaceWorld(browser.createX3DFromString(content);
});
For the prototype expander a live, development version (I?recommend downloading locally or forking) in your HTML, put:
then call (does not modify extern protos yet, use the included server as `node app.js`--works in some cases?does this on the server):
json = protoExpander.prototypeExpander(url, json);
json = flattener(json);
json is the X3DJSON you want to expand protos for (also modifies the parameter as output)
The server-side code for running the prototype expander is (you may have to add the flattener as well):
var PROTOS = require('./src/main/node/PrototypeExpander')
PROTOS.setLoadURLs(loadURLs);
json = PROTOS.externalPrototypeExpander(url, json);
You may wish to try this on the client to see if it works.? I haven?t gotten it to work yet in all cases.
There is a lot of useful code in loaderJQuery.js.? index.html (for protos), flipper.html (for the base loader, subscenes), prototypes.html (scripts, prototypes, subscenes), prototypes2.html (JSON loading into X_ITE) are good examples.
To enable JSONScript scripting, put this on your web page:
??????? Use JSONScript in X3DOM?
And put this in your JavaScript where the selector is an X3DOM scene:
??????????????????????????????????? if ($('#scripting').is(':checked')) {
??????????????????????????????????????loadScripts(json, selector);
??????????????????????????????? }
To run XML -> JSON conversions, put your .x3d file in src/main/data, and cd to src/main/shell and run `sh several.sh ../data/file.x3d`? You will find output in data, nashorn, java, and python folders (way down low for the latter).
To run the proto expander on the server, put your .json and .x3d files in src/main/data and cd to src/main/shell and run `sh runppp.sh`? The XML will be in src/main/shell/data and the JSON will be in src/main/ppp.? Good luck!
You may start a local file browser by cd?ing to X3DJSONLD and running `node app.js`? This will allow you to use ExternProtoDeclare in JSON at least, and search for JSON, WRL, X3D, STL, and PLY files from the web browser.
TODO:? Bring X_ITE and XML selectors to API.
John Carlson
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 15:00:06 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 18:00:06 -0400
Subject: [x3d-public] X3DJSON prototypes and scripts for X3DOM, X_ITE.
In-Reply-To: <5ac15534.4e19c80a.d4958.46f5@mx.google.com>
References: <5ac1516f.4207c80a.d207f.d186@mx.google.com>
<5ac15534.4e19c80a.d4958.46f5@mx.google.com>
Message-ID: <5ac15664.c337ed0a.280fe.2f76@mx.google.com>
So CTRL return sends.
New X3DJSONLD examples:
https://coderextreme.net/X3DJSONLD/src/main/html/prototypes.html
https://coderextreme.net/X3DJSONLD/src/main/html/prototypes2.html (JSON X_ITE)
https://coderextreme.net/X3DJSONLD/src/main/html/flipper.html
https://coderextreme.net/X3DJSONLD/src/main/html/flowers2.html
https://coderextreme.net/X3DJSONLD/ (main site)
Remember, Scripting is at 0.1 alpha.
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:55 PM
To: x3d-public at web3d.org; x3dom mlist
Subject: RE: X3DJSON prototypes and scripts for X3DOM, X_ITE.
https://coderextreme.net/X3DJSONLD/src/main/html/flowers2.html
https://coderextreme.net/X3DJSONLD/src/main/html/
https://coderextreme.net/X3DJSONLD/src/main/html/
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:38 PM
To: x3d-public at web3d.org; x3dom mlist
Subject: X3DJSON prototypes and scripts for X3DOM, X_ITE.
Introducing: ?The X3D JSON Loader (2.0 beta), X3DOM JSON Prototype Expander (2.0 beta), X3DOM JSONScript (0.1 alpha) ? Your solution for XMLDOM -> X3D JSON -> XMLDOM JavaScript development for X3DOM and X_ITE.
For a Quick Start, edit flowers2.html and replace ../data/flowers2.json with your X3D JSON URL and put flowers2.html, following JavaScript on your web server.? Then open flowers2.html in your web browser.
???
???
???
???
???
[ also you may want to add my versions of x_ite (maybe not?should be the same) and x3dom (definitely) for full functionality ]
There are more complex cases of multi JSON files in the same scene in prototypes.html.
Good luck.
I still have extra stuff in the global scope of JavaScript?let people know this. ?Pull requests and forks are welcome, as long as you agree to the license.
License is here:?https://github.com/coderextreme/X3DJSONLD/blob/master/LICENSE
Repository is here:?https://github.com/coderextreme/X3DJSONLD/
For a web browser,?a live, development version of the X3D JSON loader (I?recommend downloading locally or forking) in your HTML, put:
somewhere in the script (see index.html),
call
loadX3DJS(document.implementation, json, url, xml, NS, loadSchema, doValidate, function(element, xmlDoc) {
Then append the element to your DOM:
???? document.querySelector(selector).appendChild(element);
x3dom.reload();
}
selector is the CSS selector which you want to append the X3DOM HTML code to.
json is the X3D JSON you want to display.
url is used for resolving URLs in the X3D JSON. ?Should be similar or the same as the URL you passed to retrieve the JSON from the server.
xml is the array or LOG for inclusion into X_ITE via createX3DFromString, this would normally work something like:
?????? var browser = X3D.getBrowser(?X3D");
?????? browser.replaceWorld(browser.createX3DFromString(xml.join("\n"));
?X3D? is the CSS query selector.
NS is the namespace to use when creating elements in the DOM for the XML Serializer.? http://www.w3.org/1999/xhtml normally works for X3DOM and http://www.web3d.org/specifications/x3d-namespace normally works for X_ITE.? Leaving NS off is also acceptable, but may lead to results you don't like.
Sample code for X_ITE where #x_ite is the id of your X3DCanvas :
var content = xml.join("\n");
X3D(function() {
???? var browser = X3D.getBrowser("#x_ite");
browser.replaceWorld(browser.createX3DFromString(content);
});
For the prototype expander a live, development version (I?recommend downloading locally or forking) in your HTML, put:
then call (does not modify extern protos yet, use the included server as `node app.js`--works in some cases?does this on the server):
json = protoExpander.prototypeExpander(url, json);
json = flattener(json);
json is the X3DJSON you want to expand protos for (also modifies the parameter as output)
The server-side code for running the prototype expander is (you may have to add the flattener as well):
var PROTOS = require('./src/main/node/PrototypeExpander')
PROTOS.setLoadURLs(loadURLs);
json = PROTOS.externalPrototypeExpander(url, json);
You may wish to try this on the client to see if it works.? I haven?t gotten it to work yet in all cases.
There is a lot of useful code in loaderJQuery.js.? index.html (for protos), flipper.html (for the base loader, subscenes), prototypes.html (scripts, prototypes, subscenes), prototypes2.html (JSON loading into X_ITE) are good examples.
To enable JSONScript scripting, put this on your web page:
??????? Use JSONScript in X3DOM?
And put this in your JavaScript where the selector is an X3DOM scene:
??????????????????????????????????? if ($('#scripting').is(':checked')) {
??????????????????????????????????????loadScripts(json, selector);
??????????????????????????????? }
To run XML -> JSON conversions, put your .x3d file in src/main/data, and cd to src/main/shell and run `sh several.sh ../data/file.x3d`? You will find output in data, nashorn, java, and python folders (way down low for the latter).
To run the proto expander on the server, put your .json and .x3d files in src/main/data and cd to src/main/shell and run `sh runppp.sh`? The XML will be in src/main/shell/data and the JSON will be in src/main/ppp.? Good luck!
You may start a local file browser by cd?ing to X3DJSONLD and running `node app.js`? This will allow you to use ExternProtoDeclare in JSON at least, and search for JSON, WRL, X3D, STL, and PLY files from the web browser.
TODO:? Bring X_ITE and XML selectors to API.
John Carlson
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Leonard.Daly at realism.com Sun Apr 1 16:38:40 2018
From: Leonard.Daly at realism.com (Leonard Daly)
Date: Sun, 1 Apr 2018 16:38:40 -0700
Subject: [x3d-public] CDATA sections not showing up in Edge. X3DJSONLD.
In-Reply-To: <5ac0d307.87a4370a.b5259.3187@mx.google.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
<5ac0abbc.aa24c80a.974af.009d@mx.google.com>
<5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
<5ac0c62d.ef32c80a.ca4cb.6ec9@mx.google.com>
<5ac0cc12.042aed0a.b6b06.59df@mx.google.com>
<5ac0cccb.84d1370a.91202.d99d@mx.google.com>
<5ac0d307.87a4370a.b5259.3187@mx.google.com>
Message-ID: <411b28d9-06b6-defe-5881-442e7439e1d3@realism.com>
John,
Note that in HTML (V5.2 standard -
https://www.w3.org/TR/html52/syntax.html#cdata-sections), CDATA can only
be used in foreign content (MATHML and SVG are explicitly mentioned). It
use to be common practice to put CDATA around JavaScript contents; but
all browsers that support WebGL also support JavaScript, so that would
not be necessary.
Leonard Daly
> So it looks like:
>
> xmlDoc.createCDATASection("This is an element");
>
> is the standard way of creating a CDATA section, and this works in
> X3DJSONLD server side.? Can we use this in Edge with the other hack to
> get CDATA sections in place?? Or will using the HTML document variable
> throw us off? ?I guess we should be using an XML document and
> definitely not the HTML document, eh?
>
> Looks like the way to get an XML document in the browser is:
>
> /var documentType/=
> document.implementation.createDocumentType(/qualifiedNameStr/,
> /publicId/, /systemId/)
> var xmlDoc = document.implementation.createDocument(/namespaceURI/,
> /qualifiedNameStr/, /documentType/);
>
> Can anyone confirm?? I?d like to get this into X3DJSONLD GUI asap.
> It?s already in my server side code with xmldom.
>
> Probably I?ll start working on this now. I?m not sure what putting an
> xml document in HTML will do however, when I put it in a textarea,
> so?help!
> Thanks,
>
> John
>
> Sent from Mail for
> Windows 10
>
> *From: *John Carlson
> *Sent: *Sunday, April 1, 2018 8:12 AM
> *To: *holger.seelig at yahoo.de ;
> x3d-public at web3d.org ; Andreas Plesch
> ; GPU Group
> ; Don Brutzman
> *Subject: *RE: possible issue with X_ITE with
> Edge;CDATAsectionsnotshowingupinEdge XML textareas. Problem with other
> browsers.
>
> Loading JSON definitely prevents animation from happening in the X_ITE
> XML text section in Edge.? That?s the CDATA section I think.? Load
> bubs.json for example.
>
> John
>
> Sent from Mail for
> Windows 10
>
> *From: *John Carlson
> *Sent: *Sunday, April 1, 2018 8:09 AM
> *To: *holger.seelig at yahoo.de ;
> x3d-public at web3d.org ; Andreas Plesch
> ; GPU Group
> ; Don Brutzman
> *Subject: *RE: possible issue with X_ITE with Edge;
> CDATAsectionsnotshowingupinEdge XML textareas. Problem with other
> browsers.
>
> Both serialized XML versions load work from URLs after adding CDATA
> sections to XML.? Otherwise, the script isn?t run in Edge. Andreas, do
> you have some magic for adding CDATA sections in Edge?? Thanks!
>
>
> I also replaced the < when hand editing the CDATA sections.? So
> that may be an issue as well
>
> Attached.
>
> Getting closer.
>
> John
>
> Sent from Mail for
> Windows 10
>
> *From: *John Carlson
> *Sent: *Sunday, April 1, 2018 7:44 AM
> *To: *holger.seelig at yahoo.de ;
> x3d-public at web3d.org ; Andreas Plesch
> ; GPU Group
> ; Don Brutzman
> *Subject: *RE: possible issue with X_ITE with Edge; CDATA
> sectionsnotshowingupinEdge XML textareas. Problem with other browsers.
>
> 1.XML5656: Illegal qualified name character.
>
> 2.[object Error]: {description: "Unable to get property 'setup' of
> undefined or null reference", message: "Unable to get property 'setup'
> of undefined or null reference", number: -2146823281, stack:
> "TypeError: Unable to get property 'setup' of undefined or null
> reference at createX3DFromString
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971)
> at Anonymous function
> (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:203:3)
> at h
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940)
> at c.add
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057)
> at T
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332)
> at t
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467)
> at load_X_ITE_XML
> (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:201:2)
> at loadXmlBrowsers
> (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:80:4)
> at Anonymous function
> (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:289:8)
> at Anonymous function
> (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:437:3)"}
>
> Still having an issue or two with createX3DFromString in Edge, but
> either the initial XML load works, or the XML -> My JSON -> XML
> conversion works, but the JSON -> XML conversion does not work.? The
> JSON load (of Don?s JSON) does not produces a good XML string for
> createX3DFromString or something.? I will verify, but there?s no issue
> loading JSON with importJS that I can tell?it?s the best at loading
> ?. Or URLs work too. Don?s XML is attached as don.txt and my XML is
> attached as john.txt.? So I think the don.txt is failing.? I will test
> them as URLs.
>
> However the file doesn?t load in the other browsers besides web
> browser, and I?m wondering why.? I think it?s because coordIndex
> cannot be initialized from a script, or the MFVec3f constructor ? Can
> some tell me how to add an SFVec3f to an MFVec3f in the general case??
> Should I add the SFVec3f to MFVec3f after creating it by doing a push()?
>
> Other vendors, let me know.? Attached is the file.? I now believe the
> JSON file produces the above error
>
>
> I?m thinking the standard may not be flexible enough for
> non-declarative graphics, which is unfortunate?but I didn?t look at MF
> field methods in general.
>
> Doug, also see if you can get this file working in FreeWRL.
>
>
> I do recall an older version of this file working with other browsers,
> so I know it?s possible!
>
> Thanks,
>
> John
>
> Sent from Mail for
> Windows 10
>
> *From: *John Carlson
> *Sent: *Sunday, April 1, 2018 6:05 AM
> *To: *holger.seelig at yahoo.de ;
> x3d-public at web3d.org ; Andreas Plesch
>
> *Subject: *RE: possible issue with X_ITE with Edge; CDATA sections
> notshowingupinEdge XML textareas.
>
> The color has been fixed by changing the type from SFVec3f to SFColor
> (whew).
>
> https://coderextreme.net/X3DJSONLD/src/main/html/x_ite.xhtml
>
> Thanks!
>
> John
>
> Sent from Mail for
> Windows 10
>
> *From: *John Carlson
> *Sent: *Sunday, April 1, 2018 5:51 AM
> *To: *holger.seelig at yahoo.de ;
> x3d-public at web3d.org ; Andreas Plesch
>
> *Subject: *RE: possible issue with X_ITE with Edge; CDATA sections not
> showingupinEdge XML textareas.
>
> The only issue now is the color of the ProtoInstances (passed as
> parameters to the Protos) in the XML.? I will put into a URL and test.
>
> John
>
> Sent from Mail for
> Windows 10
>
> *From: *John Carlson
> *Sent: *Sunday, April 1, 2018 5:04 AM
> *To: *holger.seelig at yahoo.de ;
> x3d-public at web3d.org ; Andreas Plesch
>
> *Subject: *RE: possible issue with X_ITE with Edge; CDATA sections not
> showingup inEdge XML textareas.
>
> More info.? When I load flowers2.x3d XML without converted JSON -> XML
> (comment out call to updateFromJson()).
>
> 1.XML Parser Error: Couldn't create IS reference: Field 'diffuseColor'
> and 'diffuseColor' in PROTO have different types.
>
> x_ite.min.js (17,13252)
>
>
> 2.XML Parser Error: Couldn't create IS reference: Field
> 'specularColor' and 'specularColor' in PROTO have different types.
>
> x_ite.min.js (17,13252)
>
>
> 3.XML Parser Error: Unknown named or imported node 'Clock'.
>
> x_ite.min.js (17,15070)
>
>
> 4.XML Parser Error: Unknown named or imported node 'OrbitPath'.
>
> The display comes up in X_ITE XML with no color and no animation.
>
> So likely there?s a problem with my XML and CDATA.? But I think the
> JSON may be okay (the conversion from JSON -> XML), at least for JSON
> parsing and X3DOM.
>
> John
>
> Sent from Mail for
> Windows 10
>
> *From: *John Carlson
> *Sent: *Saturday, March 31, 2018 4:02 PM
> *To: *holger.seelig at yahoo.de ;
> x3d-public at web3d.org ; Andreas Plesch
>
> *Subject: *possible issue with X_ITE with Edge; CDATA sections not
> showing up inEdge XML textareas.
>
> Holger, Andreas, files converted JSON -> XML in Chrome and Firefox
> have CDATA sections, but Edge doesn?t have CDATA sections when looking
> at serialized XML text, from my several time look.?? We need a better
> hack below in X3DJSONLD for Edge, I think, but investigate below:
>
> function CDATACreateFunction(document, element, str) {
>
> ??????? var y = str.replace(/\\"/g, "\\\"")
>
> ??????????????? .replace(/</g, "<")
>
> ??????????????? .replace(/>/g, ">")
>
> ??????????????? .replace(/&/g, "&");
>
> ??????? do {
>
> ??????????????? str = y;
>
> ??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
>
> ??????????????? if (str !== y) {
>
> ??????????????????????? // console.error("CDATA Replacing",str,"with",y);
>
> ??????????????? }
>
> ??????? } while (y != str);
>
> ?var domParser = new DOMParser();
>
> ??????? var cdataStr = '';
> // has to be wrapped into an element
>
> ??????? var scriptDoc = domParser .parseFromString (cdataStr,
> 'application/xml');
>
> ??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space
> after script is childNode[0]
>
> ??????? element .appendChild(cdata);
>
> }
>
> Holger, there may be an issue with:
>
> browser.replaceWorld(browser.createX3DFromString(content)); // where
> content is XML
>
> in the Edge browser for X_ITE.? No problems with Chrome or Firefox in
> that regard.
>
> This is with 4.1.5.
>
> You can see it online here:
> https://coderextreme.net/X3DJSONLD/src/main/html/index.html
>
> Select ../data/flowers2.json from the upper left selection (this is
> converted to XML (not DOM, although I could) and loaded into X_ITE).?
> If you paste flowers2.x3d into the XML section, you might see that the
> flowers aren?t colored, but black and white for some reason
> (PROTOs?).? Note that you may have to reload because failed
> replaceWorlds will freeze the canvas, I think.
>
> Also ../data/force.json has no animation with Edge and the XML
> version.? I feel this may be the CDATA above, but it also may be due
> to an initializeOnly field on an Extrusion (spine).
>
> These errors may be due to initializeOnly fields (modifying Extrusion
> spline, IFS coordIndexes) which aren?t tested with browser.importJS???
> (not sure?may want to check).? Note that X3DJSAIL does not validate
> flowers2.json (converted to flowers2.java), so likely there?s an issue
> with that file.? I?m also getting XML5656: Illegal qualified name
> character. And [object Error]: {description: "Unable to get property
> 'setup' of undefined or null reference", message: "Unable to get
> property 'setup' of undefined or null reference", number: -2146823281,
> stack: "TypeError: Unable to get property 'setup' of undefined or null
> reference at createX3DFromString
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971)
> at Anonymous function
> (http://localhost:3000/node/loaderJQuery.js:204:3) at h
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940)
> at c.add
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057)
> at T
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332)
> at t
> (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467)
> at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2)
> at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4)
> at Anonymous function
> (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous
> function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
>
> Again, all this is working fine in Chrome and Firefox as far as I
> know. Well X3DOM isn?t currently working in Chrome. Sigh!
>
> Thanks,
>
> John
>
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
--
*Leonard Daly*
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Past Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 18:47:37 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 21:47:37 -0400
Subject: [x3d-public] CDATA sections not showing up in Edge. X3DJSONLD.
In-Reply-To: <411b28d9-06b6-defe-5881-442e7439e1d3@realism.com>
References: <5abfe972.ce30ed0a.5c2f2.f286@mx.google.com>
<5ac0a088.90d4370a.7e2fb.ea0b@mx.google.com>
<5ac0abbc.aa24c80a.974af.009d@mx.google.com>
<5ac0af04.0bd6e90a.90918.bdf2@mx.google.com>
<5ac0c62d.ef32c80a.ca4cb.6ec9@mx.google.com>
<5ac0cc12.042aed0a.b6b06.59df@mx.google.com>
<5ac0cccb.84d1370a.91202.d99d@mx.google.com>
<5ac0d307.87a4370a.b5259.3187@mx.google.com>
<411b28d9-06b6-defe-5881-442e7439e1d3@realism.com>
Message-ID: <5ac18bb7.0336c80a.98a7d.933b@mx.google.com>
Yes, I need it for X_ITE content (XML).
John
Sent from Mail for Windows 10
From: Leonard Daly
Sent: Sunday, April 1, 2018 7:39 PM
To: x3d-public at web3d.org
Subject: Re: [x3d-public] CDATA sections not showing up in Edge. X3DJSONLD.
John,
Note that in HTML (V5.2 standard - https://www.w3.org/TR/html52/syntax.html#cdata-sections), CDATA can only be used in foreign content (MATHML and SVG are explicitly mentioned). It use to be common practice to put CDATA around JavaScript contents; but all browsers that support WebGL also support JavaScript, so that would not be necessary.
Leonard Daly
So it looks like:
?
xmlDoc.createCDATASection("This is an element");
?
is the standard way of creating a CDATA section, and this works in X3DJSONLD server side.? Can we use this in Edge with the other hack to get CDATA sections in place?? Or will using the HTML document variable throw us off? ?I guess we should be using an XML document and definitely not the HTML document, eh?
Looks like the way to get an XML document in the browser is:
?
var documentType = document.implementation.createDocumentType(qualifiedNameStr, publicId, systemId)
var xmlDoc = document.implementation.createDocument(namespaceURI, qualifiedNameStr, documentType);
?
Can anyone confirm?? I?d like to get this into X3DJSONLD GUI asap. It?s already in my server side code with xmldom.
?
Probably I?ll start working on this now.? I?m not sure what putting an xml document in HTML will do however, when I put it in a textarea, so?help!
Thanks,
?
John
?
Sent from Mail for Windows 10
?
From: John Carlson
Sent: Sunday, April 1, 2018 8:12 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge;CDATAsectionsnotshowingupinEdge XML textareas. Problem with other browsers.
?
Loading JSON definitely prevents animation from happening in the X_ITE XML text section in Edge.? That?s the CDATA section I think.? Load bubs.json for example.
?
John
?
Sent from Mail for Windows 10
?
From: John Carlson
Sent: Sunday, April 1, 2018 8:09 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATAsectionsnotshowingupinEdge XML textareas. Problem with other browsers.
?
Both serialized XML versions load work from URLs after adding CDATA sections to XML.? Otherwise, the script isn?t run in Edge. Andreas, do you have some magic for adding CDATA sections in Edge?? Thanks!
I also replaced the < when hand editing the CDATA sections.? So that may be an issue as well
?
Attached.
?
Getting closer.
?
John
?
Sent from Mail for Windows 10
?
From: John Carlson
Sent: Sunday, April 1, 2018 7:44 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch; GPU Group; Don Brutzman
Subject: RE: possible issue with X_ITE with Edge; CDATA sectionsnotshowingupinEdge XML textareas. Problem with other browsers.
?
1. XML5656: Illegal qualified name character.
2. [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:203:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:201:2) at loadXmlBrowsers (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:80:4) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:289:8) at Anonymous function (https://coderextreme.net/X3DJSONLD/src/main/node/loaderJQuery.js:437:3)"}
Still having an issue or two with createX3DFromString in Edge, but either the initial XML load works, or the XML -> My JSON -> XML conversion works, but the JSON -> XML conversion does not work.? The JSON load (of Don?s JSON) does not produces a good XML string for createX3DFromString or something.? I will verify, but there?s no issue loading JSON with importJS that I can tell?it?s the best at loading ?. Or URLs work too. Don?s XML is attached as don.txt and my XML is attached as john.txt.? So I think the don.txt is failing.? I will test them as URLs.
?
However the file doesn?t load in the other browsers besides web browser, and I?m wondering why.? I think it?s because coordIndex cannot be initialized from a script, or the MFVec3f constructor ?? Can some tell me how to add an SFVec3f to an MFVec3f in the general case?? Should I add the SFVec3f to MFVec3f after creating it by doing a push()?
?
Other vendors, let me know.? Attached is the file.? I now believe the JSON file produces the above error
I?m thinking the standard may not be flexible enough for non-declarative graphics, which is unfortunate?but I didn?t look at MF field methods in general.
?
Doug, also see if you can get this file working in FreeWRL.
I do recall an older version of this file working with other browsers, so I know it?s possible!
?
Thanks,
?
John
?
Sent from Mail for Windows 10
?
From: John Carlson
Sent: Sunday, April 1, 2018 6:05 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections notshowingupinEdge XML textareas.
?
The color has been fixed by changing the type from SFVec3f to SFColor (whew).
?
https://coderextreme.net/X3DJSONLD/src/main/html/x_ite.xhtml
?
Thanks!
?
John
?
Sent from Mail for Windows 10
?
From: John Carlson
Sent: Sunday, April 1, 2018 5:51 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingupinEdge XML textareas.
?
The only issue now is the color of the ProtoInstances (passed as parameters to the Protos) in the XML.? I will put into a URL and test.
?
John
?
Sent from Mail for Windows 10
?
From: John Carlson
Sent: Sunday, April 1, 2018 5:04 AM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: RE: possible issue with X_ITE with Edge; CDATA sections not showingup inEdge XML textareas.
?
More info.? When I load flowers2.x3d XML without converted JSON -> XML (comment out call to updateFromJson()).??
?
1. XML Parser Error: Couldn't create IS reference: Field 'diffuseColor' and 'diffuseColor' in PROTO have different types.
x_ite.min.js (17,13252)
2. XML Parser Error: Couldn't create IS reference: Field 'specularColor' and 'specularColor' in PROTO have different types.
x_ite.min.js (17,13252)
3. XML Parser Error: Unknown named or imported node 'Clock'.
x_ite.min.js (17,15070)
4. XML Parser Error: Unknown named or imported node 'OrbitPath'.
The display comes up in X_ITE XML with no color and no animation.
?
So likely there?s a problem with my XML and CDATA.? But I think the JSON may be okay (the conversion from JSON -> XML), at least for JSON parsing and X3DOM.
?
John
?
Sent from Mail for Windows 10
?
From: John Carlson
Sent: Saturday, March 31, 2018 4:02 PM
To: holger.seelig at yahoo.de; x3d-public at web3d.org; Andreas Plesch
Subject: possible issue with X_ITE with Edge; CDATA sections not showing up inEdge XML textareas.
?
Holger, Andreas, files converted JSON -> XML in Chrome and Firefox have CDATA sections, but Edge doesn?t have CDATA sections when looking at serialized XML text, from my several time look.?? We need a better hack below in X3DJSONLD for Edge, I think, but investigate below:
?
function CDATACreateFunction(document, element, str) {
??????? var y = str.replace(/\\"/g, "\\\"")
??????????????? .replace(/</g, "<")
??????????????? .replace(/>/g, ">")
??????????????? .replace(/&/g, "&");
??????? do {
??????????????? str = y;
??????????????? y = str.replace(/'([^'\r\n]*)\n([^']*)'/g, "'$1\\n$2'");
??????????????? if (str !== y) {
??????????????????????? // console.error("CDATA Replacing",str,"with",y);
??????????????? }
??????? } while (y != str);
?????? ?var domParser = new DOMParser();
??????? var cdataStr = ''; // has to be wrapped into an element
??????? var scriptDoc = domParser .parseFromString (cdataStr, 'application/xml');
??????? var cdata = scriptDoc .children[0] .childNodes[1]; // space after script is childNode[0]
??????? element .appendChild(cdata);
}
?
?
Holger, there may be an issue with:
?
??????????????? browser.replaceWorld(browser.createX3DFromString(content));? // where content is XML
?
in the Edge browser for X_ITE.? No problems with Chrome or Firefox in that regard.
?
This is with 4.1.5.
?
You can see it online here:? https://coderextreme.net/X3DJSONLD/src/main/html/index.html
?
Select ../data/flowers2.json from the upper left selection (this is converted to XML (not DOM, although I could) and loaded into X_ITE).? If you paste flowers2.x3d into the XML section, you might see that the flowers aren?t colored, but black and white for some reason (PROTOs?).? Note that you may have to reload because failed replaceWorlds will freeze the canvas, I think.
?
Also ../data/force.json has no animation with Edge and the XML version.? I feel this may be the CDATA above, but it also may be due to an initializeOnly field on an Extrusion (spine).
?
These errors may be due to initializeOnly fields (modifying Extrusion spline, IFS coordIndexes) which aren?t tested with browser.importJS??? (not sure?may want to check).? Note that X3DJSAIL does not validate flowers2.json (converted to flowers2.java), so likely there?s an issue with that file.? I?m also getting XML5656: Illegal qualified name character. And [object Error]: {description: "Unable to get property 'setup' of undefined or null reference", message: "Unable to get property 'setup' of undefined or null reference", number: -2146823281, stack: "TypeError: Unable to get property 'setup' of undefined or null reference at createX3DFromString (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:22971) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:204:3) at h (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:24940) at c.add (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:4:25057) at T (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:29332) at t (https://cdn.rawgit.com/create3000/x_ite/4.1.5/dist/x_ite.min.js:43:30467) at load_X_ITE_XML (http://localhost:3000/node/loaderJQuery.js:202:2) at loadXmlBrowsers (http://localhost:3000/node/loaderJQuery.js:80:4) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:290:8) at Anonymous function (http://localhost:3000/node/loaderJQuery.js:438:3)"}
?
Again, all this is working fine in Chrome and Firefox as far as I know.? Well X3DOM isn?t currently working in Chrome. Sigh!
?
Thanks,
?
John
?
?
?
?
?
?
?
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
--
Leonard Daly
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Past Chair
President, Daly Realism - Creating the Future
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Sun Apr 1 20:19:25 2018
From: yottzumm at gmail.com (John Carlson)
Date: Sun, 1 Apr 2018 23:19:25 -0400
Subject: [x3d-public] [x3dom-users] Using different textures for
multipleinstancesofthesame inline
In-Reply-To: <5ac14b6a.2c24ed0a.20c33.3959@mx.google.com>
References: <371569768.369488.1522599198322.ref@mail.yahoo.com>
<371569768.369488.1522599198322@mail.yahoo.com>
<5ac12d58.1c2ec80a.fc9f2.5862@mx.google.com>
<5ac12f6a.a819c80a.8ed98.f748@mx.google.com>
<5ac14b6a.2c24ed0a.20c33.3959@mx.google.com>
Message-ID: <5ac1a13b.c212c80a.a8f22.4585@mx.google.com>
Here?s an example of X3DOM JSONScript (X3DJSONLD) with 2 subscenes. This allows you to include scripts from several JSON files.
https://coderextreme.net/X3DJSONLD/src/main/html/prototypes.html
Made some upgrades to Scripts, so they are more robustly loaded under multiple selectors and multiple files.
X3DOM JSONScript is now at alpha 0.2.
https://coderextreme.net/X3DJSONLD/doc/GettingStarted.pdf
(but I haven?t updated the version on the PDF or RTF, sorry).
I?ve introduced initializeScripts() and added a parameter to loadScripts().
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 5:13 PM
To: x3dom mlist; x3d-public at web3d.org
Subject: RE: [x3dom-users] Using different textures for multipleinstancesofthesame inline
It?s not a direct answer to your question, but you may be able to use the protoExpander with a Proto with an Inline.
Here?s a better example:
https://coderextreme.net/X3DJSONLD/src/main/html/flowers2.html
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 3:13 PM
To: x3dom mlist
Subject: RE: [x3dom-users] Using different textures for multipleinstancesofthe same inline
I?ve confirmed these links work now.? There was a small issue with prototype.html (case sensitive windows hid it).
https://coderextreme.net/X3DJSONLD/src/main/html/prototypes.html should work properly
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Sunday, April 1, 2018 3:04 PM
To: x3dom mlist
Subject: RE: [x3dom-users] Using different textures for multiple instancesofthe same inline
Apparently mailers don?t allow you to edit existing URLs
https://coderextreme.net/X3DJSONLD/src/main/html/prototype.html
https://coderextreme.net/X3DJSONLD/src/main/html/flipper.html
Features of X3DJSONLD 2.0 beta.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brutzman at nps.edu Sun Apr 1 20:31:37 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Sun, 1 Apr 2018 20:31:37 -0700
Subject: [x3d-public] Help with IndexedFaceSet and initialization.
X3DJSAIL corrections
In-Reply-To: <5a9fcd8b.e831c80a.39cfb.c545@mx.google.com>
References: <5a9fc6d4.1d1b370a.e36f9.2a83@mx.google.com>
<5a9fcd8b.e831c80a.39cfb.c545@mx.google.com>
Message-ID:
New release available:
X3D Java Scene Access Interface Library (X3DJSAIL)
which supports programmers with standards-based X3D Java interfaces and objects, all as open source.
http://www.web3d.org/specifications/java/X3DJSAIL.html
1. The flowers4.x3d scene (attached) is another tough but excellent test. Thanks for persisting on that one John.
The first problem was in the reflection-based DOM loader, disambiguating a texture node's parent when the parent is ComposedCubeMapTextureObject and child is a Texture node. Also found erroneous containerField default for (ComposedCubeMapTextureObject, GeneratedCubeMapTextureObject, ImageCubeMapTextureObject) in X3D Tooltips.
http://www.web3d.org/x3d/tooltips/X3dTooltips.html#ComposedCubeMapTexture
http://www.web3d.org/x3d/tooltips/X3dTooltips.html#GeneratedCubeMapTextureObject
http://www.web3d.org/x3d/tooltips/X3dTooltips.html#ImageCubeMapTextureObject
This example scene also exposed omissions in handling parent/child combinations ComposedShader/ShaderPart and ProgramShader/ShaderProgram, now remedied (for concrete nodes at least).
2. Next, something else you have reported before:
"org.web3d.x3d.sai.InvalidFieldException: IndexedFaceSet containing Coordinate node must also include coordIndex field"
Looks like you are setting values independently via Script - a pretty common authoring technique, starting out with unadorned IndexedFaceSet/Coordinate. So this run-time validation error indeed seems overly assertive.
Thinking it would be OK if I relaxed this validation rule slightly to allow no coordIndex field if the Coordinate node had no point values. Would similarly modify a series of other error checks... turned out to be another nontrivial block of work, because there might be a CoordinateDouble or even contained ProtoInstance node instead of a Coordinate node. And so on and so on for Color/ColorRGBA, Normal and TextureCoordinate.
So I added some utility methods for all this housekeeping to IndexedFaceSet and (when appropriate) IndexedLineSet. Then was able to make the exceptions less interruptive when no values are present in the child node. They only holler if values are found in the contained node but the corresponding index is empty, thus flagging an otherwise-silent failure to render.
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Geometry3D/IndexedFaceSetObject.html#getCoordCount--
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Geometry3D/IndexedFaceSetObject.html#getColorCount--
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Geometry3D/IndexedFaceSetObject.html#getNormalCount--
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Geometry3D/IndexedFaceSetObject.html#getTexCoordCount--
3. Now your flowers4.x3d test finally passes Java loading and scene validation prior to JSON conversion. Have added it to X3DJSAIL examples.
===========================================
org.web3d.x3d.jsail.CommandLine java/examples/flowers4.x3d -toJSON -toFile java/examples/flowers4.json
parameter: source file flowers4.x3d filesize 7176 bytes
parameter: "-toJSON" for conversion to JSON encoding
parameter: "-toFile" "java/examples/flowers4.json" for result file name root java/examples/flowers4
convert to JSON:
Warning: java/examples/flowers4.json does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...
Script DEF=OrbitScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
file conversion successful: flowers4.json (12543 bytes)
===========================================
4. I also added some further conversions last week: toFileX3dTidy/toStringX3dTidy and toFileHtmlDocumentation (refactor/rename)
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3DObject.html#toFileX3dTidy-java.lang.String-
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3DObject.html#toStringX3dTidy--
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3DObject.html#toFileHtmlDocumentation-java.lang.String-
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3DObject.html#toStringHtmlDocumentation-java.lang.String-
These many fixes are checked in, jars uploaded, file deployment in progress (takes about 2 hours from home).
On 3/7/2018 3:31 AM, John Carlson wrote:
> This may be a better example. Attached. Note:? it works in X_ITE 4.1.3 under firefox, last time I tried.
>
> John
>
> Sent from Mail for Windows 10
>
> *From: *John Carlson
> *Sent: *Wednesday, March 7, 2018 6:02 AM
> *To: *x3d-public at web3d.org
> *Subject: *Help with IndexedFaceSet and initialization. X3DJSAIL
>
> I would like to initialize an IndexedFaceSet in a script.? However, if I don?t provide coordinates, coordIndex in the XML, X3DJSAIL complains!? I could enable output on invalid scenegraph but is there another alternative?? I am generating the X3DJSAIL files, and I only have a? few invalid ones.
>
> John
>
> org.web3d.x3d.sai.InvalidFieldException: IndexedFaceSet containing Coordinate node must also include coordIndex field
>
> org.web3d.x3d.sai.InvalidFieldException: IndexedFaceSet containing Coordinate node must also include coordIndex field
>
> ??????? at org.web3d.x3d.jsail.Geometry3D.IndexedFaceSetObject.validate(IndexedFaceSetObject.java:3007)
>
> ??????? at org.web3d.x3d.jsail.Shape.ShapeObject.validate(ShapeObject.java:1404)
>
> ??????? at org.web3d.x3d.jsail.Grouping.TransformObject.validate(TransformObject.java:1818)
>
> ??????? at org.web3d.x3d.jsail.Core.ProtoBodyObject.validate(ProtoBodyObject.java:641)
>
> ??????? at org.web3d.x3d.jsail.Core.ProtoDeclareObject.validate(ProtoDeclareObject.java:875)
>
> ??????? at org.web3d.x3d.jsail.Core.SceneObject.validate(SceneObject.java:651)
>
> ??????? at org.web3d.x3d.jsail.Core.X3DObject.validate(X3DObject.java:3309)
>
> ??????? at org.web3d.x3d.jsail.Core.X3DObject.toFileX3D(X3DObject.java:648)
>
> ??????? at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$548$flowers_sail$cu1$restOf.:program(../nashorn/net/coderextreme/data/flowers.sail.js:202)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:652)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:517)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.apply(Shell.java:519)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.runScripts(Shell.java:448)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.run(Shell.java:186)
>
> ??????? at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:104)
>
> ??????? at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:80)
>
> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldException: IndexedFaceSet containing Coordinate node must also include coordIndex field
>
> ??????? at org.web3d.x3d.jsail.Geometry3D.IndexedFaceSetObject.validate(IndexedFaceSetObject.java:3007)
>
> ??????? at org.web3d.x3d.jsail.Shape.ShapeObject.validate(ShapeObject.java:1404)
>
> ??????? at org.web3d.x3d.jsail.Grouping.TransformObject.validate(TransformObject.java:1818)
>
> ??????? at org.web3d.x3d.jsail.Core.ProtoBodyObject.validate(ProtoBodyObject.java:641)
>
> ??????? at org.web3d.x3d.jsail.Core.ProtoDeclareObject.validate(ProtoDeclareObject.java:875)
>
> ??????? at org.web3d.x3d.jsail.Core.SceneObject.validate(SceneObject.java:651)
>
> ??????? at org.web3d.x3d.jsail.Core.X3DObject.validate(X3DObject.java:3309)
>
> ??????? at org.web3d.x3d.jsail.Core.X3DObject.toFileX3D(X3DObject.java:648)
>
> ??????? at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$548$flowers_sail$cu1$restOf.:program(../nashorn/net/coderextreme/data/flowers.sail.js:202)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:652)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:517)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.apply(Shell.java:519)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.runScripts(Shell.java:448)
>
> ??????? at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.run(Shell.java:186)
>
> ??????? at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:104)
>
> ??????? at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:80)
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flowers4.x3d
Type: model/x3d+xml
Size: 7034 bytes
Desc: not available
URL:
-------------- next part --------------
{ "X3D": {
"encoding":"UTF-8",
"@profile":"Immersive",
"@version":"3.3",
"@xsd:noNamespaceSchemaLocation":"http://www.web3d.org/specifications/x3d-3.3.xsd",
"JSON schema":"http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json",
"head": {
"component": [
{
"@name":"Shaders",
"@level":1
},
{
"@name":"CubeMapTexturing",
"@level":1
}
],
"meta": [
{
"@name":"title",
"@content":"flowers4.x3d"
},
{
"@name":"creator",
"@content":"John Carlson"
},
{
"@name":"generator",
"@content":"manual"
},
{
"@name":"identifier",
"@content":"https://coderextreme.net/X3DJSONLD/flowers4.x3d"
},
{
"@name":"description",
"@content":"an animated flower"
},
{
"@name":"translated",
"@content":"01 April 2018"
},
{
"@name":"generator",
"@content":"X3dToJson.xslt, http://www.web3d.org/x3d/stylesheets/X3dToJson.html"
},
{
"@name":"reference",
"@content":"X3D JSON encoding: http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
}
]
},
"Scene": {
"-children":[
{ "NavigationInfo":
{
}
},
{ "Background":
{
"@backUrl":["../resources/images/all_probes/stpeters_cross/stpeters_back.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_back.png"],
"@bottomUrl":["../resources/images/all_probes/stpeters_cross/stpeters_bottom.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_bottom.png"],
"@frontUrl":["../resources/images/all_probes/stpeters_cross/stpeters_front.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_front.png"],
"@leftUrl":["../resources/images/all_probes/stpeters_cross/stpeters_left.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_left.png"],
"@rightUrl":["../resources/images/all_probes/stpeters_cross/stpeters_right.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_right.png"],
"@topUrl":["../resources/images/all_probes/stpeters_cross/stpeters_top.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_top.png"]
}
},
{ "Transform":
{
"@DEF":"transform",
"-children":[
{ "Shape":
{
"-children":[
{
"#comment":""
}
],
"-appearance":
{ "Appearance":
{
"-material":
{ "Material":
{
"@diffuseColor":[0.7,0.7,0.7],
"@specularColor":[0.5,0.5,0.5]
}
},
"-shaders":[
{ "ComposedShader":
{
"@DEF":"shader",
"@language":"GLSL",
"-parts":[
{ "ShaderPart":
{
"@type":"VERTEX",
"@url":["../shaders/x3dom.vs","https://coderextreme.net/X3DJSONLD/shaders/x3dom.vs"]
}
},
{ "ShaderPart":
{
"@type":"FRAGMENT",
"@url":["../shaders/pc_bubbles.fs","https://coderextreme.net/X3DJSONLD/shaders/pc_bubbles.fs"]
}
}
],
"field": [
{
"@name":"cube",
"@accessType":"inputOutput",
"@type":"SFInt32",
"@value":0
},
{
"@name":"chromaticDispertion",
"@accessType":"inputOutput",
"@type":"SFVec3f",
"@value":[0.98,1,1.033]
},
{
"@name":"bias",
"@accessType":"inputOutput",
"@type":"SFFloat",
"@value":0.5
},
{
"@name":"scale",
"@accessType":"inputOutput",
"@type":"SFFloat",
"@value":0.5
},
{
"@name":"power",
"@accessType":"inputOutput",
"@type":"SFFloat",
"@value":2.0
}
]
}
}
],
"-texture":
{ "ComposedCubeMapTexture":
{
"-back":
{ "ImageTexture":
{
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_back.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_back.png"]
}
},
"-bottom":
{ "ImageTexture":
{
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_bottom.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_bottom.png"]
}
},
"-front":
{ "ImageTexture":
{
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_front.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_front.png"]
}
},
"-left":
{ "ImageTexture":
{
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_left.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_left.png"]
}
},
"-right":
{ "ImageTexture":
{
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_right.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_right.png"]
}
},
"-top":
{ "ImageTexture":
{
"@url":["../resources/images/all_probes/stpeters_cross/stpeters_top.png","https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_top.png"]
}
}
}
}
}
},
"-geometry":
{ "IndexedFaceSet":
{
"@DEF":"Orbit",
"@convex":false,
"-coord":
{ "Coordinate":
{
"@DEF":"OrbitCoordinates"
}
}
}
}
}
}
]
}
},
{ "Script":
{
"@DEF":"OrbitScript",
"field": [
{
"@name":"set_fraction",
"@accessType":"inputOnly",
"@type":"SFFloat"
},
{
"@name":"coordinates",
"@accessType":"inputOutput",
"@type":"MFVec3f"
},
{
"@name":"coordIndexes",
"@accessType":"outputOnly",
"@type":"MFInt32"
}
],
"#sourceText":[
"",
"",
"ecmascript:",
"",
"var e = 5;",
"var f = 5;",
"var g = 5;",
"var h = 5;",
"",
"function initialize() {",
" resolution = 100;",
" updateCoordinates(resolution);",
" var cis = [];",
" for ( i = 0; i < resolution-1; i++) {",
" \tfor ( j = 0; j < resolution-1; j++) {",
"\t cis.push(i*resolution+j);",
"\t cis.push(i*resolution+j+1);",
"\t cis.push((i+1)*resolution+j+1);",
"\t cis.push((i+1)*resolution+j);",
"\t cis.push(-1);",
"\t}",
" }",
" coordIndexes = new MFInt32(cis);",
"}",
"",
"function updateCoordinates(resolution) {",
" theta = 0.0;",
" phi = 0.0;",
" delta = (2 * 3.141592653) / (resolution-1);",
" var crds = [];",
" for ( i = 0; i < resolution; i++) {",
" \tfor ( j = 0; j < resolution; j++) {",
"\t\trho = e + f * Math.cos(g * theta) * Math.cos(h * phi);",
"\t\tcrds.push(new SFVec3f(",
"\t\t\trho * Math.cos(phi) * Math.cos(theta),",
"\t\t\trho * Math.cos(phi) * Math.sin(theta),",
"\t\t\trho * Math.sin(phi)",
"\t\t));",
"\t\ttheta += delta;",
"\t}",
"\tphi += delta;",
" }",
" coordinates = new MFVec3f(crds);",
"}",
"",
"function set_fraction(fraction, eventTime) {",
"\tchoice = Math.floor(Math.random() * 4);",
"\tswitch (choice) {",
"\tcase 0:",
"\t\te += Math.floor(Math.random() * 2) * 2 - 1;",
"\t\tbreak;",
"\tcase 1:",
"\t\tf += Math.floor(Math.random() * 2) * 2 - 1;",
"\t\tbreak;",
"\tcase 2:",
"\t\tg += Math.floor(Math.random() * 2) * 2 - 1;",
"\t\tbreak;",
"\tcase 3:",
"\t\th += Math.floor(Math.random() * 2) * 2 - 1;",
"\t\tbreak;",
"\t}",
"\tif (f < 1) {",
"\t\tf = 10;",
"\t}",
"\tif (g < 1) {",
"\t\tg = 4;",
"\t}",
"\tif (h < 1) {",
"\t\th = 4;",
"\t}",
"\tresolution = 100;",
"\tupdateCoordinates(resolution);",
"}",
"",
""
]
}
},
{ "TimeSensor":
{
"@DEF":"Clock",
"@cycleInterval":16.0,
"@loop":true
}
},
{ "ROUTE":
{
"@fromField":"coordIndexes",
"@fromNode":"OrbitScript",
"@toField":"set_coordIndex",
"@toNode":"Orbit"
}
},
{ "ROUTE":
{
"@fromField":"coordinates",
"@fromNode":"OrbitScript",
"@toField":"set_point",
"@toNode":"OrbitCoordinates"
}
},
{ "ROUTE":
{
"@fromField":"fraction_changed",
"@fromNode":"Clock",
"@toField":"set_fraction",
"@toNode":"OrbitScript"
}
}
]
}
}
}
From yottzumm at gmail.com Sun Apr 1 23:29:39 2018
From: yottzumm at gmail.com (John Carlson)
Date: Mon, 2 Apr 2018 02:29:39 -0400
Subject: [x3d-public] JavaScript JSON interface to X3DOM
Message-ID: <5ac1cdd3.a22fed0a.56171.3af8@mx.google.com>
I?m here to discuss adding potential JavaScript JSON APIs to X3DOM, including the use of a X3D JSON validator (for draft07 JSON schema), an X3D JSON -> XML DOM converter (see pull request), an X3D JSON prototype expander (see pull request), an XML DOM -> JSON serializer (to precondition the XML for expanding and preprocessing) and VRMLScript (?X3DOM JSONScript?) preprocessor (still in alpha to pre-alpha?consider yourself lucky if your script works) to HTML JavaScript to handle X3D XML Script tag. I need help with namespaces and scripting the X3D event model mostly (help with leaving the existing VRMLScript as intact as possible?or replacing it with other, similar JavaScript).
I would like to see an SFRotation field type in X3DOM.
https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/X3DJSONLD.js
https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/PrototypeExpander.js
https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONSerializer.js
https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/Script.js
The code I have submitted before is a better display of what I intend for X3DOM. 2 of these files aren?t classes yet. I have already created classes for a third (see pull request).
I also have yet to get JSON Inlines working all the way outside of X3DOM (not sure about inside), so that?s on a wish list.
If someone could help with debugging/testing, that would most helpful.
John
An example API from JavaScript might look like this:
https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/html/prototypes.html (currently assumes ExternProtoDeclare is turned into ProtoDeclare on the JSON server).
function load_X3DOM(htmlselector, url, callback) {
$(htmlselector).empty();
$.getJSON(url, function(json) {
var xml = [];
json = protoExpander.prototypeExpander(url, json, "");
json = flattener(json);
if ($('#scripting').is(':checked')) {
loadScripts(json, htmlselector, url);
}
loadX3DJS(document.implementation, json, url, xml, "", loadSchema, doValidate, function(element, xmlDoc) {
callback(element, xmlDoc, json);
});
});
}
function loadSubscene_X3DOM(htmlselector, xmlselector, url, element, xmlDoc, json, callback) {
$.getJSON(url, function(subjson) {
subjson = protoExpander.prototypeExpander(url, subjson, "");
subjson = flattener(subjson);
if ($('#scripting').is(':checked')) {
loadScripts(subjson, htmlselector, url);
}
var sceneElement = ConvertToX3DOM(xmlDoc, subjson["X3D"][xmlselector], xmlselector, element.querySelector(xmlselector), url); // returns Scene element
$(element.querySelector(xmlselector)).children().appendTo(htmlselector);
// join json for scripts
for (var c in subjson["X3D"]["Scene"]["-children"]) {
json["X3D"]["Scene"]["-children"].push(subjson["X3D"]["Scene"]["-children"][c])
}
if (typeof callback === 'function') {
callback(subjson, htmlselector);
}
});
}
$(document).ready(function() {
var htmlselector = "#x3domjson";
var xmlselector = "Scene";
var flowers2 = '../data/flowers2.json';
var bubbles = '../data/force.json';
var force = '../data/bubs.json';
if ($('#scripting').is(':checked')) {
initializeScripts();
}
load_X3DOM(htmlselector, flowers2, function(element, xmlDoc, json) {
loadSubscene_X3DOM(htmlselector, xmlselector, bubbles, element, xmlDoc, json, function(sub1json, htmlselector) {
loadSubscene_X3DOM(htmlselector, xmlselector, force, element, xmlDoc, json, function(sub2json, htmlselector) {
$(htmlselector+" Script").empty();
try {
x3dom.reload(); // This may be necessary
} catch (e) {
console.error(e);
alert("Problem with x3dom.reload()", e);
}
});
});
});
});
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Mon Apr 2 19:58:00 2018
From: yottzumm at gmail.com (John Carlson)
Date: Mon, 2 Apr 2018 22:58:00 -0400
Subject: [x3d-public] Repairs to X3DJSONLD -- Extern Proto Expander
Message-ID: <5ac2edb8.02f6370a.d5615.b5af@mx.google.com>
I made ExternProtoDeclare handling easier by declaring all extern proto expander calls synchronous.
https://coderextreme.net/X3DJSONLD/
select sphereflowers.json and x3domflowers.json to see my flowers in X_ITE and X3DOM.
This means that the server-side dependency for ExternProtoDeclare has disappeared!
YAY!
Client side calls to the Extern Proto Expander should look like this:
$.ajaxSetup({
async: false
});
json = protoExpander.externalPrototypeExpander(url, json);
$.ajaxSetup({
async: true
});
Also, I believe nested ExternProtoDeclares are handled, but not tested yet.
Time to try to load KelpForestMain again, and start working on inlines.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Mon Apr 2 21:28:38 2018
From: yottzumm at gmail.com (John Carlson)
Date: Tue, 3 Apr 2018 00:28:38 -0400
Subject: [x3d-public] X3DOM not loading this file?
Message-ID: <5ac302f5.b324ed0a.e3a39.d0e9@mx.google.com>
This file doesn?t load in X3DOM:
http://coderextreme.net/X3DJSONLD/src/main/html/x3domframe.html
http://coderextreme.net/X3DJSONLD/src/main/data/ifs.x3d
Loads in BS Contact and X_ITE fine, but the object is kind of flat. Not sure why?perhaps it really is flat. Gotta work on my transforms from JSON -> STL, I guess.
Sigh, more work!
I?m guessing I?m going over the limit on coordinates or Indexes, but there?s no warning??? Did I already report this bug?
John
INFO: setBaseURL: ../data/
INFO: Inline: downloading ../data/ifs.x3d done.
INFO: Time for setup and init of GL element no. 0: 25 ms.
INFO: activate ViewpointBindable null/defaultX3DViewpointNode
INFO: register ViewpointBindable null/defaultX3DViewpointNode
INFO: create new Viewpoint for X3DViewpointNode-stack
INFO: activate BackgroundBindable null/defaultX3DBackgroundNode
INFO: register BackgroundBindable null/defaultX3DBackgroundNode
INFO: create new Background for X3DBackgroundNode-stack
INFO: System ready.
INFO: activate NavigationInfoBindable null/defaultX3DNavigationInfoNode
INFO: register NavigationInfoBindable null/defaultX3DNavigationInfoNode
INFO: NavType: undefined
INFO: Switch to examine mode.
INFO: create new NavigationInfo for X3DNavigationInfoNode-stack
INFO: activate EnvironmentBindable null/defaultX3DEnvironmentNode
INFO: register EnvironmentBindable null/defaultX3DEnvironmentNode
INFO: create new Environment for X3DEnvironmentNode-stack
INFO: addEventListener for X3D.onDOMNodeInserted
INFO: addEventListener for X3D.onDOMNodeRemoved
INFO: webgl context found Vendor: WebKit Google Inc., Renderer: WebKit WebGL ANGLE (NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0), Version: WebGL 1.0 (OpenGL ES 2.0 Chromium), ShadingLangV.: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium), MSAA samples: 8 Extensions: ANGLE_instanced_arrays, EXT_blend_minmax, EXT_color_buffer_half_float, EXT_frag_depth, EXT_shader_texture_lod, EXT_texture_filter_anisotropic, WEBKIT_EXT_texture_filter_anisotropic, EXT_sRGB, OES_element_index_uint, OES_standard_derivatives, OES_texture_float, OES_texture_float_linear, OES_texture_half_float, OES_texture_half_float_linear, OES_vertex_array_object, WEBGL_color_buffer_float, WEBGL_compressed_texture_s3tc, WEBKIT_WEBGL_compressed_texture_s3tc, WEBGL_compressed_texture_s3tc_srgb, WEBGL_debug_renderer_info, WEBGL_debug_shaders, WEBGL_depth_texture, WEBKIT_WEBGL_depth_texture, WEBGL_draw_buffers, WEBGL_lose_context, WEBKIT_WEBGL_lose_context
INFO: Initializing X3DCanvas for [x3dom-1522728762315-canvas]
INFO: Creating canvas for (X)3D element...
INFO: Found 1 X3D and nodes...
INFO: X3DOM version 1.7.3-dev, Revison 770406f16691ff42e705b150e5825ca8a943ab5c, Date Thu Feb 22 07:32:24 2018 -0500
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Mon Apr 2 22:26:21 2018
From: yottzumm at gmail.com (John Carlson)
Date: Tue, 3 Apr 2018 01:26:21 -0400
Subject: [x3d-public] Good site to know about for FLOSS...someone want to
provide funds for X3D, VRML, Visualization and Analytics?
Message-ID: <5ac3107c.0a0b370a.5a649.b01f@mx.google.com>
https://www.bountysource.com/
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brutzman at nps.edu Tue Apr 3 09:03:29 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Tue, 3 Apr 2018 09:03:29 -0700
Subject: [x3d-public] X3D meeting agenda 4 April 2018: X3D Profiles,
Feedback on Mantis Issues, HAnim updates to X3D spec
Message-ID: <27aae253-df5d-a13c-ab5b-b7d5b81637e2@nps.edu>
The X3D Working addresses all X3D specification issues and coordinates the technical development of future improvements.
X3D Graphics Working Group
http://www.web3d.org/working-groups/x3d
We will meet at regular time (0800 pacific) tomorrow Wednesday 4 April 2018 using Web3D Teleconference line.
Web3D Teleconference
http://www.web3d.org/member/teleconference-information
Here is our agenda for next week.
1. *Review minutes*. Confirm or correct last week's minutes at
X3D Working Group meeting minutes 28 March 2018:
tutorials, HAnim DIS, X3D Profiles, Feedback and Mantis Issue Tracking
http://web3d.org/mailman/private/x3d_web3d.org/2018-March/006933.html
This is a good point to note whether any other new business might be added to this meeting agenda.
2. *X3D Profiles page*. Last week we had a good discussion and new diagram by Vince Marchetti. We will review and agree on specific improvements to the page.
X3D Profiles
http://www.web3d.org/x3d/profiles
3. *Public and Member Feedback* and *Mantis Issues*.
We have a lot of specifications! Completing and maintaining them is important, so streamlining participation with process-based procedures is import.
During last week's meeting we had a good review of the detailed summaries for each of these activities. They are now collected as an entry-level overview page at
Mantis Issue Tracking and Review
http://www.web3d.org/mantis-issue-tracking-and-review
Please review this page. Following this week's discussion, if ready, we can ask that it be added to the menu lists as entry point for Mantis.
We also talked through the need to have each draft and proposed specification listed on the selection menu in the comments form.
Web3D Standards Comment Form
http://www.web3d.org/content/web3d-standards-comment-form
Mantis 1232: Additional menu items needed on Web3D Specification Comments form
http://www.web3d.org/member-only/mantis/view.php?id=1232
(work approved and assigned)
X3D Graphics Standards: Specification Relationships
http://www.web3d.org/specifications/X3dSpecificationRelationships.png
4. *Humanoid Animation (HAnim) Update*.
Quite a lot continues to happen, status is online for members at
Urgent HAnim Specification Improvements for DIS Submission
https://docs.google.com/document/d/1v1peZ-k-k4u6vGAAEHtw5qEN-3OTZmpN3Vg3kNJgVp4
We will look at the potential changes needed in the X3D v4 Abstract Specification to match these HAnim Architecture and HAnim Motion Animation improvements.
Spec "linkology" follows to facilitate meeting review.
X3D v3.3 International Standard (IS), Humanoid animation (H-Anim) component
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/hanim.html
https://github.com/Web3DConsortium (requires member login)
X3D v4.0 Abstract Specification, Working Draft 1
https://github.com/Web3DConsortium/X3D/tree/master/ISO-IEC%2019775/ISO-IEC%2019775-1/ISO-IEC%2019775-1%20V4.0/ISO-IEC%2019775-1%20V4.0%20WD1
specifically X3D v4.0 Abstract Specification, Working Draft 1, Humanoid animation (H-Anim) component
https://github.com/Web3DConsortium/X3D/blob/master/ISO-IEC%2019775/ISO-IEC%2019775-1/ISO-IEC%2019775-1%20V4.0/ISO-IEC%2019775-1%20V4.0%20WD1/Part01/components/hanim.html
HAnim Architecture draft DIS
https://github.com/Web3DConsortium/H-Anim/tree/master/ISO-IEC%2019774/ISO-IEC%2019774-1/ISO-IEC%2019774-1%20V2.0/ISO-IEC%2019774-1%20V2.0%20DIS%20Prep
HAnim Motion Capture draft DIS
https://github.com/Web3DConsortium/H-Anim/tree/master/ISO-IEC%2019774/ISO-IEC%2019774-2/ISO-IEC%2019774-2%20V2.0/ISO-IEC%2019774-2%20V2.0%20DIS%20Prep
Thanks for all interest and activity. Have fun with X3D!
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: X3dProfilesBoxDiagram.svg
Type: image/svg+xml
Size: 18421 bytes
Desc: not available
URL:
From brutzman at nps.edu Tue Apr 3 09:53:40 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Tue, 3 Apr 2018 09:53:40 -0700
Subject: [x3d-public] X3D meeting agenda 4 April 2018: X3D Profiles,
Feedback on Mantis Issues, HAnim updates to X3D spec
In-Reply-To: <27aae253-df5d-a13c-ab5b-b7d5b81637e2@nps.edu>
References: <27aae253-df5d-a13c-ab5b-b7d5b81637e2@nps.edu>
Message-ID:
On 4/3/2018 9:03 AM, Don Brutzman wrote:
>
> Here is our agenda for next week.
_this_ week! BCNU tomoro.
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From yottzumm at gmail.com Tue Apr 3 18:58:20 2018
From: yottzumm at gmail.com (John Carlson)
Date: Wed, 04 Apr 2018 01:58:20 +0000
Subject: [x3d-public] Nodes only on routes
Message-ID:
Any comments on my nodes only in routes to send to Scripts initializeOnly
fields? Is this supported?
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brutzman at nps.edu Wed Apr 4 10:02:49 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Wed, 4 Apr 2018 10:02:49 -0700
Subject: [x3d-public] X3D meeting minutes for 4 April 2018: X3D Profiles,
Feedback on Mantis Issues, HAnim updates to X3D spec
In-Reply-To: <27aae253-df5d-a13c-ab5b-b7d5b81637e2@nps.edu>
References: <27aae253-df5d-a13c-ab5b-b7d5b81637e2@nps.edu>
Message-ID: <8c67c0f9-1b45-692b-9feb-940ef4f38052@nps.edu>
Attendees: Anita Havele, Vince Marcetti, Nicholas Polys, Dick Puk, Don Brutzman.
On 4/3/2018 9:03 AM, Don Brutzman wrote:
> The X3D Working addresses all X3D specification issues and coordinates the technical development of future improvements.
>
> X3D Graphics Working Group
> http://www.web3d.org/working-groups/x3d
>
> We will meet at regular time (0800 pacific) tomorrow Wednesday 4 April 2018 using Web3D Teleconference line.
>
> Web3D Teleconference
> http://www.web3d.org/member/teleconference-information
>
> Here is our agenda for next week.
>
> 1. *Review minutes*. Confirm or correct last week's minutes at
>
> X3D Working Group meeting minutes 28 March 2018:
> tutorials, HAnim DIS, X3D Profiles, Feedback and Mantis Issue Tracking
> http://web3d.org/mailman/private/x3d_web3d.org/2018-March/006933.html
Accepted.
> This is a good point to note whether any other new business might be added to this meeting agenda.
Web3D 2018 Conference reviews are well underway and we expect conference registration to open soon.
> 2. *X3D Profiles page*. Last week we had a good discussion and new diagram by Vince Marchetti. We will review and agree on specific improvements to the page.
>
> X3D Profiles
> http://www.web3d.org/x3d/profiles
Updated version of the figure is at the same address as reported earlier:
> A draft replacement for the Profiles diagram is attached, source file (SVG) at
> https://drive.google.com/drive/folders/1Ex4A_3_Ahb39izfjq2vnaVMGJ8l7GoLN?usp=sharing
We looked at the X3D Specification and discussed whether the X3D Specification might benefit from adding this conceptual diagram.
We agreed to add it as new Figure 4.4 to draft X3D v4.0 specification, with cross-checking for comprehensive match and moving some of the labeling into figure metadata. It will be added to
4.6 Profiles
4.6.1 Overview
We will also add MedicalInterchange profile to the bullet list in paragraph 4.6.1.
Vince will check in original, SVG and png into github for X3D v4. We replaced the figure in the website profiles page. Had trouble with image sizing, the website seems to be overriding requested image width of 400px.
Continuing improvement will be considered next week.
> 3. *Public and Member Feedback* and *Mantis Issues*.
>
> We have a lot of specifications! Completing and maintaining them is important, so streamlining participation with process-based procedures is import.
>
> During last week's meeting we had a good review of the detailed summaries for each of these activities. They are now collected as an entry-level overview page at
>
> Mantis Issue Tracking and Review
> http://www.web3d.org/mantis-issue-tracking-and-review
>
> Please review this page. Following this week's discussion, if ready, we can ask that it be added to the menu lists as entry point for Mantis.
We fiddled with Mantis Access section and improved the words a bit. This bears continued scrutiny. We are not consistently seeing the same login process, which is curious.
The page looks helpful enough that it can be integrated into the website. We request that the following sentence be added in the Web3D Standards Comment Form:
"_Mantis Issue Tracking and Review" describes X3D Working Group procedures for reviewing feedback and improving Web3D specifications."
Entered as Mantis website issue 1235 for Executive Director and Webmaster resolution.
http://www.web3d.org/member-only/mantis/view.php?id=1235
> We also talked through the need to have each draft and proposed specification listed on the selection menu in the comments form.
>
> Web3D Standards Comment Form
> http://www.web3d.org/content/web3d-standards-comment-form
>
> Mantis 1232: Additional menu items needed on Web3D Specification Comments form
> http://www.web3d.org/member-only/mantis/view.php?id=1232
> (work approved and assigned)
>
> X3D Graphics Standards: Specification Relationships
> http://www.web3d.org/specifications/X3dSpecificationRelationships.png
No change.
> 4. *Humanoid Animation (HAnim) Update*.
>
> Quite a lot continues to happen, status is online for members at
>
> Urgent HAnim Specification Improvements for DIS Submission
> https://docs.google.com/document/d/1v1peZ-k-k4u6vGAAEHtw5qEN-3OTZmpN3Vg3kNJgVp4
>
> We will look at the potential changes needed in the X3D v4 Abstract Specification to match these HAnim Architecture and HAnim Motion Animation improvements.
>
> Spec "linkology" follows to facilitate meeting review.
>
> X3D v3.3 International Standard (IS), Humanoid animation (H-Anim) component
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/hanim.html
>
> https://github.com/Web3DConsortium (requires member login)
>
> X3D v4.0 Abstract Specification, Working Draft 1
> https://github.com/Web3DConsortium/X3D/tree/master/ISO-IEC%2019775/ISO-IEC%2019775-1/ISO-IEC%2019775-1%20V4.0/ISO-IEC%2019775-1%20V4.0%20WD1
>
> specifically X3D v4.0 Abstract Specification, Working Draft 1, Humanoid animation (H-Anim) component
> https://github.com/Web3DConsortium/X3D/blob/master/ISO-IEC%2019775/ISO-IEC%2019775-1/ISO-IEC%2019775-1%20V4.0/ISO-IEC%2019775-1%20V4.0%20WD1/Part01/components/hanim.html
>
> HAnim Architecture draft DIS
> https://github.com/Web3DConsortium/H-Anim/tree/master/ISO-IEC%2019774/ISO-IEC%2019774-1/ISO-IEC%2019774-1%20V2.0/ISO-IEC%2019774-1%20V2.0%20DIS%20Prep
>
> HAnim Motion Capture draft DIS
> https://github.com/Web3DConsortium/H-Anim/tree/master/ISO-IEC%2019774/ISO-IEC%2019774-2/ISO-IEC%2019774-2%20V2.0/ISO-IEC%2019774-2%20V2.0%20DIS%20Prep
Expected changes in X3D v4.0 specification:
a. Review and possible tweaking of existing HAnim node interfaces and prose, matching refinements in the HAnim specification editors (perhaps an hour's work).
b. Expect insertion of HAnimMotion node under 26.3 Node reference, likely as 26.3.4 between HAnimJoint and HAnimSegment.
c. Expect addition of HAnimMotion support in section 26.4 Support levels, Table 26.2 ? Humanoid animation (H-Anim) component support levels.
d. Given that HAnimMotion is something completely new, and not expected as part of legacy X3D v3.3 players, our past practice (and current good sense!) would add new Level 2 for supporting HAnimMotion nodes.
e. Direct interpoloation support (corresponding to HAnimMotion functionality) requires PositionInterpolator, OrientationInterpolator, TimeSensor/ROUTE. We will consider how to best align this requirement in the prose.
f. It is likely we will add support for *.bvh file format as part of HAnimMotion node functionality. This may add a subsection under 26.2 Concepts.
These seem straightforward. Specification editors will continue work, in coordination with HAnim group.
=========================================================
As must be clear if you got this far, Web specification stability and interoperability is a lot of work! We are keen for others to help and to support the mission of Web3D Consortium. Many benefits also flow back to members. If you are not currently a member, Please Join.
http://www.web3d.org/join
Thanks for all interest and activity. Have fun with X3D! 8)
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From yottzumm at gmail.com Wed Apr 4 10:08:48 2018
From: yottzumm at gmail.com (John Carlson)
Date: Wed, 04 Apr 2018 17:08:48 +0000
Subject: [x3d-public] [x3d] X3D meeting minutes for 4 April 2018: X3D
Profiles, Feedback on Mantis Issues, HAnim updates to X3D spec
In-Reply-To: <8c67c0f9-1b45-692b-9feb-940ef4f38052@nps.edu>
References: <27aae253-df5d-a13c-ab5b-b7d5b81637e2@nps.edu>
<8c67c0f9-1b45-692b-9feb-940ef4f38052@nps.edu>
Message-ID:
The difference in the mantis login process to me appeared to be dependent
on which project was selected.
John
On Wed, Apr 4, 2018, 1:05 PM Don Brutzman wrote:
> Attendees: Anita Havele, Vince Marcetti, Nicholas Polys, Dick Puk, Don
> Brutzman.
>
> On 4/3/2018 9:03 AM, Don Brutzman wrote:
> > The X3D Working addresses all X3D specification issues and coordinates
> the technical development of future improvements.
> >
> > X3D Graphics Working Group
> > http://www.web3d.org/working-groups/x3d
> >
> > We will meet at regular time (0800 pacific) tomorrow Wednesday 4 April
> 2018 using Web3D Teleconference line.
> >
> > Web3D Teleconference
> > http://www.web3d.org/member/teleconference-information
> >
> > Here is our agenda for next week.
> >
> > 1. *Review minutes*. Confirm or correct last week's minutes at
> >
> > X3D Working Group meeting minutes 28 March 2018:
> > tutorials, HAnim DIS, X3D Profiles, Feedback and Mantis Issue
> Tracking
> >
> http://web3d.org/mailman/private/x3d_web3d.org/2018-March/006933.html
>
> Accepted.
>
> > This is a good point to note whether any other new business might be
> added to this meeting agenda.
>
> Web3D 2018 Conference reviews are well underway and we expect conference
> registration to open soon.
>
>
> > 2. *X3D Profiles page*. Last week we had a good discussion and new
> diagram by Vince Marchetti. We will review and agree on specific
> improvements to the page.
> >
> > X3D Profiles
> > http://www.web3d.org/x3d/profiles
>
> Updated version of the figure is at the same address as reported earlier:
>
> > A draft replacement for the Profiles diagram is attached, source file
> (SVG) at
> >
> https://drive.google.com/drive/folders/1Ex4A_3_Ahb39izfjq2vnaVMGJ8l7GoLN?usp=sharing
>
> We looked at the X3D Specification and discussed whether the X3D
> Specification might benefit from adding this conceptual diagram.
>
> We agreed to add it as new Figure 4.4 to draft X3D v4.0 specification,
> with cross-checking for comprehensive match and moving some of the labeling
> into figure metadata. It will be added to
>
> 4.6 Profiles
> 4.6.1 Overview
>
> We will also add MedicalInterchange profile to the bullet list in
> paragraph 4.6.1.
>
> Vince will check in original, SVG and png into github for X3D v4. We
> replaced the figure in the website profiles page. Had trouble with image
> sizing, the website seems to be overriding requested image width of 400px.
>
> Continuing improvement will be considered next week.
>
>
> > 3. *Public and Member Feedback* and *Mantis Issues*.
> >
> > We have a lot of specifications! Completing and maintaining them is
> important, so streamlining participation with process-based procedures is
> import.
> >
> > During last week's meeting we had a good review of the detailed
> summaries for each of these activities. They are now collected as an
> entry-level overview page at
> >
> > Mantis Issue Tracking and Review
> > http://www.web3d.org/mantis-issue-tracking-and-review
> >
> > Please review this page. Following this week's discussion, if ready, we
> can ask that it be added to the menu lists as entry point for Mantis.
>
> We fiddled with Mantis Access section and improved the words a bit. This
> bears continued scrutiny. We are not consistently seeing the same login
> process, which is curious.
>
> The page looks helpful enough that it can be integrated into the website.
> We request that the following sentence be added in the Web3D Standards
> Comment Form:
>
> "_Mantis Issue Tracking and Review" describes X3D Working Group procedures
> for reviewing feedback and improving Web3D specifications."
>
> Entered as Mantis website issue 1235 for Executive Director and Webmaster
> resolution.
> http://www.web3d.org/member-only/mantis/view.php?id=1235
>
> > We also talked through the need to have each draft and proposed
> specification listed on the selection menu in the comments form.
> >
> > Web3D Standards Comment Form
> > http://www.web3d.org/content/web3d-standards-comment-form
> >
> > Mantis 1232: Additional menu items needed on Web3D Specification
> Comments form
> > http://www.web3d.org/member-only/mantis/view.php?id=1232
> > (work approved and assigned)
> >
> > X3D Graphics Standards: Specification Relationships
> >
> http://www.web3d.org/specifications/X3dSpecificationRelationships.png
>
> No change.
>
> > 4. *Humanoid Animation (HAnim) Update*.
> >
> > Quite a lot continues to happen, status is online for members at
> >
> > Urgent HAnim Specification Improvements for DIS Submission
> >
> https://docs.google.com/document/d/1v1peZ-k-k4u6vGAAEHtw5qEN-3OTZmpN3Vg3kNJgVp4
> >
> > We will look at the potential changes needed in the X3D v4 Abstract
> Specification to match these HAnim Architecture and HAnim Motion Animation
> improvements.
> >
> > Spec "linkology" follows to facilitate meeting review.
> >
> > X3D v3.3 International Standard (IS), Humanoid animation (H-Anim)
> component
> >
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/hanim.html
> >
> > https://github.com/Web3DConsortium (requires member login)
> >
> > X3D v4.0 Abstract Specification, Working Draft 1
> >
> https://github.com/Web3DConsortium/X3D/tree/master/ISO-IEC%2019775/ISO-IEC%2019775-1/ISO-IEC%2019775-1%20V4.0/ISO-IEC%2019775-1%20V4.0%20WD1
> >
> > specifically X3D v4.0 Abstract Specification, Working Draft 1,
> Humanoid animation (H-Anim) component
> >
> https://github.com/Web3DConsortium/X3D/blob/master/ISO-IEC%2019775/ISO-IEC%2019775-1/ISO-IEC%2019775-1%20V4.0/ISO-IEC%2019775-1%20V4.0%20WD1/Part01/components/hanim.html
> >
> > HAnim Architecture draft DIS
> >
> https://github.com/Web3DConsortium/H-Anim/tree/master/ISO-IEC%2019774/ISO-IEC%2019774-1/ISO-IEC%2019774-1%20V2.0/ISO-IEC%2019774-1%20V2.0%20DIS%20Prep
> >
> > HAnim Motion Capture draft DIS
> >
> https://github.com/Web3DConsortium/H-Anim/tree/master/ISO-IEC%2019774/ISO-IEC%2019774-2/ISO-IEC%2019774-2%20V2.0/ISO-IEC%2019774-2%20V2.0%20DIS%20Prep
>
> Expected changes in X3D v4.0 specification:
>
> a. Review and possible tweaking of existing HAnim node interfaces and
> prose, matching refinements in the HAnim specification editors (perhaps an
> hour's work).
>
> b. Expect insertion of HAnimMotion node under 26.3 Node reference, likely
> as 26.3.4 between HAnimJoint and HAnimSegment.
>
> c. Expect addition of HAnimMotion support in section 26.4 Support levels,
> Table 26.2 ? Humanoid animation (H-Anim) component support levels.
>
> d. Given that HAnimMotion is something completely new, and not expected as
> part of legacy X3D v3.3 players, our past practice (and current good
> sense!) would add new Level 2 for supporting HAnimMotion nodes.
>
> e. Direct interpoloation support (corresponding to HAnimMotion
> functionality) requires PositionInterpolator, OrientationInterpolator,
> TimeSensor/ROUTE. We will consider how to best align this requirement in
> the prose.
>
> f. It is likely we will add support for *.bvh file format as part of
> HAnimMotion node functionality. This may add a subsection under 26.2
> Concepts.
>
> These seem straightforward. Specification editors will continue work, in
> coordination with HAnim group.
>
> =========================================================
>
> As must be clear if you got this far, Web specification stability and
> interoperability is a lot of work! We are keen for others to help and to
> support the mission of Web3D Consortium. Many benefits also flow back to
> members. If you are not currently a member, Please Join.
>
> http://www.web3d.org/join
>
> Thanks for all interest and activity. Have fun with X3D! 8)
>
> all the best, Don
> --
> Don Brutzman Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
> _______________________________________________
> x3d mailing list
> x3d at web3d.org
> http://web3d.org/mailman/listinfo/x3d_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brutzman at nps.edu Thu Apr 5 07:51:21 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Thu, 5 Apr 2018 07:51:21 -0700
Subject: [x3d-public] Minimal set of JSON schema errors to investigate
In-Reply-To: <5abe04bb.14c9370a.23047.8f86@mx.google.com>
References: <5abe0271.850e370a.f4fab.e8f0@mx.google.com>
<5abe04bb.14c9370a.23047.8f86@mx.google.com>
Message-ID:
Quick response on CADPartChildTransformationAlternativeB and CADPartChildTransformationAlternativeC: they were design experiments and will not validate.
Note presence of document metadata:
If you want a consistent format for such warnings, can provide. Nevertheless any scene with is likely problematic.
Geo nodes are trickier, will require further scrutiny on my part. Thanks for identifying them!
On 3/30/2018 2:34 AM, John Carlson wrote:
> Here?s the minimal set of JSON schema errors to investigate. Note that this doesn?t include H-Anim.? I am mostly concerned about Squaw.json and the Metadata @name.
>
> John
>
> json-schema 3.1 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/3/CADFace: 2 schema violations found C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeB.json
>
> json-schema 3.1 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/4/CADFace: 2 schema violations found C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeB.json
>
> json-schema 3.1 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/3: extraneous key [Transform] is not permitted C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeC.json
>
> json-schema 3.1 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/4: extraneous key [Transform] is not permitted C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeC.json
>
> json-schema 3.3 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/4/GeoViewpoint: 36 schema violations found C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/Geospatial/Squaw.json
>
> json-schema 3.3 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/5/Group/-children/0/Group/-children/0/Group/-children: 540 schema violations found C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/Geospatial/Squaw.json
>
> json-schema 3.3 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/0/MetadataString: required key [@name] not found C:/x3d-code/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
>
> json-schema 3.3 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/1/MetadataInteger: required key [@name] not found C:/x3d-code/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
>
> json-schema 3.3 Validation error org.everit.json.schema.ValidationException: #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/2/MetadataFloat: required key [@name] not found C:/x3d-code/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
>
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From yottzumm at gmail.com Thu Apr 5 10:46:35 2018
From: yottzumm at gmail.com (John Carlson)
Date: Thu, 05 Apr 2018 17:46:35 +0000
Subject: [x3d-public] Minimal set of JSON schema errors to investigate
In-Reply-To:
References: <5abe0271.850e370a.f4fab.e8f0@mx.google.com>
<5abe04bb.14c9370a.23047.8f86@mx.google.com>
Message-ID:
We could make meta="error" invalid schema.
On Thu, Apr 5, 2018, 10:53 AM Don Brutzman wrote:
> Quick response on CADPartChildTransformationAlternativeB and
> CADPartChildTransformationAlternativeC: they were design experiments and
> will not validate.
>
> Note presence of document metadata:
>
>
>
> If you want a consistent format for such warnings, can provide.
> Nevertheless any scene with is
> likely problematic.
>
> Geo nodes are trickier, will require further scrutiny on my part. Thanks
> for identifying them!
>
> On 3/30/2018 2:34 AM, John Carlson wrote:
> > Here?s the minimal set of JSON schema errors to investigate. Note that
> this doesn?t include H-Anim. I am mostly concerned about Squaw.json and
> the Metadata @name.
> >
> > John
> >
> > json-schema 3.1 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/3/CADFace:
> 2 schema violations found C:/x3d-code/
> www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeB.json
> >
> > json-schema 3.1 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/4/CADFace:
> 2 schema violations found C:/x3d-code/
> www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeB.json
> >
> > json-schema 3.1 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/3:
> extraneous key [Transform] is not permitted C:/x3d-code/
> www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeC.json
> >
> > json-schema 3.1 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/4:
> extraneous key [Transform] is not permitted C:/x3d-code/
> www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeC.json
> >
> > json-schema 3.3 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/4/GeoViewpoint: 36 schema violations found
> C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/Geospatial/Squaw.json
> >
> > json-schema 3.3 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/5/Group/-children/0/Group/-children/0/Group/-children:
> 540 schema violations found C:/x3d-code/
> www.web3d.org/x3d/content/examples/Basic/Geospatial/Squaw.json
> >
> > json-schema 3.3 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/0/MetadataString:
> required key [@name] not found C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
> >
> > json-schema 3.3 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/1/MetadataInteger:
> required key [@name] not found C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
> >
> > json-schema 3.3 Validation error
> org.everit.json.schema.ValidationException:
> #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/2/MetadataFloat:
> required key [@name] not found C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
> >
>
>
> all the best, Don
> --
> Don Brutzman Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Thu Apr 5 10:50:05 2018
From: yottzumm at gmail.com (John Carlson)
Date: Thu, 05 Apr 2018 17:50:05 +0000
Subject: [x3d-public] Minimal set of JSON schema errors to investigate
In-Reply-To:
References: <5abe0271.850e370a.f4fab.e8f0@mx.google.com>
<5abe04bb.14c9370a.23047.8f86@mx.google.com>
Message-ID:
I mean wrote:
> We could make meta="error" invalid schema.
>
> On Thu, Apr 5, 2018, 10:53 AM Don Brutzman wrote:
>
>> Quick response on CADPartChildTransformationAlternativeB and
>> CADPartChildTransformationAlternativeC: they were design experiments and
>> will not validate.
>>
>> Note presence of document metadata:
>>
>>
>>
>> If you want a consistent format for such warnings, can provide.
>> Nevertheless any scene with is
>> likely problematic.
>>
>> Geo nodes are trickier, will require further scrutiny on my part. Thanks
>> for identifying them!
>>
>> On 3/30/2018 2:34 AM, John Carlson wrote:
>> > Here?s the minimal set of JSON schema errors to investigate. Note that
>> this doesn?t include H-Anim. I am mostly concerned about Squaw.json and
>> the Metadata @name.
>> >
>> > John
>> >
>> > json-schema 3.1 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/3/CADFace:
>> 2 schema violations found C:/x3d-code/
>> www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeB.json
>> >
>> > json-schema 3.1 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/4/CADFace:
>> 2 schema violations found C:/x3d-code/
>> www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeB.json
>> >
>> > json-schema 3.1 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/3:
>> extraneous key [Transform] is not permitted C:/x3d-code/
>> www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeC.json
>> >
>> > json-schema 3.1 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/2/CADAssembly/-children/0/CADPart/-children/4:
>> extraneous key [Transform] is not permitted C:/x3d-code/
>> www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeC.json
>> >
>> > json-schema 3.3 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/4/GeoViewpoint: 36 schema violations found
>> C:/x3d-code/
>> www.web3d.org/x3d/content/examples/Basic/Geospatial/Squaw.json
>> >
>> > json-schema 3.3 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/5/Group/-children/0/Group/-children/0/Group/-children:
>> 540 schema violations found C:/x3d-code/
>> www.web3d.org/x3d/content/examples/Basic/Geospatial/Squaw.json
>> >
>> > json-schema 3.3 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/0/MetadataString:
>> required key [@name] not found C:/x3d-code/
>> www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
>> >
>> > json-schema 3.3 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/1/MetadataInteger:
>> required key [@name] not found C:/x3d-code/
>> www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
>> >
>> > json-schema 3.3 Validation error
>> org.everit.json.schema.ValidationException:
>> #/X3D/Scene/-children/2/WorldInfo/-metadata/MetadataSet/-metadata/MetadataSet/-value/2/MetadataFloat:
>> required key [@name] not found C:/x3d-code/
>> www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
>> >
>>
>>
>> all the best, Don
>> --
>> Don Brutzman Naval Postgraduate School, Code USW/Br
>> brutzman at nps.edu
>> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA
>> +1.831.656.2149
>> X3D graphics, virtual worlds, navy robotics
>> http://faculty.nps.edu/brutzman
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From vmarchetti at kshell.com Fri Apr 6 06:15:49 2018
From: vmarchetti at kshell.com (vmarchetti at kshell.com)
Date: Fri, 6 Apr 2018 09:15:49 -0400
Subject: [x3d-public] IPython and X3DOM for scientific publication
Message-ID: <7E9AFC2C-1C4C-43B1-96A8-A2AC37952F53@kshell.com>
Interesting article: "The Scientific Paper is obsolete" : https://www.theatlantic.com/science/archive/2018/04/the-scientific-paper-is-obsolete/556676/
Quick Summary and comment:
After some hot air about Stephen Wolfram and Mathematica, the article discusses IPython, now call Jupyter, a Python-based notebook style application for performing and documenting scientific/engineering computation.
This article only discusses 2D graphics, but X3DOM can be used as a back-end to do 3D visualization in a Jupyter notebook.
The examples I've found on the web are all in the context of a much larger computation toolkit such as Mayavi http://docs.enthought.com/mayavi/mayavi/ or Fenics https://fenicsproject.org/ .
Does anyone have a "Hello World" complexity example of creating an X3DOM scene in a Jupyter notebook and rendering it inside the notebook, that can be put in the Web3D Examples set?
Vince Marchetti
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From andreasplesch at gmail.com Fri Apr 6 08:22:27 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Fri, 6 Apr 2018 11:22:27 -0400
Subject: [x3d-public] remove SF/MFInt32 ?
Message-ID:
Here is a somewhat radical idea to simplify X3D a bit. Since x3dom is
javascript it does not really distinguish between SFInt32 and SFFloat, and
lives pretty well with it. So why not consider completely removing the
SF/MFInt32 from the spec. in general ?
The integer fields are used in not very many nodes: Switch,
IntegerSequencer, LOD (level_changed) come to mind. A replacement with
SFFloat would mean adding rounding or truncation to nearest integer in the
spec. language but probably not more than that.
The advantages are that it is an opportunity to make the spec. leaner, and
help with some node communication issues.
The disadvantages are that it would be a backwards incompatible change, and
may have a minor performance impact.
-Andreas
--
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From gpugroup at gmail.com Fri Apr 6 09:49:32 2018
From: gpugroup at gmail.com (GPU Group)
Date: Fri, 6 Apr 2018 10:49:32 -0600
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
related: SF float32 vs double64: would all double be simpler on x3d specs,
and internally, up to opengl interface?
On Fri, Apr 6, 2018 at 9:22 AM, Andreas Plesch
wrote:
> Here is a somewhat radical idea to simplify X3D a bit. Since x3dom is
> javascript it does not really distinguish between SFInt32 and SFFloat, and
> lives pretty well with it. So why not consider completely removing the
> SF/MFInt32 from the spec. in general ?
>
> The integer fields are used in not very many nodes: Switch,
> IntegerSequencer, LOD (level_changed) come to mind. A replacement with
> SFFloat would mean adding rounding or truncation to nearest integer in the
> spec. language but probably not more than that.
>
> The advantages are that it is an opportunity to make the spec. leaner, and
> help with some node communication issues.
>
> The disadvantages are that it would be a backwards incompatible change,
> and may have a minor performance impact.
>
> -Andreas
>
> --
> Andreas Plesch
> Waltham, MA 02453
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From michalis.kambi at gmail.com Fri Apr 6 10:02:43 2018
From: michalis.kambi at gmail.com (Michalis Kamburelis)
Date: Fri, 6 Apr 2018 19:02:43 +0200
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
"2018-04-06 17:22 GMT+02:00 Andreas Plesch :
> Here is a somewhat radical idea to simplify X3D a bit. Since x3dom is
> javascript it does not really distinguish between SFInt32 and SFFloat, and
> lives pretty well with it. So why not consider completely removing the
> SF/MFInt32 from the spec. in general ?
>
> The integer fields are used in not very many nodes: Switch,
> IntegerSequencer, LOD (level_changed) come to mind. A replacement with
> SFFloat would mean adding rounding or truncation to nearest integer in the
> spec. language but probably not more than that.
>
> The advantages are that it is an opportunity to make the spec. leaner, and
> help with some node communication issues.
>
> The disadvantages are that it would be a backwards incompatible change, and
> may have a minor performance impact.
>
This is a limitation of JavaScript (there are no separate "integer" or
"float" types, just "number"), but all other programming languages
have separate integer / float types. So I would a bit reluctant to do
this...
Equating "SFFloat == SFInt32" would mean we have less strict typing
when it comes to checking ROUTE connections. All SFFloat fields/events
could be then connected with SFInt32. E.g. in my opinion it is good
that right now you are forced to animate "Switch.whichChoice" with
"IntegerSequencer", and you cannot do it with "ScalarInterpolator".
And it allows X3D specification to avoid making some general rules
whether we round (with round(0.75)=1.0), or truncate (ceil).
More importantly, what happens with MFInt32? If it's now MFFloat, then
we get a performance hit when reading a long list of coordinates (like
IndexedFaceSet.coordIndex), because now we have to call round() on
every list item.
Regards,
Michalis
From andreasplesch at gmail.com Fri Apr 6 10:14:03 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Fri, 6 Apr 2018 13:14:03 -0400
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
That came to mind as well, since js numbers are doubles. May be it is time
to trade less efficient use of resources for simplicity and convenience ?
Mobile is a large area with limited resources, however.
On Fri, Apr 6, 2018, 12:49 PM GPU Group wrote:
> related: SF float32 vs double64: would all double be simpler on x3d specs,
> and internally, up to opengl interface?
>
> On Fri, Apr 6, 2018 at 9:22 AM, Andreas Plesch
> wrote:
>
>> Here is a somewhat radical idea to simplify X3D a bit. Since x3dom is
>> javascript it does not really distinguish between SFInt32 and SFFloat, and
>> lives pretty well with it. So why not consider completely removing the
>> SF/MFInt32 from the spec. in general ?
>>
>> The integer fields are used in not very many nodes: Switch,
>> IntegerSequencer, LOD (level_changed) come to mind. A replacement with
>> SFFloat would mean adding rounding or truncation to nearest integer in the
>> spec. language but probably not more than that.
>>
>> The advantages are that it is an opportunity to make the spec. leaner,
>> and help with some node communication issues.
>>
>> The disadvantages are that it would be a backwards incompatible change,
>> and may have a minor performance impact.
>>
>> -Andreas
>>
>> --
>> Andreas Plesch
>> Waltham, MA 02453
>>
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yottzumm at gmail.com Fri Apr 6 10:15:00 2018
From: yottzumm at gmail.com (John Carlson)
Date: Fri, 06 Apr 2018 17:15:00 +0000
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
On Fri, Apr 6, 2018, 1:04 PM Michalis Kamburelis
wrote:
>
>
> More importantly, what happens with MFInt32? If it's now MFFloat, then
> we get a performance hit when reading a long list of coordinates (like
> IndexedFaceSet.coordIndex), because now we have to call round() on
> every list item.
>
This, I feel, is a very important point.
John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From andreasplesch at gmail.com Fri Apr 6 10:41:08 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Fri, 6 Apr 2018 13:41:08 -0400
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
I did not really expect a lot of enthusiasm but thought it might be worth a
discussion. So let me try.
On Fri, Apr 6, 2018 at 1:02 PM, Michalis Kamburelis <
michalis.kambi at gmail.com> wrote:
> "2018-04-06 17:22 GMT+02:00 Andreas Plesch :
> > Here is a somewhat radical idea to simplify X3D a bit. Since x3dom is
> > javascript it does not really distinguish between SFInt32 and SFFloat,
> and
> > lives pretty well with it. So why not consider completely removing the
> > SF/MFInt32 from the spec. in general ?
> >
> > The integer fields are used in not very many nodes: Switch,
> > IntegerSequencer, LOD (level_changed) come to mind. A replacement with
> > SFFloat would mean adding rounding or truncation to nearest integer in
> the
> > spec. language but probably not more than that.
> >
> > The advantages are that it is an opportunity to make the spec. leaner,
> and
> > help with some node communication issues.
> >
> > The disadvantages are that it would be a backwards incompatible change,
> and
> > may have a minor performance impact.
> >
>
> This is a limitation of JavaScript (there are no separate "integer" or
> "float" types, just "number"), but all other programming languages
> have separate integer / float types. So I would a bit reluctant to do
> this...
>
> Equating "SFFloat == SFInt32" would mean we have less strict typing
> when it comes to checking ROUTE connections. All SFFloat fields/events
> could be then connected with SFInt32. E.g. in my opinion it is good
> that right now you are forced to animate "Switch.whichChoice" with
> "IntegerSequencer", and you cannot do it with "ScalarInterpolator".
> And it allows X3D specification to avoid making some general rules
> whether we round (with round(0.75)=1.0), or truncate (ceil).
>
I am not sure if X3D should be considered a programming language although
it is probably Turing complete. Its declarative nature and its abstracted
foundation serve to strike a balance between ease of use and full
programmability. So I think there may be room for simplification.
You are right that the loss of some strictness in type checking would be
probably the main drawback/impact.
The rule on how to convert to an index would be just a decision.
Alternatively, indices could still be required to be round numbers.
Otherwise, the value would be undefined. The strict type checking is a
doubly edged sword. It encourages more precision on the input and therefore
presumably more correctness but then requires more nodes and fields to
enable that precision. For example, I would like to route a level_changed
SFInt32 value to a SFFloat key field of a BooleanSequencer. Now I need a
type converter and since there is not one, I have to have a type converter
script just to satisfy type correctness.
> More importantly, what happens with MFInt32? If it's now MFFloat, then
> we get a performance hit when reading a long list of coordinates (like
> IndexedFaceSet.coordIndex), because now we have to call round() on
> every list item.
>
I believe this would be a one time operation during loading which would be
barely noticeable on a modern system, even for large IFSs. The parsing of
the string to a number in the first place likely takes much longer.
> Regards,
> Michalis
>
--
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From michalis.kambi at gmail.com Fri Apr 6 10:41:56 2018
From: michalis.kambi at gmail.com (Michalis Kamburelis)
Date: Fri, 6 Apr 2018 19:41:56 +0200
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
2018-04-06 18:49 GMT+02:00 GPU Group :
> related: SF float32 vs double64: would all double be simpler on x3d specs,
> and internally, up to opengl interface?
>
The OpenGL (and GPUs, internally) perform calculations using the
precision indicated in their shader code. Which is usually float
(32-bit) or half-float (16-bit floating point type, not natively
available on CPUs), and very seldom double (64-bit).
And you should not use double in shader code, unless you really have a
good reason for this (i.e. you have tested that this particular
calculation is too unprecise otherwise). It matters for performance in
my experience, you can degrade the speed of your calculations
noticeably by carelessly using more precision than necessary. I
actually made a bug around this once, causing any shape with bump
mapping in Castle Game Engine to kill the speed of rendering :) And
that was on desktop.
And you should not send a list of double values when you can instead
send a list of floats. The list of doubles will have 2x size, and it
matters for a long list. Which is esp. important if we would also make
all vectors use double-precision, to be consistent with scalars. That
is why it's a reasonable optimization to even send your mesh
coordinates as 16-bit integers, when possible (Unity3d can compress
meshes like this, and it makes a significant speedup on Android).
Some applications for the same reason convert floats to half-floats on
CPU (half-float is not supported natively, but there are libraries to
work with it). If the mesh is static and large, it's better to run a
preprocessing step and deliver it as a list of half-floats, not
floats, to GPU.
See also https://www.khronos.org/opengl/wiki/Data_Type_(GLSL) and
https://en.wikibooks.org/wiki/GLSL_Programming/Vector_and_Matrix_Operations#Precision_Qualifiers
.
So, in my experience forcing "double" everywhere would be a bad idea
for performance on GPU... Esp. since the float precision is enough for
most cases.
And as for CPU calculations: For a long time, I had a switchable (by a
compiler directive) implementation of many collision routines in
Castle Game Engine (CastleVectors and CastleTriangles units). You
could calculate everything using double, if you needed. And my
measurements consistently shown that it causes a big performance drop,
and it's also not necessary for a majority of the code. Most of the
"switchable" feature was even removed around the CGE 6.4 (it was
complicating code for no gain). Of course you can still double for
some calculations, and we have double-precision vectors in CGE, but
they are only used when it's really necessary. I think there occurred
only 2 such occasions in a large engine :)
So, in my experience, even on CPU: we benefit, noticeably, from using
floats vs doubles.
Regards,
Michalis
From yottzumm at gmail.com Fri Apr 6 11:25:26 2018
From: yottzumm at gmail.com (John Carlson)
Date: Fri, 06 Apr 2018 18:25:26 +0000
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
I think type conversion should be implicit, or with a warning. Would this
satisfy the requirement?
John
On Fri, Apr 6, 2018, 1:42 PM Andreas Plesch wrote:
> I did not really expect a lot of enthusiasm but thought it might be worth
> a discussion. So let me try.
>
> On Fri, Apr 6, 2018 at 1:02 PM, Michalis Kamburelis <
> michalis.kambi at gmail.com> wrote:
>
>> "2018-04-06 17:22 GMT+02:00 Andreas Plesch :
>> > Here is a somewhat radical idea to simplify X3D a bit. Since x3dom is
>> > javascript it does not really distinguish between SFInt32 and SFFloat,
>> and
>> > lives pretty well with it. So why not consider completely removing the
>> > SF/MFInt32 from the spec. in general ?
>> >
>> > The integer fields are used in not very many nodes: Switch,
>> > IntegerSequencer, LOD (level_changed) come to mind. A replacement with
>> > SFFloat would mean adding rounding or truncation to nearest integer in
>> the
>> > spec. language but probably not more than that.
>> >
>> > The advantages are that it is an opportunity to make the spec. leaner,
>> and
>> > help with some node communication issues.
>> >
>> > The disadvantages are that it would be a backwards incompatible change,
>> and
>> > may have a minor performance impact.
>> >
>>
>> This is a limitation of JavaScript (there are no separate "integer" or
>> "float" types, just "number"), but all other programming languages
>> have separate integer / float types. So I would a bit reluctant to do
>> this...
>>
>> Equating "SFFloat == SFInt32" would mean we have less strict typing
>> when it comes to checking ROUTE connections. All SFFloat fields/events
>> could be then connected with SFInt32. E.g. in my opinion it is good
>> that right now you are forced to animate "Switch.whichChoice" with
>> "IntegerSequencer", and you cannot do it with "ScalarInterpolator".
>> And it allows X3D specification to avoid making some general rules
>> whether we round (with round(0.75)=1.0), or truncate (ceil).
>>
>
> I am not sure if X3D should be considered a programming language although
> it is probably Turing complete. Its declarative nature and its abstracted
> foundation serve to strike a balance between ease of use and full
> programmability. So I think there may be room for simplification.
>
> You are right that the loss of some strictness in type checking would be
> probably the main drawback/impact.
>
> The rule on how to convert to an index would be just a decision.
> Alternatively, indices could still be required to be round numbers.
> Otherwise, the value would be undefined. The strict type checking is a
> doubly edged sword. It encourages more precision on the input and therefore
> presumably more correctness but then requires more nodes and fields to
> enable that precision. For example, I would like to route a level_changed
> SFInt32 value to a SFFloat key field of a BooleanSequencer. Now I need a
> type converter and since there is not one, I have to have a type converter
> script just to satisfy type correctness.
>
>
>> More importantly, what happens with MFInt32? If it's now MFFloat, then
>> we get a performance hit when reading a long list of coordinates (like
>> IndexedFaceSet.coordIndex), because now we have to call round() on
>> every list item.
>>
>
> I believe this would be a one time operation during loading which would be
> barely noticeable on a modern system, even for large IFSs. The parsing of
> the string to a number in the first place likely takes much longer.
>
>
>> Regards,
>> Michalis
>>
>
> --
> Andreas Plesch
> Waltham, MA 02453
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From michalis.kambi at gmail.com Fri Apr 6 11:28:28 2018
From: michalis.kambi at gmail.com (Michalis Kamburelis)
Date: Fri, 6 Apr 2018 20:28:28 +0200
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
2018-04-06 19:41 GMT+02:00 Andreas Plesch :
>> This is a limitation of JavaScript (there are no separate "integer" or
>> "float" types, just "number"), but all other programming languages
>> have separate integer / float types. So I would a bit reluctant to do
>> this...
>>
>> Equating "SFFloat == SFInt32" would mean we have less strict typing
>> when it comes to checking ROUTE connections. All SFFloat fields/events
>> could be then connected with SFInt32. E.g. in my opinion it is good
>> that right now you are forced to animate "Switch.whichChoice" with
>> "IntegerSequencer", and you cannot do it with "ScalarInterpolator".
>> And it allows X3D specification to avoid making some general rules
>> whether we round (with round(0.75)=1.0), or truncate (ceil).
>
>
> I am not sure if X3D should be considered a programming language although it
> is probably Turing complete. Its declarative nature and its abstracted
> foundation serve to strike a balance between ease of use and full
> programmability. So I think there may be room for simplification.
>
> You are right that the loss of some strictness in type checking would be
> probably the main drawback/impact.
>
> The rule on how to convert to an index would be just a decision.
> Alternatively, indices could still be required to be round numbers.
> Otherwise, the value would be undefined. The strict type checking is a
> doubly edged sword. It encourages more precision on the input and therefore
> presumably more correctness but then requires more nodes and fields to
> enable that precision. For example, I would like to route a level_changed
> SFInt32 value to a SFFloat key field of a BooleanSequencer. Now I need a
> type converter and since there is not one, I have to have a type converter
> script just to satisfy type correctness.
Hm, I do agree that "type strictness" of X3D is not the main argument
here. You are right, I can see that sometimes you could even benefit
from easily passing float to/from int, while now you need to put nodes
in-between.
Note that InstantReality has an extension
http://doc.instantreality.org/documentation/nodetype/Converter/ .
>
>>
>> More importantly, what happens with MFInt32? If it's now MFFloat, then
>> we get a performance hit when reading a long list of coordinates (like
>> IndexedFaceSet.coordIndex), because now we have to call round() on
>> every list item.
>
>
> I believe this would be a one time operation during loading which would be
> barely noticeable on a modern system, even for large IFSs. The parsing of
> the string to a number in the first place likely takes much longer.
>
1. The parsing is indeed a problem for performance, and it probably
costs more than "rounding a float". But to make this rounding happen
early (at parsing or at glTF->X3D conversion) you need a way to mark
the field "this is MFInt32". Otherwise, you will need to introduce a
new field marked "this is MFFloat, but round it to integers at
loading". Or make "IndexedFaceSet.coordIndex" a special case.
We want to eliminate this parsing by using binary mesh formats. Like
glTF and ExternalGeometry/Shape. Or (older but already standardized)
X3D binary encoding format. But I realize that, for now, most X3D
content is parsed from text files (X3D in XML or classic encoding).
2. You can "embed" an X3D renderer, like Castle Game Engine or
probably any other X3D renderer, to build or animate X3D graph by code
in your own applications. In which case (right now) you can just use
integers, from start to finish. If coordIndex would be defined as
simple MFFloat, then you would need to provide floats.
This is an untypical but important use-case for me. People are
building procedurally-generated worlds or games, or machines, using
Castle Game Engine. So our API wants to allow defining
"IndexedFaceSet.coordIndex" efficiently.
This use-case is also relevant to X3D used directly: a Script that
can send MFFloat value to "IndexedFaceSet.set_coordIndex".
Note that this point is relevant even for JavaScript (when used as a
scripting or renderer language). JavaScript doesn't have a "real
integer" type for scalars, but it has a "real integer" type for lists
(Int16Array, Int32Array etc.). There lists are actually stored as
native integers, as far as I know.
Regards,
Michalis
From gpugroup at gmail.com Fri Apr 6 11:33:02 2018
From: gpugroup at gmail.com (GPU Group)
Date: Fri, 6 Apr 2018 12:33:02 -0600
Subject: [x3d-public] Distributed Interactive Simulation Component
Message-ID:
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/dis.html
Q1. should DIS be dropped from future specs
Q2. is there a more web3d-like way to do something like it?
-Doug
I can see why this isn't widely implemented.
x half-baked - looks like student papers - just a prototype or proof of
concept
x only one implents it -xj3d-, and I have yet to see it run with DIS nodes
(it whitescreens on me when run from x3d-edit), so difficult to reverse
engineer fuzzy concepts
x the flavor of some nodes like radio transmitter, receiver, signal seems
too specific/high level compared to the rest of web3d which is more about
general capabilites that can be combined flexibly in many permutations
x the DIS specs are very 1990s like
x DIS specs are big
But it also seems to fill some gaps versus EAI:
* node level synchronization (versus EAI access via rootnode > tree)
**- so easier to bury inside proto bodies
* wireline protocol
** so compatible among any browsers or utilities that implement the protocol
* no server -peer-to-peer, nothing bad happens if peers join or leave
And it has problems:
- using broadcast udp means no ACK / resend if packet lost
- better at regular / heartbeat updates
-- if one is dropped, just wait a few seconds
-- if peer joins late, just wait a few seconds
x, poor at one-time state intializations / transfers
xx if packet lost, DIS spec full of bandaids for this issue
xx if peer joins late, awkward
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From michalis.kambi at gmail.com Fri Apr 6 11:36:08 2018
From: michalis.kambi at gmail.com (Michalis Kamburelis)
Date: Fri, 6 Apr 2018 20:36:08 +0200
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
2018-04-06 19:14 GMT+02:00 Andreas Plesch :
> That came to mind as well, since js numbers are doubles. May be it is time
> to trade less efficient use of resources for simplicity and convenience ?
Note that JavaScript *has* native 32-bit floats when it comes to
lists: Float32Array . And I bet that Float32Array is used in X3DOM
internally for rendering :) WebGL API (bufferData), and three.js on
top of it, use Float32Array for their data.
Regards,
Michalis
From andreasplesch at gmail.com Fri Apr 6 12:06:25 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Fri, 6 Apr 2018 15:06:25 -0400
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
Yes, you are right, of course. Float32Arrays are used in x3dom to pass data
to webgl. BTW, x3dom does not use three.js, I believe mostly for historical
reasons.
On the other hand, GPU Group specifically drew the boundary for unified
number use before the GPU, eg. limited to CPU.
Games may be the most performance sensitive area for X3D, and mobile.
Another way to think about this, is to consider if it is feasible to not
have SFDouble in X3D. They are rarely used and the GPU does not really
support them. Doubles would be really useful for the geospatial component
since you want cm resolution on a global scale but due to the GPU
restriction it is necessary anyways to introduce a special local origin
(geoOrigin).
Then if there are no doubles, then there may be only a SFRealNumber type
and it could be left to the discretion of the browser to use floats or
doubles for the work.
-Andreas
On Fri, Apr 6, 2018 at 2:36 PM, Michalis Kamburelis <
michalis.kambi at gmail.com> wrote:
> 2018-04-06 19:14 GMT+02:00 Andreas Plesch :
> > That came to mind as well, since js numbers are doubles. May be it is
> time
> > to trade less efficient use of resources for simplicity and convenience ?
>
> Note that JavaScript *has* native 32-bit floats when it comes to
> lists: Float32Array . And I bet that Float32Array is used in X3DOM
> internally for rendering :) WebGL API (bufferData), and three.js on
> top of it, use Float32Array for their data.
>
> Regards,
> Michalis
>
--
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From andreasplesch at gmail.com Fri Apr 6 13:00:04 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Fri, 6 Apr 2018 16:00:04 -0400
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID:
Thanks for thinking this through more thoroughly, starting from a
rather vague idea.
On Fri, Apr 6, 2018 at 2:28 PM, Michalis Kamburelis
wrote:
>
> 2018-04-06 19:41 GMT+02:00 Andreas Plesch :
> ...
> Hm, I do agree that "type strictness" of X3D is not the main argument
> here. You are right, I can see that sometimes you could even benefit
> from easily passing float to/from int, while now you need to put nodes
> in-between.
>
> Note that InstantReality has an extension
> http://doc.instantreality.org/documentation/nodetype/Converter/ .
>
> >
> >>
> >> More importantly, what happens with MFInt32? If it's now MFFloat, then
> >> we get a performance hit when reading a long list of coordinates (like
> >> IndexedFaceSet.coordIndex), because now we have to call round() on
> >> every list item.
> >
> >
> > I believe this would be a one time operation during loading which would be
> > barely noticeable on a modern system, even for large IFSs. The parsing of
> > the string to a number in the first place likely takes much longer.
> >
>
> 1. The parsing is indeed a problem for performance, and it probably
> costs more than "rounding a float". But to make this rounding happen
> early (at parsing or at glTF->X3D conversion) you need a way to mark
> the field "this is MFInt32". Otherwise, you will need to introduce a
> new field marked "this is MFFloat, but round it to integers at
> loading". Or make "IndexedFaceSet.coordIndex" a special case.
Yes, it would be in effect a special or marked case, eg. the type
conversion happens implicitly.
For x3dom, actually no change would be necessary as long as the
provided floats are round numbers.
>
> We want to eliminate this parsing by using binary mesh formats. Like
> glTF and ExternalGeometry/Shape. Or (older but already standardized)
> X3D binary encoding format. But I realize that, for now, most X3D
> content is parsed from text files (X3D in XML or classic encoding).
>
>
> 2. You can "embed" an X3D renderer, like Castle Game Engine or
> probably any other X3D renderer, to build or animate X3D graph by code
> in your own applications. In which case (right now) you can just use
> integers, from start to finish. If coordIndex would be defined as
> simple MFFloat, then you would need to provide floats.
>
> This is an untypical but important use-case for me. People are
> building procedurally-generated worlds or games, or machines, using
> Castle Game Engine. So our API wants to allow defining
> "IndexedFaceSet.coordIndex" efficiently.
Ok, this is a good point. On the other hand an X3D engine still could
accept integer type numbers and internally treat them as integers from
start to finish for these float fields. Think a generic SFNumber
field.
> This use-case is also relevant to X3D used directly: a Script that
> can send MFFloat value to "IndexedFaceSet.set_coordIndex".
This is actually what effectively needs to happen now in X3D scripts
which are written in js.
> Note that this point is relevant even for JavaScript (when used as a
> scripting or renderer language). JavaScript doesn't have a "real
> integer" type for scalars, but it has a "real integer" type for lists
> (Int16Array, Int32Array etc.). There lists are actually stored as
> native integers, as far as I know.
Yes, the TypedArrays are for efficient use of native types. x3dom does
not actually use the TypedArrays for MF fields, I believe, until they
are submitted to webgl. Not really sure why not since mostly you can
treat TypedArrays as regular arrays in js. Perhaps TypedArrays were
experimental when x3dom got started.
-Andreas
--
Andreas Plesch
Waltham, MA 02453
From yottzumm at gmail.com Fri Apr 6 13:08:45 2018
From: yottzumm at gmail.com (John Carlson)
Date: Fri, 6 Apr 2018 16:08:45 -0400
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
Message-ID: <5ac7d3cc.0229ed0a.19e1.cbf9@mx.google.com>
I think x3dom wants to support getAttribute/setAttribute for MF fields in general, but I?m not sure we want that for X3D JSON, hence I use getFieldValue/setFieldValue unless they don?t exist on an element, then I fallback to the attribute methods in X3DJSONLD.
John
Sent from Mail for Windows 10
From: Andreas Plesch
Sent: Friday, April 6, 2018 4:01 PM
To: Michalis Kamburelis
Cc: X3D Graphics public mailing list
Subject: Re: [x3d-public] remove SF/MFInt32 ?
Thanks for thinking this through more thoroughly, starting from a
rather vague idea.
On Fri, Apr 6, 2018 at 2:28 PM, Michalis Kamburelis
wrote:
>
> 2018-04-06 19:41 GMT+02:00 Andreas Plesch :
> ...
> Hm, I do agree that "type strictness" of X3D is not the main argument
> here. You are right, I can see that sometimes you could even benefit
> from easily passing float to/from int, while now you need to put nodes
> in-between.
>
> Note that InstantReality has an extension
> http://doc.instantreality.org/documentation/nodetype/Converter/ .
>
> >
> >>
> >> More importantly, what happens with MFInt32? If it's now MFFloat, then
> >> we get a performance hit when reading a long list of coordinates (like
> >> IndexedFaceSet.coordIndex), because now we have to call round() on
> >> every list item.
> >
> >
> > I believe this would be a one time operation during loading which would be
> > barely noticeable on a modern system, even for large IFSs. The parsing of
> > the string to a number in the first place likely takes much longer.
> >
>
> 1. The parsing is indeed a problem for performance, and it probably
> costs more than "rounding a float". But to make this rounding happen
> early (at parsing or at glTF->X3D conversion) you need a way to mark
> the field "this is MFInt32". Otherwise, you will need to introduce a
> new field marked "this is MFFloat, but round it to integers at
> loading". Or make "IndexedFaceSet.coordIndex" a special case.
Yes, it would be in effect a special or marked case, eg. the type
conversion happens implicitly.
For x3dom, actually no change would be necessary as long as the
provided floats are round numbers.
>
> We want to eliminate this parsing by using binary mesh formats. Like
> glTF and ExternalGeometry/Shape. Or (older but already standardized)
> X3D binary encoding format. But I realize that, for now, most X3D
> content is parsed from text files (X3D in XML or classic encoding).
>
>
> 2. You can "embed" an X3D renderer, like Castle Game Engine or
> probably any other X3D renderer, to build or animate X3D graph by code
> in your own applications. In which case (right now) you can just use
> integers, from start to finish. If coordIndex would be defined as
> simple MFFloat, then you would need to provide floats.
>
> This is an untypical but important use-case for me. People are
> building procedurally-generated worlds or games, or machines, using
> Castle Game Engine. So our API wants to allow defining
> "IndexedFaceSet.coordIndex" efficiently.
Ok, this is a good point. On the other hand an X3D engine still could
accept integer type numbers and internally treat them as integers from
start to finish for these float fields. Think a generic SFNumber
field.
> This use-case is also relevant to X3D used directly: a Script that
> can send MFFloat value to "IndexedFaceSet.set_coordIndex".
This is actually what effectively needs to happen now in X3D scripts
which are written in js.
> Note that this point is relevant even for JavaScript (when used as a
> scripting or renderer language). JavaScript doesn't have a "real
> integer" type for scalars, but it has a "real integer" type for lists
> (Int16Array, Int32Array etc.). There lists are actually stored as
> native integers, as far as I know.
Yes, the TypedArrays are for efficient use of native types. x3dom does
not actually use the TypedArrays for MF fields, I believe, until they
are submitted to webgl. Not really sure why not since mostly you can
treat TypedArrays as regular arrays in js. Perhaps TypedArrays were
experimental when x3dom got started.
-Andreas
--
Andreas Plesch
Waltham, MA 02453
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brutzman at nps.edu Fri Apr 6 15:48:19 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Fri, 6 Apr 2018 15:48:19 -0700
Subject: [x3d-public] Distributed Interactive Simulation Component
In-Reply-To:
References:
Message-ID: <4e13ff74-4fa9-4e10-df46-f42c467661ad@nps.edu>
Thanks for your interest and scrutiny Doug.
Backgrounders:
IEEE Distributed Interactive Simulation (DIS) protocol is a long-running networking standard used by many DoD systems for creating shared virtual environments, Live Virtual Constructive (LVC) hybrid simulations/exercises, etc.
https://en.wikipedia.org/wiki/Distributed_Interactive_Simulation
As it turns out, NPS has an extensive body of active effort in this arena. We expect to be able to tackle this with partners sometime after Soft Launch this summer. Current course work is testing and improving a number of Web-based examples using the OpenDIS library.
Integration with X3D is relatively easy. We have a DIS-networked EspduTransform node which can be the scene-graph parent of any moving entity.
X3D-Edit has pretty good support including sender-receiver-tester-recorder-player tools. It works, we ran it many times in class last quarter, tested with WireShark, etc. etc.
Further references for people who want to read ahead:
a. IITSEC 2017 slideset, DIS 101
https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/raw/master/presentations/IITSEC2018_DIS_Tutorial.pptx
b. X3D and Distributed Interactive Simulation (DIS)
http://x3dgraphics.com/slidesets/X3dForAdvancedModeling/DistributedInteractiveSimulation.pdf
c. X3D v3.3 Distributed interactive simulation (DIS) component
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/dis.html
d. IEEE Standards Maintained by SISO SAC
https://www.sisostds.org/ProductsPublications/Standards/IEEEStandards.aspx
The protocol is quite mature, evolving since early 1990s. Multiple commercial players.
Our team is "getting back up on the horse" and gradually rejuvenating the OpenDIS implementation. It has code generators for API binding in multiple programming languages (Java JavaScript C++ C# others). We are working through examples and fixing them in a pair of courses, 3-months into a 12-month cycle. Initial bindings existed in X3DOM at some point, not sure of their current status.
You are asking good questions, n.b. that good answers exist too. Too bad others didn't follow through "back in the day" but certainly happy that you are pursuing this. IMO it has huge potential value, especially as we make progress on using Javascript inside HTML to bridge to web services or other connections rather than UDP multicast.
I expect that sometime after Web3D 2018 Conference we will have our internal work ready for broader sharing. Can you wait until then? We will be keen to help and test together - sounds like a great student team project actually. Topmost priorities right now include HAnim spec and Motion node, other OpenDIS work is slowly progressing and will help.
Step by step, again thanks...
v/r Don
On 4/6/2018 11:33 AM, GPU Group wrote:
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/dis.html
> Q1. should DIS be dropped from future specs
> Q2. is there a more web3d-like way to do something like it?
> -Doug
>
>
> I can see why this isn't widely implemented.
> x half-baked - looks like student papers - just a prototype or proof of concept
> x only one implents it -xj3d-, and I have yet to see it run with DIS nodes (it whitescreens on me when run from x3d-edit), so difficult to reverse engineer fuzzy concepts
> x the flavor of some nodes like radio transmitter, receiver, signal seems too specific/high level compared to the rest of web3d which is more about general capabilites that can be combined flexibly in many permutations
> x the DIS specs are very 1990s like
> x DIS specs are big
>
> But it also seems to fill some gaps versus EAI:
> * node level synchronization (versus EAI access via rootnode > tree)
> **- so easier to bury inside proto bodies
> * wireline protocol
> ** so compatible among any browsers or utilities that implement the protocol
> * no server -peer-to-peer, nothing bad happens if peers join or leave
>
> And it has problems:
> - using broadcast udp means no ACK / resend if packet lost
> - better at regular / heartbeat updates
> -- if one is dropped, just wait a few seconds
> -- if peer joins late, just wait a few seconds
> x, poor at one-time state intializations / transfers
> xx if packet lost, DIS spec full of bandaids for this issue
> xx if peer joins late, awkward
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From andreasplesch at gmail.com Fri Apr 6 17:11:52 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Fri, 6 Apr 2018 20:11:52 -0400
Subject: [x3d-public] LOD first level_changed event
Message-ID:
LOD has an outputOnly level_changed field which indicates the level
index of a child when it is activated.
Should the level_changed event be generated the very first time the
LOD activates any of its children ?
It looks like it should and the spec. does not treat the
initialization as a special case: When L(d) is activated for display,
the LOD node generates a level_changed event with value i where the
value of i identifies which value of L was activated for display.
On the other hand, the first display may not be considered a change
from a previous display. But it is a change from no display, and
generally logic using the event should work for the initial case as
well.
So I think the answer is yes but thought it is worth raising the
question before the field is added to x3dom.
Perhaps it is time to put together a simple test using an existing LOD
example by adding a route from level_changed to a switch node to see
if it gets an initial value.
Any feedback welcome,
-Andreas
--
Andreas Plesch
Waltham, MA 02453
From andreasplesch at gmail.com Fri Apr 6 18:21:40 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Fri, 6 Apr 2018 21:21:40 -0400
Subject: [x3d-public] LOD first level_changed event
In-Reply-To:
References:
Message-ID:
https://x3d-lodlevel-test.glitch.me/LODwithDifferentShapes.x3d
tests if an initial level_changed event is generated. If it is,
'Choice 0' is displayed on front of the red cube, at first display. If
not, no text is displayed.
x marks the browser which show the text:
x3dom: x
Instant Player: x
H3DViewer: x
View3dScene: x
Octaga
BS Contact
FreeWrl
X-ITE
FreeWrl and X-ITE do not show text even after initialisation and
changing LOD levels. So they may not support level_changed.
Apparently there are differences in spec. interpretation.
-Andreas
On Fri, Apr 6, 2018 at 8:11 PM, Andreas Plesch wrote:
> LOD has an outputOnly level_changed field which indicates the level
> index of a child when it is activated.
>
> Should the level_changed event be generated the very first time the
> LOD activates any of its children ?
>
> It looks like it should and the spec. does not treat the
> initialization as a special case: When L(d) is activated for display,
> the LOD node generates a level_changed event with value i where the
> value of i identifies which value of L was activated for display.
>
> On the other hand, the first display may not be considered a change
> from a previous display. But it is a change from no display, and
> generally logic using the event should work for the initial case as
> well.
>
> So I think the answer is yes but thought it is worth raising the
> question before the field is added to x3dom.
>
> Perhaps it is time to put together a simple test using an existing LOD
> example by adding a route from level_changed to a switch node to see
> if it gets an initial value.
>
> Any feedback welcome,
>
> -Andreas
>
> --
> Andreas Plesch
> Waltham, MA 02453
--
Andreas Plesch
Waltham, MA 02453
From michalis.kambi at gmail.com Fri Apr 6 18:21:38 2018
From: michalis.kambi at gmail.com (Michalis Kamburelis)
Date: Sat, 7 Apr 2018 03:21:38 +0200
Subject: [x3d-public] LOD first level_changed event
In-Reply-To:
References:
Message-ID:
2018-04-07 2:11 GMT+02:00 Andreas Plesch :
> LOD has an outputOnly level_changed field which indicates the level
> index of a child when it is activated.
>
> Should the level_changed event be generated the very first time the
> LOD activates any of its children ?
>
> It looks like it should and the spec. does not treat the
> initialization as a special case: When L(d) is activated for display,
> the LOD node generates a level_changed event with value i where the
> value of i identifies which value of L was activated for display.
>
Castle Game Engine and view3dscene do generate level_changed on 1st
display. When implementing, I thought that it is sensible: the display
changes from "nothing" to "that child node", so I was thinking just as
you :)
But I have not tested other X3D browsers about this. A confirmation
would be welcome. Maybe my old LOD testcase may be adapted?
https://github.com/castle-engine/demo-models/blob/master/navigation/lod_test.x3dv
. Though it uses Logger node (an extension only in InstantReality /
CGE) for watching level_changed.
Regards,
Michalis
From andreasplesch at gmail.com Sat Apr 7 06:14:56 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Sat, 7 Apr 2018 09:14:56 -0400
Subject: [x3d-public] LOD first level_changed event
In-Reply-To:
References:
Message-ID:
On Fri, Apr 6, 2018 at 9:21 PM, Andreas Plesch wrote:
> https://x3d-lodlevel-test.glitch.me/LODwithDifferentShapes.x3d
>
> tests if an initial level_changed event is generated. If it is,
> 'Choice 0' is displayed on front of the red cube, at first display. If
> not, no text is displayed.
>
> x marks the browser which show the text:
>
> x3dom: x
> Instant Player: x
> H3DViewer: x
> View3dScene: x
>
> Octaga
> BS Contact
>
> FreeWrl
> X-ITE
>
>
> FreeWrl and X-ITE do not show text even after initialisation and
> changing LOD levels. So they may not support level_changed.
>
> Apparently there are differences in spec. interpretation.
So this suggests that there is a need to tighten the spec. language. I
would be in favor of generating the first time event.
The relevant sentence is:
' When L(d) is activated for display,
the LOD node generates a level_changed event with value i where the
value of i identifies which value of L was activated for display.'
Would add 'including the first time' suffice ?
' When L(d) is activated for display including the first time,
the LOD node generates a level_changed event with value i where the
value of i identifies which value of L was activated for display.'
If there is no immediate objection I can add a standard comment via web3d.org .
-Andreas
>
>
>
> On Fri, Apr 6, 2018 at 8:11 PM, Andreas Plesch wrote:
>> LOD has an outputOnly level_changed field which indicates the level
>> index of a child when it is activated.
>>
>> Should the level_changed event be generated the very first time the
>> LOD activates any of its children ?
>>
>> It looks like it should and the spec. does not treat the
>> initialization as a special case: When L(d) is activated for display,
>> the LOD node generates a level_changed event with value i where the
>> value of i identifies which value of L was activated for display.
>>
>> On the other hand, the first display may not be considered a change
>> from a previous display. But it is a change from no display, and
>> generally logic using the event should work for the initial case as
>> well.
>>
>> So I think the answer is yes but thought it is worth raising the
>> question before the field is added to x3dom.
>>
>> Perhaps it is time to put together a simple test using an existing LOD
>> example by adding a route from level_changed to a switch node to see
>> if it gets an initial value.
>>
>> Any feedback welcome,
>>
>> -Andreas
>>
>> --
>> Andreas Plesch
>> Waltham, MA 02453
>
>
>
> --
> Andreas Plesch
> Waltham, MA 02453
--
Andreas Plesch
Waltham, MA 02453
From gpugroup at gmail.com Sat Apr 7 06:55:01 2018
From: gpugroup at gmail.com (GPU Group)
Date: Sat, 7 Apr 2018 07:55:01 -0600
Subject: [x3d-public] LOD first level_changed event
In-Reply-To:
References:
Message-ID:
> FreeWrl ... do not show text even after initialisation and
> changing LOD levels. So they may not support level_changed.
freewrl had a bug, fixed for next release, shows Choice 0 over box on
startup.
-Doug
On Fri, Apr 6, 2018 at 7:21 PM, Michalis Kamburelis <
michalis.kambi at gmail.com> wrote:
> 2018-04-07 2:11 GMT+02:00 Andreas Plesch :
> > LOD has an outputOnly level_changed field which indicates the level
> > index of a child when it is activated.
> >
> > Should the level_changed event be generated the very first time the
> > LOD activates any of its children ?
> >
> > It looks like it should and the spec. does not treat the
> > initialization as a special case: When L(d) is activated for display,
> > the LOD node generates a level_changed event with value i where the
> > value of i identifies which value of L was activated for display.
> >
>
> Castle Game Engine and view3dscene do generate level_changed on 1st
> display. When implementing, I thought that it is sensible: the display
> changes from "nothing" to "that child node", so I was thinking just as
> you :)
>
> But I have not tested other X3D browsers about this. A confirmation
> would be welcome. Maybe my old LOD testcase may be adapted?
> https://github.com/castle-engine/demo-models/blob/
> master/navigation/lod_test.x3dv
> . Though it uses Logger node (an extension only in InstantReality /
> CGE) for watching level_changed.
>
> Regards,
> Michalis
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From gpugroup at gmail.com Sat Apr 7 07:36:06 2018
From: gpugroup at gmail.com (GPU Group)
Date: Sat, 7 Apr 2018 08:36:06 -0600
Subject: [x3d-public] Distributed Interactive Simulation Component
In-Reply-To: <4e13ff74-4fa9-4e10-df46-f42c467661ad@nps.edu>
References:
<4e13ff74-4fa9-4e10-df46-f42c467661ad@nps.edu>
Message-ID:
Thanks for the Background on DIS and links, I missed a few.
> Can you wait until then?
(I had hoped to reach v3.3 FULL_PROFILE to prove it can be done, not
illusive goal -just 6 DIS nodes away from full profile- but ..)
Yes, or maybe I can go just a little further and prepare a few more
questions / complaints / notes as seen from non-DIS-expert trying to
implement, to share with your class. And yes would be great to work with
your students on it if I'm available at the time. The great thing about DIS
it should work with any tool that can join the exercise.
I'll prepare a .msi installer in the next few weeks. Or if any of your
students can stomach C they are very welcome to try hacking freewrl.
-Doug
PS I do have the simple transform part of espdu working in scenes like
http://dug9.users.sourceforge.net/web3d/tests/DIS/EspduTransformSenderReceiver.x3d
(which white-screens for me in x3d-edit embedded xj3d in win10 and Ubuntu)
and tested wtih x3d-edit sender panel
and used the xmlpg to do a CGenerator.java to generate a flat-C .h/.c used
in freewrl
x haven't done dead reckoning, geoCoords, collision, fire, detonation,
create/remove, manager or radio,
(in large part because of personal confusion about how its supposed to work
-never seen professional DIS simm- and no DIS-working xj3d to test
hypotheses^ against, lack of specific examples for collision, fire,
detonation, manager.)
...
^Hypotheses how geoCoords work for DIS nodes:
like GeoLocation,
Scene
.LCS (local coordinate system as described in precision section of
geospatial: shared cartesian)
..(dis node with geoCoords)
... TCS - topocentric coordinate system aka LGS local geodetic system as
described in GeoLocation
.... Transform part of espdu
..... children in entity coords
On Send from isWriter/owner, the translation and rotation are combined with
TCS translation and rotation, converted to GC and sent as GC
On Receive, GC converted to TCS, TCS to LCS transform is updated, and
translation, rotation part of Transform is set to default 000 0100
Hypothesis for how Manager node works:
- its an isReader, there's no simulation manager in web3d specs, no way to
generate create/remove events
- when espdu gets create/remove pdus, it does nothing with them, and the
scene needs to route/forward them to the Manager for creating/removing
espdus
On Fri, Apr 6, 2018 at 4:48 PM, Don Brutzman wrote:
> Thanks for your interest and scrutiny Doug.
>
> Backgrounders:
>
> IEEE Distributed Interactive Simulation (DIS) protocol is a long-running
> networking standard used by many DoD systems for creating shared virtual
> environments, Live Virtual Constructive (LVC) hybrid simulations/exercises,
> etc.
>
> https://en.wikipedia.org/wiki/Distributed_Interactive_Simulation
>
> As it turns out, NPS has an extensive body of active effort in this
> arena. We expect to be able to tackle this with partners sometime after
> Soft Launch this summer. Current course work is testing and improving a
> number of Web-based examples using the OpenDIS library.
>
> Integration with X3D is relatively easy. We have a DIS-networked
> EspduTransform node which can be the scene-graph parent of any moving
> entity.
>
> X3D-Edit has pretty good support including sender-receiver-tester-recorder-player
> tools. It works, we ran it many times in class last quarter, tested with
> WireShark, etc. etc.
>
> Further references for people who want to read ahead:
>
> a. IITSEC 2017 slideset, DIS 101
> https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500
> /raw/master/presentations/IITSEC2018_DIS_Tutorial.pptx
>
> b. X3D and Distributed Interactive Simulation (DIS)
> http://x3dgraphics.com/slidesets/X3dForAdvancedModeling/Dis
> tributedInteractiveSimulation.pdf
>
> c. X3D v3.3 Distributed interactive simulation (DIS) component
> http://www.web3d.org/documents/specifications/19775-1/V3.3/
> Part01/components/dis.html
> d. IEEE Standards Maintained by SISO SAC
> https://www.sisostds.org/ProductsPublications/Standards/
> IEEEStandards.aspx
>
> The protocol is quite mature, evolving since early 1990s. Multiple
> commercial players.
>
> Our team is "getting back up on the horse" and gradually rejuvenating the
> OpenDIS implementation. It has code generators for API binding in multiple
> programming languages (Java JavaScript C++ C# others). We are working
> through examples and fixing them in a pair of courses, 3-months into a
> 12-month cycle. Initial bindings existed in X3DOM at some point, not sure
> of their current status.
>
> You are asking good questions, n.b. that good answers exist too. Too bad
> others didn't follow through "back in the day" but certainly happy that you
> are pursuing this. IMO it has huge potential value, especially as we make
> progress on using Javascript inside HTML to bridge to web services or other
> connections rather than UDP multicast.
>
> I expect that sometime after Web3D 2018 Conference we will have our
> internal work ready for broader sharing. Can you wait until then? We will
> be keen to help and test together - sounds like a great student team
> project actually. Topmost priorities right now include HAnim spec and
> Motion node, other OpenDIS work is slowly progressing and will help.
>
> Step by step, again thanks...
>
> v/r Don
>
>
> On 4/6/2018 11:33 AM, GPU Group wrote:
>
>> http://www.web3d.org/documents/specifications/19775-1/V3.3/
>> Part01/components/dis.html
>> Q1. should DIS be dropped from future specs
>> Q2. is there a more web3d-like way to do something like it?
>> -Doug
>>
>>
>> I can see why this isn't widely implemented.
>> x half-baked - looks like student papers - just a prototype or proof of
>> concept
>> x only one implents it -xj3d-, and I have yet to see it run with DIS
>> nodes (it whitescreens on me when run from x3d-edit), so difficult to
>> reverse engineer fuzzy concepts
>> x the flavor of some nodes like radio transmitter, receiver, signal seems
>> too specific/high level compared to the rest of web3d which is more about
>> general capabilites that can be combined flexibly in many permutations
>> x the DIS specs are very 1990s like
>> x DIS specs are big
>>
>> But it also seems to fill some gaps versus EAI:
>> * node level synchronization (versus EAI access via rootnode > tree)
>> **- so easier to bury inside proto bodies
>> * wireline protocol
>> ** so compatible among any browsers or utilities that implement the
>> protocol
>> * no server -peer-to-peer, nothing bad happens if peers join or leave
>>
>> And it has problems:
>> - using broadcast udp means no ACK / resend if packet lost
>> - better at regular / heartbeat updates
>> -- if one is dropped, just wait a few seconds
>> -- if peer joins late, just wait a few seconds
>> x, poor at one-time state intializations / transfers
>> xx if packet lost, DIS spec full of bandaids for this issue
>> xx if peer joins late, awkward
>>
>
> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>
> all the best, Don
> --
> Don Brutzman Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzma
> n
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From andreasplesch at gmail.com Sat Apr 7 12:42:31 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Sat, 7 Apr 2018 15:42:31 -0400
Subject: [x3d-public] LOD first level_changed event
Message-ID:
> Date: Sat, 7 Apr 2018 07:55:01 -0600
> From: GPU Group
> To: X3D Graphics public mailing list
> Subject: Re: [x3d-public] LOD first level_changed event
>> FreeWrl ... do not show text even after initialisation and
>> changing LOD levels. So they may not support level_changed.
> freewrl had a bug, fixed for next release, shows Choice 0 over box on
> startup.
Ok, very good. I also filed an issue for x_ite here:
https://github.com/create3000/x_ite/issues/11
-Andreas
From brutzman at nps.edu Sun Apr 8 15:59:03 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Sun, 8 Apr 2018 15:59:03 -0700
Subject: [x3d-public] [x3dom-users] X3DOM not loading this file?
In-Reply-To: <5ac302f5.b324ed0a.e3a39.d0e9@mx.google.com>
References: <5ac302f5.b324ed0a.e3a39.d0e9@mx.google.com>
Message-ID: <753db28c-c829-6ceb-db86-2600a152bc58@nps.edu>
I tried sending it to X3D Validator via url
https://savage.nps.edu/X3dValidator?url=http://coderextreme.net/X3DJSONLD/src/main/data/ifs.x3d
but it didn't eventually return. Scene is fairly large (2.8 MB) so testing will be easier on a smaller excerpt; perhaps include same number of values but only use 1-2 places beyond decimal point for file reduction..
I also ran X3D Validator in Netbeans using X3D-Edit and got the following:
--------- Commence validation checks for ifs.x3d ---------
Performing well-formed XML check...
Checking file:/C:/installs/ifs.x3d...
Well-formed XML check: pass
Performing DOCTYPE check...
[X3dDoctypeChecker] success: valid XML declaration found; success: final X3D 3.3 DOCTYPE found.
Performing DTD validation...
Checking file:/C:/installs/ifs.x3d...
XML DTD validation: pass
Performing X3D schema validation...
Checking file:/C:/installs/ifs.x3d...
Referenced entity at "nbres:/org/web3d/x3d/externals/schemas/x3d-3.3-Web3dExtensionsPublic.xsd".
cvc-pattern-valid: Value '-1.5717495803202972 1.5010459735645993 -0.9984927008286802 -1.579391660072666 1.551492859008854 -0.9864885983744568 -1.57079 0.9724032096291927 -1 -1.5707958351153464 0.9724150552548111 -0.999990834259165 -1.5707917219270615 0.9724303160837228 -0.9999972952141909 -1.570811598646887
[... snip ...]
-0.8268688097168273 0.6117797847733457 -2.1685439664849047 -0.8484724749836337 1.031108768482434 -2.134609145120458 -0.8754682244714049 1.2986451920818023 -2.092204491782562 -0.9034445552370282 1.372625773813016 -2.0482595511792283 -0.9271920890568556 1.2403361339622263 -2.0109571625303815 -2.565880204623874 -0.045153193449661636 0.5630777425211346'
of attribute 'vector' on element 'Normal' is not valid with respect to its type, 'MFVec3f'.
XML schema validation: fail!
Performing X3D regular expression (regex) values check...
Performing X3dToClassicVrml.xslt conversion check...
Performing X3D Schematron check...
It is good practice to identify editor used, for example [/X3D/head, info]
--------- Validation checks complete for ifs.x3d ---------
It looks to me like your normal value is failing the regular-expression check for MFVec3f in X3D Schema.
Am noticing that many of your normal values are greater than 1, you likely want to convert all normal vectors to 1.0 unit magnitude (and none with 0.0 magnitude).
FYI there was once a regex in place that only allowed such unit-magnitude vectors; I disabled it because many tools do not bother to normalize that content. Perhaps we should have a strict mode in X3D-Tidy for that.
For you a good generator meta tag might be something like the following (I'll restore the meta/generator menu in X3D-Edit).
On 4/2/2018 9:28 PM, John Carlson wrote:
> This file doesn?t load in X3DOM:
>
> http://coderextreme.net/X3DJSONLD/src/main/html/x3domframe.html
>
> http://coderextreme.net/X3DJSONLD/src/main/data/ifs.x3d
>
> Loads in BS Contact and X_ITE fine, but the object is kind of flat.? Not sure why?perhaps it really is flat.? Gotta work on my transforms from JSON -> STL, I guess.
A handful of players forgave the normal problem and showed a flat neon-green helicopter pointing straight down.
Others did not forgive. Xj3D independently noted the same MFVec3f error.
> Sigh, more work!
thank goodness 8)
> I?m guessing I?m going over the limit on coordinates or Indexes, but there?s no warning???? Did I already report this bug?
>
> John
minimum support levels in X3D specification are pretty high (and there is no maximum):
X3D v3.3 Abstract Specification, B Interchange Profile, B.4 Conformance criteria
Table B.3 ? Nodes for conforming to the Interchange profile
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#SupportLevels
Item X3D File Limit, Minimum Browser Support
=======================================================
Color 15,000 colours. 15,000 colours.
Coordinate 65,535 points 65,535 points.
Normal 15,000 normals 15,000 normals.
etc.
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From brutzman at nps.edu Sun Apr 8 16:28:12 2018
From: brutzman at nps.edu (Don Brutzman)
Date: Sun, 8 Apr 2018 16:28:12 -0700
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To: <5ac7d3cc.0229ed0a.19e1.cbf9@mx.google.com>
References:
<5ac7d3cc.0229ed0a.19e1.cbf9@mx.google.com>
Message-ID: <76ede8e9-c92c-e2b2-e560-74a3777b247c@nps.edu>
Appreciate the thoughtful inquiry, thanks colleagues. A few more points:
a. Hardware. X3D is designed to run across an exceptionally wide range of devices in a performant way. The original scene graph was designed when every single triangle counted, and we have been diligent about maintaining graphics-performance rigor throughout its evolution, so X3D is efficient. Many computing hardware platforms are quite necessarily strict about the handling of integers/floats/doubles based on memory, processing performance, and power consumption.
b. Software. X3D is designed to run across an exceptionally wide range of programming and processing environments. Thus if a JavaScript implementation wants to treat all numbers equivalently, or defer typecasting until data gets transferred to hardware, or whatever, that is OK and doesn't impede other implementations. The X3D abstract specification describes functionality of rendering and interaction, not reference software implementations.
c. Data or code. X3D is designed to be workable both as a file encoding or as a programming-language binding with functional equivalence. The X3D Unified Object Model work is capitalizing on that... more to follow once we get through HAnim updates, venture into C++/C#/Python programming, etc. etc.
d. Disclaimer: I think that typing is incredibly valuable because it reveals errors. Many such errors are otherwise undetectable, so typing is an important aspect of model Quality Assurance (QA).
e. Portability of reusable models. So feel free to pursue X3D generation, presentation and interaction using the best implementation approach you want... YMMV. Also know that portability of X3D scenes across all of these other platforms/formats/languages/methodologies can (and typically will) work equivalently when deploying valid X3D model content.
Have fun with X3D! 8)
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
From vmarchetti at kshell.com Mon Apr 9 05:49:41 2018
From: vmarchetti at kshell.com (vmarchetti at kshell.com)
Date: Mon, 9 Apr 2018 08:49:41 -0400
Subject: [x3d-public] Agenda for DPS WG call Apr 12 -- MetadataDate proposal
Message-ID: <204CFF2E-E070-4F97-B275-82931AEFA090@kshell.com>
There will be a Design Printing and Scanning Working Group call Thurs April 12 11:00 AM EDT 15:00 GMT
Google Drive Folder for call: https://drive.google.com/open?id=1FM8jeB7-OFyM3dT4-mDN3UTkk-UyklpE
1. Topic: Proposal for a new node: MetadataDate : To implement metadata with value of a calendar date.
Mantis Issue 1218: http://www.web3d.org/member-only/mantis/view.php?id=1218
-- there is a text-dump of the comments in the Google Drive folder
X3D Mailing list submission: http://web3d.org/mailman/private/x3d_web3d.org/2018-February/006844.html
Additional Resources:
ISO 8601 date and time format: https://www.iso.org/iso-8601-date-and-time-format.html
W3C report: https://www.w3.org/TR/NOTE-datetime
Dublin Core Metadata Element Set http://dublincore.org/documents/dces/ -- see Term Name: date
-----
Future DPS WG Meetings [from http://web3d.org/mailman/private/cad_web3d.org/2018-April/000927.html ]
April 19 : Presentations: NIST Conformance Suite examples archive [DB, VM] ; Tool Review: OpenCascasde, FreeCAD, CADExchanger support for X3D import and export. [VM]
April 26 : Mantis Issue 1234 : Proposal to change attribute 'shape' of CADFace to 'children'
May 3 : OPEN
May 10 : Prepare summary of recent Web3D/X3D activities for SC4 Plenary meeting in China, May 20-25
May 17 : Mantis Issues 983, 528
May 24 : OPEN
May 31 : Review collaborative work with JTC1/SG3, Dicom WG-17, and SC4 WG-16
Jun 6 : OPEN
Jun 14: OPEN
Suggested topics for OPEN dates welcome.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Design Printing and Scanning Call.ics
Type: text/calendar
Size: 951 bytes
Desc: not available
URL:
From richards at spawar.navy.mil Mon Apr 9 13:17:22 2018
From: richards at spawar.navy.mil (John Richardson)
Date: Mon, 9 Apr 2018 20:17:22 -0000
Subject: [x3d-public] Distributed Interactive Simulation Component
In-Reply-To: <4e13ff74-4fa9-4e10-df46-f42c467661ad@nps.edu>
References:
<4e13ff74-4fa9-4e10-df46-f42c467661ad@nps.edu>
Message-ID: <02a901d3d03f$ce8472a0$6b8d57e0$@spawar.navy.mil>
Greetings and Salutations,
DIS really cannot be separated from the HLA problem domain. So any SISO
documentation on HLA is useful. Also, NASA uses HLA. The SISO proceedings
are free and have the current hot topics in DIS/HLA.
X3D draws a lot of interest and implementation from the Academic Computer
Graphics community. Other communities that are interested - Game Community,
VR/AR Community. Communities that try to make money.
DIS/HLA draws a lot of interest and implementation from the Academic and
industrial Simulation theory community. Other communities that are
interested - DoD, MoD, NATO, China, European Space Agency, NASA. Communities
that spend money.
So, think of it this way. X3D is the anointed successor of VRML. HLA is the
anointed successor to DIS.
Any perceived deficiencies in VRML?
Any perceived deficiencies in DIS?
Well, VRML seems to still exist. DIS seems to still exist. My guess is that
DIS will continue to be maintained in legacy format for possibly decades.
John Richardson
-----Original Message-----
From: x3d-public [mailto:x3d-public-bounces at web3d.org] On Behalf Of Don
Brutzman
Sent: Friday, April 6, 2018 10:48 PM
To: GPU Group ; X3D Graphics public mailing list
Subject: Re: [x3d-public] Distributed Interactive Simulation Component
Thanks for your interest and scrutiny Doug.
Backgrounders:
IEEE Distributed Interactive Simulation (DIS) protocol is a long-running
networking standard used by many DoD systems for creating shared virtual
environments, Live Virtual Constructive (LVC) hybrid simulations/exercises,
etc.
https://en.wikipedia.org/wiki/Distributed_Interactive_Simulation
As it turns out, NPS has an extensive body of active effort in this arena.
We expect to be able to tackle this with partners sometime after Soft Launch
this summer. Current course work is testing and improving a number of
Web-based examples using the OpenDIS library.
Integration with X3D is relatively easy. We have a DIS-networked
EspduTransform node which can be the scene-graph parent of any moving
entity.
X3D-Edit has pretty good support including
sender-receiver-tester-recorder-player tools. It works, we ran it many
times in class last quarter, tested with WireShark, etc. etc.
Further references for people who want to read ahead:
a. IITSEC 2017 slideset, DIS 101
https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/raw/master/presentatio
ns/IITSEC2018_DIS_Tutorial.pptx
b. X3D and Distributed Interactive Simulation (DIS)
http://x3dgraphics.com/slidesets/X3dForAdvancedModeling/DistributedInteracti
veSimulation.pdf
c. X3D v3.3 Distributed interactive simulation (DIS) component
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components
/dis.html
d. IEEE Standards Maintained by SISO SAC
https://www.sisostds.org/ProductsPublications/Standards/IEEEStandards.aspx
The protocol is quite mature, evolving since early 1990s. Multiple
commercial players.
Our team is "getting back up on the horse" and gradually rejuvenating the
OpenDIS implementation. It has code generators for API binding in multiple
programming languages (Java JavaScript C++ C# others). We are working
through examples and fixing them in a pair of courses, 3-months into a
12-month cycle. Initial bindings existed in X3DOM at some point, not sure
of their current status.
You are asking good questions, n.b. that good answers exist too. Too bad
others didn't follow through "back in the day" but certainly happy that you
are pursuing this. IMO it has huge potential value, especially as we make
progress on using Javascript inside HTML to bridge to web services or other
connections rather than UDP multicast.
I expect that sometime after Web3D 2018 Conference we will have our internal
work ready for broader sharing. Can you wait until then? We will be keen
to help and test together - sounds like a great student team project
actually. Topmost priorities right now include HAnim spec and Motion node,
other OpenDIS work is slowly progressing and will help.
Step by step, again thanks...
v/r Don
On 4/6/2018 11:33 AM, GPU Group wrote:
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp
> onents/dis.html Q1. should DIS be dropped from future specs Q2. is
> there a more web3d-like way to do something like it?
> -Doug
>
>
> I can see why this isn't widely implemented.
> x half-baked - looks like student papers - just a prototype or proof
> of concept x only one implents it -xj3d-, and I have yet to see it run
> with DIS nodes (it whitescreens on me when run from x3d-edit), so
> difficult to reverse engineer fuzzy concepts x the flavor of some
> nodes like radio transmitter, receiver, signal seems too specific/high
> level compared to the rest of web3d which is more about general
> capabilites that can be combined flexibly in many permutations x the
> DIS specs are very 1990s like x DIS specs are big
>
> But it also seems to fill some gaps versus EAI:
> * node level synchronization (versus EAI access via rootnode > tree)
> **- so easier to bury inside proto bodies
> * wireline protocol
> ** so compatible among any browsers or utilities that implement the
> protocol
> * no server -peer-to-peer, nothing bad happens if peers join or leave
>
> And it has problems:
> - using broadcast udp means no ACK / resend if packet lost
> - better at regular / heartbeat updates
> -- if one is dropped, just wait a few seconds
> -- if peer joins late, just wait a few seconds x, poor at one-time
> state intializations / transfers xx if packet lost, DIS spec full of
> bandaids for this issue xx if peer joins late, awkward
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
From richards at spawar.navy.mil Mon Apr 9 13:22:53 2018
From: richards at spawar.navy.mil (John Richardson)
Date: Mon, 9 Apr 2018 20:22:53 -0000
Subject: [x3d-public] Distributed Interactive Simulation Component
In-Reply-To: <4e13ff74-4fa9-4e10-df46-f42c467661ad@nps.edu>
References:
<4e13ff74-4fa9-4e10-df46-f42c467661ad@nps.edu>
Message-ID: <02ac01d3d040$90b483b0$b21d8b10$@spawar.navy.mil>
Hello,
While we are on the topic of distributed simulation and graphics.
Drum Roll: The Summersim 2018 paper call is still open Extended to April 20.
As is the Computer Graphics for Simulation paper track...:-)
www.scs.org/summersim is where you all want to go...:-)
John
-----Original Message-----
From: x3d-public [mailto:x3d-public-bounces at web3d.org] On Behalf Of Don
Brutzman
Sent: Friday, April 6, 2018 10:48 PM
To: GPU Group ; X3D Graphics public mailing list
Subject: Re: [x3d-public] Distributed Interactive Simulation Component
Thanks for your interest and scrutiny Doug.
Backgrounders:
IEEE Distributed Interactive Simulation (DIS) protocol is a long-running
networking standard used by many DoD systems for creating shared virtual
environments, Live Virtual Constructive (LVC) hybrid simulations/exercises,
etc.
https://en.wikipedia.org/wiki/Distributed_Interactive_Simulation
As it turns out, NPS has an extensive body of active effort in this arena.
We expect to be able to tackle this with partners sometime after Soft Launch
this summer. Current course work is testing and improving a number of
Web-based examples using the OpenDIS library.
Integration with X3D is relatively easy. We have a DIS-networked
EspduTransform node which can be the scene-graph parent of any moving
entity.
X3D-Edit has pretty good support including
sender-receiver-tester-recorder-player tools. It works, we ran it many
times in class last quarter, tested with WireShark, etc. etc.
Further references for people who want to read ahead:
a. IITSEC 2017 slideset, DIS 101
https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/raw/master/presentatio
ns/IITSEC2018_DIS_Tutorial.pptx
b. X3D and Distributed Interactive Simulation (DIS)
http://x3dgraphics.com/slidesets/X3dForAdvancedModeling/DistributedInteracti
veSimulation.pdf
c. X3D v3.3 Distributed interactive simulation (DIS) component
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components
/dis.html
d. IEEE Standards Maintained by SISO SAC
https://www.sisostds.org/ProductsPublications/Standards/IEEEStandards.aspx
The protocol is quite mature, evolving since early 1990s. Multiple
commercial players.
Our team is "getting back up on the horse" and gradually rejuvenating the
OpenDIS implementation. It has code generators for API binding in multiple
programming languages (Java JavaScript C++ C# others). We are working
through examples and fixing them in a pair of courses, 3-months into a
12-month cycle. Initial bindings existed in X3DOM at some point, not sure
of their current status.
You are asking good questions, n.b. that good answers exist too. Too bad
others didn't follow through "back in the day" but certainly happy that you
are pursuing this. IMO it has huge potential value, especially as we make
progress on using Javascript inside HTML to bridge to web services or other
connections rather than UDP multicast.
I expect that sometime after Web3D 2018 Conference we will have our internal
work ready for broader sharing. Can you wait until then? We will be keen
to help and test together - sounds like a great student team project
actually. Topmost priorities right now include HAnim spec and Motion node,
other OpenDIS work is slowly progressing and will help.
Step by step, again thanks...
v/r Don
On 4/6/2018 11:33 AM, GPU Group wrote:
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/comp
> onents/dis.html Q1. should DIS be dropped from future specs Q2. is
> there a more web3d-like way to do something like it?
> -Doug
>
>
> I can see why this isn't widely implemented.
> x half-baked - looks like student papers - just a prototype or proof
> of concept x only one implents it -xj3d-, and I have yet to see it run
> with DIS nodes (it whitescreens on me when run from x3d-edit), so
> difficult to reverse engineer fuzzy concepts x the flavor of some
> nodes like radio transmitter, receiver, signal seems too specific/high
> level compared to the rest of web3d which is more about general
> capabilites that can be combined flexibly in many permutations x the
> DIS specs are very 1990s like x DIS specs are big
>
> But it also seems to fill some gaps versus EAI:
> * node level synchronization (versus EAI access via rootnode > tree)
> **- so easier to bury inside proto bodies
> * wireline protocol
> ** so compatible among any browsers or utilities that implement the
> protocol
> * no server -peer-to-peer, nothing bad happens if peers join or leave
>
> And it has problems:
> - using broadcast udp means no ACK / resend if packet lost
> - better at regular / heartbeat updates
> -- if one is dropped, just wait a few seconds
> -- if peer joins late, just wait a few seconds x, poor at one-time
> state intializations / transfers xx if packet lost, DIS spec full of
> bandaids for this issue xx if peer joins late, awkward
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
From yottzumm at gmail.com Mon Apr 9 19:09:23 2018
From: yottzumm at gmail.com (John Carlson)
Date: Mon, 9 Apr 2018 22:09:23 -0400
Subject: [x3d-public] JSON import added to X3DJSAIL. Take off TODO
In-Reply-To: <85117d5a-1f41-3719-e0db-4b89482b0ad0@nps.edu>
References: <5a92a96b.531bc80a.31e4e.57ad@mx.google.com>
<85117d5a-1f41-3719-e0db-4b89482b0ad0@nps.edu>
Message-ID: <5acc1cd1.f338c80a.78fa1.a7a9@mx.google.com>
I documented the code in java/src/net/coderextreme and java/nashorn/node. The rest of the code isn?t mine I think.
We need to figure out a way to load Nashorn in the classpath from Nashorn. I?ve tried adding a leading /. Putting it in a jar doesn?t seem to help so far.
The nashornFolder is properly set to nashorn. The issue is in the JavaScriptSerializer.js and outputs from it.
Rats. ?
John
Sent from Mail for Windows 10
From: Don Brutzman
Sent: Sunday, April 1, 2018 11:30 AM
To: John Carlson
Cc: x3d-public at web3d.org
Subject: Re: JSON import added to X3DJSAIL. Take off TODO
Similar request: let's build a few examples, then help me document X3DJSAIL correctly/consistently with X3DJSONLD.
Perhaps we should plan a special breakout teleconference on these techniques? Or stick to monthly X3D Working Group teleconference focus? Whatever works. Again thanks.
On 2/25/2018 4:17 AM, John Carlson wrote:
> With net/coderextreme/X3DJSONLD.java, JSON import has been taken of the TODO list for X3DJSAIL. Please update:
>
> http://www.web3d.org/specifications/java/X3DJSAIL.html
>
> It still needs to be tested more? extensively, but initial versions are working under java/nashorn/examples.
>
> Thanks,
>
> John
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From andreasplesch at gmail.com Mon Apr 9 19:40:05 2018
From: andreasplesch at gmail.com (Andreas Plesch)
Date: Tue, 10 Apr 2018 02:40:05 +0000
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To: <76ede8e9-c92c-e2b2-e560-74a3777b247c@nps.edu>
References:
<5ac7d3cc.0229ed0a.19e1.cbf9@mx.google.com>
<76ede8e9-c92c-e2b2-e560-74a3777b247c@nps.edu>
Message-ID:
Thanks for chiming in, Don, considering first principles.
>From a hardware/software perspective, I think it is impossible to not
recognize the large evolution from early VRML times to today which ought to
be reflected somehow in X3D.
Another way to approach the question if there is an opportunity or if such
an idea is just a distraction, is to consider why there is not a SFInt16 or
SFInt8 type. The thinking at the time may have been that there is a need
for integers for indices but also a need to keep it simple and only have a
single one, int32. On the other hand, for floats let's have both 32 and
64bit.
Ist there a time when this reasoning becomes obsolete and there is a call
for a higher level of abstraction ? Can a browser be smart enough to decide
how numbers are internally represented for various purposes so an author
does not have to be concerned about that ?
Reconsidering, a first step may be to simply rename SF/MFInt32 to SF/MFInt
and leave it up to the browser how many different integers it can represent
?
To ease such a transition both names can coexist for a while.
-Andreas
On Sun, Apr 8, 2018, 7:29 PM Don Brutzman wrote:
> Appreciate the thoughtful inquiry, thanks colleagues. A few more points:
>
> a. Hardware. X3D is designed to run across an exceptionally wide range of
> devices in a performant way. The original scene graph was designed when
> every single triangle counted, and we have been diligent about maintaining
> graphics-performance rigor throughout its evolution, so X3D is efficient.
> Many computing hardware platforms are quite necessarily strict about the
> handling of integers/floats/doubles based on memory, processing
> performance, and power consumption.
>
> b. Software. X3D is designed to run across an exceptionally wide range of
> programming and processing environments. Thus if a JavaScript
> implementation wants to treat all numbers equivalently, or defer
> typecasting until data gets transferred to hardware, or whatever, that is
> OK and doesn't impede other implementations. The X3D abstract
> specification describes functionality of rendering and interaction, not
> reference software implementations.
>
> c. Data or code. X3D is designed to be workable both as a file encoding
> or as a programming-language binding with functional equivalence. The X3D
> Unified Object Model work is capitalizing on that... more to follow once we
> get through HAnim updates, venture into C++/C#/Python programming, etc. etc.
>
> d. Disclaimer: I think that typing is incredibly valuable because it
> reveals errors. Many such errors are otherwise undetectable, so typing is
> an important aspect of model Quality Assurance (QA).
>
> e. Portability of reusable models. So feel free to pursue X3D generation,
> presentation and interaction using the best implementation approach you
> want... YMMV. Also know that portability of X3D scenes across all of these
> other platforms/formats/languages/methodologies can (and typically will)
> work equivalently when deploying valid X3D model content.
>
> Have fun with X3D! 8)
>
> all the best, Don
> --
> Don Brutzman Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From michalis.kambi at gmail.com Mon Apr 9 21:15:04 2018
From: michalis.kambi at gmail.com (Michalis Kamburelis)
Date: Tue, 10 Apr 2018 06:15:04 +0200
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References:
<5ac7d3cc.0229ed0a.19e1.cbf9@mx.google.com>
<76ede8e9-c92c-e2b2-e560-74a3777b247c@nps.edu>
Message-ID:
2018-04-10 4:40 GMT+02:00 Andreas Plesch :
> Another way to approach the question if there is an opportunity or if such
> an idea is just a distraction, is to consider why there is not a SFInt16 or
> SFInt8 type. The thinking at the time may have been that there is a need for
> integers for indices but also a need to keep it simple and only have a
> single one, int32. On the other hand, for floats let's have both 32 and
> 64bit.
Note that it is a reasonable optimization to pack mesh indexes into
8-bit or 16-bit integers, instead of full 32-bit integers. Even today,
with incredibly fast GPUs :)
Looking at others:
- glTF 2.0 allows providing indexes as 8-bit or 16-bit integers
(https://github.com/KhronosGroup/glTF/tree/master/specification/2.0
allows to use UNSIGNED_SHORT, UNSIGNED_BYTE as an alternative to
UNSIGNED_INT for indexes).
- And the APIs -- like OpenGL[ES], WebGL, Three.js -- all allow
indexes to be 8-bit or 16-bit integers, not only 32-bit integers.
- Unity3d explicitly advices using 16-bit indexes for meshes, not 32:
https://docs.unity3d.com/Manual/FBXImporter-Model.html : "Note: For
bandwidth and memory storage size reasons, you generally want to keep
16 bit indices as default, and only use 32 bit when necessary." . Note
that it's a new setting -- before 2017, Unity3d was *forcing* to use
16-bit indices, limiting all mesh sizes to 64k chunks, and there
wasn't even an option to use 32-bit indices.
- In Castle Game Engine, we use 16-bit indexes for rendering on
OpenGLES (mobile) and for all 2D user-interface rendering. We keep
using 32-bit indexes on desktop OpenGL for 3D rendering.
I'm not proposing to introduce MFInt16 to X3D :) But I wanted to note
that "the size of integers still matters for GPUs". While the hardware
is incredibly faster than it was 20 years ago, some of the "old"
optimizations still matter. The gain you get from using smaller types
still matters when you have a large mesh data and need to send it fast
to GPU. ("coordIndex" expressed using 16-bit ints is 2x smaller than
32-bit ints, "Coordinate.point" expressed using half-floats is 2x
smaller than 32-bit floats and so on.)
Regards,
Michalis
From yottzumm at gmail.com Tue Apr 10 00:21:10 2018
From: yottzumm at gmail.com (John Carlson)
Date: Tue, 10 Apr 2018 07:21:10 +0000
Subject: [x3d-public] remove SF/MFInt32 ?
In-Reply-To:
References: