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

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

61. Animation提示未定义 [ 69%]

...Cloud = new Animation(); this.aniCloud.loadAnimation("AniCloud.ani"); Laya.stage.addChild(this.aniCloud); }报错 Uncaught ReferenceError: Animation is not defined 2017-10-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 ...

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

62. 使用HtmlDivElement取不到实际大小 [ 68%]

...貌似加上<div>就不能计算了,代码如下: (function() { var Stage = Laya.Stage; var HTMLDivElement = Laya.HTMLDivElement; var HTMLIframeElement = Laya.HTMLIframeElement; var Browser = Laya.Browser; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.ini...

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

63. 官方Demo摇杆控制有bug [ 68%]

...如下代码:   this._currentMouse.x = Math.round(e.touchPos.x / Laya.stage.clientScaleY); this._currentMouse.y = Math.round(e.touchPos.y / Laya.stage.clientScaleY); this.currRockerbox.globalToLocal(this._currentMouse, false); 改为如下方式: // this._currentMouse.x = Math.round(e.touchPos....

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

64. WebGl下 graphics画出东西后 移动sprite 不起效果 [ 68%]

...4657 赞同来自: (function() {     var Sprite = Laya.Sprite;     var Stage = Laya.Stage;     var WebGL = Laya.WebGL;     var sp;     (function()     {         // 不支持WebGL时自动切换至Canvas         Laya.init(740, 400, WebGL);         Laya.stage.alignV = Stage.ALI...

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

65. 求助。资源加载问题,按照官方demo出现问题 [ 67%]

...ivate onLoadComplete(){     const scene = new Laya.Scene3D()     Laya.stage.addChild(scene)          const prefab = Laya.loader.getRes(url)     scene.addChild(prefab) } 2020-03-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...

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

66. ts项目 模块问题 [ 67%]

... // 程序入口 class GameMain { constructor() { Laya.init(640, 960); var stage = Laya.stage; let p1 = new player(); } } new GameMain(); 2018-08-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Mz 赞同来自: ...

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

67. 求教 JS项目的Promise如何使用 [ 67%]

...路径 this.monkey2 = "res/img/monkey2.png"; //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.monkey2,Laya.Handler.create(this,graphicsImg)); function graphicsImg(...

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

68. laya.display.Sprite_API3.0 [ 67%]

...() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 onInit(); } private function onInit():void { sprite = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。 sprite.loadImage("resource/ui/bg.png");//加载...

来源: Laya3.0_api 发布时间: 20231115

69. webgl文字显示不齐 [ 67%]

...t txt; txt = new Laya.Text(); txt.text = "abcde"; txt.fontSize = 100; Laya.stage.addChild(txt); txt = new Laya.Text(); txt.text = "我们是最好的"; txt.fontSize = 50; txt.x = 0; txt.y = 300; txt.scale(2,2); Laya.stage.addChild(txt);在laya2.0版本里,上面第二个文字显示不齐, log...

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

70. 引擎示例中的错误 [ 67%]

...layaair2.ldc2.layabox. ... DForm 1、constructor里的最后一行: Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements, [emailInput, birthdayInput, passwordInput]); 当stage调整尺寸时,对3个input位置进行调整,当初次运行时,3个input框排在网页左上角,必须手...

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