Turntool官方操作手册中英文对照
Figure 45: Setting Rendering Parameters For Shadow Map
You can play around with the size and position of the shadow plane to place it just right. When you are satisfied, export as TNT file and view the results (figure 46).
45. 设置Rendering Parameters For Shadow Map
随意选择或调试阴影平面的尺寸和位置直至最佳状态,导出TNT 文件,查看结果。(步骤46)
Figure 46: The Finished Model
46. 完成模型
Part Three: Scripting
In this part you will modify the JavaScript of the HTML file to make the model respond to mouse actions.
Open your file manager (like explorer) and browse to the generated files. Make a copy of the HTML file (in thesame folder) and rename it to something else. Open the copy in a text editor (such as Notepad). If you are not familiar with HTML code, the contents of this file may seem a bit overwhelming at first. We will concentrate our attention on the script section.
Skeleton handler functions for all TurnTool events are already present. This is what we want to do: The device should switch on/off when the on/off buttons are clicked.
Find the section looking like this:
第三部分:Scripting
在这部分中,您将修改HTML file的JavaScript,使模型对鼠标活动做出应答。用文件管理器(如explorer)浏览生成文件。在同文件夹内做一份HTML文件拷贝,注意另外命名。用文本编辑器打开拷贝(如Notepad)。如果您对HTML码比较生疏,一开始您会发现文本内容难以理解,这时我们可以集中精力在文稿部分。Skeleton handler的功能已经展示了所有TurnTool的活动需求。我们希望的是,当点击on/off键时,设备也能随即打开/关闭。操作部分如下:
Figure 47: Old onClick Function
This is the function "onClick". It is automatically activated each time every time the viewer clicks an object in the scene with the "Mouse Click" event property. If you want more details on JavaScript programming the Internet Explorer, a complete reference can be found in Microsoft's Developer Network http://msdn.microsoft.com.For now, replace the text above with this code:
47. onClick的原有功能
每当viewer点击图像中的一个景象时,onClick会被自动激活。想获得更多JavaScript程序信息,可以登陆http://msdn.microsoft.com获得更详尽内容。
Figure 48: New onClick Function
Briefly described, If the object clicked was 'navigate' this piece of code sets the frame of the object 'Screen' to 0 or 1 depending on what it currently is. If the object clicked was 'on' or 'off', it activates the animation of the object 'ScreenCover'. It will play it forwards to frame 10 (full on), or backwards to frame 0 (full off) from the current frame.
Save the HTML file and double click it to open it in Internet Explorer. You can now click the on/off buttons to switch the device on/off.
Return to Notepad and open the HTML file again.
Find the section looking like this:
48. onClick Function新功能
简述如下:如果点击的对象呈阴性,该条密码设定'Screen'的frame取0或1由现状决定.如果点击对象'on' 或 'off',则会激活动画'ScreenCover',当前frame状态继续向前移至frame 10,或退后移至frame 0。保存HTML文件,双击打开用Internet Explore浏览,这时您可以点击on/off来打开/关闭设备。回到Notepad,再次打开HTML文件,该部分如下:
Figure 49: Old Mouse Enter & Exit Function