Back to Table of Contents
Effect Editor available functions

Available functions




CurveAddKeyframe(curve_id,x,y,z)
CurveCreate(type,loop)
CurveGetDistance(curve_id,keyframe_index)
CurveGetPitch(curve_id,position)
CurveGetX(curve_id,position)
CurveGetY(curve_id,position)
CurveGetYaw(curve_id,position)
CurveGetZ(curve_id,position)
CurveSetDistance(curve_id,keyframe_index,new_distance)
DisplayDebug(text)
Ease(dt,mode)
GetAmplitudeParameter()
GetCameraDistance()
GetColorBlueParameter()
GetColorGreenParameter()
GetColorRedParameter()
GetMusicBass()
GetMusicMedium()
GetMusicTreble()
GetMusicVolume()
GetObjectText()
GetTotalTime()
GetWindowHeight()
GetWindowWidth()
MatrixAddRotation(x,y,z)
MatrixAddScale(x,y,z)
MatrixAddTranslation(x,y,z)
MatrixGetRotationX()
MatrixGetRotationY()
MatrixGetRotationZ()
MatrixGetScaleX()
MatrixGetScaleY()
MatrixGetScaleZ()
MatrixGetX()
MatrixGetY()
MatrixGetZ()
MatrixReset()
MeshAddTriangle(meshID,x1,y1,z1,x2,y2,z2,x3,y3,z3)
MeshBackfaceCulling(meshID,enableCulling)
MeshCopy(mesh)
MeshCreate()
MeshCreateCube(size)
MeshCreatePlane(size_x,size_y,subdivision_x,subdivision_y)
MeshCreateSphere(size, subdivision)
MeshGetNumberOfVector(meshID)
MeshGetPointPositionX(meshID,vectorIndex)
MeshGetPointPositionY(meshID,vectorIndex)
MeshGetPointPositionZ(meshID,vectorIndex)
MeshLighting(meshID,enableLighting)
MeshSetAlpha(meshID,alpha)
MeshSetColor(meshID,r,g,b)
MeshSetPixelShader(mesh, shaderCode)
MeshSetPointAlpha(meshID,vectorIndex,a)
MeshSetPointColor(meshID,vectorIndex,r,g,b)
MeshSetPointPosition(meshID,vectorIndex,x,y,z)
MeshSetPointTextureCoordinates(meshID,vectorIndex,u,v,textureIndex)
MeshSetPosition(meshID,x,y,z)
MeshSetRotation(meshID,x,y,z)
MeshSetScale(meshID,x,y,z)
MeshSetTexture(meshID,textureID,textureIndex)
MeshSetVisible(mesh,visible)
MeshWireframe(meshID,enableWireframe)
ParticlesCreateEmitter(particle_image_id)
ParticlesSetAlpha(emitterID,startAlpha,alphaVariation=0.0,alphaChange=0.0)
ParticlesSetColor(emitterID,colorR,colorG,colorB,colorVariation=0.0,colorRChange=0,colorGChange=0,colorBChange=0)
ParticlesSetDelay(emitterID,delay)
ParticlesSetDirection(emitterID,x,y,z)
ParticlesSetDuration(emitterID,duration)
ParticlesSetEmitterPosition(emitterID,x,y,z)
ParticlesSetEmittingAngle(emitterID,ax,ay,az)
ParticlesSetLifetime(emitterID,lifetime)
ParticlesSetParticlesPerSeconds(emitterID,min,max)
ParticlesSetPulsationStrength(emitterID,strength)
ParticlesSetRandomSpeed(emitterID,randomSpeedX,randomSpeedY,randomSpeedZ)
ParticlesSetRotation(emitterID,rotationMode,rotationValue)
ParticlesSetSize(emitterID,minSizeX,minSizeY,maxSizeX,maxSizeY,sizeChange=0.0)
ParticlesSetSpeed(emitterID,speed,speedVariation=0.0, speedChange=0.0, negativeSpeed=false)
ParticlesSetStartOffset(emitterID,x,y,z)
ParticlesSetWeight(emitterID,weight,weightVariation=0.0)
PlaySound(index,volume)
SetColor(r,g,b)

