Difference between revisions of "Qmaze2D How To/en/functions"

From QmazeWiki
Jump to: navigation, search
(Other functions)
Line 1: Line 1:
 
[[Qmaze2D_How_To/en|''Back to the manual'']]
 
[[Qmaze2D_How_To/en|''Back to the manual'']]
  
<br />
+
<br /><br />
  
 
=='''Explanation per individual function'''==
 
=='''Explanation per individual function'''==
 
<br />
 
<br />
 +
Here you can find all the documentation for each individual functions.<br />
 +
How to use the functions, what they do and more.<br />
 +
<br /><br />
 
==='''Adding / Altering (existing) objects / images:'''===
 
==='''Adding / Altering (existing) objects / images:'''===
 
These functions can be used to add objects / images to the canvas. <br />
 
These functions can be used to add objects / images to the canvas. <br />
Line 267: Line 270:
 
setcolor('welcometext','red');<br />
 
setcolor('welcometext','red');<br />
 
When the object is a canvas the background color is changed to the given value.<br />
 
When the object is a canvas the background color is changed to the given value.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
  
Line 284: Line 290:
 
setdraggable('welcomeimg','1');<br />
 
setdraggable('welcomeimg','1');<br />
 
The value can either be 1 or 0, where 0 makes the object static and 1 makes the object draggable.<br />
 
The value can either be 1 or 0, where 0 makes the object static and 1 makes the object draggable.<br />
 +
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 302: Line 311:
 
In this example the animation duration is set to 1000ms (1 second).<br />
 
In this example the animation duration is set to 1000ms (1 second).<br />
 
The animation duration counts for all animations untill it is altered again.<br />
 
The animation duration counts for all animations untill it is altered again.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 321: Line 332:
 
In this example the animation type is set to InOutBounce, this makes the object 'bounce' at the end of an position change.<br />
 
In this example the animation type is set to InOutBounce, this makes the object 'bounce' at the end of an position change.<br />
 
The animation type counts for all animations untill it is altered again.<br />
 
The animation type counts for all animations untill it is altered again.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 339: Line 352:
 
sethandles('newrect','2');<br />
 
sethandles('newrect','2');<br />
 
Changes which lines and or user interactive corners are visible.<br />
 
Changes which lines and or user interactive corners are visible.<br />
 +
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 356: Line 372:
 
x3d(newrect).sethandlecolor = red<br />
 
x3d(newrect).sethandlecolor = red<br />
 
sethandlecolor('newrect','red');<br />
 
sethandlecolor('newrect','red');<br />
 +
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 373: Line 392:
 
x3d(welcomeimg).setheight = 150<br />
 
x3d(welcomeimg).setheight = 150<br />
 
setheight('welcomeimg',150);<br />
 
setheight('welcomeimg',150);<br />
 +
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 390: Line 412:
 
x3d(welcomeimg).setwidth = 250<br />
 
x3d(welcomeimg).setwidth = 250<br />
 
setwidth('welcomeimg',250);<br />
 
setwidth('welcomeimg',250);<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
<br /><br />
 
<br /><br />
 
 
Line 409: Line 434:
 
The value represents the scale on which the object / image is scaled. ( x and y axle )<br />
 
The value represents the scale on which the object / image is scaled. ( x and y axle )<br />
 
The value 1 is the original value.<br />
 
The value 1 is the original value.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
<br /><br />
 
<br /><br />
  
Line 427: Line 455:
 
setid('welcomeomg','goodbyeimg');<br />
 
setid('welcomeomg','goodbyeimg');<br />
 
The object is the id of an object that is to be changed, the value is to become the new id. The new id must not be existent on the canvas.<br />
 
The object is the id of an object that is to be changed, the value is to become the new id. The new id must not be existent on the canvas.<br />
 +
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 444: Line 475:
 
x3d(welcometext).setlineheight = 10
 
x3d(welcometext).setlineheight = 10
 
setlineheight('welcometext',10);<br />
 
setlineheight('welcometext',10);<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
<br /><br />
 
