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

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

471. 局部坐标转全局坐标结果与预期相差甚远 [ 64%]

...远 在某个地方使用var pos:Point = img.localToGlobal(new Point(img.width/2, img.height/2));转换坐标 结果是完全正确的。但最近又有地方需要用到 于是写了trace(soil_1.localToGlobal(new Point(soil_1.width/2, soil_1.height/2)));结果与预期相差很远。结果与预期...

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

472. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 64%]

...据IDE设置初始化引擎 if (window["Laya3D"]) Laya3D.init(GameConfig.width, GameConfig.height); else Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]); Laya.stage.scaleMode = GameConfig.scaleMode; Laya.stage.screenMode = GameConfig.screenMode; Laya.stage.alignV = GameConfig.alignV; L...

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

473. 自定义组件时,设置组件子节点的image的skin时,路径layaIde的路径而非项目路径 [ 64%]

...ize(); _proMask = new Sprite(); _proMask.graphics.drawRect(0, 0, _progress.width, _progress.height); _proMask.scaleX = 0; _progress.mask = _proMask; _bar.stateNum = 1; } override protected function createChildren():void { super.createChildren(); var index:Number = getChildIndex(_bg); addChildAt(_pro...

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

474. 2D精灵光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

...tReceive = true; } // 生成一个矩形 private generateRectVerticesAndUV(width: number, height: number): Laya.Mesh2D { const vertices = new Float32Array(4 * 5); const indices = new Uint16Array(2 * 3); let index = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[index++] = 0; vertices[inde...

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

475. 打包出APK后达不到全屏的效果 [ 64%]

... 网页:   模拟器:   真机测试:   有两端黑边 Browser.width获取不到真正的手机宽度值   想请问下各位大佬 怎么能获取到手机的宽度值来计算出比例   TEST2demo,apk打包的apk 附件 : --> Test2.rar apk.rar 2020-05-15 添加评论 免费帖 ...

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

476. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 63%]

...tatic tempTexture: Laya.Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(system.width, system.height); } if (!this.tempTexture) { this.tempTexture = new Laya.T...

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

477. UI-List [ 63%]

...temRender = Item; list.repeatX = 1; list.repeatY = 4; list.x = (Laya.stage.width - WID) / 2; list.y = (Laya.stage.height - HEI * list.repeatY) / 2; // 使用但隐藏滚动条 list.vScrollBarSkin = ""; list.selectEnable = true; list.selectHandler = new Handler(this, this.onSelect); list.renderHandle...

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

478. textInput的单行输入&多行输入(ActionScript-LayaAir基础篇(AS3)-文本) [ 63%]

...性 y 的值,用于控制 textInput 对象的显示位置。 textInput.width = 300;//设置 textInput 的宽度。 textInput.height = 200;//设置 textInput 的高度。 textInput.bgColor = "#c30c30"; Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。 } private function Text_I...

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

479. UI-List [ 63%]

...temRender = Item; list.repeatX = 1; list.repeatY = 4; list.x = (Laya.stage.width - WID) / 2; list.y = (Laya.stage.height - HEI * list.repeatY) / 2; // 使用但隐藏滚动条 list.vScrollBarSkin = ""; list.selectEnable = true; list.selectHandler = new Handler(this, onSelect); list.renderHandler = n...

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

480. 在 tiledmap 插入一个精灵在上面 [ 63%]

...this.tiledMap.createMap("desert.json", new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height),   Laya.Handler.create(this,this.loadedMap)); }   loadedMap(){   this.sp=new Laya.Sprite();   this.sp.graphics.drawRect(0,0,100,100,"#FF0000");   var mapLayer = this.tiledMap.getLayerByIndex(1);...

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