大约有 4,034 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0086 秒)
Laya_社区(3264) Laya2.0_文档(296) Laya_示例(141) Laya2.0_示例(117) Laya3.0_文档(107) Laya3.0_api(94) Laya2.0_api(9) laya_api(6)
...让项目开发更高效。class Physics_Physics_Tumbler { constructor() { this.count = 0; this.totalBox = 200; Laya.Config.isAntialias = true; Laya.Laya.init(Laya.Browser.clientWidth, Laya.Browser.clientHeight, Laya.WebGL); Laya.Stat.show(); Laya.Physics.enable({ gravity: 0 }); Laya.PhysicsDebugDra...
来源: Laya2.0_示例 发布时间: 20250223
...rel/Materials/Textures/Barrel_AlbedoTransparency.png', Laya.Handler.create(this, function (texture) { this.mat.albedoTexture = texture; })); //法线贴图 Laya.Texture2D.load('res/threeDimen/scene/PBRMaterialScene/Assets/PBR Barrel/Materials/Textures/Barrel_Normal.png', Laya.Handler.create(this, fu...
来源: Laya2.0_文档 发布时间: 20210715
...组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.txtarea.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.txtarea.size(500, 200); //大小 this.txtarea.pivot(this.txtarea.width/2, this.txtarea.height/2); //轴心点 this.txtarea.text = "大...
来源: Laya3.0_文档 发布时间: 20240910
...(["res/background.png", "res/m_background.png"], laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); //加载进度 function onLoading(progress){ console.log("onLoading: " + progress); } //加载完毕 function onLoaded(){ console.log("onLoaded"); } ...
来源: Laya_社区 发布时间: 20160722
...画播放模式 在下面的示例代码中有一段代码 ```typescript this.skeleton = this.templet.buildArmature(); ``` 与内置版Spine动画播放模式不同的地方在于内置版我们需要传一个参数来确认使用哪种模式(三种模式中,0:不支持换装,1,2支持换装)...
来源: Laya2.0_文档 发布时间: 20210715
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.progressBar.value = 0.01; //初始进度值 this.loadText.text = "资源加载中……"; // 测试加载效果 Laya.timer.loop(100, this, this.changeProgress); } //这里仅模拟加载演示效果 changeProgress(): void ...
来源: Laya3.0_文档 发布时间: 20240910
... 用法: var texture: Laya.Texture = Laya.Loader.getRes("progress.png"); this.spe = new coolDownSprite(); this.spe.init(texture); //this.spe.initWithoutTexture(128, 128); this.spe.pos(300, 350); this.spe.setProgress(this.progress); Laya.stage.addChild(this.spe); ----------------------源码-------...
来源: Laya_社区 发布时间: 20170606
... onLoaded() { start = new GameStartUI(); start.btn_start.on(Event.MOUSE_UP,this,gameInit) Laya.stage.addChild(start); } function gameInit() { map = new GameBgUI(); Laya.stage.addChild(map); play = new GamPlayUI(); Laya.stage.addChild(play); hero = new Hero("hero", 25) hero.pos(100,200) Laya.stage.ad...
来源: Laya_社区 发布时间: 20180911
...组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.lab.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.lab.size(500, 30); //大小 this.lab.pivot(this.lab.width/2, this.lab.height/2); //轴心点 this.lab.text = "大家好,欢迎大家来到...
来源: Laya3.0_文档 发布时间: 20240910
...ad("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/layabox.png", ...
来源: Laya2.0_文档 发布时间: 20210715