Bowser Engine API

Introduction

This page is an auto-generated documentation from the bowser-engine package source code. It will outline all the available objects of the API as well as their methods. The word "super" references what is most commonly known as JavaScript Prototypal Inheritence.

Composer

Super

The composer object allows to overlay several scenes as well as shaders passes.
The code for this object is based on atleredq's THREE.EffectComposer.

constructor

Scene

Super

@constructor

constructor
add
update
showColliders
hideColliders

Keyboard

Super

Initializes the keyboard object in order to control the keyboard.

constructor
update
setKeyState
getKey

Entity

Super

The entity object represent the idea of an idependant self-mangage object. For instance a character or a vehicle.
Although broke out individually, arguments should be passed as a single parameters javascript object.

constructor
setScene
update
reset
handleCollisions

Base

Super

The base object would ideally be the parent for any bowser-engine object.
Unfortunately it's currently not being used everywhere since some of the classes are inheriting from three.js classes.
We are thinking about implementing multiple inheritance for these.

constructor
getParameter

extend

Super

Returns an extented version of the base class using prototypal inheritance.
The function is inspired from John Resig's Javascript Simple Inheritance article.

constructor

Sampler

Super

@constructor

constructor

Misc

Super

The misc object holds a collection of useful static methods.

constructor

Monitor

Super

Initializes the monitor object. GUI object to monitor game properties.
Each property takes the form of a output object.

constructor
show
hide
update
addOutput
addInput
removeItem

Resolution

Super

Initializes the resolution object.

constructor
getImageRatio
isValid

Sound

Super

@constructor

constructor

Loader

Super

The Loader object manages get requests and data in order to prevent duplicate requests.

constructor

Grid

Super

Creates a grid of lines to make it easier to visualize the cordinates in the scene.

constructor

TileMap

Super

@constructor
There are several callbacks that can be passed in. See the documentation for each callback in this function.

constructor
createGeometry
gidForTileAndLayer
layerData
layerId
layerOpacity
loadImages
materialIdForGid
setLayerOpacity
setMapData
setTileGid
updateMapUVs
uvsForGid

onPropFound

Super

onPropFound(properties, propType, tile)
Generic callback if the more specific callbacks were not found.

constructor

onObjectFound

Super

onObjectFound(layerName, objectData, tile)
Callback for each object in a object layer.

constructor

onMapPropsFound

Super

onMapPropsFound(properties, tile)
Called if map properties are found.

constructor

onLayerPropsFound

Super

onLayerPropsFound(layerName, properties, tile)
Called for each layer that has properties.

constructor

onTilesetPropsFound

Super

onTilesetPropsFound(properties, tileset, tile)
Called for each tileset with properties on it.

constructor

onTilePropFound

Super

onTilePropFound(gid, properties, tile)
Called for each tile that properties are found on.

constructor

Mouse

Super

Initializes the keyboard object in order to control the keyboard.

constructor
update
setButtonState
setPosition

Game

Super

Initializes the game object.

constructor
loop
show
hide
update
render
connectHandlers
disconnectHandlers
onResize
add
focus
onFocus
onBlur
log

Collider

Super

The collider object is responsible for managing collision detection. It inherits from THREE.Mesh.

constructor
setScene
update
getCollisions

CopyShader

Super

The copy shader creates a texture pass out of the underlaying layers.

constructor

CRTShader

Super

Shader that reproduce the effect of an old CRT monitor.

constructor

JumpComponent

Super

A component that allows your entity to jump.

constructor
update

Component

Super

An action that allows your entity to jump.

constructor
update

Tile

Super

@constructor
There are several callbacks that can be passed in. See the documentation for each callback in this function.

constructor
createGeometry
gidForTileAndLayer
layerData
layerId
layerOpacity
loadImages
materialIdForGid
setLayerOpacity
setMapData
setTileGid
updateMapUVs
uvsForGid

Scene2D

Super

Initializes the scene.

constructor
setResolution

Entity2D

Super

Entity used in a Scene2D.

constructor

Scene3D

Super

Initializes the scene object.

constructor
setResolution

Entity3D

Super

The entity object represent the idea of an idependant self-mangage object. For instance a character or a vehicle.

constructor
add

PerspectiveCamera

Super

@constructor

constructor

OrthographicCamera

Super

@constructor

constructor

RenderPass

Super

@author alteredq

constructor

ShaderPass

Super

@author alteredq

constructor