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

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

891. 照着官方文档写的 Dialog 报错? [ 68%]

...source.prototype.init = function () { this._container = new Sprite(); Laya.stage.addChild(this._container); Laya.loader.load(["../bin/res/ui/progressBar.png", "../bin/res/ui/progressBar$bar.png"], Handler.create(this, this.onPreloaded)); }; LoadResource.prototype.onPreloaded = function () { this.ini...

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

892. FRAME_SLOW及FRAME_MOUSE模式下切换场景有时会导致渲染崩溃 [ 68%]

...RAME_MOUSE模式下切换场景有时会导致渲染崩溃 当 设置 Laya.stage.frameRate = Laya.Stage.FRAME_SLOW;时切换场景有时会导致崩溃 见附件 附件 : --> 2018-03-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接...

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

893. 使用webgl之后toDataUrl返回黑色的图像 [ 68%]

...Sprite#drawToCanvas() 这片文档,我使用以下代码应该ok   Laya.stage.getChildAt(0).drawToCanvas(100, 100, 0, 0).getCanvas().toDataURL(); 但在WebGL的模式下,实现在laya.core.js的20644行,drawToCanvas返回的是pixels:Uint8Array,这东西怎么变成HTMLCanvas?   如果...

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

894. sprite添加click监听事件反应迟钝 [ 68%]

...//反应没有问题 drawyuan.size(100, 100); var x = Math.random() * Laya.stage.width; var y = Math.random() * Laya.stage.height; console.log(x + "" + y); drawyuan.pos(x,y); return drawyuan; } 2017-09-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...

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

895. "Background is not defined"怎么会没定义呢???求救 [ 68%]

...nction Game(){ Laya.init(600,800); this.bg = new window.Background(); Laya.stage.addChild(this.bg); })(); })();Background.js var Background = (function(_super){ function Background(){ Background.super(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("res/background.png"); this.addChild(this.b...

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

896. 加上size设置后,精灵不能点击. [ 68%]

...(Laya.Event.CLICK, this, () => { img.y -= 10; }) img.pos(100, 300) Laya.stage.addChild(img) } function createFlower() { var f = new Laya.Sprite(); var r = Math.random(); var s = r > 0.66 ? "img/flower1.jpg" : r > 0.33 ? "img/flower2.png" : "img/flower3.jpg" f.loadImage(s); f.on(Laya.Event.C...

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

897. 创建动画时画布的width和height与 实例化后的ani.size(width, height) 有什么区别 [ 68%]

...width, this.aniBirdSing.height); this.aniBirdSing.mouseEnable = true; Laya.stage.addChild(this.aniBirdSing); } 根据这个代码,我认为鼠标点击区域在图片左下区域,但结果是图片左上区域,求解? 如果我想让图片的点击区域是图片左下区域,应该如何...

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

898. 射线检测报错,outHitInfo.sprite3D=null; [ 68%]

...Laya.Vector3.ZERO); this.phasorSprite3D = new Laya.PhasorSpriter3D(); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.onMouseDown); }  private onMouseDown():void{ this.camera.viewportPointToRay(new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),this.ray); Laya.Physi...

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

899. JSON文件加载成功后,怎么解析成Object对象 [ 68%]

...ext(); txt.mouseEnabled = false; txt.overflow = Text.SCROLL; txt.size(Laya.stage.width, Laya.stage.height); txt.pos(10, 10); txt.fontSize = 30; txt.wordWrap = true; txt.color = "#FF9632"; Laya.stage.addChild(txt); var test:Object = JSON.parse('{"id": 0, "name": "Chen"}'); traceMsg(test['id']); trace...

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

900. physicsSimulation.rayCast在新版本里选取不准确 [ 68%]

...2-12-26 0 0 分享 微博 QZONE 微信 shiyang 赞同来自: mouseX / Laya.stage.clientScaleX mouseY / Laya.stage.clientScaleY   2023-01-09 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 151*****601 相关问题 Browser获取的运行...

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