Open tpaviot opened 10 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.
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.
@yjung is there any example about inline nodes somewhere ?
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
How is it possible to display an X3D file streamed to a string ?