You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
386 B
29 lines
386 B
|
4 months ago
|
# @antv/g-plugin-html-renderer
|
||
|
|
|
||
|
|
Render HTML for g-canvas/svg/webgl.
|
||
|
|
|
||
|
|
```js
|
||
|
|
const p1 = new HTML({
|
||
|
|
style: {
|
||
|
|
x: 200,
|
||
|
|
y: 100,
|
||
|
|
html: 'p1',
|
||
|
|
},
|
||
|
|
});
|
||
|
|
const p2 = new HTML({
|
||
|
|
style: {
|
||
|
|
x: 400,
|
||
|
|
y: 100,
|
||
|
|
html: 'p2',
|
||
|
|
},
|
||
|
|
});
|
||
|
|
|
||
|
|
// 修改属性
|
||
|
|
p1.style.x = x1;
|
||
|
|
p1.style.filter = 'blur(5px)';
|
||
|
|
|
||
|
|
// 变换
|
||
|
|
p1.translate(100, 0);
|
||
|
|
p1.scale(2);
|
||
|
|
```
|