x3dom / apps-modeling

Publicly Available Applications
Other
3 stars 3 forks source link

[ComponentEditor] Display a X3D file in the component editor #99

Open tpaviot opened 11 years ago

tpaviot commented 11 years ago

How is it possible to display an X3D file streamed to a string ?

yjung commented 11 years ago

I'd rather use an Inline node (cp. http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/networking.html#Inline): the X3D file can be seen as a resource on a server and via the Inline node, this resource is streamed and integrated by setting its 'url' field to the resource path.

yjung commented 11 years ago

Another, but not so nice, possibility is to use everything below the scene node of the streamed file as innerHTML of an already present group node.

tpaviot commented 11 years ago

@yjung is there any example about inline nodes somewhere ?

yjung commented 11 years ago

Yes, in the editors' index.html files it is used for loading the coordinate frame. But be aware of cross-origin issues when loading from external resources from other domains. See here for more information: http://x3dom.org/docs/dev/notes/cors.html