Skip to content

Components

Maks edited this page Feb 5, 2019 · 6 revisions

Components

Name

Nothing more than a string

Transform

Properties Type Notes
position vector3 table local position
rotation vector3 table local rotation in euler angles in degrees
scale vector3 table local scale

Transform:move(x, y, z)

Transform:rotate(angle, x, y, z)

Rotates angle degrees around axis (x,y,z). Normalizes the axis internally.

Transform:scale(x, y, z)

Multiplies the current scale by the given values.

RenderInfo

Properties Type Notes
mesh string path to the mesh, relative to the assets folder. Write-only.

A second property, RenderInfo.material, is currently only settable when creating the component out of a component definition. See Game.makeActor. Supported properties of material:

Properties Type Notes
diffuseColor vector3 table
diffuseMap string path to the diffuse map
specularColor vector3 table
specularMap string path to the specular map
shininess number shininess in ADS shading

Camera

No properties or functions at the moment.

Light

Properties Type Notes
color vector3 table
intensity number
colorAmbient string ignores intensity
kind string "Point", "Directional" or "Spot". Currently only settable through a component definition (see Game.makeActor).

Rigidbody

Properties Type Notes
isKinematic bool
useGravity bool
bounciness number should be between 0 and 1
radius number As collision detection is currently only supported between spheres
velocity vector3 table
Clone this wiki locally