kzwkt / jsc3d

Automatically exported from code.google.com/p/jsc3d
0 stars 0 forks source link

help regarding loading .md2 file #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
As i m new to javascript i need help upon loading different .md2 files on 
button click option.

What version of the product are you using? On what operating system?

Please provide any additional information below.
In ur md2viewer example u have got the canvas instance through model list.my 
requirement is to display a md2 file on button click.for example 
1)on clicking button1,1.md2 file should get loaded in the canvas.
2)on clicking button2,2.md2 file should get loaded in the canvas.
3)on clicking button3,3.md2 file should get loaded in the canvas.
and so on.
How can this be achieved.how can i code button onclick event.
kindly help me plz.
thanks in advance.

Original issue reported on code.google.com by roshini...@gmail.com on 15 Jul 2013 at 4:17

GoogleCodeExporter commented 9 years ago
If you already has an instance of JSC3D.Md2Player, say it is named md2_player, 
just call md2_player.replaceSceneFromUrls() in the button's onclick event 
handler, giving the corresponding md2 model's url and the skin's url. Jsc3d 
will begin to load and display the stuff.

The JSC3D.Md2Player.prototype.replaceSceneFromUrls() takes 4 parameters. The 
first one is the major md2 model's url; The second one is the url of the skin 
file for the major model; The third one is an attaching md2 model's url; The 
last one if the url of the skin file for the former. The last 3 parameters are 
optional.

By the way, since this topic is not an issue, we could discuss it with emails 
rather than in the issue list. I'm glad to provide any assistance or suggestion 
that can be helpul for your applications.

Original comment by Humu2...@gmail.com on 15 Jul 2013 at 7:22

GoogleCodeExporter commented 9 years ago
Thanks a lot for ur kind help.even i had the hesitation to post this query 
since it is not an issue.will contact u through mail hereafter

Original comment by roshini...@gmail.com on 15 Jul 2013 at 8:10