万创VR淮北VR 知识
不断更新有关VR全景拍摄、制作等知识,以供新手学习。

krpano1.21.2中最新actions中文对照表

查了网上很多有关于kdrpano的习资料都要付钱,这里整理了1.21.2版本中有关于actions的对应表,希望对大家有用。

def(variable, type, value*)                   //定义变量,

set(variable, value)                    //给变量赋值
set(object, variable:type=value, variable:type=value, ...)         //多个(类型无object)

action( get(variable), ... )  or  action( *variable, ... )        // 获得变量值

copy(destination, source, typeconversion*)         //变量之间传数量,或

delete(variable, ...)                    //删除并移除给定的变量

if(condition(条件), then-actions(条件为真时执行), else-actions(条件为假时执行) *)    //条件判断语句, 多条语句时用”;”隔开
if(condition, then-actions, else-if-condition*, then-actions*, else-actions*)

delayedcall(delay, actions)
delayedcall(id, delay, actions)                //延迟执行,ID可选
stopdelayedcall(id)                     //停止延迟搜索,对应上面delayedcall()

callwhen(condition, actions)
callwhen(id, condition, actions)                //当条件为真时执行,不为真一直等待
stopcallwhen(id)                    //停止调用对应上面callwhen

for(startactions, condition, nextactions, loopactions)        //for循环

loop(condition, loopactions)                //loop循环
asyncloop(condition, loopactions, doneactions*)

renderloop(loopactions)                //渲染循环,每一帧循环,只有stoprenderloop停止。
stoprenderloop()

break()                        退出循环        停止调用
exitcall()                        退出调用        终端调用

setinterval(id, delay, actions)                //定时重复执行
clearinterval(id)

toggle(variable)                    // true与false切换

switch(variable)                    //数据切换    ,同toggle        
switch(variable, value1, value2, ...)            //按顺序赋值(点一次给一个值)            

callwith(caller, actions)                对象调用

scope(scope, actions)    scope:globle全局,local局部,localony仅当前,parent    //调用范围,设置变量在特定范围内被调用

parentscopeset(variable, value)                //同set(),可将局部变量转父级

linkeventscope(element)                //当前局部范围

assignstyle(elementname, styles)                //将多个样式复现到新的对象上,多个样式用|隔开

copyattributes(destobject, srcobject)            //复制对象所有属性值,需要用get()    

events.dispatch(eventname, instantly*)  instantly:true|flase    //调用所有的事件

add(variable, valueA, valueB*)    +
sub(variable, valueA, valueB*)    -
mul(variable, valueA, valueB*)    *    
div(variable, valueA, valueB*)    /
mod(variable, valueA, valueB*)    整除
pow(variable, valueA, valueB*)    次方

inc(variable, byvalue*, max*, min*)            //增加
dec(variable, byvalue*, min*, max*)            //减少

clamp(variable, min, max)                将变量限制在一个范围内。

roundval(variable, decimalplaces*)            //四舍五入
roundval(destinationvariable, variable, decimalplaces)

tohex(variable, prefix*, length*)            //换为十六进制字符串
tohex(destinationvariable, variable, prefix, length)

tolower(variable)                //字符大小写转移
toupper(variable)
tolower(destinationvariable, sourcevariable)
toupper(destinationvariable, sourcevariable)

txtadd(destination, txt1, txt2*, txt3*, ...)        //字符串链接

subtxt(dstvar, srcvar, startpos, len)        //提取字符串

indexoftxt(index, txt, searchtxt, startindex*)        //字符串第一次出现的位置

txtreplace(var, searchtext, replacetext)        //字符串替换
txtreplace(dstvar, srcvar, searchtext, replacetext)

txtsplit(string, separator, resultingarray)        //字符串分割
txtsplit(string, separator, var1, var2, ...)

txtjoin(var, separator, array)            //链接字符串,并每个字符之间加分割符
txtjoin(var, separator, var1, var2, ...)
fromcharcode(var, charcode)            //字符代码,转成字符串

escape(var)                        //字符串转义
escape(var, text)
unescape(var)
unescape(var, text)

tween(variable, value, time*, tweentype*, donecall*, updatecall*)        //渐变
stoptween(variable, ...)

loadpano(xmlpath, vars*, flags*, blend*, loaddone*)
loadscene(scenename, vars*, flags*, blend*, loaddone*)
loadpanoscene(xmlpath, scenename, vars*, flags*, blend*, loaddone*)
loadpanoimage(flags*, blend*, loaddone*)
loadxml(xmlstring, vars*, flags*, blend*, loaddone*)

includexml(url, loaddone*)                    动态加载xml文件
includexmlstring(string, loaddone*)

loadjs(url, loaddone*, loaderror*)                    加载JS文件

openurl(url, target*)                        打开url

lookat(h, v, fov*, distortion*, architectural*, pannini*)            查看对应位置(无动画)

lookto(h, v, fov*, motiontype*, shortestway*, nonblocking*, donecall*)    移动到对应位置
looktohotspot(hotspotname, fov, motiontype, shortestway)        移动到对应热点位置
moveto(h, v, motiontype*)
zoomto(fov, motiontype*)

stoplookto() 对应上面

adjust360(source_ath, target_ath)

getlooktodistance(result, toH, toV, fromH*, fromV*)            //观察点之间的球面距离

wait(parameter)                        //等待执行下一步

addlayer(name, varname*)       //动态增加图层
addplugin(name, varname*)      //动态增加图层
addhotspot(name, varname, renderer*)   //动态增加热点

removelayer(name, removechildren*)   //删除
removeplugin(name, removechildren*)   //删除
removehotspot(name)    //删除
addcssstyles(styles)                        //动态增加CSS样式


showtext(text,textstyle*)                    //文本显示,需要引用插件

trace()                            //调试,显示 需:dubugmod=”true”
debugvar()                            //调试,显示变量值,需:dubugmod=”true”
showlog(state*,position*)                                            //调试,显示日志,需:dubugmod=”true”
state:true|false|toggle切换, position(位置):bottom|top
fatalerror(errormessage)                                            //调试,显示在中间,显示自己的信息        

jscall( ...any Javascript code... )
jsget(variable, ...Javascript code... )
addcssstyles(styles)


http://huaibei.bn188.com/vr-zhishi_v240.html
淮北VR全景24小时服务热线
400-884-1855
手机/微信:13685213388
地址:新北区通江中路396号时代商务3号14楼
邮箱:service@bn188.com