Ogoglio Manual Version 0.001

Javascript API:


Note: If you update a template script you won't see those changes in active things unless you reload them or the space restarts.  You can usually reload a thing from the space's editor page.


HTTPRequest:

httpCode

responseText

stateCode

url


constructor(requestingThingID, method, url, callback)           


abort()

getResponseHeader(headerName)

send(content)

setDestinationPage(scriptSpace, thingID, pageID)


Math:

PI


cos(value)

sqrt(value)


Point:

x, y, z


Quaternion:

w, x, y, z


constructor(w, x, y, z)


add(quat)

multiply(quat)

           

rotate(x, y, z)

setEulerOrientation(x, y, z)

set(w, x, y, z)


Space:


Settings are key/value pairs which are persisted on the service even when a space has been shutdown and restarted (unlike script variables which are transient).  They are also available via the web API so they are handy for communicating information with remote web applications.

getSetting(key)

removeSetting(key)

putSetting(key, value)


startUserMotion(username, splinePath)

stopUserMotion(username, point, quat)

showLinkToUser(username, linkDisplayName, url)


sendMessageToBrowsers(sourceThingID, message)

This method sends an event to each connected 3D viewer.  The viewer then calls the browser side javascript function handleBrowserMessage(sourceThingID, message).  Use this to synchronize space events with client side HTML.


getThingPosition(thingID)

getThingOrientation(thingID)

startThingMotion(thingID, splinePath)

stopThingMotion(thingID, point, quat)

rotateThing(thingID, radiansX, radiansY, radiansZ)

translateThing(thingID, deltaX, deltaY, deltaZ)


startShapeMotion(thingID, shapeName, splinePath)

stopShapeMotion(thingID, shapeName, point)


createTextPage(thingID, width, height, content, x, y, z, xRot, yRot, zRot)

setTextPageContent(thingID, pageID, content)

deletePage(thingID, pageID)

getPageIDs(thingID)


log(message)


scheduleCallback(thingID, timeoutInMillis, function)


SplinePath:

duration

distanceFromPlatform

followsPlatform

looping


constructor( duration,  looping,  followsPlatform)


addKeyFrame(keyFrame)


SplineKeyFrame:

x, y, z

bank

bias

continuity

heading

knot

linear

pitch

scaleX, scaleY, scaleZ

tension



constructor( x,  y,  z,  heading,  knot)

           

3/27/07