关于pixi.js:PIXIJS问题集锦

11次阅读

共计 264 个字符,预计需要花费 1 分钟才能阅读完成。

轻量 2D 渲染库

Documents

http://pixijs.download/releas…

遇到的坑

如何获取绘制出的形态面积

const spaces = this.graph.spaces
const extract = this.renderer.plugins.extract
const graphics // 依据形态绘制办法,设置 fillStyle 重绘
graphics.beginFill(fillColor, fillAlpha)
const dimension = extract.pixels(graphics)/4
//  4: rgba 4 个通道 

正文完
 0