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

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

1. 输入设备-贪吃蛇(重力感应) [ 100%]

...gments:Array = []; private foods:Array = []; private initialSegmentsAmount:number = 5; private vx:number = 0 private vy:number = 0; private targetPosition:Point; constructor() { Laya.init(Browser.width, Browser.height, WebGL); // 初始化蛇 this.initSnake(); // 监视加速器状态 Accelerator.in...

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

2. UI-Button [ 96%]

... this.onUIAssetsLoaded)); } private onUIAssetsLoaded(): void { for (var i: number = 0, len = this.skins.length; i < len; ++i) { var btn: Button = this.createButton(this.skins[i]); var x: number = i % this.COLUMNS * this.HORIZONTAL_SPACING + this.xOffset; var y: number = (i / this.COLUMNS | 0) * this...

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

3. 鼠标交互-滑动 [ 92%]

... export class Interaction_Swipe { //swipe滚动范围 private TrackLength: number = 200; //触发swipe的拖动距离 private TOGGLE_DIST: number = this.TrackLength / 2; private buttonPosition: number; private beginPosition: number; private endPosition: number; private button: Sprite; constructor() ...

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

4. UI-List [ 91%]

...对应图片的路径 let data = []; for (let i = 0; i = []; for (var i: number = 0; i < 10; ++i) { data.push("res/ui/listskins/1.jpg"); data.push("res/ui/listskins/2.jpg"); data.push("res/ui/listskins/3.jpg"); data.push("res/ui/listskins/4.jpg"); data.push("res/ui/listskins/5.jpg"); } list.array = ...

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

5. 性能测试-虫子(慎入) [ 91%]

...ggots { private texturePath:string = "res/tinyMaggot.png"; private padding:number = 100; private maggotAmount:number = 5000; private tick:number = 0; private maggots:Array = []; private wrapBounds:Rectangle; private maggotTexture:any; constructor() { Laya.init(Browser.width,Browser.height, WebGL); L...

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

6. 缓动-逐字缓动 [ 90%]

...ing = "LayaBox"; for (let i = 0, len = demoString.length; i > 1; var endY: number = Laya.stage.height / 2 - 50; var demoString: string = "LayaBox"; for (var i: number = 0, len: number = demoString.length; i > 1; var endY:int = Laya.stage.height / 2 - 50; var demoString:String = "LayaBox"; for (var i...

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

7. 骨骼动画-多纹理 [ 88%]

...ebGL; export class MultiTexture { private mAniPath:string; private mStartX:number = 400; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; constructor() { WebGL.enable...

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

8. 骨骼动画-藤蔓 [ 88%]

...export class Skeleton_SpineVine { private mAniPath:string; private mStartX:number = 200; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; private mFactory2:Templet; c...

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

9. 骨骼动画-橡胶人 [ 88%]

...class Skeleton_SpineStretchyman { private mAniPath:string; private mStartX:number = 200; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; private mFactory2:Templet; c...

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

10. 混合模式-Lighter [ 87%]

...de_Lighter { // 一只凤凰的分辨率是550 * 400 private phoenixWidth: number = 550; private phoenixHeight: number = 400; private bgColorTweener: Tween = new Tween(); private gradientInterval: number = 2000; private bgColorChannels: any = { r: 99, g: 0, b: 0xFF }; constructor() { // 不支持Web...

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