- 最后登录
- 2022-10-8
- 注册时间
- 2010-12-6
- 阅读权限
- 100
- 积分
- 14150
  
- 纳金币
- 76544
- 精华
- 23
|
代码:
<script type="text/javascript" language="javascript">
function***n_timer()
{
var x = Math.floor(Math.random()*21);
var y = Math.floor(Math.random()*21);
var z = Math.floor(Math.random()*21);
var cmd = "(SetObjectLocation #Teapot# "+x+" "+y+" "+z+")"; //Teapot 模型的名字
EspViewer.SendAPICommand(cmd);
setTimeout("***n_timer()", 200);
}
function init()
{
setTimeout("***n_timer()", 3500);
}
</script>
——————————————————————————
Version: 3.7
Running As: ActiveX Webpage
利用JavaScript 控制模型的坐标
说明:
The 'SendAPICommand' function is used to send Lisp/CScript commands to the Esperient Creator Viewer ActiveX control from .html pages
|
|