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

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

351. 使用插件导出模型后,使用js加载ls文件,报错Laya.Scene.load is not a function [ 73%]

...ar scene = Laya.Scene.load("LayaScene_layaScene/layaScene.ls"); Laya.stage.addChild(scene); var camera = new Laya.Camera(0, 0.1, 1000); //加载到场景 scene.addChild(camera); 2018-11-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

352. 粒子特效,播放与克隆有bug [ 73%]

...19-11-26 0 1 分享 微博 QZONE 微信 子艮 赞同来自: let sp3d = lf.addChild(Laya.loader.getRes("res/zhadan/1/LayaScene_zhadan/Conventional/zhadan.ls")) as Scene3D; let spCore = sp3d.getChildByName("Canvas") as Sprite3D; spCore.transform.localPosition = new Vector3(0, 0.7, 90); let tp3d = Spr...

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

353. Tree属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 73%]

...ree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; Laya.stage.addChild(tree); } } } import Box = Laya.Box; import Clip = Laya.Clip; // 此类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "u...

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

354. 圆不跟谁 sprite 一起缩放? [ 73%]

...this._rootSp.hitArea = new Laya.Rectangle(0, 0, 10000, 10000) this._rootSp.addChild(this.firstSp); Laya.stage.addChild(this._rootSp); }  private MouseWheel(e: Laya.Event) { let xs = this.firstSp.scaleX; if (e.delta > 0) { xs = xs * 1.2; } else { xs /= 1.2; } this.firstSp.scale(xs, xs); } } new G...

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

355. 创建多个Sprite对象后,再次取出来的时候坐标全为0,0高宽跟创建时的也不一样 [ 73%]

...ge(); sp.name = "logo_" + nums; sb.name = "logo_bg_" + nums; userBoxSprite.addChild(sb); userBoxSprite.addChild(sp); // sb.loadImage(newBg1, x, y, singleWidth, singleHeight); sb.skin = newBg1; sb.pos(x,y); sb.size(singleWidth, singleHeight); // sp.loadImage(imgUrl, x, y, singleWidth, singleHeight); ...

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

356. 资源回收的清理不干净的bug [ 73%]

...i=0; i<3; i++){                 var ball = myscene.addChild(sp.clone());                 ball.name = i.toString();             }             console.log("add finished: ", myscene.numChildren);                  for(v...

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

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

...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.CLICK, ...

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

358. bitmap渲染问题 [ 73%]

...; bmd2.copyPixels(bmd1, rect, pt); var bm1:Bitmap = new Bitmap(bmd1); this.addChild(bm1); var bm2:Bitmap = new Bitmap(bmd2); this.addChild(bm2); bm2.x = 50; trace(rect.width); trace(rect.height); 输出正常,不知道你那边是如何写的?

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

359. android旋转屏幕 半边黑屏 [ 73%]

... var te:Text = new Text(); te.fontSize = 50; te.text = "内容测试"; spr.addChild(te); Laya.stage.addChild(spr); Laya.stage.on(Event.CLICK, this, function():void { if (Laya.stage.screenMode == Stage.SCREEN_HORIZONTAL) { if (Browser.window.conchConfig) { Browser.window.conchConfig.setScreenOrientat...

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

360. 请问一下,怎么将下面这段AS3代码翻译成LayaAir的API [ 73%]

...; sprite_.graphics.drawRect(100, 50, 200, 90); sprite_.graphics.endFill(); addChild(sprite_); 2017-04-14 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: package { import laya.display.Sprite...

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