大约有 308 项符合查询结果, 库内数据总量为 30,936 项。 (搜索耗时: 0.0057 秒)
...os(500, 300); html.size(html.contextWidth, html.contextHeight); Laya.stage.addChild(html); setTimeout(function() { html.innerHTML = ''; }, 300);此问题是由于在新版中改变了laya.html.js的HTMLDivElement中width的set方法 之前的版本中,set方法为/** *获取对象的宽 */ __getse...
来源: Laya_社区 发布时间: 20170620
...Laya.Ease.linearInOut,Handler.create(this,this.aeroboatTween1)); })); this.addChild(this.mountain); this.addChild(this.aeroboat); this.addChild(this.tower); this.addChild(this.ball); this.addChild(this.statue); this.addChild(this.angel); } // 更新岛 _proto.update = function(target){ var obj = {};...
来源: Laya_社区 发布时间: 20170720
...Ready)); } private onResReady() { let panel = new Laya.Panel(); Laya.stage.addChild(panel); panel.graphics.drawRect(0, 0, 300, 300, "#ffcccc"); panel.width = 300; panel.height = 300; panel.pos(200, 300); let image = new Laya.Image(); image.skin = "comp/image.png"; image.pos(100, ...
来源: Laya_社区 发布时间: 20211108
...r = "#ffffff"; var Img:Sprite = new Sprite(); //添加到舞台 Laya.stage.addChild(Img); Img.loadImage("res/img/monkey1.png",200); } } } ``` 运行效果如图1所示  (图1) ### 2、刷新显示对象节点树 默认状态下,显示对象节点树中只有`DebugInfoLayer`节点...
来源: Laya2.0_文档 发布时间: 20210714
...3) 创建Sprite方式: sp = new Sprite(); addChild(sp); sp.loadImage("./assets/ico_back.png"); 6、定位到 laya.core.js 1438行发现有这样的描述: if (!tex.loaded){ tex.once(/*laya.events.Event.LOADED*/"loaded",this,this._textureLoaded,...
来源: Laya_社区 发布时间: 20171015
...ETE, this, function(){ var roleAni = roleTemp.buildArmature(1); Laya.stage.addChild(roleAni); }) roleTemp.loadAni('res/spine/knight/effect1.sk'); SK动画已经预加载了:Laya.loader.load(['res/spine/knight/effect1.png', 'res/spine/knight/effect1.sk'], Handler.create(this, init));
来源: Laya_社区 发布时间: 20171116
...的update。 为了减少update子节点的层层调用,我重写了addChild的逻辑,使最上层的节点保存了所有子节点的列表,updateChildren的时候就不层层调用,直接在列表上遍历。 但是我试了另一种方式: > 对象不再调用updateChildren...
来源: Laya_社区 发布时间: 20170821
...ature(1); skeleton0.pos(200,700); skeleton0.showSkinByIndex(1); Laya.stage.addChild(skeleton0); skeleton0.replaceSlotSkinName("head","goblin/head","goblingirl/head"); skeleton0.play("walk",true,true,0,0,true); } } new GameMain(); 2018-01-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...
来源: Laya_社区 发布时间: 20180126
... MyScene.load(this._sceneURl) as MyScene; this._scene.output(); Laya.stage.addChild(this._scene); var camera:Laya.Camera = this._scene.getChildByName("Main Camera") as Laya.Camera; camera.addComponent(CameraMoveScript); var tiger:Laya.Sprite3D = this._scene.getChildByName("tiger_idle&...
来源: Laya_社区 发布时间: 20180317
....Texture) => { let sp = new Laya.Sprite(); sp.texture = res; Laya.stage.addChild(sp); setTimeout(() => { sp.destroy() }, 1000); });重现代码如上,代码很简单。 下面是打印了Laya.Resource._idResourcesMap的截图 工程见附件,也很简单就是官方的2d Demo加了...
来源: Laya_社区 发布时间: 20231130