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

大约有 1,440 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0056 秒)

531. 设置viewport后显示区域变黑色 [ 79%]

...          //          this.viewport = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height);             this.scrollRect = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height); 2017-04-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

532. laya升级到2.0.0beat4版本,加载场景出现的bug [ 79%]

...D:Laya.Scene3D = Laya.loader.getRes(this.mSceneName) as Laya.Scene3D; Laya.stage.addChild(scene3D); 异常: TypeError: node._setParent is not a function preload.js:55 at Stage.__proto.addChild (file:///E:/H5Project/TestH5Project/TestFeiChe3D/bin/libs/laya.core.js:13235:9) 2018-10-31 添加评论 免...

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

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

...unction() { 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(Event.ERROR, ...

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

534. Laya IDE横竖屏切换时,不断刷新 [ 79%]

...Laya IDE横竖屏切换时,不断刷新 Laya.init(736, 414, WebGL); Laya.stage.scaleMode = 'exactfit'; Laya.stage.screenMode = 'horizontal'; Laya.loader.load(['res/atlas/view.atlas'], Handler.create(this, initGame)); Laya.timer.frameOnce(1, this, function () { Laya.stage.on(Event.RESIZE, this, fun...

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

535. 内存优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 79%]

... { //初始化引擎 Laya.init(1136, 640, Laya.WebGL); //等比缩放 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, this.onFrame); } onFrame(): void { //如果创建对象时间为100帧间隔后 if (this.cre...

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

536. 关于遍历产生的sprite的点击事件,急,大神帮看哈 [ 79%]

...var i=0;i<5;i++){    sp=new Laya.Sprite();    sp.index=i;    Laya.stage.addChild(sp); } 类似这样遍历出来的sprite 我怎么给每个sprite添加一个点击事件获得对应的sp.index值呢! 2017-02-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...

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

537. 使用官方文档中qrcode生成二维码的代码,打包APP后无效 [ 79%]

...eight: 100 }); var url: string = this.URL; this.qrcode.makeCode(url); Laya.stage.once("click", this, this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private clickHandler(): void { var url: string = this.qrcode._oDrawing._elImage.src;//获取,注意这...

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

538. TimeLineUI不存在的问题 [ 79%]

...画。//初始化引擎 Laya.init(600, 400); //设置舞台背景色 Laya.stage.bgColor = "rgba(0,0,0,0.1)"; //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/apes.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //创建一个UI实例 var plan = new...

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

539. 为何发生此类报错Uncaught TypeError: Cannot read property '_tf' of null [ 79%]

...关的链接 提交 6 个回复 melody0529 赞同来自: (function(){ var Stage=Laya.Stage; var WebGL=Laya.WebGL; var config=Config; (function(){ console.log("运行程序。"); Laya.init(1280,720,WebGL); //设置适配模式 Laya.stage.alignH=Stage.ALIGN_CENTER; Laya.stage.alignV=Stage.ALIGN_MIDDLE...

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

540. 程序当中更改适配模式后,没有生效成相对应的适配模式效果是为什么? [ 79%]

...模式效果是为什么? 游戏内容当中,检测横竖屏: Laya.stage.on(Laya.Event.RESIZE, this, this.onResize); /** 更改适配*/ public onResize() { var stageWidth = Laya.Browser.clientWidth; var stageHeight = Laya.Browser.clientHeight; if (stageWidth < stageHeight) { console.log...

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