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

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

141. 滤镜问题,有复现demo [ 66%]

...消失了???? */ Laya.stage.graphics.drawRect(200, 200, Laya.stage.width / 2, Laya.stage.height / 2, "#ffff00"); var btn:Sprite = new Sprite(); btn.size(200, 100); btn.graphics.drawRect(0, 0, btn.width, btn.height, "#ff00ff"); Laya.stage.addChild(btn); btn.on(Event.MOUSE_DOWN, this, function...

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

142. 加载-销毁Texture使用的图片资源 [ 65%]

...Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.init(); } init...

来源: Laya2.0_示例 发布时间: 20261113

143. emoji表情文字乱码 [ 65%]

...tr);             var tHTMLChar=words[i]=new HTMLChar(w[i],size.width,size.height||style.fontSize,style);             if (this.href){                 var tSprite=new Sprite();                 this.addChild(tSprite);               ...

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

144. setSubPixels画布擦除不掉 [ 65%]

...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

145. 屏幕适配-屏幕适配 [ 65%]

... var modes = ["noscale", "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"]; //当前适配模式索引 var index = 0; //全局文本信息 var txt; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640); //设置适配模式 Laya.stage.scaleMode = "noscale...

来源: Laya_示例 发布时间: 20261113

146. 屏幕适配-屏幕适配 [ 65%]

...let modes = ["noscale", "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"], index = 0, txt; class SmartScale_T { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Image = Laya.Image, Text = Laya.Text; ...

来源: Laya2.0_示例 发布时间: 20261113

147. 自己写了个label继承官方的label,出现了问题,求指导~ [ 65%]

... true, true); label.textFormat = textFormat; label.wordWrap = true; label.lWidth = 100; label.lHeight = 100; label.txt = "Hello"; label.lx = 100; label.ly = 100; Laya.stage.addChild(label); //---------------------------------这是用官方的api,无问题------------------------------------------...

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

148. 陀螺仪与加速计(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 64%]

... info.fontSize = 50;  info.color = "#FFFFFF";  info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(info);     Gyroscope.instance.on(Event.CHANGE, this, onDeviceorientation); }   private function onDeviceorientation(absolute:Boolean, rotationInfo:RotationInfo):void...

来源: Laya2.0_文档 发布时间: 20210714

149. HTMLDivElement中图文混排怎么获取实际内容大小 [ 64%]

...ML="<img src='res/image/1.png' />"; console.log("size: " + imageHtml.width + ", " + imageHtml.height); console.log("contextSize: " + imageHtml.contextWidth + ", " + imageHtml.contextHeight); Laya.stage.addChild(imageHtml);   上述代码在Laya中运行 正确显示了 图片 控制台输出...

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

150. 多行输入文本组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 64%]

...此方法只执行一次 */ onAwake(): void { this.txtarea.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.txtarea.size(500, 200); //大小 this.txtarea.pivot(this.txtarea.width/2, this.txtarea.height/2); //轴心点 this.txtarea.text = "大家好,欢迎各位开发...

来源: Laya3.0_文档 发布时间: 20251010