大家好,我是前端西瓜哥。 之前写了一篇 PixiJS 绘制矩形,简单说了一下 PixiJS 是怎么绘制矩形的。 《PixiJS 源码解读:绘制矩形,底层都做了什么?》 它更多的讲解上层的东西,没花太多笔墨描绘底层渲染的流程。所以我写了这篇文章,对渲染流程进行补充讲解。 PixiJS 版本为 7.2.4。 要求读者熟悉 WebGL 的基础知识。 本文会 以绘制设置了填充和描边的矩形为例子,看底层 WebGL 的调用执行。 业务层代码: const app = new PIXI.Application({ width: 500, height: 300, background: "#cc0", //(土黄色) }); document.body.appendChild(app.view); const graph = new PIXI.Graphics(); graph.beginFill(0xff0044); // 红色填充色 graph.lineStyle({ color: "blue", width: 4 }); // 蓝色描边 graph.drawRect(90, 70,...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with 'aTexture
Contact 'aTexture, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack