Skip to content

Class: Renderer

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Renderer(target, canvas, userConfig?): Renderer

Parameters

NameType
targetILeaf
canvasILeaferCanvas
userConfig?IRendererConfig

Returns

Renderer

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:37

Properties

target

target: ILeaf

Implementation of

IRenderer.target

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:9


canvas

canvas: ILeaferCanvas

Implementation of

IRenderer.canvas

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:10


updateBlocks

updateBlocks: IBounds[]

Implementation of

IRenderer.updateBlocks

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:11


FPS

FPS: number = 60

Implementation of

IRenderer.FPS

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:13


totalTimes

totalTimes: number = 0

Implementation of

IRenderer.totalTimes

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:14


times

times: number = 0

Implementation of

IRenderer.times

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:15


running

running: boolean

Implementation of

IRenderer.running

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:17


rendering

rendering: boolean

Implementation of

IRenderer.rendering

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:18


waitAgain

waitAgain: boolean

Implementation of

IRenderer.waitAgain

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:20


changed

changed: boolean

Implementation of

IRenderer.changed

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:21


ignore

ignore: boolean

Implementation of

IRenderer.ignore

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:22


config

config: IRendererConfig

Implementation of

IRenderer.config

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:24


renderBounds

Protected renderBounds: IBounds

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:29


renderOptions

Protected renderOptions: IRenderOptions

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:30


totalBounds

Protected totalBounds: IBounds

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:31


__eventIds

Protected __eventIds: IEventListenerId[]

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:33

Accessors

needFill

get needFill(): boolean

Returns

boolean

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:35

Methods

start

start(): void

Returns

void

Implementation of

IRenderer.start

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:45


stop

stop(): void

Returns

void

Implementation of

IRenderer.stop

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:49


update

update(): void

Returns

void

Implementation of

IRenderer.update

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:53


requestLayout

requestLayout(): void

Returns

void

Implementation of

IRenderer.requestLayout

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:57


render

render(callback?): void

Parameters

NameType
callback?IFunction

Returns

void

Implementation of

IRenderer.render

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:61


renderAgain

renderAgain(): void

Returns

void

Implementation of

IRenderer.renderAgain

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:88


renderOnce

renderOnce(callback?): void

Parameters

NameType
callback?IFunction

Returns

void

Implementation of

IRenderer.renderOnce

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:96


partRender

partRender(): void

Returns

void

Implementation of

IRenderer.partRender

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:140


clipRender

clipRender(block): void

Parameters

NameType
blockIBounds

Returns

void

Implementation of

IRenderer.clipRender

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:148


fullRender

fullRender(): void

Returns

void

Implementation of

IRenderer.fullRender

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:172


__render

__render(bounds, includes?, realBounds?): void

Parameters

NameType
boundsIBounds
includes?boolean
realBounds?IBounds

Returns

void

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:184


renderHitView

renderHitView(_options): void

Parameters

NameType
_optionsIRenderOptions

Returns

void

Implementation of

IRenderer.renderHitView

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:201


renderBoundsView

renderBoundsView(_options): void

Parameters

NameType
_optionsIRenderOptions

Returns

void

Implementation of

IRenderer.renderBoundsView

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:203


addBlock

addBlock(block): void

Parameters

NameType
blockIBounds

Returns

void

Implementation of

IRenderer.addBlock

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:205


mergeBlocks

mergeBlocks(): void

Returns

void

Implementation of

IRenderer.mergeBlocks

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:210


__requestRender

__requestRender(): void

Returns

void

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:220


__onResize

__onResize(e): void

Parameters

NameType
eResizeEvent

Returns

void

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:234


__onLayoutEnd

__onLayoutEnd(event): void

Parameters

NameType
eventLayoutEvent

Returns

void

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:251


emitRender

emitRender(type, bounds?, options?): void

Parameters

NameType
typestring
bounds?IBounds
options?IRenderOptions

Returns

void

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:266


__listenEvents

__listenEvents(): void

Returns

void

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:270


__removeListenEvents

__removeListenEvents(): void

Returns

void

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:280


destroy

destroy(): void

Returns

void

Implementation of

IRenderer.destroy

Defined in

leafer/packages/partner/renderer/src/Renderer.ts:284

Released under the MIT License.