|
DevalVR
-
internal programming language
Available functions to use with BUTTON,
NODO, NODO1, and other script instructions (into "code" parameter).
All functions in alphabetic order:
CameraValue Fade GoToFrame IniSequence JavascriptEvent LoopSequence NextFrame OpenURL PlaySequence PrevFrame Show ShowCursor StartDrag StopDrag StopSequence ToolCommand
GoToFrame( frameName );
This function loads
a new scene in the viewer.
frameName:
The name of the object in the script.
Example:
GoToFrame("panorama2");
NextFrame ();
This function loads the next scene defined in the
script to current scene.
Example:
NextFrame();
PrevFrame ();
This function loads the previous scene defined in the
script to current scene.
Example:
PrevFrame();
OpenURL( url, target );
This
function opens a new browser page with specified url.
url: Adress to open target:
"_blank" to open a new browser window, "_self" to open the url in current window,
or "_parent" to open the url in parent browser window.
Example:
OpenURL("http://www.devalvr.com","_blank");
ToolCommand( numTool );
Executes a tools bar function.
numTool: Number of tool to
execute:
0 1 2 3 4 5 6 |
Initial zoom Increment zoom Decrement zoom Full
screen External window AutoPlay Manual
movement |
Example:
ToolCommand(3);
Show( frameName, objetName, value, groupName );
Shows of hides an object
in selected frame.
frameName
: The name of the frame that contains the object. If this value
is "_this_", the object is into current frame. If this values
is "_all_", the object with the name "objectName" in all frames of the
script will be modified. objectName: The name
of the object. value: 0 (hide)
or 1 (show) groupName: The name of group of
the object. If this parameter is "", then this function is applied to any
group. To specify all objects of the group, set objectName to
"". Example:
Show( "_all_", "button1", 0, "" );
Fade( frameName, objetName, alphavalue, time, groupName );
Change alpha (transparency) value of an object
in selected frame.
frameName
: The name of the frame that contains the object. If this value
is "_this_", the object is into current frame. If this values
is "_all_", the object with the name "objectName" in all frames of the
script will be modified. objectName: The name
of the object. alphavalue: from
0 (transparent) to 100 (totally
opaque) time: Time in seconds to do the
transition from current alpha value to defined alpha value.
This value defines the theoretical transition from 0 to
100. For example, if this time is 5 seconds, current alpha
is 80, and target alpha value is 100, the transition time
in the viewer will be 1 second. groupName: The
name of group of the object. If this parameter is "", then this function
is applied to any group. To specify all objects of the group, set
objectName to "". Example:
Fade( "_all_", "image1", 100, 5, "" );
CameraValue(
numCamera, variable, value, relative, acceleration);
Change a camera value.
numCamera: The
number of the camera.
Main camera has number 0. variable: The name of the value
to modify, can be: "x", "y", "z", "utmx", "utmy", "elevation", "rotx", "roty", "rotz" or
"zoom" value: Floating number to asign
to camera variable. If relative parameter is 1, this value will be
incremented in one second. relative: 0
(absolute) or 1 (relative) . This parameter indicates if parameter
"value" is an increment (relative) or an absolute
value. acceleration: 0 (disabled) or 1
(enabled). This parameter enables or disables the accelerated movement of
the camera.
Example: CameraValue( 0, "roty", 30, 1, 1);
PlaySequence(
numCamera, sequencename);
Starts a
sequence defined in the scene.
numCamera: The number of the camera. Main camera has
number 0. sequencename: The name of the
sequence, this is the name of an object defined with TYPE=SEQUENCE in a
script Example: PlaySequence( 0,
"sequence1");
StopSequence( numCamera
);
Stops a running sequence.
numCamera: The number of the camera. Main camera
has number 0. Example: StopSequence(
0, "sequence1");
IniSequence(
numCamera, startFromBegin );
Defines the
initial behavior of the camera when a sequence starts.
numCamera: The number of the camera. Main camera
has number 0. startFromBegin: Boolean value (0
or 1) to define if the camera starts from the beginning of the sequence or
from the closest point to current camera value. If 1, the camera moves to
the beginning of the sequence. Default value is 0 if this function is
not used. Example: IniSequence(
0, 1);
LoopSequence(
numCamera, number );
Defines the number of
times that the sequence will be repeated. When sequence ends, it begins
again from the beginning.
numCamera: The number of the camera. Main camera
has number 0. number: The number of cycles. If
this value is 0, the sequence is repeated
infinitely. Example: LoopSequence( 0,
2);
Showcursor(
bShow);
This function displays or
hides the mouse's cursor.
bShow: If
bShow is 1, the cursor is showed. If bShow is 0,
the cursor is hidden. Example:
ShowCursor(0);
StartDrag(
frameName, objetName, groupName);
This function starts the dragging
function of an object. When an object is dragging, its 2D coordinates are
modified with mouse cursor. Dragging is stoped with StopDrag
function.
frameName : The
name of the frame that contains the object. If this value is "_this_", the
object is into current frame. If this values is "_all_", the object
with the name "objectName" in all frames of the script will be
modified. objectName: The name of the
object. groupName: The name of group of
the object. If this parameter is "", then this function is applied to any
group. To specify all objects of the group, set objectName to
"". Example:
StartDrag("_this_", image,
"");
StopDrag( frameName, objetName,
groupName);
This function stops the dragging
function of an object, previously started with StartDrag
function.
frameName : The
name of the frame that contains the object. If this value is "_this_", the
object is into current frame. If this values is "_all_", the object
with the name "objectName" in all frames of the script will be
modified. objectName: The name of the
object. groupName: The name of group of
the object. If this parameter is "", then this function is applied to any
group. To specify all objects of the group, set objectName to
"". Example:
StopDrag("_this_", image,
"");
JavascriptEvent ( text
);
This function sends an event
to Javascript code. The event is a defined text that
is received by Javascript function ..._DoDVLCommands.
text
: The text that will be sent to Javascript
code
Example: JavascriptEvent("event1");
|