<br /><br />
 
 
Line 462: Line 496:
 
setrotation('welcomeimg',90);<br />
 
setrotation('welcomeimg',90);<br />
 
The value is the rotation starting from the original rotationpoint (0) in degrees. (celcius)<br />
 
The value is the rotation starting from the original rotationpoint (0) in degrees. (celcius)<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
 
 
Line 480: Line 517:
 
setx('welcomeimg',500);<br />
 
setx('welcomeimg',500);<br />
 
The image in this example will now be placed 500 pixels to the right.<br />
 
The image in this example will now be placed 500 pixels to the right.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
 
 
Line 498: Line 538:
 
sety('welcomeimg',200);<br />
 
sety('welcomeimg',200);<br />
 
The image in this example will now be placed 200 pixels to the bottom.<br />
 
The image in this example will now be placed 200 pixels to the bottom.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
 
 
Line 517: Line 560:
 
The value is the layer on which the object / image is placed, where the layer 0 is in the back.<br />
 
The value is the layer on which the object / image is placed, where the layer 0 is in the back.<br />
 
The object / image that is already active on the chosen layer will be placed 1 place higher into the layers.<br />
 
The object / image that is already active on the chosen layer will be placed 1 place higher into the layers.<br />
 +
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 535: Line 581:
 
setstroke('newrect',20);<br />
 
setstroke('newrect',20);<br />
 
The object gets a line around the object with the size of the value in pixels.<br />
 
The object gets a line around the object with the size of the value in pixels.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
 
 
Line 552: Line 601:
 
x3d(newrect).setstrokecolor = blue<br />
 
x3d(newrect).setstrokecolor = blue<br />
 
setstrokecolor('newrect','blue');<br />
 
setstrokecolor('newrect','blue');<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
<br /><br />
 
<br /><br />
 
 
Line 571: Line 623:
 
The text font must exist, if this is not the case the text font will remain the same. Attention: Case sensitive!<br />
 
The text font must exist, if this is not the case the text font will remain the same. Attention: Case sensitive!<br />
 
You can download text fonts directly from fonts.google.com or through a url link.<br />
 
You can download text fonts directly from fonts.google.com or through a url link.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
 
 
Line 589: Line 644:
 
settextsize('welcometext',20);<br />
 
settextsize('welcometext',20);<br />
 
The value is the text size in pixels.<br />
 
The value is the text size in pixels.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
 
 
Line 607: Line 665:
 
settextweight('welcometext',400);<br />
 
settextweight('welcometext',400);<br />
 
Possible values: light, normal, bold, number.<br />
 
Possible values: light, normal, bold, number.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
 
 
Line 626: Line 687:
 
To make the canvas visible or invisible the value must be either 1 or 0 where 0 makes it invisible and 1 makes it visible.<br />
 
To make the canvas visible or invisible the value must be either 1 or 0 where 0 makes it invisible and 1 makes it visible.<br />
 
To make an object / image visible or invisible the value must be between 0 and 1, where 1 is visible and 0 is invisible, decimals may be used.<br />
 
To make an object / image visible or invisible the value must be between 0 and 1, where 1 is visible and 0 is invisible, decimals may be used.<br />
 +
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />
Line 645: Line 709:
 
The 'value' true flips the object / image around from it original stance, the value 'false' changes it back to it's original stance.<br />
 
The 'value' true flips the object / image around from it original stance, the value 'false' changes it back to it's original stance.<br />
 
The value 'flip' makes the object / image flip around no matter which stance it currently is.<br />
 
The value 'flip' makes the object / image flip around no matter which stance it currently is.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
 
<br /><br />
 
<br /><br />
  
Line 664: Line 731:
 
The 'value' true flips the object / image around from it original stance, the value 'false' changes it back to it's original stance.<br />
 
The 'value' true flips the object / image around from it original stance, the value 'false' changes it back to it's original stance.<br />
 
The value 'flip' makes the object / image flip around no matter which stance it currently is.<br />
 
