krpano 全景之内置函数 ---asyncloop roundval 等(不定期更新)
loopactions
The actions that will be repeatedly called / executed as long as the condition is true.
doneactions (optionally, asyncloop only)
The actions that will be called when the condition becomes false and the looping stops.
2.基本的函数运算(add、sub、mul、div、mod、pow)
==================================
add(variable, valueA, valueB*)
sub(variable, valueA, valueB*)
mul(variable, valueA, valueB*)
div(variable, valueA, valueB*)
mod(variable, valueA, valueB*)
pow(variable, valueA, valueB*)
Actions for mathematical calculations.
These actions can be used with 2 or3parameters:
with 2 parameters:
add(dst,val1)? =? dst = dst +val1 (like +
=)
sub(dst,val1)? =? dst = dst -val1 (like -=)
mul(dst,val1)? =? dst = dst *val1 (like *=)
div(dst,val1)? =? dst = dst /val1 (like /=)
mod(dst,val1)? =? dst = dst %val1 (modulate)
pow(dst,val1)? =? dst = dst ^ val1
with 3 parameters:
add(dst,val1,val2)? =? dst = val1+ val2
sub(dst,val1,val2)? =? dst = val1- val2
mul(dst,val1,val2)? =? dst = val1* val2
div(dst,val1,val2)? = ?dst = val1 / val2
mod(dst,val1,val2) ?= dst = val1 %val2 (modulate)
pow(dst,val1,val2)? =? dst = val1^ val2
Note - val1 and val2 can be values or variables. When val1 or val2 is a variable then automatically the content of the variable will be used!
//val1 和 val2 是可以为常量或者变量的
Parameters:
variable
The variable where the result of the calculation will be stored**.//生成的结果直接被存储起来。**
When the variable doesn't exists, it will be created.//如果没有定义直接创建一个
valueA / valueB (optionally)
The values or variables for the calculation.
3.roundval
roundval(variable, decimalplaces*)
Rounds the value of the variable to given decimal places (0 when not set).//在小数点后给定指定的数值的位数。如果不设置的话默认为 0
(Note - the variable will be a string internally after rounding) //四舍五入后的内部变量将是一个字符串
Parameters:
variable
The variable to be rounded.
decimalplaces (optionally)
The number of decimal places.
4.txtadd
========
没什么说的,在 destination 位置添加文本,如果多个参数的话就连在一起。
txtadd(destination, txt1, txt2*, txt3*, ...)
The txtadd action can be used to add/connect several texts / values together.
The action can be used with 2 or more parameters. When using only two parameters (destination and a text) then the text will be added to current value of the destination variable.
Parameters:
destination
The destination variable where the connected text will be stored.
评论