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

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

1. 加载-销毁Texture使用的图片资源 [ 100%]

...; this.PathFly = "../../res/fighter/fighter.atlas"; //初始化引擎 Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.init(); //显示...

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

2. 输入设备-指南针 [ 98%]

...reesText; var directionIndicator; var firstTime = true; (function() { Laya.init(700, 1024, WebGL); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function ...

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

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

...; function Segment(width, height) { Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height / 2, -height / 2, width + height, height, "#FF7F50"); } // 获取关节另一头位置 Segment.prototype.getPinPosition = function() { var radian = this.rotation * Math.PI / ...

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

4. 调试-帧率统计 [ 97%]

...效。(function() { var Browser = Laya.Browser; var Stat = Laya.Stat; Laya.init(Browser.clientWidth, Browser.clientHeight); Stat.show(Browser.clientWidth - 120 >> 1, Browser.clientHeight - 100 >> 1); })();module laya { import Browser = Laya.Browser; import Stat = Laya.Stat; export class Debug_FPSSta...

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

5. 性能测试-骨骼 [ 97%]

...mSpacingX; var mSpacingY; var mAnimationArray = []; var mFactory; function init() { mSpacingX = Browser.width / colCount; mSpacingY = Browser.height / rowCount; Laya.init(Browser.width, Browser.height, WebGL); Stat.show(); mTexturePath = "../../res/skeleton/" + fileName + "/" + fileName + ".png"; mA...

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

6. 屏幕适配-对齐模式 [ 97%]

...开发更高效。(function() { var Stage = Laya.Stage; (function() { Laya.init(100, 100); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.bgColor = "#232628"; })(); })();module laya { import Stage = Laya.Stage; e...

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

7. 屏幕适配-缩放-No Scale [ 93%]

...Sprite = Laya.Sprite; var Stage = Laya.Stage; var rect; (function() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; createCantralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); ...

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

8. 屏幕适配-缩放-No Border [ 93%]

...Sprite = Laya.Sprite; var Stage = Laya.Stage; var rect; (function() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; createCantralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray");...

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

9. 高级应用-基于物理渲染 [ 93%]

...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(Laya.Scene.load("../../res/threeDimen/scene/PBRScene/Demo.ls"))...

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

10. 屏幕适配-缩放-Show All [ 93%]

...Sprite = Laya.Sprite; var Stage = Laya.Stage; var rect; (function() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createCantralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); ...

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