The value 'flip' makes the object / image flip around no matter which stance it currently is.<br />
+
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
 +
 
<br /><br />
 
<br /><br />
  
Line 683: Line 753:
 
Object defines the type of object, this could for example be; 'Text','Image','Rectangle','Arrow','Circle',Etc.<br />
 
Object defines the type of object, this could for example be; 'Text','Image','Rectangle','Arrow','Circle',Etc.<br />
 
Neither the property, nor the propertyvalue is case sensitive.<br />
 
Neither the property, nor the propertyvalue is case sensitive.<br />
 +
<br />
 +
Returns:<br />
 +
'succes' or 'error'<br />
  
 
<br /><br />
 
<br /><br />

Revision as of 17:11, 1 December 2020

Back to the manual



Explanation per individual function


Here you can find all the documentation for each individual functions.
How to use the functions, what they do and more.


Adding / Altering (existing) objects / images:

These functions can be used to add objects / images to the canvas.
If objects already exist they will be altered.


Function name:

setcanvas



Function description:
Changes the default canvas to a fabric canvas.

Function structure:
x3d(object).setcanvas;
setcanvas('object');

Example:
x3d(c).setcanvas;
setcanvas('c');

Returns:
canvas




Function name:

settext



Function description:
Adds a text object to a canvas or changes the text of an already existent text object.

Function structure:
x3d(object).settext = value
settext('object','value');

Example:
x3d(welcometext).settext = Hello World!
settext('welcometext','Hello World!');
In case a text object already exists; When the id matches that of an already existent text object, the text of this object is then replaced by the given value.
If you wish to split a sentence (enter), you can use \n.
An example of this: x3d('welcomeimg').settext = Hello \n World! or settext('welcomeimg','Hello \n World!');

Returns:
add: text value
alter: 'succes' or 'error'



Function name:

setimage



Function description:
Adds a image to a canvas or changes the source/url or data string of an already existent image.

