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

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

381. 鼠标交互-鼠标交互 [ 65%]

... Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); rect.on(Event...

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

382. 灯光-聚光 [ 65%]

.../LayaMonkey/LayaMonkey.lh")); layaMonkey.once(Laya.Event.HIERARCHY_LOADED, this, function () { var aniSprite3d = layaMonkey.getChildAt(0); var animator = aniSprite3d.getComponentByType(Laya.Animator); animator.play(null, 1.0, 115, 150); }); var _quaternion = new Laya.Quaternion(); var _position = ne...

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

383. 缓动动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 65%]

...java Tween.to(letterText, { y : 300 }, 1000, Ease.bounceIn, Handler.create(this,changeColor,[letterText]), i * 100); ``` 由于需要增加新的引用,这次贴出全部的示例代码。 TweenDemo.as: ```java package { import laya.display.Text; import laya.utils.Ease; import laya.utils.Handler...

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

384. 材质-BlinnPhong-法线贴图 [ 65%]

...发语言、LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); this.rotation = new Laya.Vector3(0, 0.01, 0); this.normalMapUrl = ["../../res/threeDimen/staticModel/lizardCal/rock_norm.png", "../../res/threeDimen/staticModel/lizardCal/lizard_norm.png", "../../res/threeDimen/staticModel/liz...

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

385. 文本-下划线 [ 65%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { this.createText('left', 1, null, 100, 10); this.createText('center', 2, "#00BFFF", 155, 150); this.createText('right', 3, "#FF7F50", 210, 290); } private createText(align: s...

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

386. MovieClip的target和currentTarget属性为undefined? [ 65%]

...ach(var ul:String in pics){ var mc:MovieClip = new MovieClip; mc.load(ul); this.addChild(mc); mc.on(Event.COMPLETE,this,stopNowMC) } } private function stopNowMC(e:Event):void{ trace(e.currentTarget); trace(e.target); MovieClip(e.currentTarget).gotoAndStop(MovieClip(e.target).count-1); } AS3代码...

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

387. 部分IOS机型在加载mp3音频文件时出错,资源加载异常 [ 65%]

...    ];         Laya.loader.load(resArray, Laya.Handler.create(this, () => { this.OnLoaded() }), null, Laya.Loader.ATLAS);     }在IOS部分机型,如苹果8上,会出现资源加载出错,截图如附件一所示。 Load(): void {         var resArray: Array<any&g...

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

388. 缓动-缓动函数演示 [ 65%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { this.createCharacter(); this.createEaseFunctionList(); this.createDurationCrontroller(); } createCharacter() { const Sprite = Laya.Sprite; character = new Sprite(); Laya.stage.addChild(character); ch...

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

389. [LayaAir3]动态添加2d物理引擎shape无效 [ 65%]

...shape无效   rig.shapes = [shape];   sp.addComponentInstance(rig);   this.Sprite.parent.addChild(sp);   //设置ide中Sprite节点的shape有效   this.Sprite.getComponent(Laya.RigidBody).shapes = [shape]; 附件 : --> LayaProject_(2).zip 2025-09-12 3 条评论 免费帖 --> 分享 微博 QZON...

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

390. UI-Image [ 65%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Image = Laya.Image; let dialog = new Image("res/ui/dialog (3).png"); Laya.stage.addChild(dialog); dialog.pos(165, 62.5); } } new UI_Image();module laya { import Stage = Laya.Stage; import Image...

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