Important Notice:
JavaScript is deprecated inSimLab Composer 11 and later versions. Users need to switch to Python scripting for greater support and wider up-to-date library of functions.

Scene

Scene class.

new Scene()
Instance Members
reset()
remove(node)
importFile(fileName)
importFileWithEnvironment(fileName)
setSaveIsSaveAs(IsSaveAs)
openFile(fileName)
exportFile(fileName)
exportFile(fileName, arrayOfSceneStates)
applyReplaceRules(fileName)
render(fileName, dontOpenOutputDir)
render(fileName, width, height)
renderAnimation(inputFile, outputDir, startFrame, endFrame)
packTheScene(outputFileName, packedFileExtension)
movieMaker(outputFolderName, inputFolderName, videoQuality, frameRate, outputFormat, audio)
bakeTexture(smartBaking)
bakeTexture(selectedNodes, smartBaking)
bakeTextureForAnimation(selectedNodes, smartBaking)
setTextureBakingSettings(minSize, maxSize, spp, qualityLevelTop, optimizeBakinfTime, maxPolygonsPerObject)
createDoorAndCabinetsAnimation(fileName)
captureSceneState()
captureSceneStateFromSelection()
setPDFTemplateFileName(PDFTemplateFileName)
captureSceneImage(name, generatedImageWidth, generatedImageHeight)
createCamera()
createInstanceOf(object)
createMaterial()
createLight()
createRoundTableCameraAnimation(rotateClockWise)
exportSceneData(fileName)
isolate(selectedNodes)
unisolate()
retainMaterialPalette(smpFileName, retainType)
exportVrPackage(outputFileName, packageTitle, packagePublisher, packageDesription, packageType, packageImage)
addAttribute(nodeName, attributeName, attributeValue, attributeCategory, attributeSortingKey)
replaceObject(includes, doesNotInclude, inputFileName)

Properties
selectedNode (Node)
materials (SceneObjectList) : Read Only
lights (SceneObjectList) : Read Only
cameras (SceneObjectList) : Read Only
nodes (SceneObjectList) : Read Only
meshes (SceneObjectList) : Read Only
sceneStates (SceneObjectList) : Read Only
materialLibs (SceneObjectList) : Read Only
renderSettings (SceneObjectList) : Read Only

Camera

Camera class.

new Camera()

Extends Node

Instance Members
setFov(FovValue)
getFov()
getPosition()
getTargetPosition()
getUp()

Properties
fov (number)
position (Vector3)
targetPosition (Vector3)
up (Vector3)

BoundingBox

BoundingBox class.

new BoundingBox(Node: Node)

Extends Node

Parameters
Node (Node) that you want to calculate its bounding box
Instance Members
getCenter()
getMax()
getmin()

Properties
center (Vector3)
max (Vector3)
min (Vector3)

SceneState

SceneState class.

new SceneState()

Extends SceneObject

Instance Members
UpdateGetImage()
apply()

Properties
image (image)

Light

Light class.

new Light()

Extends Node

Instance Members
getBrightness()
getInnerConeAngle()
getOuterConeAngle()
getType()
setBrightness(brightnessValue)
setInnerConeAngle(innerConeAngleValue)
setOuterConeAngle(outerConeAngleValue)
setType(typeValue)
setIESFileName(typeValue)

Properties
brightness (number)
innerConeAngle (number)
outerConeAngle (number)
type (string) : types we support : point, spot, infinite, ies
Color (Color) : Read only parameter that return light color

Color

Color class.

new Color(RGBColor: any)
Parameters
RGBColor (any)
Instance Members
red()
green()
blue()
setBlue(BlueValue)
setGreen(GreenValue)
setRed(RedValue)

Properties
r (number) : Red
g (number) : Green
b (number) : Blue

Material

Material class.

new Material()

Extends SceneObject

Instance Members
get_diffuseColor()
set_diffuseColor(ColorValue)

Properties
opacity (number)
reflectionStrength (number)
specularStrength (number)
ambientColor (Color)
diffuseColor (Color)
emissiveColor (Color)
specularColor (Color)
diffuseTexture (Texture) : Read Only
reflectionTexture (Texture) : Read Only
bumpTexture (Texture) : Read Only
Example
material.opacity = 0.5;
material.reflectionStrength = 1;
material.specularStrength = 0.8;

var ambientColor = material.ambientColor;
var diffuseColor = material.diffuseColor;
var emissiveColor = material.emissiveColor;
var specularColor = material.specularColor;
var diffuseTexture = material.diffuseTexture;
var reflectionTexture = material.reflectionTexture;
var bumpTexture = material.bumpTexture;

