[LayaAir 2.0]laya.sprite精灵无缝拼接地图,会出现黑线跟白线,使用laya的2.0.1beta版本

使用showall的适配就会出现这些黑线(其他方式不会),我的游戏需要showall方式的适配的!!!!
请问一下 应该怎么解决这个问题,位置定位是没错,而且都是整数的移动地图的。
 
export default class MapSprite extends Laya.Image{
isShow:boolean = false;
name:string = "";
constructor() {
super();

loadImageAndPos(name:string,posX:number,posY:number):void {
this.name = name;
this.anchorX = 0;
this.anchorY = 0;
this.x = posX; //这里是256*整数倍的叠加 每张图片都是256*256大小的地图块
this.y = posY; //这里是256*整数倍的叠加 每张图片都是256*256大小的地图块
this.isShow = true;
Laya.loader.load(name,Laya.Handler.create(this,this.drawImg));

drawImg():void {
var texture:Laya.Texture = Laya.loader.getRes(this.name);
this.texture = texture;

clearImage(): void{
if (this.name != "") {
this.isShow = false;
Laya.Loader.clearTextureRes(this.name);
Laya.Loader.clearRes(this.name);
this.name = "";
}

}
S78DSEM7862MAY2}1PWPDT2.png

 
已邀请:

尾号

赞同来自:

大神请回答一下,上面说错了 是Laya.Image 不是Laya.Sprite哈

Aar0n

赞同来自:

尝试:图片设置为repeat,webgl 和canvas 模式都试试,如果都不行,那么这个裂缝就不可避免了,这种有缩放导致拼接不顺

尾号

赞同来自:

drawImg():void {
var texture:Laya.Texture = Laya.loader.getRes(this.name);
this.graphics.fillTexture(texture,0,0,256,256,"repeat");
// this.texture = texture;
} 这样设置 没什么效果~~ 设置那个Canvas也没有效果

178*****216

赞同来自:

请问解决了吗,我也遇到这个问题了

要回复问题请先

商务合作
商务合作