interface Renderer { _getImageData(sx: number,
sy: number,
sw: number,
sh: number): null | ImageData; _putImageData(imageData: ImageData,
dx: number,
dy: number,
dirtyX?: number,
dirtyY?: number,
dirtyWidth?: number,
dirtyHeight?: number): void; begin(): void; clear(): void; drawImage(surface: Surface,
offsetX: number,
offsetY: number,
width: number,
height: number,
destOffsetX: number,
destOffsetY: number): void; drawSprites(surface: Surface,
offsetX: number[],
offsetY: number[],
width: number[],
height: number[],
canvasOffsetX: number[],
canvasOffsetY: number[],
count: number): void; end(): void; fillRect(x: number,
y: number,
width: number,
height: number,
cssColor: string): void; isSupportedShaderProgram(): boolean; opacity(opacity: number): void; restore(): void; save(): void; setCompositeOperation(operation: CompositeOperationString): void; setOpacity(opacity: number): void; setShaderProgram(shaderProgram: null | ShaderProgram): void; setTransform(matrix: number[]): void; transform(matrix: number[]): void; translate(x: number,
y: number): void; } Methods
_getImageData
- _getImageData(sx, sy, sw, sh): null | ImageData
Parameters
- sx: number
- sy: number
- sw: number
- sh: number
_putImageData
- _putImageData(imageData, dx, dy, dirtyX?, dirtyY?, dirtyWidth?, dirtyHeight?): void
Parameters
- imageData: ImageData
- dx: number
- dy: number
Optional
dirtyX: numberOptional
dirtyY: numberOptional
dirtyWidth: numberOptional
dirtyHeight: number
Returns void
begin
- begin(): void
Returns void
clear
- clear(): void
Returns void
drawImage
- drawImage(surface, offsetX, offsetY, width, height, destOffsetX, destOffsetY): void
Parameters
- surface: Surface
- offsetX: number
- offsetY: number
- width: number
- height: number
- destOffsetX: number
- destOffsetY: number
Returns void
drawSprites
- drawSprites(surface, offsetX, offsetY, width, height, canvasOffsetX, canvasOffsetY, count): void
Parameters
- surface: Surface
- offsetX: number[]
- offsetY: number[]
- width: number[]
- height: number[]
- canvasOffsetX: number[]
- canvasOffsetY: number[]
- count: number
Returns void
end
- end(): void
Returns void
fillRect
- fillRect(x, y, width, height, cssColor): void
Parameters
- x: number
- y: number
- width: number
- height: number
- cssColor: string
Returns void
isSupportedShaderProgram
- isSupportedShaderProgram(): boolean
Returns boolean
opacity
- opacity(opacity): void
Returns void
restore
- restore(): void
Returns void
save
- save(): void
Returns void
setCompositeOperation
- setCompositeOperation(operation): void
Returns void
setOpacity
- setOpacity(opacity): void
Returns void
setShaderProgram
- setShaderProgram(shaderProgram): void
Parameters
- shaderProgram: null | ShaderProgram
Returns void
setTransform
- setTransform(matrix): void
Returns void
transform
- transform(matrix): void
Returns void
translate
- translate(x, y): void
Returns void
ゲームの描画を行うクラス。
描画は各エンティティによって行われる。通常、ゲーム開発者が本クラスを利用する必要はない。