大约有 162 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0078 秒)
...例3D Laya.Sprite3D.load("res/threeDimen/skinModel/Zombie/Zombie.lh", Laya.Handler.create(this, function(zombie:Laya.Sprite3D):void { scene.addChild(zombie); this.zombieAnimator = (zombie.getChildAt(0) as Laya.Sprite3D).getComponent(Laya.Animator) as Laya.Animator;//获取Animator动画组件 this.z...
来源: Laya_社区 发布时间: 20190507
...a.init(1100, 619, Laya.WebGL); Laya.loader.load("res/atlas/war.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); } private onLoaded():void{ this.ball = new Ball(); Laya.stage.addChild(this.ball); this.ball.x = Laya.stage.width / 2; this.ball.y = Laya.stage.height / 2; Laya.stag...
来源: Laya_社区 发布时间: 20171108
自定义Laya.Tab的item,tab注册的selectHandler无法触发到回调函数 我需要自定义tab里面的item项,在编辑器自定义了tabItem.scene。 在另一个View里面创建3个这个tabItem对象,命名item0,item1,item2,选中转换为容器Tab命名为myTab。 但是在该View...
来源: Laya_社区 发布时间: 20190514
...文件Image.json Laya.loader.load([{url: "res/Image.json", type: "plf"}], Handler.create(this, function():void { //在回调里,正常使用原来的图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:Texture = Laya.loader.getRes("comp/comp.png"); var sp:...
来源: Laya2.0_文档 发布时间: 20210714
... "res/building.png", // 你的建筑图片路径 Laya.Handler.create(this, () => { // 加载完成后绘制到building Sprite上 let texture = Laya.loader.getRes("res/building.png"); this.building.graphic...
来源: Laya_社区 发布时间: 20251125
... { onAwake(): void { Laya.loader.load(["resource/AtlasConfig.atlas"], Laya.Handler.create(this, () => { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500, 100); img.skin = "resources/img_bg.png"; //图集中的图片 })); } onStart() { Laya.Stat.show(0, 0); } } 通过示例代码,...
来源: Laya3.0_文档 发布时间: 20251010
...d }> = new Map(); // 回调获取方法(需在setupChannelHandlers存储回调) private callbackMap: Map<string, () => void> = new Map(); private lastKnownPositions: Map<string, number> = new Map(); private originalBGMVolume: number = 1; pr...
来源: Laya_社区 发布时间: 20250930
...load,同时可以加载2D,3D资源 Laya.loader.load(resArr, null, Laya.Handler.create(this, this.onLoading, null, false)).then(() => { // 加载完成后,处理逻辑 this.progress.value = 0.98; console.log("加载结束", this.progress.value); Laya.Scene.open("scenes/Index.ls&...
来源: Laya_社区 发布时间: 20230713
...如下: ```typescript //3d场景加载 Laya.Scene3D.load("xx/xx.ls",Laya.Handler.create(null,function(scene){ //加载完成后,把加载回调中返回的完整场景scene添加到舞台 Laya.stage.addChild(scene); //获取摄像机 var camera = scene.getChildByName("Main Camera"); /** ** 省...
来源: Laya2.0_文档 发布时间: 20210714
....”设置为当前文本的内容。 Text loadImage(url:String, complete:Handler = null):Sprite 加载并显示一个图片。相当于加载图片后,设置texture属性 注意:2.0改动:多次调用,只会显示一个图片(1.0会显示多个图片),x,y,width,height参数取消。 Sp...
来源: Laya2.0_api 发布时间: 20190513