- 最后登录
- 2024-6-3
- 注册时间
- 2009-10-16
- 阅读权限
- 100
- 积分
- 18803
  
- 纳金币
- 17488
- 精华
- 1
|
Version: 3.7
Running As: ActiveX Webpage
利用JavaScript 控制模型的坐标
<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>
说明:用'SendAPICommand' 函数发送到Lisp/CScript 脚本中。
|
|