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

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

1. 其他引擎的Demo-Example_05 [ 100%]

...ipt三种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Browser = Laya.Browser; var Stat = Laya.Stat; var WebGL = Laya.WebGL; var n = 2000; var d = 1; var current = 0; var objs = 17; var vx = 0; var vy =...

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

2. 网络和格式-ProtocolBuffer [ 99%]

...ipt三种开发语言、LayaAirIDE让项目开发更高效。(function() { var Loader = Laya.Loader; var Browser = Laya.Browser; var Handler = Laya.Handler; var ProtoBuf = Browser.window.protobuf; Laya.init(550, 400); ProtoBuf.load("res/protobuf/awesome.proto", onAssetsLoaded); function onAssetsLoad...

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

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

...时有一个食物 this.produceFood(); } private initSnake():void { for (var i:number = 0; i 0) { var prevSeg:Segment = this.segments[this.segments.length - 1]; seg.rotation = prevSeg.rotation; var point:Point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } this.s...

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

4. 2D物理-碰撞事件与传感器 [ 97%]

...rt laya.webgl.WebGL; public class Physics_Physics_CollisionEvent { private var count: Number = 7; private var sensorCollider: CircleCollider; private var bodys: Array = []; private var touching: Array = []; public function Physics_CollisionEvent() { Laya.Config.isAntialias = true; Laya.init(1200, 70...

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

5. 加载-多种类型资源加载 [ 97%]

...ipt三种开发语言、LayaAirIDE让项目开发更高效。(function() { var Loader = Laya.Loader; var Handler = Laya.Handler; var ROBOT_DATA_PATH = "res/skeleton/robot/robot.bin"; var ROBOT_TEXTURE_PATH = "res/skeleton/robot/texture.png"; (function() { Laya.init(100, 100); var assets = []; assets...

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

6. 混合模式-Lighter [ 97%]

....g = Math.floor(obj.g); bgColorChannels.b = Math.floor(bgColorChannels.b); var r = bgColorChannels.r.toString(16); r = r.length == 2 ? r : "0" + r; var g = bgColorChannels.g.toString(16); g = g.length == 2 ? g : "0" + g; var b = bgColorChannels.b.toString(16); b = b.length == 2 ? b : "0" + b; return...

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

7. UI-FontClip [ 96%]

...his, this.ShowContent)); } ShowContent() { const FontClip = Laya.FontClip; var clipnum= new FontClip(assets[0]); var fontClip = new FontClip(assets[1]); var TestFontClip = new FontClip(assets[1]); var TestClipNum = new FontClip(assets[0]); var clipnum1 = new FontClip(assets[0]); clipnum.pos(240, 500...

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

8. 性能测试-虫子(慎入) [ 96%]

...aya.timer.frameLoop(1, this, this.animate); } private initMaggots():void { var maggotContainer:Sprite; for (var i:number = 0; i wb.x + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos(x, y); } this.tick += 0.1; } } } new laya.PerformanceTest_Maggots();package { import laya...

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

9. 滤镜-颜色滤镜 [ 96%]

...(); this.makeRedApe(); this.grayingApe(); } private normalizeApe(): void { var originalApe: Sprite = this.createApe(); this.apeTexture = Laya.loader.getRes(this.ApePath); originalApe.x = (Laya.stage.width - this.apeTexture.width * 3) / 2; originalApe.y = (Laya.stage.height - this.apeTexture.height) ...

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

10. DOM元素-表单输入 [ 96%]

...aya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); var rowHeightDelta = this.rowSpacing + this.rowHeight; // 显示左侧标签 this.showLabel("邮箱", 0, rowHeightDelta * 0); this.showLabel("出生日期", 0, rowHeightDelta * 1); this.showLabel("密码", 0, rowHeightDelta *...

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