gma.sceneHelper

Connects the rendering library to gamma manager

Package

gma/utils/render

Properties

bkgIds

Dictionairy of {id:render Helpers} for things to appear in background

Type

{{id : gma.renderHelper}}

background

List of render Helpers for things to appear in background

Type

{[gma.renderHelper]}

extras

List of extra objects to be rendered in the scene

Type

{name : obj}

attached

List associating GLGE objects to gamma objects

Type

{name : [obj, offsetX, offsetY]}

scene

The GLGE.Scene being rendered

Type

GLGE.Scene

renderer

The GLGE.Renderer being used

Type

GLGE.Renderer

doc

The GLGE.Document being used

Type

GLGE.Document

grp

The GLGE.Group that holds everything

Type

GLGE.Group

Methods

init (manager, resources, callback)

Initialises the GLGE scene

Parameters

manager

gma.manager

resources

[String]

a list of paths to xml files

callback

function

The callback to call when the document is loaded

setupScene (manager)

Setups the scene with a camera, group and extras

Parameters

manager

gma.manager

makeRenderer (manager)
Function that creates renderer object
And sets the scene

Parameters

manager

gma.manager

clear ( )

Function that clears everything from the scene

add (helper)

Function that adds a helper to the scene

Parameters

helper

gma.renderHelper

countContained ( )

Returns how many things are rendered by the scene

render (manager)

Function that sets locations and renders the scene

Parameters

manager

gma.manager

setRenderedLocations (manager)

Sets locations of everything in the scene

Parameters

manager

gma.manager

addExtra (name, type, spec) -> Object just added

Adds other objects into the scene

Parameters

name

String

type

String

spec

Object

removeExtras (extras)

Removes specified extras from the scene helper

Parameters

extras

[String]

List of extra ids to remove

removeBackground (backgrounds)

Removes specified background from the scene helper

Parameters

backgrounds

[String]

List of background ids to remove

attach (name, obj, offsetX, offsetY, offsetZ)

Records the necessary information to allow an object to follow another

Parameters

name

String

Name of the object in self.extras we are attaching the gma object to

obj

gma.shapes.rectangle

offsetX

Number

offsetY

Number

offsetZ

Number

detach (name)

Dissociates a object from another to stop an object following another object

Parameters

name

String