Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Viewpoint Scene Builder    displaying different textures via java script

Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
<jason>
Posted
Hi,
Very new to this all, trying to place different textures on my 3d model via java script, for example when you click on a texture image it would display this on my 3d cube etc.
Any help would be very much appriciated..
Thx
 
Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of duncan
Posted Hide Post
Hi Jason,

Here's an example, just replace the HTML buttons with your thumbnail images.

example:

http://3w3d.com/vet/textureChanger3/

source:

http://3w3d.com/vet/textureChanger3.zip

HTH,
Daimen
 
Posts: 381 | Registered: January 24, 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Sundar
Posted Hide Post
Hi you can do it by the following mannure. First apply some initial texture to the object some already generated code like this. and it will have time line to load the texture like this one. and have java function like the following to chage the path.and run the time element once again.


XML CODE:
  
	<MTSTimeElem Type="MTSImageStream"  Name="Change_texture_top"  Path="../image/BOX_plain.jpg" >
		<Target Name="MTSTexture.BOX_TEXTURE_1" />
	</MTSTimeElem>



Java Function:

function change()
{			
vmp.SetProperty('Change_texture_top'  ,  'Path'  ,   newstr);
vmp.TriggerAnim('Change_texture_top');
}


I hope now u can do it.


R.Sundar
 
Posts: 21 | Location: Chennai,India, Asia. | Registered: April 05, 2004Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Viewpoint Scene Builder    displaying different textures via java script