[X3D-Public] X3D to X3Dom > how store protoinstance fieldValues?

doug sanden highaspirations at hotmail.com
Sun Nov 30 07:56:25 PST 2014


Q. Where/how is a good way to store data that was previously in X3D ProtoInstance fields, so new html scripts can be written against it for x3dom?
Thanks,
-Doug
more..
In general, to store data in X3D, you can define a proto
<ProdoDeclare ...>
<field type name ..>
</ProtoDeclare>
<ProtoInstance ...>
<fieldValue name='' value='...our custom data...'>
</ProtoInstance>

Scripts in the proto can access the data.
Q. when converting animated scenes from x3d to x3dom, where's a good place to store our custom data?

more..

I'm converting my pet project from x3d to x3dom. It's, a virtual tour of a 100 year old townsite, recsontructed with virtual reality:
http://dug9.users.sourceforge.net/web3d/townsite_2014/townsite_withHud.x3d
It has 2 modes: a building tour, with a slidebar for the year (I animated buildings below ground if there era of existance doesn't match the slidebar year), and a photo tour - 100 year old photos scanned in and positioned in 3D space to their original location, with year, caption, description, and a transparency slidebar so you can see how well the building geometry behind the photo lines up with the photo details.
With about 100 photos and 50 buildings, there's lots of data to store, and I stored it in long fieldValues of my big animation proto.
Now for X3Dom I want to re-animate, taking out the x3d proto, and putting the slidebars and buttons in html outside the scene, and redo the script in html javascript. 
Here's what I have so far:
http://dug9.users.sourceforge.net/web3d/townsite_2014/townside_withHud_x3dom.html

Where's a good place to put these custom fields in html?
- if some of the fields are/could-be MF types, such as viewpoint pose parameters
- so that html scripts can access it
Q. is there an x3dom / html equivalent to a proto, just for storing custom data?
Q. or can I just define a custom html element and attributes without worrying about document validation schemas?  (I know just a little html)
Q. or should I embed it somehow within an html <script> element as static vars?
Q. or can/should I leave it in an Inlined x3d proto?

more..

In X3D, I stored a lot of parameters in fields of the protoInstance:
<ProtoInstance ...>
6 field values for photo tour: urls, viewpoint pose for each photo, cute name, description, and year/epoch of each photo:
<fieldValue name='urlstrings' value=' "photo1.jpg" "photo2.jpg" ...' />
..
3 fieldValues for buildings, era of building, name of building, SFNode of building
<fieldValue name='BuildingEras' value='1925.0 1965.0,  ...
...



 		 	   		  


More information about the X3D-Public mailing list