📄 viewtopic.php.htm
字号:
<br />var test;
<br />
<br />var browser;
<br />var big = false;
<br />var strval;
<br />var trans;
<br />var radius;
<br />var ready = false;
<br />
<br />function InitPort()
<br />{
<br /> MSC.CommPort = 3; //Specifies COM3
<br /> MSC.Settings = "9600,N,8,1"; //2400 Baud, No Parity, 8 databits, 1 stopbit
<br /> MSC.SThreshold = 1; //Enable Tranmit Events
<br /> MSC.Rthreshold = 1; //Enable Receive Events
<br /> MSC.PortOpen = true; //Open Port
<br /> if (MSC.PortOpen)
<br /> alert("Port Opened Successfuly");
<br /> else
<br /> alert("Port failed to Open");
<br />}
<br />
<br />function doit()
<br />{
<br /> if (!ready)alert("not ready yet");
<br /> if (big){
<br /> strval.setValue(new Array("small ball"));
<br /> radius.setValue(.5);
<br /> trans.setValue(0,0,0);
<br /> }
<br /> else {
<br /> strval.setValue(new Array("big","ball"));
<br /> radius.setValue(2);
<br /> trans.setValue(0,1,0);
<br /> }
<br /> big = !big;
<br />}
<br />
<br />function wrlLoaded(){
<br /> browser = Venues.getEAIBrowser();
<br />
<br /> words = browser.getNode("WORDS-GEO");
<br /> strval = words.getExposedField("string");
<br />
<br /> transform = browser.getNode("TRANS");
<br /> trans = transform.getExposedField("translation");
<br />
<br /> sphere = browser.getNode("BALL");
<br /> radius = sphere.getExposedField("radius");
<br />
<br /> ready = true;
<br />}
<br /></script>
<br />
<br /><script for="MSComm1" event="OnComm" language="JavaScript">
<br /> if (MSC.CommEvent == 2) //Bytes received in Input Buffer
<br /> {
<br /> test = MSC.Input; //Move data from input buffer to 'test'
<br /> if(test == 114) //Data coming from Microcontroller
<br /> doit(); //Edit VRML scene
<br /> }
<br /></script>
<br />
<br /><script for="Venues" event="onWorldLoaded" language="JavaScript">setTimeout('wrlLoaded()', 100);</script>
<br />
<br /><br><br>
<br />
<br /><input type="button" name="doit" value="doit" onClick="javascript:doit()"></input>
<br />
<br /></body>
<br /></html>
<br /></td> </tr></table><span class="postbody">
<br />
<br /></span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed"><b>Code:</b></span></td> </tr> <tr> <td class="code">
<br />#VRML V2.0 utf8
<br />
<br />DEF TRANS Transform {
<br /> children [
<br /> Transform {
<br /> translation -3 0 -2
<br /> children Shape {
<br /> appearance Appearance {
<br /> material Material { diffuseColor 1 0 0 }
<br /> }
<br /> geometry DEF BALL Sphere {
<br /> radius .5
<br /> }
<br /> }
<br /> }
<br /> Shape {
<br /> appearance Appearance {
<br /> material Material { diffuseColor 0 0 1 }
<br /> }
<br /> geometry DEF WORDS-GEO Text {
<br /> string "small ball"
<br /> }
<br /> }
<br /> ]
<br />}
<br /></td> </tr></table><span class="postbody"></span><span class="gensmall"></span></td> </tr> </table></td> </tr> <tr> <td class="row1" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">Back to top</a></span></td> <td class="row1" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18"> <tr> <td valign="middle" nowrap="nowrap"><a href="profile.php?mode=viewprofile&u=486&sid=54f60a8cafbd0f857940068d6be591f0"><img src="templates/web3d/images/lang_english/icon_profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&u=486&sid=54f60a8cafbd0f857940068d6be591f0"><img src="templates/web3d/images/lang_english/icon_pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <a href="mailto:wvenhau@siue.edu"><img src="templates/web3d/images/lang_english/icon_email.gif" alt="Send e-mail" title="Send e-mail" border="0" /></a> <script language="JavaScript" type="text/javascript"><!-- if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 ) document.write(' '); else document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute"></div><div style="position:absolute;left:3px;top:-1px"></div></div>'); //--></script><noscript></noscript></td> </tr> </table></td> </tr> <tr> <td class="spaceRow" colspan="2" height="1"><img src="templates/web3d/images/spacer.gif" alt="" width="1" height="1" /></td> </tr> <tr align="center"> <td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0"> <tr><form method="post" action="viewtopic.php?t=443&start=0&sid=54f60a8cafbd0f857940068d6be591f0"> <td align="center"><span class="gensmall">Display posts from previous: <select name="postdays"><option value="0" selected="selected">All Posts</option><option value="1">1 Day</option><option value="7">7 Days</option><option value="14">2 Weeks</option><option value="30">1 Month</option><option value="90">3 Months</option><option value="180">6 Months</option><option value="364">1 Year</option></select> <select name="postorder"><option value="asc" selected="selected">Oldest First</option><option value="desc">Newest First</option></select> <input type="submit" value="Go" class="liteoption" name="submit" /></span></td> </form></tr> </table></td> </tr></table><table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> <td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="posting.php?mode=newtopic&f=1&sid=54f60a8cafbd0f857940068d6be591f0"><img src="templates/web3d/images/lang_english/post.gif" border="0" alt="Post new topic" align="middle" /></a> <a href="posting.php?mode=reply&t=443&sid=54f60a8cafbd0f857940068d6be591f0"><img src="templates/web3d/images/lang_english/reply.gif" border="0" alt="Reply to topic" align="middle" /></a></span></td> <td align="left" valign="middle" width="100%"><span class="nav"> <a href="index.php?sid=54f60a8cafbd0f857940068d6be591f0" class="nav">web3d.org Forum Index</a> -> <a href="viewforum.php?f=1&sid=54f60a8cafbd0f857940068d6be591f0" class="nav">X3D Specification and File Format</a></span></td> <td align="right" valign="top" nowrap="nowrap"><span class="gensmall">All times are GMT - 4 Hours</span><br /><span class="nav"></span> </td> </tr> <tr> <td align="left" colspan="3"><span class="nav">Page <b>1</b> of <b>1</b></span></td> </tr></table><table width="100%" cellspacing="2" border="0" align="center"> <tr> <td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall"></span><br /> <br /> </td> <td align="right" valign="top" nowrap="nowrap"><form method="get" name="jumpbox" action="viewforum.php?sid=54f60a8cafbd0f857940068d6be591f0" onSubmit="if(document.jumpbox.f.value == -1){return false;}"><table cellspacing="0" cellpadding="0" border="0"> <tr> <td nowrap="nowrap"><span class="gensmall">Jump to: <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ forms['jumpbox'].submit() }"><option value="-1">Select a forum</option><option value="-1"> </option><option value="-1">Developers</option><option value="-1">----------------</option><option value="1"selected="selected">X3D Specification and File Format</option><option value="7">Xj3D Toolkit & Browser</option><option value="3">GeoSpatial</option><option value="5">How to upgrade VRML97 applications to X3D</option><option value="2">Humanoid Animation (H-Anim)</option><option value="4">General XML Issues</option><option value="-1"> </option><option value="-1">Web 3D Philosophies and Non-X3D Topics</option><option value="-1">----------------</option><option value="6">Non-X3D discussions</option></select><input type="hidden" name="sid" value="54f60a8cafbd0f857940068d6be591f0" /> <input type="submit" value="Go" class="liteoption" /></span></td> </tr></table></form><span class="gensmall">You <b>cannot</b> post new topics in this forum<br />You <b>cannot</b> reply to topics in this forum<br />You <b>cannot</b> edit your posts in this forum<br />You <b>cannot</b> delete your posts in this forum<br />You <b>cannot</b> vote in polls in this forum<br /></span></td> </tr></table><div align="center"><span class="copyright"><br /><br /> </td> </tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0" background="templates/web3d/images/footer_bg.gif"> <tr> <td width="6%" align="right"> <a href="#top"><img src="templates/web3d/images/footer_backtotop.gif" width="44" height="62" border="0"></a> </td> <td width="94%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="34" align="center" background="templates/web3d/images/spacer.gif" class="copyright"> <!-- We request you retain the full copyright notice below including the link to www.phpbb.com. This not only gives respect to the large amount of time given freely by the developers but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good reason) retain the full copyright we request you at least leave in place the Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse to include even this then support on our forums may be affected. The phpBB Group : 2002 // --> Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group<br /></span></div> </td> </tr> <tr> <td background="templates/web3d/images/spacer.gif"> </td> </tr> </table></td> </tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="32" background="templates/web3d/images/footer_2_bg.gif"> </td> </tr> <tr> <td height="32" background="templates/web3d/images/spacer.gif"> </td> </tr></table> </div> <!-- /entry --></div> <!-- /maincontent --> <div id="footer-frame"><div id="copyright"> </div> <div id="footer"><p class="footer-nav"><a href="http://www.web3d.org">Home</a> | <a href="/about/" >About X3D</a> | <a href="/x3d/">X3D Developers</a> | <a href="/news/">News & Events</a> | <a href="/membership/">Membership</a> | <a href="/contact/">Contact</a> </p> </div> <div class="clr"></div></div></div><!-- /container --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -