ParallelGraphics Forums
Cortona VRML Client
You are here: [Forums]::[Browsers]::[Cortona VRML Client]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
3D Page Of the Week
email:  password:
   Browsers - Cortona VRML Client

Subject: texture change via Javascript
Sender: lobprvit@gmail.com 28.04.09 09:25

Hi,
I've tried to find the answer here before post this. But I didn't find anything. Would you please help me?
I need to change texture on object created in VRML from webpage using javascript.

I have simple object in WRL

DEF Sphere01 Transform {
translation 0 0 0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor .23 .2 .43
         specularColor .32 .4 .4
         ambientIntensity .0733
         shininess .54
}
        texture DEF textura ImageTexture {
            url    ""
        }
}
geometry Sphere { radius 3.0 }
}
]
}


and in HTML I have

<embed SRC="koule.WRL"
type="model/vrml"
width="500"
height="600"
vrml_splashscreen="TRUE"
vrml_dashboard="TRUE"
vrml_background=""
contextmenu="TRUE" ></embed>

<input type="radio" name="textura" onclick="Engine.Node('textura').Fields("url").value = old-image.JPG" />
<input type="radio" name="textura" onclick="Engine.Node('textura').Fields("url").value = old-image.JPG" />

I need to change the texture to old-image.JPG or island-girl.JPG when I click on the radio button.
Can somebody help me please? I really need it.

 


texture change via Javascript / lobprvit@gmail.com / 28.04.09 09:25

Messages in thread: 1


© 1998-2009 ParallelGraphics. All rights reserved. Terms of use.