Function structure:
x3d(object).setimage = source/url/data-string
setimage('object','source/url/data-string);

Example:
x3d('welcomeimg').setimage = /Images/pug.png
setimage('welcomeimg','/Images/pug.png');
In case a image already exists; When the id matches that of an already existent image, the source/url or datastring of this image will be replaced by the given value.

Returns:
add: image (object)
alter: 'succes' or 'error'



Function name:

setbgimg



Function description:
Adds a background image to a canvas or changes the current background image, the image fills the entire canvas.

Function structure:
x3d(object).setbgimg = source/url/data-string
setbgimg('object','source/url/data-string);

Example:
x3d(bgimg).setbgimg = /Images/pineapples.png
setbgimg('bgimg','/Images/pineapples.png');
In case a background image already exists; When the id matches that of an already existing background image, the source/url or data string of this background image will be replaced by the given value.
When you add a background image with another id whilst a background image is already active on that canvas, the lastest added background image will be the one shown because of the layering structure. (see setz)

Returns:
bgimg (object)



Function name:

setrectangle



Function description:
Adds a rectangle to a canvas or changes an already existent rectangle. ( position, height and width )

Function structure:
x3d(object).setrectangle = x1,y1,x2,y2
setrectangle('object','x1,y1,x2,y2');

Example:
x3d(newrect).setrectangle = 50,50,100,100
setrectangle('newrect','50,50,100,100');
The rectangle in this example starts ( starting top left (0,0)) 50 pixels to the right and 50 pixels to the bottom.
In case a rectangle with this id is already existent, the locations ( and the width,height ) are changed.

Returns:
add: rectangle (object)
alter: rectangle (object) or 'error'



Function name:

setcircle



Function description:
Adds a circle to a canvas or changes an already existent circle. ( position and radius )

Function structure:
x3d(object).setcircle = x,y,radius
setcircle('object','x,y,radius');

Example:
x3d(newcircle).setcircle = 50,50,25
setcircle('newcircle','50,50,25');
The circle in this example starts ( starting top left (0,0)) 50 pixels to the right and 50 pixels to the bottom and gets a 25 pixel radius.
In case a circle with this id is already existent, the location and radius is changed.

Returns:
add: rectangle (object)
alter: rectangle (object) or 'error'



Function name:

settriangle



Function description:
Adds a triangle to a canvas or changes an already existent circle. ( position, height and width )

Function structure:
x3d(object).settriangle = x,y,width,height
settriangle('object','x,y,width,height');

Example:
x3d(newtriangle).settriangle = 50,50,75,75
settriangle('newtriangle','50,50,75,75');
The triangle in this example starts ( starting top left (0,0)) 50 pixels to the right and 50 pixels to the bottom and get a 75 pixels height and a 75 pixels width.
In case a triangle with this id is already existent, the location, height and width are changed.

Returns:
add: triangle(object)
alter: triangle(object) or 'error'



Function name:

setpolygon



Function description:
Adds a polygon to a canvas or changes an already existent polygon, the begin and endpoint always connect. ( positions)

Function structure:
x3d(object).setpolygon = x1,y1,x2,y2 etc.
setpolygon('object','x1,y1,x2,y2 etc.');

Example:
x3d(newpoly).setpolygon = 20,0,40,50,60,80,40,70,20,60
setpolygon('newpoly','20,0,40,50,60,80,40,70,20,60');
The polygon in this example starts ( starting top left (0,0)) 20 pixels to the right and 0 pixels to the bottom, the second point is 40 pixels to the right and 50 pixels to the bottom etc.
The end of the polygon always connects with the beginpoint.
In case a triangle with this id is already existent, the points get changed.

Returns:
add: polygon(object)
alter: polygon(object) or 'error'



Function name:

setarrows



Function description:
Adds a line to the canvas with 2 arrowpoints or replaces an already existing arrow/line.

Function structure:
x3d(object).setarrows = x1,y1,x2,y2
setarrows('object','x1,y1.x2.y2');

Example:
x3d(newarrow).setarrows = 100,100,300,300
setarrows('newarrow','100,100,300,300');
The arrow in this example starts ( starting top left (0,0)) 100 pixels to the right and 100 pixels to the bottom and stops 300 pixels to the right and 300 pixels to the bottom.
In case a arrow with this id is already existent (setline,setarrow,setarrows), the positions are replaced with the given value and if required arrowpoints are added/removed.

Returns:
'succes' or 'error'



Function name:

setarrow



Function description:
Adds a line to a canvas with 1 arrowpoint or replaces an already existing arrow/line.

Function structure:
x3d(object).setarrow = x1,y1,x2,y2
setarrow('object','x1,y1,x2,y2');

Example:
x3d(newarrow).setarrows = 100,100,300,300
setarrow('newarrow','100,100,300,300'); The arrow in this example starts ( starting top left (0,0)) 100 pixels to the right and 100 pixels to the bottom and stops 300 pixels to the right and 300 pixels to the bottom.
In case a arrow with this id is already existent (setline,setarrow,setarrows), the positions are replaced with the given value and if required arrowpoints are added/removed.

Returns:
'succes' or 'error'



Function name:

setline



Function description:
Adds a line to a canvas or replaces an already existing arrow/line.

Function structure:
x3d(object).setline = x1,y1,x2,y2
setline('object','x1,y1,x2,y2');
Example:
x3d(newarrow).setline = 100,100,300,300
setline('newarrow','100,100,300,300');
The arrow in this example starts ( starting top left (0,0)) 100 pixels to the right and 100 pixels to the bottom and stops 300 pixels to the right and 300 pixels to the bottom.
In case a arrow with this id is already existent (setline,setarrow,setarrows), the positions are replaced with the given value and if required arrowpoints are added/removed.

Returns:
'succes' or 'error'



Altering existent objects / images

These functions alter an already existent object' / image' property.

Function name:

setcolor



Function description:
Changes the color of an object.

Function structure:
x3d(object).setcolor = value
setcolor('object','value');

Example:
x3d(welcometext).setcolor = red
setcolor('welcometext','red');
When the object is a canvas the background color is changed to the given value.

Returns:
'succes' or 'error'



Function name:

setdraggable



Function description:
Changes the object to be static or dynamic ( user interaction )

Function structure:
x3d(object).setdraggable = value
setdraggable('object','value');

Example:
x3d(welcomeimg).setdraggable = 1
setdraggable('welcomeimg','1');
The value can either be 1 or 0, where 0 makes the object static and 1 makes the object draggable.

Returns:
'succes' or 'error'



Function name:

setanimationduration



Function description:
Changes the duration of animations.

Function structure:
x3d().setanimationduration = duration
setanimationduration('duration');

Example:
x3d(object).setanimationduration = 1000
setanimationduration('1000'); In this example the animation duration is set to 1000ms (1 second).
The animation duration counts for all animations untill it is altered again.

Returns:
'succes' or 'error'



Function name:

setanimationtype



Function description:
Changes which animation is played when positions change.

Function structure:
x3d().setanimationtype = value
setanimationtype('value');

Example:
x3d().setanimationtype = easeInOutBounce
setanimationtype('easeInOutBounce');
In this example the animation type is set to InOutBounce, this makes the object 'bounce' at the end of an position change.
The animation type counts for all animations untill it is altered again.

Returns:
'succes' or 'error'



Function name:

sethandles



Function description:
Changes the handles of an object depended on the value.

Function structure:
x3d(object).sethandles = value
sethandles('object','value');
Example:
x3d(newrect).sethandles = 2
sethandles('newrect','2');
Changes which lines and or user interactive corners are visible.

Returns:
'succes' or 'error'



Function name:

sethandlecolor



Function description:
Changes the color of the handles.

Function structure:
x3d(object).sethandlecolor = value
sethandlecolor('object','value');

Example:
x3d(newrect).sethandlecolor = red
sethandlecolor('newrect','red');

Returns:
'succes' or 'error'



Function name:

setheight



Function description:
Changes the height of an object in pixels.

Function structure:
x3d(object).setheight = value
setheight('object',value);

Example:
x3d(welcomeimg).setheight = 150
setheight('welcomeimg',150);

Returns:
'succes' or 'error'



Function name:

setwidth



Function description:
Changes the width of an object in pixels.

Function structure:
x3d(object).setwidth = value
setwidth('object',value);

Example:
x3d(welcomeimg).setwidth = 250
setwidth('welcomeimg',250);

Returns:
'succes' or 'error'



Function name:

setscale



Function description:
Changes the width and height of an object or image by scale.

Function structure:
x3d(object).setscale = value
setscale('object',value);

Example:
x3d(welcomeimg).setscale = 0.8
setscale('welcomeimg',0.8)
The value represents the scale on which the object / image is scaled. ( x and y axle )
The value 1 is the original value.

Returns:
'succes' or 'error'



Function name:

setid



Function description:
Changes the id of an already existent object / image.

Function structure:
x3d(object).setid = value
setid('object','value');

Example:
x3d(welcomeimg).setid = goodbyeimg
setid('welcomeomg','goodbyeimg');
The object is the id of an object that is to be changed, the value is to become the new id. The new id must not be existent on the canvas.

Returns:
'succes' or 'error'



Function name:

setlineheight



Function description:
Changes how much height is between text lines.

Function structure:
x3d(object).setlineheight = value
setlineheight('object',value);

Example: x3d(welcometext).setlineheight = 10 setlineheight('welcometext',10);

Returns:
'succes' or 'error'



Function name:

setrotation



Function description:
Changes the rotation of an object / image.

Function structure:
x3d(object).setrotation = value
setrotation('object',value);

Example:
x3d(welcomeimg).setrotation = 90
setrotation('welcomeimg',90);
The value is the rotation starting from the original rotationpoint (0) in degrees. (celcius)

Returns:
'succes' or 'error'



Function name:

setx



Function description:
Changes the position of an object / image on the x-axle. (in pixels where the left is 0)

Function structure:
x3d(object).setx = value
setx('object',value);

Example:
x3d(welcomeimg).setx = 500
setx('welcomeimg',500);
The image in this example will now be placed 500 pixels to the right.

Returns:
'succes' or 'error'



Function name:

sety



Function description:
Changes the position of an object / image on the y-axle. (in pixels where the top is 0)

Function structure:
x3d(object).sety = value
sety('object',value);

Example:
x3d(welcomeimg).sety = 200
sety('welcomeimg',200);
The image in this example will now be placed 200 pixels to the bottom.

Returns:
'succes' or 'error'



Function name:

setz



Function description:
Changes on which layer the object / image resides. ( where 0 is in the back )

Function structure:
x3d(object).setz = value
setz('object',value);

Example:
x3d(welcomeimg).setz = 10
setz('welcomeimg',10);
The value is the layer on which the object / image is placed, where the layer 0 is in the back.
The object / image that is already active on the chosen layer will be placed 1 place higher into the layers.

Returns:
'succes' or 'error'



Function name:

setstroke



Function description:
Changes the stroke of an object.

Function structure:
x3d(object).setstroke = value
setstroke('object',value);

Example:
x3d(newrect).setstroke = 20
setstroke('newrect',20);
The object gets a line around the object with the size of the value in pixels.

Returns:
'succes' or 'error'



Function name:

setstrokecolor



Function description:
Changes the color of the objects' stroke.

Function structure:
x3d(object).setstrokecolor = value
setstrokecolor('object','value');

Example:
x3d(newrect).setstrokecolor = blue
setstrokecolor('newrect','blue');

Returns:
'succes' or 'error'



Function name:

settextfont



Function description:
Changes the text font of an text object.

Function structure:
x3d(object).settextfont = value
settextfont('object','value');

Example:
x3d(welcometext).settextfont = Arial
settextfont('welcometext','Arial');
The text font must exist, if this is not the case the text font will remain the same. Attention: Case sensitive!
You can download text fonts directly from fonts.google.com or through a url link.

Returns:
'succes' or 'error'



Function name:

settextsize



Function description:
Changes the text size of a text object.

Function structure:
x3d(object).settextsize = value
settextsize('object',value);

Example:
x3d(welcometext).settextsize = 20
settextsize('welcometext',20);
The value is the text size in pixels.

Returns:
'succes' or 'error'



Function name:

settextweight



Function description:
Changes the boldness of an text object.

Function structure:
x3d(object).settextweight = value
settextweight('object',value);

Example:
x3d(welcometext).settextweight = 400
settextweight('welcometext',400);
Possible values: light, normal, bold, number.

Returns:
'succes' or 'error'



Function name:

setvisible



Function description:
Changes the visibility of an object / image / canvas.

Function structure:
x3d(object).setvisible = value
setvisible('object',value);

Example:
x3d(welcometext).setvisible = 0.7
setvisible('welcometext',0.7);
To make the canvas visible or invisible the value must be either 1 or 0 where 0 makes it invisible and 1 makes it visible.
To make an object / image visible or invisible the value must be between 0 and 1, where 1 is visible and 0 is invisible, decimals may be used.

Returns:
'succes' or 'error'



Function name:

setflipx



Function description:
Flips the object / image around. (Horizontally)

Function structure:
x3d(object).setflipx = value
setflipx('object','value');
Example:
x3d(welcomeimg).setflipx = true
setflipx('welcomeimg','true');
The 'value' true flips the object / image around from it original stance, the value 'false' changes it back to it's original stance.
The value 'flip' makes the object / image flip around no matter which stance it currently is.

Returns:
'succes' or 'error'



Function name:

setflipy



Function description:
Flips the object / image around. (Vertically)

Function structure:
x3d(object).setflipy = value
setflipy('object','value');

Example:
x3d(welcomeimg).setflipy = flip
setflipy('welcomeimg','flip');
The 'value' true flips the object / image around from it original stance, the value 'false' changes it back to it's original stance.
The value 'flip' makes the object / image flip around no matter which stance it currently is.

Returns:
'succes' or 'error'



Function name:

setdefault



Function description:
Changes the default properties of which an object / image is loaded in with.

Function structure:
x3d(object).setdefault = property,propertyvalue
setdefault('object','propertympropertyvalue');
Example:
x3d(text).setdefault = fill,red
setdefault('text','fill,red');
Object defines the type of object, this could for example be; 'Text','Image','Rectangle','Arrow','Circle',Etc.
Neither the property, nor the propertyvalue is case sensitive.

Returns:
'succes' or 'error'



Retrieving object / image properties

These functions 'get' a property of the object / image, they return this property and could thus be used for testing or to fill variables for example.


Function name:

getproperty



Function description:
Gets the chosen property (value) of the object / image.

Function structure:
x3d(object).getproperty = value
getproperty('object','value');

Example:
x3d(welcomeimg).getproperty = top
getproperty('welcomeimg','top');
The value is the property you wish to retrieve.

Returns:
propertyvalue



Function name:

getx



Function description:
Gets the x-axle value from the object / image.

Function structure:
x3d(object).getx
getx('object');

Example:
x3d(welcomeimg).getx
getx('welcomeimg');

Returns:
x (left) value



Function name:

gety



Function description:
Gets the y-axle value from the object / image.

Function structure:
x3d(object).gety
gety('object');

Example:
x3d(welcomeimg).gety
gety('welcomeimg');

Returns:
y (top) value



Function name:

getz



Function description:
Gets the layer on which the object / images resides.

Function structure:
x3d(object).getz
getz('object');

Example:
x3d(welcomeimg).getz
getz('welcomeimg');

Returns:
z (layer) value



Function name:

getscale



Function description:
Gets the objects scale (X&Y combined)

Function structure:
x3d(object).getscale
getscale('object');

Example:
x3d(welcomeimg).getscale
getscale('welcomeimg');

Returns:
scale (x&y) value



Function name:

getscalex



Function description:
Gets the objects x-axle scale.

Function structure:
x3d(object).getscalex
getscalex('object');

Example:
x3d(welcomeimg).getscalex
getscalex('welcomeimg'):

Returns:
scalex value



Function name:

getscaley



Function description:
Gets the objects y-axle scale.

Function structure:
x3d(object).getscaley
getscaley('object');

Example:
x3d(welcomeimg).getscaley
getscaley('welcomeimg');

Returns:
scaley value



Other functions

These functions don't add/alter objects / images.
They are classified as 'other' functions for this reason.


Function name:

copy



Function description:
Copies the chosen object / image and gives it a new id.

Function structure:
x3d(object).copy = value
copy('object','value');

Example:
x3d(welcomeimg).copy = newimage
copy('welcomeimg','newimage');
The new id (value) must be unique. (can't already exist)

Returns:
cloned object (object) or 'error



Function name:

delete/deletethis



Function description:
Deletes the chosen object / image from the canvas.

Function structure:
x3d(object).delete
deletethis('object');

Example:
x3d(newimage).delete
deletethis('newimage');
If you wish to use this function in the outputscript you must use 'deletethis' otherwise an error will occur.
Using this function in the rules works with both 'delete' and 'deletethis'.
To use this function, you only need to enter a object(id).

Returns:
'succes' or 'error




Function name:

clearcanvas



Function description:
Removes all objects and images from the canvas.

Function structure:
x3d(object).clearcanvas
clearcanvas('object');

Example:
x3d(c).clearcanvas
clearcanvas('c');
To use this function, you only need to enter a object(id).
The object(id) in this case is that of the canvas.

Returns:
'succes' or 'error'



Function name:

screenshot



Function description:
Makes a screenshot of the chosen canvas.

Function structure:
x3d(object).screenshot
screenshot('object');

Example:
x3d(c).screenshot
screenshot('c');
To use this function, you only need to enter a object(id).
The object(id) in this case is that of the canvas.

Returns:
'succes' or 'error'