Detailed descriptions




CurveAddKeyframe(curve_id,x,y,z)

Add a keyframe to the curve

Parameters: curve_id: id returned by CurveCreate x,y,z: coordinates
Return value: None




CurveCreate(type,loop)

To create a curve object

Parameters: type: 0-LINE,1-SPLINE, default SPLINE, loop default FALSE
Return value: ID of the curve




CurveGetDistance(curve_id,keyframe_index)

Returns the distance from start for this keyframe.

Parameters: curve_id: id returned by CurveCreate keyframe_index: index of keyframe
Return value: Distance: 0.0 start, 1.0 end




CurveGetPitch(curve_id,position)

Returns pitch angle for a position in the curve

Parameters: curve_id: id returned by CurveCreate position: 0.0 start, 1.0 end
Return value: Pitch angle (degrees)




CurveGetX(curve_id,position)

Returns X coordinate for a position in the curve

Parameters: curve_id: id returned by CurveCreate position: 0.0 start, 1.0 end
Return value: X coordinate




CurveGetY(curve_id,position)

Returns Y coordinate for a position in the curve

Parameters: curve_id: id returned by CurveCreate position: 0.0 start, 1.0 end
Return value: Y coordinate




CurveGetYaw(curve_id,position)

Returns yaw angle for a position in the curve

Parameters: curve_id: id returned by CurveCreate position: 0.0 start, 1.0 end
Return value: Yaw angle (degrees)




CurveGetZ(curve_id,position)

Returns Z coordinate for a position in the curve

Parameters: curve_id: id returned by CurveCreate position: 0.0 start, 1.0 end
Return value: Z coordinate




CurveSetDistance(curve_id,keyframe_index,new_distance)

Set the distance of a keyframe. This value is computed automatically, but can be customized to make an object accelerate or deccelerate at some point. Distances are automatically computed on each call to CurveAddKeyframe.

Parameters: curve_id: id returned by CurveCreate keyframe_index: index of keyframe new_distance: 0.0 start, 1.0 end
Return value: None




DisplayDebug(text)

To display some debug information when developing new effects (do not use in final effects)

Parameters: text: the text to be displayed
Return value: None




Ease(dt,mode)

To add effects to movements. It is useful when you want to add special effect to a linear movement.

Parameters: dt: value between 0.0 (start) and 1.0 (end).
mode: it is the special move effect mode used. Available values are (easing in means a slower motion at the beginning, where easing out means a slower motion at the end):


Return value: a value between 0.0 (start) and 1.0 (end)




GetAmplitudeParameter()

To get the value of the amplitude parameter set by user. (The "use amplitude parameter" checkbox should be checked on the editor).

Parameters: None
Return value: Amplitude between 0 and 100




GetCameraDistance()

Get the distance of the camera (from 0;0;0). It is useful for instance when you want to set a plane on the background, you can just move it to -distanceCamera and double the size.

Parameters: None
Return value: Distance between point 0;0;0 and the camera




GetColorBlueParameter()

To get the blue component of the color value parameter set by user. (The "use color parameter" checkbox should be checked on the editor).

Parameters: None
Return value: Blue value between 0 and 255




GetColorGreenParameter()

To get the green component of the color value parameter set by user. (The "use color parameter" checkbox should be checked on the editor).

Parameters: None
Return value: Green value between 0 and 255




GetColorRedParameter()

To get the red component of the color value parameter set by user. (The "use color parameter" checkbox should be checked on the editor).

Parameters: None
Return value: Red value between 0 and 255




GetMusicBass()

To retrieve the current music bass

Parameters: None
Return value: a value between 0.0 (no music) and 1.0 (loud)




GetMusicMedium()

To retrieve the current music medium

Parameters: None
Return value: a value between 0.0 (no music) and 1.0 (loud)




