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

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

941. runTime使用(JavaScript-IDE篇(JS)-组件化开发相关) [ 54%]

...也不影响后续流程 Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION); } onVersionLoaded() { //激活大小图映射,加载小图的时候,如果发现小图在大图合集里面,则优先加载大图合集...

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

942. 为什么全局属性赋值后,在另外个函数中调用会自动变成undefined [ 54%]

...       Scene3D.load("res/model/LayaScene_Car/Conventional/car.ls", Handler.create(null, function(scene:Scene3D):void {                 Laya.stage.addChild(scene) as Scene3D;                 camera = scene.getChildByName("Main Camera") as Camera;        ...

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

943. typescipt在一定范围内加载图片按照等比排列 [ 54%]

...png', 'comp/button.png', 'comp/image.png'];     myTestUI.imgList.renderHandler = new Laya.Handler(this, onImgListRender);   function onImgListRender(box: Laya.Box) {     let model = box.dataSource;     let panel = box.getChildByName('panel') as Laya.Panel;     let img = panel.getChi...

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

944. 关于mouseThough=true的问题 [ 54%]

...rl:[ "fish_6.png" ],type:Loader.IMAGE}); Laya.loader.load(assets,Handler.create(this,onLoaded)); } private function onLoaded():void{ var img:Image = new Image("fish_6.png"); img.on(Event.CLICK,this,onClick); img.mouseThrough = true; Laya.stage.addChild(img); } 代码就这么简...

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

945. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到了舞台上,可以用手机扫下,发现手机已经...

来源: Laya3.0_文档 发布时间: 20251010

946. 如何能够clone一个node(包括node所有的子节点, 以及所有节点上的compnent,属性) [ 54%]

...a.loader.load([{url:"prefab/ButtonA.json", type:Laya.Loader.PREFAB}], Laya.Handler.create(this, ()=>{ let prefab = Laya.loader.getRes("prefab/ButtonA.json") as Laya.Prefab; let o:Laya.Button = prefab.create(); o.zOrder = 10000; Laya.stage.addChild(o); })); 但是如果要把状态也clone出来...

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

947. 怎么集成导入mqtt.js到laya[ 54%]

....client = new Paho.MQTT.Client(url, Number(port), client); // set callback handlers //连接消失 收到消息 this.client.onConnectionLost = this.onConnectionLost; this.client.onMessageArrived = this.onMessageArrived; // connect the client this.client.connect({ onSuccess: this.onConnect.bind(this)...

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

948. 2d粒子旋转时大小也会随着改变 [ 54%]

...会随着改变 代码: Laya.loader.load("res/Particles/Tail.part", Laya.Handler.create(this, this.OnPariticleAssetsLoaded), null, Laya.Loader.JSON); OnPariticleAssetsLoaded(setting:Laya.ParticleSetting) { let sp = new Laya.Particle2D(setting); sp.pos(200, 200); sp.emitter.start(); sp.play(); Laya...

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

949. 在Unity中设置动画事件(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 54%]

...threeDimen/scene/LayaScene_AnimationEvent/Conventional/layaScene.ls", Laya.Handler.create(this, function(scene) { Laya.stage.addChild(scene); //获取cube对象 var cube = scene.getChildByName("Cube") as Laya.Sprite3D; //添加组件(脚本) var _script = cube.addComponent(SceneScript) as SceneScrip...

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

950. 进度条组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 53%]

...width = 400; this.progressBar.sizeGrid = "5,5,5,5"; this.progressBar.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(this.progressBar); Laya.timer.loop(100, this, this.changeValue); }); } // 模拟进度条加载 private changeValue(): void { if (this.progressBar.value &gt...

来源: Laya3.0_文档 发布时间: 20251010