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
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 Example: OpenURL("http://www.devalvr.com","_blank");
ToolCommand( numTool ); Executes a tools bar function. numTool: Number of tool to execute:
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.
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.
CameraValue(
numCamera, variable, value, relative, acceleration);
numCamera: The
number of the camera.
Main camera has number 0. Example: CameraValue( 0, "roty", 30, 1, 1);
PlaySequence(
numCamera, sequencename); numCamera: The number of the camera. Main camera has
number 0.
StopSequence( numCamera
); numCamera: The number of the camera. Main camera
has number 0.
IniSequence(
numCamera, startFromBegin ); numCamera: The number of the camera. Main camera
has number 0.
LoopSequence(
numCamera, number ); numCamera: The number of the camera. Main camera
has number 0.
ShowCursor(
bShow); bShow: If
bShow is 1, the cursor is showed. If bShow is 0,
the cursor is hidden.
StartDrag(
frameName, objetName, groupName, movetocursor, offsetx, offsety,
margin); 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.
StopDrag( frameName, objetName,
groupName); 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.
ResetDrag(
frameName, objetName, groupName); 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.
JavascriptEvent ( text
); text
: The text that will be sent to Javascript
code
Transition( frameName,
enableInitialPosition, percentageLoaded, duration,
type); With this function only the effect for a determinate frame is defined. This is not the same than in TRANSITION script instruction, because TRANSITION script instruction defines the effect for all the entire script. frameName
:
The name of the frame where the transition is defined.
If this value is "_this_", the effect is defined in current
frame. percentajeLoaded: This parameter defines the percentage loaded in
the next scene when transition effect will begin.
"blend" : Blend effect from the current scene to the next.
Load
(objetName, fileName); objectName : The name of the
object in the script, this must be an image or any other resource defined in the
script.
Unload
(objetName); objectName : The name of the
object in the script, this must be an image or any other resource defined in the
script.
EnableAnaglyph(
enable); enable: If enable is 1, the anaglyph images are enabled. If
enable is 0, this feature is disabled.
SetProjection(
projection); projection: This is the name of the projection that will be used. The available values are: "spherical", "cylindrical" or "stereographic" Example: SetProjection("stereographic");
ObjectValue( frameName, objectName,
groupName, property,
value); 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. value: The value to assign to the property. This value can be a number or a text string, the type depends of the property to assign. Example: ObjectValuet("","text1","","description"," This is a text value to assign to 'text1' object ");
FrameValue( frameName, property,
value); frameName : The name of the frame to
define the property. If this value is "_this_" or empty "", the
property is assigned in current
frame. Example: FrameValue("", "minzoom", 0.6);
SetFile ( filename
); filename: The name of the new file to
load. This file could be any file supported by the viewer, a
single picture or a script
file.
PlaySound ( objectName ,
loop); objectName : The name of the object in the script, this
must be a sound resource defined in the script with
type=SOUND.
StopSound ( objectName
); objectName : The name of the object in the
script, this must be a sound resource defined in the script with
type=SOUND.
PauseSound ( objectName
); objectName : The name of the object in the
script, this must be a sound resource defined in the script with
type=SOUND.
ResumeSound ( objectName
); objectName : The name of the object in the
script, this must be a sound resource defined in the script with
type=SOUND.
VolumeSound ( objectName, value, channel
); objectName : The name of the object in the
script, this must be a sound resource defined in the script with
type=SOUND. Example: VolumeSound("sound1", 50, "all");
PlayerWindow ( command
); command : The name of the command. This must be one of the next predefined commands: "close","move", "resizeleft", "resizeright", "resizetop", "resizetopleft", "resizetopright", "resizebottom", "resizebottomleft", "resizebottomright", "minimize", "maximize" Note: Some of the commands is better to start them in "click" event of elements, because the release of the mouse's button provokes a default stop of the command. Example: PlayerWindow("close");
|