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

大约有 202 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0035 秒)

1. 屏幕适配-缩放-Show All [ 100%]

...rIDE让项目开发更高效。(function() { var 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....

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

2. 屏幕适配-缩放-Show All [ 99%]

...OW_ALL { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.sc...

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

3. 关于适配有点疑惑 [ 82%]

...验, 代码如下:var rect; (function() { Laya.init(550, 400); // Laya.stage.scaleMode = Stage.SCALE_SHOWALL; // Laya.stage.scaleMode = "noscale"; // Laya.stage.scaleMode = "fixedwidth"; Laya.stage.scaleMode = "fixedheight"; Laya.stage.bgColor = "#ff0000"; Laya.stage.alignH = "center"; Laya.stag...

来源: Laya_社区 发布时间: 20170206

4. Laya_API3.0 [ 80%]

...用入口集。 Laya类引用了一些常用的全局对象,比如Laya.stage:舞台,Laya.timer:时间管理器,Laya.loader:加载管理器,使用时注意大小写。 Hierarchy Laya Index Properties isWXOpenDataContext isWXPosMsg loader stage timer Methods addWasmModule alertGlobalErro...

来源: Laya3.0_api 发布时间: 20231115

5. laya.utils.SpriteUtils_API3.0 [ 79%]

...s dom: any DOM元素引用 coordinateSpace: Sprite 坐标空间,不能是Stage引用 x: number 相对于coordinateSpace的x坐标 y: number 相对于coordinateSpace的y坐标 width: number 宽度 height: number 高度 Returns void Static getGlobalPosAndScale getGlobalPosAndScale(sprite: Sprite): R...

来源: Laya3.0_api 发布时间: 20231115

6. 位图切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...建完毕,此方法只执行一次 onAwake(): void { this.clip.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); // 位置 this.clip.skin = "atlas/comp/clip_num.png"; // 皮肤 this.clip.interval = 1000; // 切片动画的播放时间间隔1000毫秒 this.clip.clipX = 10; // 切片x...

来源: Laya3.0_文档 发布时间: 20251010

7. HTML文本 · LayaAir3.0文档 · LAYABOX [ 69%]

... + "LayaBox</span><span>欢迎你的加入</span>"; Laya.stage.addChild(div); 运行效果: 3.2 同一个文本中设置字体、颜色不同 示例如下: var htmlD:HTMLDivElement = new HTMLDivElement(); Laya.stage.addChild(htmlD); htmlD.innerHTML = "<font style='fontSize:3...

来源: Laya3.0_文档 发布时间: 20230303

8. laya.utils.Utils [ 68%]

...t — DOM元素引用  coordinateSpace:Sprite — 坐标空间,不能是Stage引用  x:Number — 相对于coordinateSpace的x坐标  y:Number — 相对于coordinateSpace的y坐标  width:Number — 宽度  height:Number — 高度 getGID()method  public static function getGID():int获取...

来源: laya_api 发布时间: 20170929

9. laya.utils.Utils [ 67%]

...t — DOM元素引用  coordinateSpace:Sprite — 坐标空间,不能是Stage引用  x:Number — 相对于coordinateSpace的x坐标  y:Number — 相对于coordinateSpace的y坐标  width:Number — 宽度  height:Number — 高度 getGID()method  public static function getGID():int获取...

来源: Laya2.0_api 发布时间: 20190513

10. laya.display.Stage [ 66%]

...I DocumentationAll Packages | All Classes | Index | Frames No Frames StageProperties | Methods | Events | Constants Packagelaya.displayClasspublic class StageInheritanceStage Sprite Node EventDispatcher Object Stage 是舞台类,显示列表的根节点,所有显示对象都在舞台...

来源: laya_api 发布时间: 20170929