Get started with zrender CDN
BSD-3-Clause licensed
Zrender: Lightweight, flexible 2D WebGL rendering library.
Tags:- canvas
- 2d
- draw
- echarts
Stable version
Copied!
How to start using zrender CDN
// Include ZRender library from CDN
const ZR = window.ZR || zrender.init(document.createElement('canvas'));
// Create a new renderer instance
const renderer = new ZR.WebGLRenderer({
canvas: document.getElementById('mainCanvas'), // Replace with your canvas ID
width: 200,
height: 200
});
// Create a new group node
const group = new ZR.Group();
// Create a new circle shape
const circle = new ZR.Circle({
shape: {
r: 50, // Radius
cx: 100, // Center x
cy: 100 // Center y
},
style: {
fill: 'red' // Fill color
}
});
// Add the circle to the group
group.add(circle);
// Add the group to the scene
renderer.add(group);
// Render the scene
renderer.render();
Copied!
Copied!
Copied!
Copied!
All versions
1.0.0
1.0.1
1.0.2
1.0.3
1.0.4
1.0.5
1.0.6
1.0.7
1.0.8
1.0.9
1.1.0
1.1.1
1.1.2
2.0.0
2.0.1
2.0.2
2.0.3
2.0.4
2.0.5
2.0.6
2.0.7
2.0.8
2.0.9
2.1.0
2.1.1
3.0.0
3.0.1
3.0.2
3.0.3
3.0.4
3.0.5
3.0.6
3.0.7
3.0.8
3.0.9
3.1.0
3.1.1
3.1.2
3.1.3
3.2.0
3.2.1
3.2.2
3.3.0
3.4.0
3.4.1
3.4.2
3.4.3
3.4.4
3.5.0
3.5.1
3.5.2
3.6.0
3.6.1
4.0.5
4.0.6
4.0.7
4.1.0
4.1.1
4.1.2
4.2.0
4.3.0
4.3.1
4.3.2
5.0.0
5.0.0-alpha.1
5.0.0-alpha.2
5.0.0-beta.1
5.0.0-beta.2
5.0.1
5.0.3
5.0.4
5.1.0
5.1.1
5.2.0
5.2.1
5.3.0
5.3.1
5.3.2
5.4.0
5.4.1
5.4.2
5.4.3
5.4.4
*** 5.5.0