GetMusicTreble()

To retrieve the current music treble

Parameters: None
Return value: a value between 0.0 (no music) and 1.0 (loud)




GetMusicVolume()

To retrieve the current music volume

Parameters: None
Return value: a value between 0.0 (no music) and 1.0 (loud)




GetObjectText()

Returns the text displayed by the object

Parameters: None
Return value: String containing the text




GetTotalTime()

Returns the total time of the transition

Parameters: None
Return value: total time in [ms] of the transition




GetWindowHeight()

Return the height of the screen (logical unit, not real pixels)

Parameters: None
Return value: Height of the window




GetWindowWidth()

Return the width of the screen (logical unit, not real pixels)

Parameters: None
Return value: Width of the window




MatrixAddRotation(x,y,z)

add a rotation to the matrix

Parameters: x,y,z rotation in degrees for each axis
Return value: None




MatrixAddScale(x,y,z)

add a scaling operation to the matrix

Parameters: x,y,z scale for each axis
Return value: None




MatrixAddTranslation(x,y,z)

add a translation to the matrix

Parameters: x,y,z translation for each axis
Return value: None




MatrixGetRotationX()

retrieve the X rotation value

Parameters: None
Return value: X rotation value




MatrixGetRotationY()

retrieve the Y rotation value

Parameters: None
Return value: Y rotation value




MatrixGetRotationZ()

retrieve the Z rotation value

Parameters: None
Return value: Z rotation value




MatrixGetScaleX()

retrieve the X scale value

Parameters: None
Return value: X scale value




MatrixGetScaleY()

retrieve the Y scale value

Parameters: None
Return value: Y scale value




MatrixGetScaleZ()

retrieve the Z scale value

Parameters: None
Return value: Z scale value




MatrixGetX()

retrieve the X value

Parameters: None
Return value: X value




MatrixGetY()

retrieve the Y value

Parameters: None
Return value: Y value




MatrixGetZ()

retrieve the Z value

Parameters: None
Return value: Z value




MatrixReset()

reset the matrix to identity

Parameters: None
Return value: None




MeshAddTriangle(meshID,x1,y1,z1,x2,y2,z2,x3,y3,z3)

To add a triangle to a mesh

Parameters: mesh Id and coordinates of all 3 points.
Return value: None.




MeshBackfaceCulling(meshID,enableCulling)

activate/deactivate backface culling on this mesh (default is deactivated)

Parameters: mesh Id, culling or not (true/false)
Return value: None.




MeshCopy(mesh)

Create a copy of a mesh

Parameters: mesh: source mesh
Return value: copied mesh




MeshCreate()

To create an empty mesh

Parameters: None
Return value: ID of the created mesh.




MeshCreateCube(size)

Create a cube of a given dimension

Parameters: size: dimension of the cube
Return value: Mesh ID.




MeshCreatePlane(size_x,size_y,subdivision_x,subdivision_y)

Create a plane of a given dimension

Parameters: size_x,size_y: size of the plane, subdivision_x,subdivision_y: number of subdivision in each axis (1-...)
Return value: Mesh ID.




MeshCreateSphere(size, subdivision)

Create a sphere of a given dimension

Parameters: size: dimension of the sphere, subdivision of the sphere (10 to 20 are good numbers)
Return value: Mesh ID.




MeshGetNumberOfVector(meshID)

retrieve the number of vectors in a mesh

Parameters: mesh Id
Return value: Number of vectors.




MeshGetPointPositionX(meshID,vectorIndex)

return the X position of a vector.

Parameters: mesh Id, vectorIndex (between 0 and number of vector)
Return value: X position.




MeshGetPointPositionY(meshID,vectorIndex)

return the Y position of a vector.

Parameters: mesh Id, vectorIndex (between 0 and number of vector)
Return value: Y position.




MeshGetPointPositionZ(meshID,vectorIndex)

return the Z position of a vector.

