createVRMLfromString with an Inline Node ? 
Author Message
 createVRMLfromString with an Inline Node ?

HI

I can't attach a scenegraph on the fly with the createVrmlFromString()
function.

the createVrmlFromString() function is not hard to master but it seems to
refuses inline nodes.

I need however to use an Inline node in the string because the scene to load
(here 'masphere.wrl' is regulary updated by another process.

So far here is what I wrote in a script :

  newNode = new MFNode();
  sphereString = 'Transform {children [Inline { url  masphere.wrl }]}';
  Browser.createVrmlFromString(sphereString);
  print(newNode);

on the console (Blaxxun) I can see that the last line 'print(newNode);' only
displays : '[]' meaning the inline node has been ignored.

Is there a way to make it work please ?

Thanks



Mon, 04 Nov 2002 03:00:00 GMT  
 createVRMLfromString with an Inline Node ?

Quote:

>HI

>I can't attach a scenegraph on the fly with the createVrmlFromString()
>function.

>the createVrmlFromString() function is not hard to master but it seems to
>refuses inline nodes.

>I need however to use an Inline node in the string because the scene to
load
>(here 'masphere.wrl' is regulary updated by another process.

>So far here is what I wrote in a script :

>  newNode = new MFNode();
>  sphereString = 'Transform {children [Inline { url  masphere.wrl }]}';

Maybe you should add "  " around masphere.wrl, or even \"   \"

- Show quoted text -

Quote:
>  Browser.createVrmlFromString(sphereString);
>  print(newNode);

>on the console (Blaxxun) I can see that the last line 'print(newNode);'
only
>displays : '[]' meaning the inline node has been ignored.

>Is there a way to make it work please ?

>Thanks



Mon, 04 Nov 2002 03:00:00 GMT  
 createVRMLfromString with an Inline Node ?

Quote:

> Maybe you should add "  " around masphere.wrl, or even \"   \"

NO, unfortunately , I can't add " " since the line is included in a vrml
javascript and these "" would be understood as the end of the script!

if I use
sphereString = 'Transform {children [Inline { url  \"masphere.wrl\" }]}';

 blaxxun simply ignores the wrl file just as if I wrote
sphereString = 'Transform {children [Inline { url  masphere.wrl }]}';

So, I am stuck !
But there should exist one way to force the browser to reload a part of the
scene !!

Thanks anyway



Mon, 04 Nov 2002 03:00:00 GMT  
 createVRMLfromString with an Inline Node ?
Hi !

Why don't you simply use createVrmlFromURL ?
Use a Transform or Group node as container and add it to the scene .

DEF CONTAINER Transform{}

field MFString worldurl ["masphere.wrl"]
field SFNode container USE CONTAINER
.
function addMe(){
  Browser.createVrmlFromURL(worldurl,container,'addChildren');

Quote:
}

8-;

all the best,

Roland

   Roland Praehofer - webdesign.sound.virtual_environments


   web:http://www.memeticdesign.de
   tel:+49 30 827 029 77
   fax:+49 30 827 029 78

Quote:

> HI

> I can't attach a scenegraph on the fly with the createVrmlFromString()
> function.

> the createVrmlFromString() function is not hard to master but it seems to
> refuses inline nodes.

> I need however to use an Inline node in the string because the scene to load
> (here 'masphere.wrl' is regulary updated by another process.

> So far here is what I wrote in a script :

>   newNode = new MFNode();
>   sphereString = 'Transform {children [Inline { url  masphere.wrl }]}';
>   Browser.createVrmlFromString(sphereString);
>   print(newNode);

> on the console (Blaxxun) I can see that the last line 'print(newNode);' only
> displays : '[]' meaning the inline node has been ignored.

> Is there a way to make it work please ?

> Thanks



Tue, 05 Nov 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Adding ROUTEs to nodes in createVrmlFromString

2. Problem accessing eventIns of nodes made with createVrmlFromString?

3. DEF's nodes and createVrmlFromString(), createVrmlFromUrl(), and replaceWorld()

4. createVrmlFromString and linking new nodes to exisitng scene

5. inline node not working in cosmo 2.0/2.1????

6. Inline node and gzip compressed vrml files?

7. Help Required directing Events into Inline Nodes

8. How do I Route into Inline Nodes ?

9. Knowledge needed on INLINE NODE

10. Q: Texture2 node, WWW Inline and Live3D

11. problem with Inline node

12. java and .wrl with inline nodes

 

 
Powered by phpBB® Forum Software