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

大约有 2,033 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0064 秒)

211. 高级应用-实时阴影 [ 91%]

.../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh" ], Laya.Handler.create(this, onComplete)); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); var _direction = directionLight.direction; Laya.Vector...

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

212. UI-ProgressBar [ 91%]

...s/ui/progressBar.png", "../../res/ui/progressBar$bar.png"], Handler.create(this, onLoadComplete)); })(); function onLoadComplete() { progressBar = new ProgressBar("../../res/ui/progressBar.png"); progressBar.width = 400; progressBar.x = (Laya.stage.width - progressBar.width) / 2; progressBar.y = Lay...

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

213. 计时器-间隔循环 [ 91%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); this.rotateFrameRateBasedText = this.createText("基于帧频...

来源: Laya2.0_示例 发布时间: 20251130

214. 飞机大战地图滚动报错,麻烦看下? [ 91%]

...  bg2.pos(650, 0);     box.addChild(bg2);     Laya.timer.frameLoop(1, this, bg_loop()); } function bg_loop() {     box.x -= 1;     if (bg1.x + box.x <= 0) {         bg1.y = 650     }     if (bg2.x + box.x <= 0) {         bg2.x = 650     } } bg_rolling(); 以上是我把...

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

215. 加载-加载序列 [ 91%]

...xLoader = 1; Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, onAssetLoaded), null, null, 0, false); Laya.loader.load("../../res/apes/monkey1.png", Handler.create(this, onAssetLoaded), null, null, 1, false); Laya.loader.load("../../res/apes/monkey0.png", Handler.create(this, onAss...

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

216. 物理系统之FixedConstraint(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 91%]

...刚体 ```typescript //创建盒型MeshSprite3D var box: MeshSprite3D = (this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(1, 1, 1)))); //设置材质 var transform: Transform3D = box.transform; var pos: Vector3 = transform.position; pos.setValue(0, 5, 0); transform.position = pos; //创...

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

217. 物理系统之FixedConstraint(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 91%]

...刚体 ```typescript //创建盒型MeshSprite3D var box: MeshSprite3D = (this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(1, 1, 1)))); //设置材质 var transform: Transform3D = box.transform; var pos: Vector3 = transform.position; pos.setValue(0, 5, 0); transform.position = pos; //创...

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

218. HScrollBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 91%]

...ndler = Laya.Handler; var WebGL = Laya.WebGL; /***水平滚动条资源**/ this.skins = ["res/ui/hscroll.png", "res/ui/hscroll$bar.png", "res/ui/hscroll$down.png", "res/ui/hscroll$up.png"]; Laya.init(800, 600, WebGL); //画布垂直居中对齐 Laya.stage.alignV = Stage.ALIGN_MIDDLE; //画布水平...

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

219. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 91%]

...,可以使用局部变量来保存它: ```typescript foo() { var prop=this.target.prop; //使用prop this.process1(prop); this.process2(prop); this.process3(prop); } ``` ### 二、计时器 LayaAir提供两种计时器循环来执行代码块。 1. `Laya.timer.frameLoop`执行频率依赖于帧...

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

220. 输入设备-摇一摇 [ 91%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showShakePic(); this.showConsoleText(); this.startShake(); } showShakePic() { const Sprite = Laya.Sprite; let shakePic = new Sprite(); shakePic.loadImage("res/inputDevice/shake.png"); Laya.stage.addChild(shakePic); } sho...

来源: Laya2.0_示例 发布时间: 20251130