Parameters: mesh Id, vectorIndex (between 0 and number of vector)
Return value: Z position.




MeshLighting(meshID,enableLighting)

activate/deactivate lighting on this mesh (default is deactivated)

Parameters: mesh Id, lighting or not (true/false)
Return value: None.




MeshSetAlpha(meshID,alpha)

Set alpha of a mesh

Parameters: mesh Id, alpha (0.0-1.0)
Return value: None.




MeshSetColor(meshID,r,g,b)

Set color of a mesh

Parameters: mesh Id,color rgb (0-255)
Return value: None.




MeshSetPixelShader(mesh, shaderCode)

Apply a pixel shader (GLSL) to the mesh

Parameters: mesh: mesh, shaderCode: pixel shader code
Return value: None




MeshSetPointAlpha(meshID,vectorIndex,a)

set the color of a vector

Parameters: mesh Id, vectorIndex (between 0 and number of vector), alpha value (0.0-1.0)
Return value: None.




MeshSetPointColor(meshID,vectorIndex,r,g,b)

set the color of a vector

Parameters: mesh Id, vectorIndex (between 0 and number of vector), color (r,g,b) (0-255)
Return value: None.




MeshSetPointPosition(meshID,vectorIndex,x,y,z)

set the position of a vector

Parameters: mesh Id, vectorIndex (between 0 and number of vector), x,y,z
Return value: None.




MeshSetPointTextureCoordinates(meshID,vectorIndex,u,v,textureIndex)

set the texture coordinate (usually 0.0 to 1.0) of a vector

Parameters: mesh Id, vectorIndex (between 0 and number of vector), texture coordinates, textureIndex (usually 0 but can be set to 1 in case of multitexturing)
Return value: None.




MeshSetPosition(meshID,x,y,z)

Set position of a mesh

Parameters: mesh Id,x,y,z
Return value: None.




MeshSetRotation(meshID,x,y,z)

Set rotation of a mesh

Parameters: mesh Id,x,y,z angle (degrees)
Return value: None.




MeshSetScale(meshID,x,y,z)

Set scale of a mesh

Parameters: mesh Id,x,y,z scale
Return value: None.




MeshSetTexture(meshID,textureID,textureIndex)

apply a texture to a mesh

Parameters: mesh Id, texture Id, textureIndex (usually 0 but can be set to 1 in case of multitexturing)
Return value: None.




MeshSetVisible(mesh,visible)

make a mesh visible or not

Parameters: mesh: source mesh, visible:true/false
Return value: None




MeshWireframe(meshID,enableWireframe)

display a mesh as wireframe or not

Parameters: mesh Id, wireframe or not (true/false)
Return value: None.




ParticlesCreateEmitter(particle_image_id)

create a particle emitter.

Parameters: particle_image_id: index of the particle image you want to use (0 to 15)
Return value: Emitter ID




ParticlesSetAlpha(emitterID,startAlpha,alphaVariation=0.0,alphaChange=0.0)

Set alpha value for particles.

Parameters: emitterID: ID of the emitter, startAlpha: start alpha value (0.0 to 1.0); alphaVariation: random variation in start alpha value; alphaChange: change of alpha value over time. For instance if you set this value to -0.5, alpha will decrease by 0.5 every seconds.
Return value: None




ParticlesSetColor(emitterID,colorR,colorG,colorB,colorVariation=0.0,colorRChange=0,colorGChange=0,colorBChange=0)

Set color value for particles.

Parameters: emitterID: ID of the emitter, colorR,colorG,colorB: start color value (0 to 255); colorVariation: random variation in start color; colorRChange,colorGChange,colorBChange: change of color value over time. For instance if you set this value to -5, color component will decrease by 5 every seconds.
Return value: None




ParticlesSetDelay(emitterID,delay)

Set delay for emitting particles.

Parameters: emitterID: ID of the emitter, delay: time [ms] before starting to emit particles.
Return value: None




ParticlesSetDirection(emitterID,x,y,z)

Set initial direction of particles.

