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

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

1641. Cannot read property 'toDefault' of undefined报错是什么原因 [ 43%]

...age.addChild(new MousePickingScene()); // Laya.init(Browser.width, Browser.height); // Laya.stage.scaleMode = Stage.SCALE_NOSCALE; infoText = "距离:null"; mySwitch = true; target = new BMap.Point(113.392307, 23.062487); createDom(); initMap(); createButton(); var successHandler = new Handler(thi...

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

1642. 使用对象池重复使用skeleton报错,请问有解决方案吗?谢谢 [ 43%]

...nIndex = 0; (function() { WebGL.enable(); Laya.init(Browser.width, Browser.height); Laya.stage.bgColor = "#ffffff"; Stat.show(); startFun(); })(); function startFun() { mAniPath = "res/spine/spineRes1/dragon.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on...

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

1643. 绘制三角形、多边形及根据数据绘制图案(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 42%]

...       canvas.graphics.drawPoly(Laya.stage.width / 2, Laya.stage.height / 2, path, "#FF7F50");             }     } } ``` 代码运行效果如下图所示: ​ ![blob.png](img/4.png) ​ (图4) ​ 通过上面的示例代码的写法,是不是感觉代码的可...

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

1644. Button属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 42%]

... Laya.stage.addChild(btn); //设置Button相关属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label = "按钮"; } ``` 上述代码运行效果如动图2所示: ![动图2](img/2.gif) (动图2) **Tips:** Button 组件的属性接口介绍请参考 [Button API](https://layaair2.ldc2.l...

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

1645. 垂直滑动条组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 42%]

...id { let vs: Laya.Slider = new Laya.VSlider(); vs.skin = "vslider.png"; vs.height = 300; vs.pos(400, 50); vs.min = 0; vs.max = 100; vs.value = 50; vs.tick = 1; vs.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(vs); } private onChange(value: number): void { console.log("...

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

1646. Button属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 42%]

... Laya.stage.addChild(btn); //设置Button相关属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label = "按钮"; } } new GameMain(); ``` 上述代码运行效果如动图2所示: ![动图2](img/2.gif) (动图2) **Tips:** Button 组件的属性接口介绍请参考 [Button API](https...

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

1647. tiledMap类createMap()创建地图 如何理解这个viewRect视口区 [ 42%]

...什么宽高)         console.log(tiledMap.gridWidth,tiledMap.gridHeight);         //地图宽高         console.log(tiledMap.width,tiledMap.height);         //         console.log(tiledMap.numColumnsGrid,tiledMap.numRowsGrid );          console.log(...

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

1648. Laya.Loader.getRes("xxx.png")取出来的资源为什么是Texture2D,不是Texture [ 42%]

...  tex.once(Event.READY, this, this.drawImage, [tex, x, y, width, height]);                 }   导致 tex 找不到 getIsReady 方法报错     报错堆栈 TypeError: tex.getIsReady is not a function at Graphics.loadImage (file:///D:/zxl/2.0_stable/lfGame2.0/bin/libs/lay...

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

1649. tiledMap类createMap()创建地图 如何理解这个viewRect视口区 [ 41%]

...什么宽高)         console.log(tiledMap.gridWidth,tiledMap.gridHeight);         //地图宽高         console.log(tiledMap.width,tiledMap.height);         //         console.log(tiledMap.numColumnsGrid,tiledMap.numRowsGrid );          console.log(...

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

1650. laya打包iOS,运行奔溃,构建时候选择的是2.3.0 [ 41%]

...问题。   Laya.init(GameConfig_1.default.width, GameConfig_1.default.height, Laya["WebGL"]); 加了一些alert,bundle.js 这里的Laya["WebGL"]已经是undefined了:   虽然在core.js中强制使用了webgl,if (!isWebGLEnabled)/*__JS__ */{laya.webgl.WebGL.enable();}   但在webgl.js ...

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