const icon = new Raster({
source: getBase64Icon(source,
position: new Point(x, y)
});
icon.scale(scale);也许值得一提的是,这些图标是在特定的图层上绘制的。
谢谢你的帮助
发布于 2020-04-28 16:24:24
我认为您正在寻找item.remove()方法,该方法将项目从场景图中移出,从而使其消失。
这是一个演示解决方案的sketch。
// Draw an image.
const raster = new Raster({
source: 'http://assets.paperjs.org/images/marilyn.jpg',
position: view.center
});
// Wait 4 seconds...
setTimeout(() => {
// ...then remove it.
raster.remove();
}, 4000);https://stackoverflow.com/questions/61446686
复制相似问题