大约有 94 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0047 秒)
...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
...D)) { tex = new Texture2D(data.width, data.height, 1, false, false); tex.wrapModeU = exports.WarpMode.Clamp; tex.wrapModeV = exports.WarpMode.Clamp; ...
来源: Laya_社区 发布时间: 20201130
...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
... if (this.x < 0 || this.x > this._map.viewPortWidth || this.y < 0 || this.y > this._map.viewPortHeight) { this.hide(); } else { this.show(); ...
来源: Laya_社区 发布时间: 20220627
...(_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
...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
...); //获取临时sprite的htmlCanvas var htmlCanvas = img.drawToCanvas(tex.width,tex.height,0,0); //获取临时sprite的 原生Canvas var c = htmlCanvas.getCanvas(); var ctx = c.getContext("2d"); //获取canvas的imgData var imgData = ctx.getImageData(0,0,ctx.canvas.width,ctx.canvas.height); //将...
来源: Laya_社区 发布时间: 20180413
....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
...ics.drawTexture(texture); //设置纹理宽高 this.img.size(texture.width, texture.height); <!-- 我想把加粗部分换成 this.img.graphics.drawTexture(Laya.loader.getRes(imgUrl),100,50,60,60); 为什么就不起作用了,switchImg()只执行了一次,不能实现切换图片 ...
来源: Laya_社区 发布时间: 20180226
...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