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

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

351. Laya.stage.on(Laya.Event.RESIZE,this, this.ChangeSize); [ 94%]

Laya.stage.on(Laya.Event.RESIZE,this, this.ChangeSize); private ChangeSize() {         console.log("---------------")         if(Laya.Browser.window.innerHeight < Laya.Browser.window.innerWidth) {             console.log("横屏")         } else {             console.log(...

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

352. 3D场景销毁后,仍有引用存在,内存中场景及引用其的对象无法销毁 [ 94%]

...存在,内存中场景及引用其的对象无法销毁         this.scene = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D;          this.camera = new Laya.Camera();         this.camera.transform.translate(new Laya.Vector3(0, 2, 5));         th...

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

353. 关于切换图片的问题 [ 94%]

...prite; private flag: boolean = false; constructor() { Laya.init(1000,800); this.img = new Laya.Sprite; this.img.loadImage(this.plane1); Laya.stage.addChild(this.img); this.img.graphics.clear(); this.img.loadImage(this.plane2); Laya.stage.addChild(this.img) } } new Main(); 出来的结果是两张图...

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

354. Image加载完成后的图片大小重设问题 [ 94%]

...;        init();     }     public init ():void     {         this.bg_img.loadImage("ui/bg.jpg",0,0,Laya.stage.width,Laya.stage.height,Laya.Handler.create(this,this.onComplete));         Laya.stage.on(Laya.Event.RESIZE,this,this.onResize);     }     onComplete():void     {   ...

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

355. HtmlDivElement宽度设置错误 [ 94%]

...port default class HtmlTest extends Laya.Sprite { constructor() { super(); this.init(); } init() { this.bg = new Laya.Sprite(); this.bg.graphics.drawRect(0, 0, 200, 200, '#ccc'); this.addChild(this.bg); this.htmlTxt = new Laya.HTMLDivElement(); this.htmlTxt.style.fontSize = 20; this.htmlTxt.style.wi...

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

356. 注册函数里面 事件侦听函数的执行域 的详解 [ 94%]

...函数里面 事件侦听函数的执行域 的详解 sp.on(Event.CLICK, this, fun) 有时候是this,有时候是null 到底怎么区分这个 2016-12-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 LayaBB...

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

357. 为何定时时钟函数可以执行,但是得到的值却不会实时刷新 [ 94%]

...时钟函数可以执行,但是得到的值却不会实时刷新 比如 this.loadNum=0; //资源加载进度中函数 _proto_.onProgress = function(){ //显示加载进度 Laya.timer.loop(100,this,this.ontime); this.txt_load.text = "资源加载中,当前进度:" + parseInt(this.loadNum) + "%"...

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

358. socket报错,on: reserved1 = 1, reserved2 = 1, reserved3 = 0 [ 94%]

... private var byte:Byte; public function SocketSample() { //初始化引擎 this.byte = new Byte(); this.byte.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket = new Socket(); this.socket.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket.on(Event.OPEN,this,open...

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

359. Laya.stage.on(Laya.Event.DISPLAY,this,this.ddddd); 无法监听到。 [ 94%]

Laya.stage.on(Laya.Event.DISPLAY,this,this.ddddd); 无法监听到。 2017-02-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞同来自: 我们测试是没有问题的,当显示对象显示到...

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

360. Spine动画资源加载时不能同时使用"版本管理"和"URL.basePath" [ 94%]

...本)的4827行左右的Templet类的onComplete及parseData方法中设置this._path的位置处对_path进行路径过滤,去掉它内部包含URL.basePath的部分 __proto.onComplete=function(content){ if (this._isDestroyed){ this.destroy(); return; }; var tSkBuffer=Loader.getRes(this._skBuffer...

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