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

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

1. UI-List [ 100%]

...import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: string): void {...

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

2. 2D物理-碰撞过滤器 [ 95%]

...t laya.physics.RigidBody; import laya.utils.Stat; import laya.webgl.WebGL; public class Physics_Physics_CollisionFiltering { public static const k_smallGroup = 1; public static const k_middleGroup = 0; public static const k_largeGroup = -1; public static const k_triangleCategory = 0x2; public static...

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

3. 性能测试-虫子(慎入) [ 94%]

...ort laya.utils.Stat; import laya.maths.Rectangle; import laya.webgl.WebGL; public class PerformanceTest_Maggots { private var texturePath:String = "../../res/tinyMaggot.png"; private var padding:int = 100; private var maggotAmount:int = 5000; private var tick:Number = 0; private var maggots:Array = ...

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

4. 性能测试-卡通人物2 [ 94%]

...is.text.text = Stat.FPS.toString(); } } } class Character extends Sprite { public static WIDTH: number = 110; public static HEIGHT: number = 110; private speed: number = 5; private bloodBar: Sprite; private animation: Animation; private nameLabel: Text; constructor(images: Array) { super(); this.cre...

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

5. 粒子-粒子演示1 [ 88%]

...de.part", Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } public onAssetsLoaded(settings: ParticleSetting): void { this.sp = new Particle2D(settings); this.sp.emitter.start(); this.sp.play(); Laya.stage.addChild(this.sp); this.sp.x = Laya.stage.width / 2; this.sp.y = Laya.stage.heig...

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

6. 粒子-粒子演示2 [ 88%]

...de.part", Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } public onAssetsLoaded(settings: ParticleSetting): void { this.sp = new Particle2D(settings); this.sp.emitter.start(); this.sp.play(); Laya.stage.addChild(this.sp); this.sp.x = Laya.stage.width / 2; this.sp.y = Laya.stage.heig...

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

7. 粒子-粒子演示3 [ 88%]

...ew.part", Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } public onAssetsLoaded(settings: ParticleSetting): void { this.sp = new Particle2D(settings); this.sp.emitter.start(); this.sp.play(); Laya.stage.addChild(this.sp); this.sp.x = Laya.stage.width / 2; this.sp.y = Laya.stage.heig...

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

8. 骨骼动画-多纹理 [ 85%]

...r.height); Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } public startFun():void { this.mAniPath = "res/spine/spineRes1/dragon.sk"; this.mFactory = new Templet(); this.mFactory.on(Event.COMPLETE, this, this.parseComplete); this.mFactory.on(Event.ERROR, this, this.onError); this.mFac...

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

9. 鼠标交互-自定义事件 [ 85%]

...a.Tween; import WebGL = Laya.WebGL; export class Interaction_CustomEvent { public static ROTATE: string = "rotate"; private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya....

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

10. 骨骼动画-藤蔓 [ 85%]

...ht,WebGL); Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } public startFun():void { this.mAniPath = "res/spine/spineRes5/vine.sk"; this.mFactory = new Templet(); this.mFactory.on(Event.COMPLETE, this, this.parseComplete); this.mFactory.on(Event.ERROR, this, this.onError); this.mFacto...

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