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

大约有 4,000 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0083 秒)

231. PBRStandardMaterial材质详解(JavaScript-3D基础(JS)-模型材质详解) [ 95%]

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

232. 进度条组件 · LayaAir3.0文档 · LAYABOX [ 95%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.progressBar.value = 0.01; //初始进度值 this.loadText.text = "资源加载中……"; // 测试加载效果 Laya.timer.loop(100, this, this.changeProgress); } //这里仅模拟加载演示效果 changeProgress(): void ...

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

233. Spine适配版(TypeScript-LayaAir基础篇(TS)-动画基础) [ 95%]

...画播放模式 在下面的示例代码中有一段代码 ```typescript this.skeleton = this.templet.buildArmature(); ``` 与内置版Spine动画播放模式不同的地方在于内置版我们需要传一个参数来确认使用哪种模式(三种模式中,0:不支持换装,1,2支持换装)...

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

234. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 95%]

...(["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

235. 显示文本组件 · LayaAir3.0文档 · LAYABOX [ 95%]

...组件均已创建完毕,此方法只执行一次 */ 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_文档 发布时间: 20230629

236. 分享一个Shader版的CoolDown实现 [ 95%]

... 用法: 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

237. 打飞机点开始游戏加载飞机动画不出来,点重新开始,才出来,新手求助! [ 95%]

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

238. 动画挂点(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 95%]

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

239. 动画挂点(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 95%]

...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_文档 发布时间: 20210714

240. 屏幕适配-屏幕适配 [ 95%]

...le)"; txt.bold = true; txt.pos(0, 200); txt.fontSize = 30; txt.on("click", this, onTxtClick); Laya.stage.addChild(txt); //实例一个小人,放到右上角,并相对布局 var boy1 = new Image(); boy1.skin = "../../res/cartoonCharacters/1.png"; boy1.top = 0; boy1.right = 0; boy1.on("click", thi...

来源: Laya_示例 发布时间: 20241002