Parameters: emitterID: ID of the emitter, x,y,z: initial direction.
Return value: None




ParticlesSetDuration(emitterID,duration)

Set delay for emitting particles.

Parameters: emitterID: ID of the emitter, duration: [ms] if different than 0, the emitter will stop after given time.
Return value: None




ParticlesSetEmitterPosition(emitterID,x,y,z)

set the position of a particle emitter.

Parameters: emitterID: the ID returned by ParticlesCreateEmitter; x,y,z: position of the emitter (relative to the object)
Return value: None




ParticlesSetEmittingAngle(emitterID,ax,ay,az)

Set emitting cone for the particle emitter.

Parameters: emitterID: ID of the emitter, ax,ay,az: [degrees] angle for each axis for emitting particles. For example, if you set az to 20, the emitter will throw particles from -20� to +20� around the Z axis of the direction vector.
Return value: None




ParticlesSetLifetime(emitterID,lifetime)

Set max lifetime of particles.

Parameters: emitterID: ID of the emitter, lifetime: [ms] max lifetime of particles.
Return value: None




ParticlesSetParticlesPerSeconds(emitterID,min,max)

Set the number of particles to emit each seconds.

Parameters: emitterID: ID of the emitter, min,max: minimum/maximum number of particles to emit each seconds.
Return value: None




ParticlesSetPulsationStrength(emitterID,strength)

Use this for flickering effects, a strength value of 0.5 for example, will alter each particle's size randomly within a range of -0.5 to +0.5 to produce a flickering effect.

Parameters: emitterID: ID of the emitter, strength: strength of the flickering effect.
Return value: None




ParticlesSetRandomSpeed(emitterID,randomSpeedX,randomSpeedY,randomSpeedZ)

A value that will be added or substracted randomly to the particles velocity. Useful to create chaotic particl effects like windy snow, etc...

Parameters: emitterID: ID of the emitter, randomSpeedX,randomSpeedY,randomSpeedZ: random value to add or substract.
Return value: None




ParticlesSetRotation(emitterID,rotationMode,rotationValue)

Set the rotation mode and the rotation value of particles.

Parameters: emitterID: ID of the emitter, rotationMode: 0-The rotation angle of all particles will be set to [rotationValue] and not be changed anymore. 1-Each particle will be set to a random start position and will rotate automatically with a speed specified by [rotationValue] parameter. 2-The particles will be always aligned to their travel direction. [rotationValue] is not used in this mode.
Return value: None




ParticlesSetSize(emitterID,minSizeX,minSizeY,maxSizeX,maxSizeY,sizeChange=0.0)

Set the size of each particles.

Parameters: emitterID: ID of the emitter, minSizeX,minSizeY: minimum start size of particles in X-Y axis, maxSizeX,maxSizeY: maximum start size of particles in X-Y axis, sizeChange: size change of the particle over time.
Return value: None




ParticlesSetSpeed(emitterID,speed,speedVariation=0.0, speedChange=0.0, negativeSpeed=false)

Set the speed of each particles.

Parameters: emitterID: ID of the emitter, speed: initial speed of particles, speedVariation: variation in initial speed, speedChange: change of speed over time, negativeSpeed: if set to false, when speed goes lower than 0, it is set to 0.
Return value: None




ParticlesSetStartOffset(emitterID,x,y,z)

Set the start offset for the emitter.

Parameters: emitterID: ID of the emitter, x,y,z: set the distance in each axis from the emitter position where particles are emitted.
Return value: None




ParticlesSetWeight(emitterID,weight,weightVariation=0.0)

Set the weight of each particles (for gravity effects).

Parameters: emitterID: ID of the emitter, weight: weight of the particle, weightVariation: variation in weight.
Return value: None




PlaySound(index,volume)

To play a sound

Parameters: index of sound, volume % (0-100)
Return value: None




SetColor(r,g,b)

To set the base color

Parameters: r,g,b color to use (0-255 values)
Return value: None