@antv/g-plugin-zdog-canvas-renderer
v2.0.26
Published
A G plugin of renderer implementation with Zdog
Downloads
1,002
Maintainers
Readme
@antv/g-plugin-zdog-canvas-renderer
Use Zdog(Canvas version) to render pseudo-3D shapes.
Getting started
Use g-canvas
and register this plugin.
The dirty-rectangle rendering won't work in this scenario, any change on display objects will cause fullscreen re-rendering.
import { Canvas } from '@antv/g';
import { Renderer } from '@antv/g-canvas';
import { Plugin as PluginZdogCanvasRenderer } from '@antv/g-plugin-zdog-canvas-renderer';
// create a renderer
const renderer = new Renderer();
renderer.registerPlugin(new PluginZdogCanvasRenderer());
// create a canvas & use `g-canvas`
const canvas = new Canvas({
container: 'container',
width: 600,
height: 500,
renderer,
});