Matrix4x4

Matrix4x4 class.

new Matrix4x4()
Instance Members
getInverse()
scale(set, set, set)
scaleInPlace(set, set, set)
multiply(Matrix4x4)
multiplyInPlace(Matrix4x4)
transformPosition(Vector3)
translate(Vector3)
translateInPlace(Vector3)
rotate(Vector3, Vector3)
rotateInPlace(Vector3, Vector3)
rotateAboutVectorInPlace(number, Vector3)

Properties
inverse (Matrix4x4)

Node

Node class.

new Node()

Extends SceneObject

Instance Members
setVisibility(isVisible)
getVisibility()
getParent()
computeBoundingBox()

Properties
visible (boolean)
parent (Node)
transform (Matrix4x4) : Read Only

Example
var nodeTransform = sceneNode.transform;

RenderSettings

RenderSettings class.

new RenderSettings()
Instance Members
set(renderProperityName, ItsValue)
get(propertyName)

SceneObject

SceneObject class.

new SceneObject()
Instance Members
PerformSetName(scene)
PerformGetName()

Properties
name (string)

SceneObjectList

SceneObjectList class.

new SceneObjectList()
Instance Members
getByIndex(scene)
getByName(scene)
getByGuid(scene)
update()

Properties
count (number)
Example
var sceneObjectCount = scene.node.count;

Texture

Texture class.

new Texture()
Instance Members
setPath(texturepath)
setScaleU()
setScalev()
setOffsetU()
setOffsetV()
getScaleU()
getScaleV()
getOffsetU()
getOffsetV()

Properties
amount (number) : The degree to which the Texture is applied, which can be a value from 0.0 to 1.0
image (Image)
Example
var textureImage = Texture.image; 
Texture.amount = 0.6 ;

Image

Image class.

new Image()
Instance Members
setPath(texture)
getPath()

Vector3

Vector3 class.

new Vector3()
Instance Members
setX(X)
setY(Y)
setZ(Z)
getX()
getY()
getZ()
getLength()
normalize()
subtract()
scale()
dot(Vector3)
cross(Vector3)

Properties
x (number)
y (number)
z (number)
length (number)

RunTime

RunTime class.

new RunTime()
Instance Members
setView(camera)
fitAll(drawingAreaWidth, drawingAreaHeight, zoomOutFactor)

Properties
STANDARD_VIEW_TOP (string)
STANDARD_VIEW_BOTTOM (string)
STANDARD_VIEW_FRONT (string)
STANDARD_VIEW_BACK (string)
STANDARD_VIEW_RIGHT (string)
STANDARD_VIEW_LEFT (string)
STANDARD_VIEW_ISO (string)
Args (Arguments) : Get needed data from arguments passed from command line .
dictionaty (Dictionary) : Access composer dictionary
preferences (preferences) : Get needed data from composer preferences.

UI

UI class.

new UI()
Instance Members
getBool()
getOpenFileName()
getString()
getValue()
getSaveFileName()
getColor()
getNode()
getData()
getNodeArray()

Properties
DATA_TYPE_VALUE (number)
DATA_TYPE_STRING (number)
DATA_TYPE_BOOL (number)
DATA_TYPE_VECTOR3 (number)
DATA_TYPE_RAY3 (number)
DATA_TYPE_NODE (number)
DATA_TYPE_NODE_ARRAY (number)
DATA_TYPE_FILENAME_OPEN (number)
DATA_TYPE_COLOR (number)
DATA_TYPE_FILENAME_SAVE (number)

Arguments

Arguments class.

new Arguments()
Instance Members
isFound(key)
getAsVector3(key)
getAsColor(key)
getAsVector3Array(key)
getAsColorArray(key)
getAsString(key)
getAsStringArray(key)
getAsNumber(key)
getAsNumberArray(key)

Dictionary

Dictionary class.

new Dictionary()
Instance Members
isFound(key)
getAsVector3(key)
getAsColor(key)
getAsVector3Array(key)
getAsColorArray(key)
getAsString(key)
getAsStringArray(key)
getAsNumber(key)
getAsNumberArray(key)
set(key, value)

Ray3

Ray3 class.

new Ray3()

Properties
position (Vector3)
direction (Vector3)
Example
var RayPosition = ray.position;
var RayDirection = ray.direction;

Mesh

Mesh class.

new Mesh()

Properties
material (Material) : The Mesh object’s default Material.

Preferences

Preferences Class.

new Preferences()
Instance Members
set(properityName)
get(properityName)