• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 17 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0063 秒)

1. setSubPixels画布擦除不掉 [ 100%]

...0; this._testStatus = !this._testStatus; // let canvasInfo = this.getCanvasWidthHeight(); let ctx = new Laya.Context(); // let w = canvasInfo.w//tex.width; // let h = canvasInfo.h//tex.height; let w = tex.width; let h = tex.height; ctx.size(w,h); ctx.asBitmap = true; // ctx.clearRect(0,0,w,h); let _...

来源: Laya_社区 发布时间: 20230328

2. Laya.loader.load(xx) 当地址""的时候,会报错。 [ 97%]

...D)) {                     tex = new Texture2D(data.width, data.height, 1, false, false);                     tex.wrapModeU = exports.WarpMode.Clamp;                     tex.wrapModeV = exports.WarpMode.Clamp;          ...

来源: Laya_社区 发布时间: 20201130

3. 在安卓手机上drawToTexture不能正确返回纹理对象,是HTMLCanvas [ 92%]

...exture = Laya.Sprite.drawToTexture(dragCom,Laya.SpriteConst.TEXTURE,bounds.width, bounds.height, -bounds.x + view.x, -bounds.y + view.y); this._agent.graphics.drawTexture(this._agentTexture, (this._agent.width - bounds.width) * 0.5, (this._agent.height - bounds.height) * 0.5);   }   附件 : --> 2...

来源: Laya_社区 发布时间: 20210911

4. 引擎 TiledMap 居然不支持图块翻转 [ 90%]

...                if (this.x < 0 || this.x > this._map.viewPortWidth || this.y < 0 || this.y > this._map.viewPortHeight) {                     this.hide();                 }                 else {                     this.show();           ...

来源: Laya_社区 发布时间: 20220627

5. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 89%]

...(_colorTex); _colorSpr.cacheAs = "bitmap"; _colorSpr.pos((1024 - _colorTex.width) >> 1, (768 - _colorTex.height) >> 1); _colorSpr.size(_colorTex.width, _colorTex.height); Laya.stage.addChild(_colorSpr); _initPixelCount = getPixel(_colorTex); addEvent(); } private function addEvent():void...

来源: Laya_社区 发布时间: 20180302

6. 画了一个封闭的曲线,获取鼠标点击处的像素,为何坐标对不上导致拿不到正确位置的Texture? [ 85%]

....mouseX, _view.stage.mouseY); var tex:Texture = new Texture(hc); trace(tex.width + "---" + tex.height + "---" + getPixel(tex)); /*获取所画曲线鼠标点击处的像素,为何坐标对不上? 导致无法拿到正确位置的Texture*/ /*var spr:Sprite = new Sprite(); spr.graphics.drawTexture...

来源: Laya_社区 发布时间: 20180319

7. Uint8Array的像素数据在ios中无法改变图片纹理,安卓正常 [ 80%]

...testSetPixels() { let data = this.test1.texture.getPixels(0, 0, this.test1.width, this.test1.height); let width = this.test1.width; let height = data.length / 4 / width; let tex2d = new Laya.Texture2D(width, height, 1); tex2d.setPixels(data); this.imgAr.texture.setTo(tex2d); } 附件 : --> demo.zip ...

来源: Laya_社区 发布时间: 20210114

8. Texture2D.setPixels会导致图片质量变差了,获取原生的pixels没有进行改动。怎么回事呢? [ 78%]

...Obj = this; var onload=function (){ var tex=new Laya.Texture2D(imageSource.width,imageSource.height,1,false,true); tex.wrapModeU=1; tex.wrapModeV=1; tex.loadImageSource(imageSource,true); tex._setCreateURL(url); var tex2=new Laya.Texture(tex); tex2.url=url;   var image:Laya.Image = new Laya.Image()...

来源: Laya_社区 发布时间: 20190923

9. 使用drawToCanvas截图多次之后,再也无法再本次程序中截图显示。没有任何报错 [ 78%]

...private takePhoto(){ this._htmlC = this.gridBox.drawToCanvas(this.gridBox.width,this.gridBox.height,0,0); //获取截屏区域的texture this._tex = new Laya.Texture(this._htmlC); this._photo=new Laya.Sprite(); //将截屏的texture进行draw绘制并显示到舞台 this._photo.name="testtt"; this._...

来源: Laya_社区 发布时间: 20170502

10. this.bitmap.activeResource is not a function [ 77%]

...域 this._openZone = new Laya.Sprite(); } this._openZone.size(Laya.stage.width,Laya.stage.height); if(this._openZone.parent) return; console.log("打开开放域",Laya.Browser.onMiniGame) Laya.stage.addChild(this._openZone); this._openZone.x = vx; this._openZone.y = vy; if(Laya.Browser.onMiniGame){ ...

来源: Laya_社区 发布时间: 20200618