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

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

1. 屏幕适配-缩放-No Scale [ 100%]

...tage = 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.stage.addChild(rect); ...

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

2. Sprite3D-Sprite3D变换 [ 97%]

...LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Lay...

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

3. 屏幕适配-缩放-No Border [ 95%]

...tage = 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.stage.addChild(rect);...

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

4. 屏幕适配-缩放-Show All [ 95%]

...tage = 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.stage.addChild(rect); ...

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

5. 屏幕适配-缩放-Extract Fit [ 95%]

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

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

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

...() { 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; export class SmartScale_Alig...

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

7. 高级应用-基于物理渲染 [ 82%]

...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")); scene.once(Laya.Event.HIERARC...

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

8. UI-Image [ 81%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { var dialog = new Image("../../res/ui/dialog (3).png"); dialog.pos(165, 62.5); Laya.stage.addChild(dialog); } })();module laya ...

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

9. 粒子系统-场景与粒子 [ 81%]

...LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; var scene = Laya.stage.addChild(Laya.Scene.load("../../res/threeDimen/scene/particle/Example_01.ls")); var camera = scene.addChild(new Laya.Came...

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

10. 屏幕适配-屏幕适配 [ 81%]

...= Laya.Image; var WebGL = Laya.WebGL; //所有适配模式 var modes = ["noscale", "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"]; //当前适配模式索引 var index = 0; //全局文本信息 var txt; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, ...

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