API Reference

This page lists all the current Loon API calls.

***WARNING***

As the Loon API is currently under development, all information contained herein is subject to change without notice. This warning will be removed when the API reaches a stable release state.

Game
loon.game.shutdown

loon.game.state

Scene
loon.scene.attachCollider(id, table entity)

loon.scene.createMaterial(table ambient, table diffuse, table specular, table emission, float shiny, shader id, texture id)

loon.scene.addCube(table pos, material id, table scale)

loon.scene.removeFromDisplay(target id)

loon.scene.rotate(target id, table {x,y,z})

loon.scene.setPos(target id, float x, float y, float z)

loon.scene.updateCamera(float x, float y, float z)

loon.scene.positionLight(x, y, z)

loon.scene.addSquare --pls rename to addPlane

Display
loon.display.resizeWindow

loon.display.setClearColor(float r, float g, float b, float a)

loon.display.setProjection(enum)

Vector
loon.vector3.normalize(table vec3)

loon.vector3.slerp(table vec3, table vec3, float time)

loon.vector3.subtract(table vec3, table vec3)

Font
loon.fonts.loadTTF(string filename, float pointsize)

GUI / HUD
loon.gui.addText(string text, float x, float y, font id, table color)

Input
loon.input.getState

Audio
loon.audio.loadOgg(string filename)

loon.audio.play(source id)

loon.audio.playbackSpeed(source id, float speed)

loon.audio.setLevel(source id, float level)

loon.audio.setLooping(source id, boolean loop)

loon.audio.stop(source id)