Class Viewport
Defined in: Viewport.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Viewport(canvas, camera)
|
Method Attributes | Method Name and Description |
---|---|
addTime(time)
|
|
invokeKeyDown(event)
|
|
invokeKeyPress(event)
|
|
invokeKeyUp(event)
|
|
invokeMouseDown(event)
|
|
invokeMouseDrag(event, pressedKeys, diffX, diffY)
|
|
invokeMouseMove(event, diffX, diffY)
|
|
invokeMouseUp(event)
|
|
invokeMouseWheel(delta)
|
|
setCamera(camera)
|
|
setCanvas(canvas)
|
|
setDimension(x, y, width, height)
|
Method Detail
addTime(time)
- Parameters:
- time
invokeKeyDown(event)
- Parameters:
- event
invokeKeyPress(event)
- Parameters:
- event
invokeKeyUp(event)
- Parameters:
- event
invokeMouseDown(event)
- Parameters:
- event
invokeMouseDrag(event, pressedKeys, diffX, diffY)
- Parameters:
- event
- pressedKeys
- diffX
- diffY
invokeMouseMove(event, diffX, diffY)
- Parameters:
- event
- diffX
- diffY
invokeMouseUp(event)
- Parameters:
- event
invokeMouseWheel(delta)
- Parameters:
- delta
setCamera(camera)
- Parameters:
- camera
setCanvas(canvas)
- Parameters:
- canvas
- Returns:
setDimension(x, y, width, height)
- Parameters:
- x
- y
- width
- height