[x3d-public] JavaScript news from meeting with Don today.

John Carlson yottzumm at gmail.com
Mon May 25 17:50:26 PDT 2020


1.   We will only be promoting highly experimental use of a typesafe ES6
API on the server, at least until we research minifying or client-side
caching methods. 16MB is too large for downloads. Reducing the
implementations in interface code may help.  We can also research
interfaces with TypeScript.

2.  Don asked for examples of the ProtoExpander running. Note that 8 of
these do not generate good JavaScript, with the script processor. I did not
want to present JavaScript examples, because the API is extremely
experimental, but here goes:

Generated (run through protoexpander) examples are here:

https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/ppp

the *.json file have been run  through the ProtoExpander (no Protos are
present) and still contain the old script, I believe.  The *.js is expanded
script, with major modifications.

Here's the original source. Note the files in the ppp file are ones with
Protos originally in them:

https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/data

If you want try this yourself, use code similar to this script:

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/shell/runppp.sh


(use this script at your own risk--I don't know all the places it dumps
files).

Here's an experimental script with XML processing:

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


I haven't run this for a long time.

Here's the ProtoPreProcessor file which runs the Proto Expander on a list
of files:

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

Debugging is more helpful than "This doesn't work!"

Here's my current version of the ProtoExpander:

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

Thanks!

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200525/49c64334/attachment-0001.html>


More information about the x3d-public mailing list