Lesson 77 - JavaScript-Powered Web 3D - Part 1
Lesson 77 - JavaScript-Powered Web 3D - Part 1
we've been previewing the soon-to-be released Shou 3D Models 1.0. This remarkable package (as I cannot repeat too often) allows developers to embed a realtime, interactive 3D rendering engine directly into a Web page, without any plug-ins. Shout3D uses a Java applet as the 3D player, and therefore makes use of the full programming power of the Java language to realize unlimited possibilities for user interactivity. I hope to have the final word on the release date of this important package in the near future.
Java programming, however, is not a skill that the average 3D artist (or even the average Web developer) is likely to have. Many interested people may well be impressed with Shout3D, but doubt (or even dismiss) their own ability to learn this toolset. Of course, a great deal can be done with Shout3D with very little programming, and, if no interactivity is required, no programming at all. But it's fair to say that solid commercial applications for 3D on the Internet depend on strong user interactivity, and this, of course, requires coding.
Thus, I was very excited to learn how much can be achieved with Shout 3D Models using JavaScript instead of Java. JavaScript is the standard scripting language of Web development, and a far larger number of people know JavaScript than Java. JavaScript is easy to learn and fun to experiment with. No compiler or development environment is required. You just type code onto the HTML page and view the page to test it. The browser interprets the code and kicks back error messages to help you debug. By using JavaScript, you can get started in Shout3D fast, and pick up Java as needed.
I'd always wondered about the name "JavaScript." It seemed to have nothing much to do with the true Java language. But, as it turns out, there is an important connection. If you have a Java applet on a Web page, you can call the functions (methods) of that applet from JavaScript functions elsewhere on the page. This makes it easy to add interactivity to applets, as we'll soon see.
To understand the situation, I'll start by creating interactivity in the applet itself (using Java), rather than by using JavaScript outside the applet. The following applet loads a looping animation file created in 3D Studio MAX and exported to VRML.Click in the applet window to start the animation. Then click again to stop it. This is just a simple toggle--but it's still very impressive to see it running on a Web page!
Keyframed animation in Shout 3D Models is driven by a TimeSensor, a node right out of VRML. When the TimeSensor is started, the animation begins. At this point, we must distinguish between stopping and pausing the TimeSensor. If we pause the TimeSensor after it has started, we can unpause it to continue the animation. But if the animation is stopped, it can only be restarted from the beginning. Thus the toggle in this applet starts the animation, and then just pauses and unpauses it.
Let's take a look at the code.
Video Internet Marketing Tips for 2011 LG 46LD550 46-Inch 1080p 120 Hz LCD HDTV with Internet Applications Review Home Tuition Malaysia And Internet Training White Label Internet Marketing – Basics of SEO Marketing The Fundamentals Associated With Email Marketing As Well As Your Internet Business MLM Prospects - Prospects Will Chasing You About Your Network marketing business! World wide web Advertising and marketing Ideas - Discover How to Make Extra Money From the internet Undertaking the Things you Really enjoy! How to Make Money Online – Free Internet Marketing Course Download The Green Hornet Free 2010 Online Download No Strings Attached free Streaming Earn $10,000 A Week In Your Underwear - Internet Marketing Promises To Trust? Truth Revealed Network Marketing Success In The 21st Century Download Sanctum Megavideo Movie Links
www.yloan.com
guest:
register
|
login
|
search
IP(3.133.117.5) Michigan / Ann Arbor
Processed in 0.008146 second(s), 7 queries
,
Gzip enabled
, discuz 5.5 through PHP 8.3.9 ,
debug code: 14 , 3100, 49,