- core
- Context
- ElementAllocator
- ElementOutput
- Engine
- Entity
- EventEmitter
- EventHandler
- Group
- Modifier
- OptionsManager
- RenderNode
- Scene
- SpecParser
- Transform
- View
- ViewSequence
- events
- EventArbiter
- EventFilter
- EventMapper
- inputs
- Accumulator
- GenericSync
- MouseSync
- PinchSync
- RotateSync
- ScaleSync
- ScrollSync
- TouchSync
- TouchTracker
- TwoFingerSync
- math
- Matrix
- Quaternion
- Random
- Utilities
- Vector
- modifiers
- Draggable
- Fader
- ModifierChain
- StateModifier
- physics
- PhysicsEngine
- physics/bodies
- Body
- Circle
- Particle
- Rectangle
- physics/constraints
- Surface
- Collision
- Constraint
- Curve
- Distance
- Snap
- Wall
- Walls
- physics/forces
- Drag
- Force
- Repulsion
- RotationalDrag
- RotationalSpring
- Spring
- VectorField
- physics/integrators
- SymplecticEuler
- surfaces
- CanvasSurface
- ContainerSurface
- ImageSurface
- InputSurface
- TextareaSurface
- VideoSurface
- transitions
- CachedMap
- Easing
- MultipleTransition
- SnapTransition
- SpringTransition
- Transitionable
- TransitionableTransform
- TweenTransition
- WallTransition
- utilities
- KeyCodes
- Timer
- Utility
- views
- ContextualView
- Deck
- DrawerLayout
- EdgeSwapper
- FlexibleLayout
- Flipper
- GridLayout
- HeaderFooterLayout
- Lightbox
- RenderController
- ScrollContainer
- Scroller
- Scrollview
- SequentialLayout
- widgets
- NavigationBar
- TabBar
CanvasSurface
A surface containing an HTML5 Canvas element. This extends the Surface class.
Overview
Options
canvasSize] [width, height
                Methods
setContent
                  getContext
                  setSize
                CanvasSurface(options)
Constructor Parameters
options
Object
overrides of default options
canvasSize] [width, height
                      Array.Number
                      for document element
                      
                    Methods
setContent()
Set inner document content. Note that this is a noop for CanvasSurface.
deploy(target)Private
Place the document element this component manages into the document. This will draw the content to the document.
Parameters
target
                    Node
                    document parent of this container
                    
                  recall(target)Private
Remove this component and contained content from the document
Parameters
target
                    Node
                    node to which the component was deployed
                    
                  getContext(contextId)
Returns the canvas element's context
Parameters
contextId
                    String
                    context identifier
                    
                  setSize(size, canvasSize)
Set the size of the surface and canvas element.
Parameters
size
                    Array.number
                    [width, height] of surface
                    
                  canvasSize
                    Array.number
                    [width, height] of canvas surface