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
EnableAnaglyph
Fade
FrameValue
GoToFrame
IniSequence
JavascriptEvent
Load
LoopSequence
NextFrame
ObjectValue
OpenURL
PauseSound
PlayerWindow
PlaySequence
PlaySound
PrevFrame
ResetDrag
SetFile
SetProjection
ResumeSound
Show
ShowCursor
StartDrag
StopDrag
StopSequence
StopSound
ToolCommand
Transition
Unload
VolumeSound

 

 

 

 

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, movetocursor, offsetx, offsety, margin); 

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, "");

 

 

ResetDrag( frameName, objetName, groupName); 

This function reset the position of an object to its initial position.

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:  ResetDrag("_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");

 

 

Transition( frameName, enableInitialPosition, percentageLoaded, duration, type); 

This function define the effect in for the transition from a frame to another one. This transition effect is defined in the frame when the transition is started, this is, in the initial frame.

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.
 
enableInitialPositionThis parameter enables or disables initial positioning of the camera when the new frame is loaded.

percentajeLoadedThis parameter defines the percentage loaded in the next scene when transition effect will begin.
  
durationDefines the duration time in seconds for the transition effect.

typeDefines effect type for transition. This value must be one of the next defined words:

                                    "blend" : Blend effect from the current scene to the next.


Example:
  Transition("frame1", 1, 100, 3.0, "blend");

 

 

Load (objetName, fileName); 

This function loads a resource in the script. The object in the script could be defined as "unloaded" with LOADED script instruction. This function could be used to replace the resource loaded in any object in the script, for example, to load a diferent filename in a image object.

objectName :  The name of the object in the script, this must be an image or any other resource defined in the script.
  
fileName
:  The path to the file that will be loaded in the object. If this parameter is "" or not defined, then this function will load the object with the filename defined in the FILE script instruction of the object.
 
 
Example:  Load("image1", "images/imagefile.jpg");

 

 

Unload (objetName); 

This function unloads a resource in the script

objectName :  The name of the object in the script, this must be an image or any other resource defined in the script.
  
 
Example:  Unload("image1");

 

 

EnableAnaglyph( enable); 

This function enables or disables the anaglyps feature of the viewer. The feature can be enabled with QTVR object movies (.MOV). These anaglyph images can be seen with a 3D red-cyan glasses (or red-blue). The "3D effect" is more appreciable with objects movies of more than 100 horizontal photograms.

enable:  If enable is 1, the anaglyph images are enabled. If enable is 0, this feature is disabled.
 
Example:  EnableAnaglyph(1);

 

 

SetProjection( projection); 

This function sets the current projection in the escene. The parameter  projection is a text string with the name of the projection to use.

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); 

Sets the value of a property of any object in the scene. The object can be a text, image, button...

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 "".
 
property:  The name of the property to assign the value. The available properties are: "x", "y", "z", "rotx", "roty", "rotz", "rotation", "width", "height", "description". 

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); 

This function sets the current projection in the escene. The parameter  projection is a text string with the name of the projection to use.

frameName :  The name of the frame to define the property. If this value is "_this_" or empty "", the property is assigned in current frame.
  
property:  The name of the property to assign the value. The available properties are: "tilt", "pan", "zoom", "mintilt", "maxtilt", "minpan", "maxpan", "minzoom", "maxzoom", "mousemode", "horizonposition", "autoplay", "autoplayspeed", "velocity", "zoomvelocity", "acceleration", "bgcolor". 
 
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:  FrameValue("", "minzoom", 0.6);

 

 

SetFile ( filename ); 

Loads another file into the player.

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.
  
Example:  SetFile("script2.txt");

 

 

PlaySound ( objectName , loop); 

Starts to play a sound defined in the script like "type= SOUND".

objectName :  The name of the object in the script, this must be a sound resource defined in the script with type=SOUND.
 
loop
Boolean value (0 or 1) to define if the sound must be restarted when finished.
  
Example:  PlaySound("sound1");

 

 

StopSound ( objectName ); 

Stops a sound that was started with PlaySound function.

objectName :  The name of the object in the script, this must be a sound resource defined in the script with type=SOUND.
  
Example:  StopSound("sound1");

 

 

PauseSound ( objectName ); 

Pauses a sound that was started with PlaySound function.

objectName :  The name of the object in the script, this must be a sound resource defined in the script with type=SOUND.
  
Example:  PauseSound("sound1");

 

 

ResumeSound ( objectName ); 

Resumes a sound that was paused with PauseSound function.

objectName :  The name of the object in the script, this must be a sound resource defined in the script with type=SOUND.
  
Example:  ResumeSound("sound1");

 

 

VolumeSound ( objectName, value, channel ); 

Change the volume level of a sound.

objectName :  The name of the object in the script, this must be a sound resource defined in the script with type=SOUND.
 
value:  A percentage value from 0 to 100 to set the volume level.
 
channel:  The channel to assign the volume level. This parameter is optional and must be "all", "left" or "right".

Example:  VolumeSound("sound1", 50, "all");

 

 

PlayerWindow ( command ); 

Executes a command in the window of the standalone player.

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");