[]1.7.12beta版本 drawPoly() 有Bug,少填充一部分.
(function()
{
var Sprite = Laya.Sprite;
var Stage = Laya.Stage;
var WebGL = Laya.WebGL;
var sp;
(function()
{
// 不支持WebGL时自动切换至Canvas
Laya.init(740, 400, WebGL);
Laya.stage.alignV = Stage.ALIGN_MIDDLE;
Laya.stage.alignH = Stage.ALIGN_CENTER;
Laya.stage.scaleMode = "noscale";
Laya.stage.bgColor = "#232628";
drawSomething();
})();
function drawSomething()
{
sp = new Sprite();
Laya.stage.addChild(sp);
// 绘制这些坐标.会出现如下图的错误
sp.graphics.drawPoly(0, 0, [285,285,-1,285,-1,-1,285,-1,285,213.24324324324323,240,240,240,260,260,260,285,259.12280701754383], "#ffff00");
}
})();
{
var Sprite = Laya.Sprite;
var Stage = Laya.Stage;
var WebGL = Laya.WebGL;
var sp;
(function()
{
// 不支持WebGL时自动切换至Canvas
Laya.init(740, 400, WebGL);
Laya.stage.alignV = Stage.ALIGN_MIDDLE;
Laya.stage.alignH = Stage.ALIGN_CENTER;
Laya.stage.scaleMode = "noscale";
Laya.stage.bgColor = "#232628";
drawSomething();
})();
function drawSomething()
{
sp = new Sprite();
Laya.stage.addChild(sp);
// 绘制这些坐标.会出现如下图的错误
sp.graphics.drawPoly(0, 0, [285,285,-1,285,-1,-1,285,-1,285,213.24324324324323,240,240,240,260,260,260,285,259.12280701754383], "#ffff00");
}
})();
没有找到相关结果
已邀请:
1 个回复
Monica - 知识达人
赞同来自:
这个是你最终想要的显示效果吧?请更新至最新版本,即可解决!