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

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

231. 2D物理-复合碰撞器 [ 95%]

...让项目开发更高效。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

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

233. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 95%]

...组件均已创建完毕,此方法只执行一次 */ 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

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. Spine适配版(TypeScript-LayaAir基础篇(TS)-动画基础) [ 95%]

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

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

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

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

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

237. 分享一个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

238. 打飞机点开始游戏加载飞机动画不出来,点重新开始,才出来,新手求助! [ 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

239. 显示文本组件 · LayaAir3.3 · 引擎文档 · 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_文档 发布时间: 20240910

240. 动画挂点(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