Function createRender2dTexture
- createRender2dTexture(opts): {
dispatchEvent: ((eventName, x?, y?) => void);
dispose: (() => void);
texture: ((param?) => Texture);
update: ((cb) => boolean);
} Returns {
dispatchEvent: ((eventName, x?, y?) => void);
dispose: (() => void);
texture: ((param?) => Texture);
update: ((cb) => boolean);
}
dispatchEvent: ((eventName, x?, y?) => void)
- (eventName, x?, y?): void
Parameters
eventName: "click" | "dblclick" | "mousewheel" | "mouseout" | "mouseup" | "mousedown" | "mousemove" | "contextmenu"
Optional
x: number | Vector2
Optional
y: number
Returns void
dispose: (() => void)
texture: ((param?) => Texture)
- (param?): Texture
Parameters
Optional
param: {
copyData?: boolean;
dispose?: boolean;
expandRect?: number | [number, number, number, number];
outputImageDebug?: boolean;
}
Optional
copyData?: boolean
Optional
dispose?: boolean
Optional
expandRect?: number | [number, number, number, number]
Optional
outputImageDebug?: boolean
Returns Texture
update: ((cb) => boolean)
- (cb): boolean
Parameters
cb: ((context) => boolean)
- (context): boolean
Parameters
context: {
canvas: HTMLCanvasElement;
group: Group;
render: Render2dType;
}
canvas: HTMLCanvasElement
Returns boolean
Returns boolean
创建2d绘图渲染材质