[x3d-public] ProtoDeclarations via SAI ?

doug sanden highaspirations at hotmail.com
Tue Oct 25 14:16:10 PDT 2016


freewrl stores its protoDeclares and externProtoDeclares in binary proto (aka broto) form - almost the same as a protoInstance, except with a flag saying its 'not live' and with any contained protoInstances 'shallow copied' meaning they have no body.
ProtoDeclare name=A
Body {
  ProtoInsance name=B Body { -nada / blank / ziltch- }
}
}
Then when instancing an A, the body for contained instance name= B is filled in / deepened.
That keeps declares light with lazy/delayed recursive instancing.
That also implies if new SAI functions are designed for hacking Instances or Declares, they would work on either/both.
One idea is for browsers to have a built in 'stub' protodeclare, and a function to create it with a new name=, and add to the list of protodeclares.
Then a few functions for creating fields on it, and ISing, and shallow-instancing.


________________________________________
From: x3d-public <x3d-public-bounces at web3d.org> on behalf of doug sanden <highaspirations at hotmail.com>
Sent: October 25, 2016 3:00 PM
To: X3D Graphics public mailing list
Subject: Re: [x3d-public] ProtoDeclarations via SAI ?

Doesn't look promising.
I find the javascript SAI doc easier to read.
http://www.web3d.org/documents/specifications/19777-1/V3.3/index.html
x no way to create a protodeclare that I can see
x even if you created a blank one, doesn't look like there's a way to create fields and add them
Q. how do scene design tools do it?
H:  through a modified design-time SAI
-Doug
________________________________________
From: x3d-public <x3d-public-bounces at web3d.org> on behalf of Andreas Plesch <andreasplesch at gmail.com>
Sent: October 25, 2016 2:31 PM
To: X3D Graphics public mailing list
Subject: [x3d-public] ProtoDeclarations via SAI ?

I am working on adding Proto support for cobweb_dom. While adding/modifying ProtoInstances via the DOM is very useful (and seemingly working in a dev. branch), I am unsure about the possibility of adding/modifying(?) ProtoDeclarations via the DOM.

The SAI spec. seems to specify that this should be possible:

http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ProtoDeclarationHandling
http://www.web3d.org/documents/specifications/19777-1/V3.3/Part1/functions.html#t-ExecutionContextProperties

Wait ..

http://www.web3d.org/documents/specifications/19777-1/V3.3/Part1/functions.html#PrototypeServices

says that ProtoDeclarations cannot be instantiated (by SAI methods).

Does that mean it should not be possible to add/update ProtoDeclarations within a scene by an x3d script ? Is there an example script somewhere ? All ProtoDeclarations a scene can ever expect to use should be available when the scene is first loaded by the x3d browser ?

If not, it probably means that cobweb_dom should not try to do that as well (although it may be possible).

Any feedback welcome,

-Andreas

--
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org



More information about the x3d-public mailing list