Search
Preparing search index...
The search index is not available
Craters - v0.1.0-rebase.12
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Craters - v0.1.0-rebase.12
Canvas2DRenderer
Class Canvas2DRenderer
Hierarchy
Canvas2DRenderer
Index
Constructors
constructor
Properties
canvas
Element
context
device
Pixel
Ratio
height
width
Methods
clear
create
Image
draw
Image
resize
Constructors
constructor
new
Canvas2DRenderer
(
width
:
number
, height
:
number
, options
?:
any
, devicePixelRatio
?:
number
)
:
Canvas2DRenderer
Parameters
width:
number
height:
number
Optional
options:
any
devicePixelRatio:
number
= window.devicePixelRatio
Returns
Canvas2DRenderer
Properties
canvas
Element
canvas
Element
:
HTMLCanvasElement
context
context
:
CanvasRenderingContext2D
device
Pixel
Ratio
device
Pixel
Ratio
:
number
height
height
:
number
width
width
:
number
Methods
clear
clear
(
v
?:
string
, w
?:
number
, x
?:
number
, y
?:
number
, z
?:
number
)
:
void
Parameters
Optional
v:
string
w:
number
= 0
x:
number
= 0
y:
number
= ...
z:
number
= ...
Returns
void
create
Image
create
Image
(
image
:
any
)
:
any
Parameters
image:
any
Returns
any
draw
Image
draw
Image
(
image
:
any
, sx
?:
number
, sy
?:
number
, sWidth
?:
number
, sHeight
?:
number
, dx
?:
number
, dy
?:
number
, dWidth
?:
number
, dHeight
?:
number
)
:
void
Parameters
image:
any
sx:
number
= 0
sy:
number
= 0
sWidth:
number
= image.width
sHeight:
number
= image.height
dx:
number
= 0
dy:
number
= 0
dWidth:
number
= image.width
dHeight:
number
= image.height
Returns
void
resize
resize
(
width
?:
number
, height
?:
number
, devicePixelRatio
?:
number
)
:
void
Parameters
width:
number
= ...
height:
number
= ...
devicePixelRatio:
number
= ...
Returns
void
Exports
Entity
Component
System
Canvas2DRenderer
constructor
canvas
Element
context
device
Pixel
Ratio
height
width
clear
create
Image
draw
Image
resize