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

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

121. Sprite-轴心点 [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; let gap = 150; this.ape1 = new Sprite(); Laya.stage.ad...

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

122. 计时器-间隔循环 [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height...

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

123. UI-RadioGroup [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; skins = ["../../res/ui/radioButton (1).png", "../../res/ui/radioButton (2).png", "../../res/ui/radioButton (3).png"]; Laya.loader.load(skins, Handler.create(thi...

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

124. UI-RadioGroup [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; skins = ["res/ui/radioButton (1).png", "res/ui/radioButton (2).png", "res/ui/radioButton (3).png"]; Laya.loader.load(skins, Handler.create(this, this.initRadioG...

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

125. 鼠标交互-自定义事件 [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createSprite(); })(); function createSprite() { sp = new Sprite(); sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); sp.pivot(100, 100); sp.x = Laya.stage.width / 2; sp.y ...

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

126. Sprite3D-Sprite3D加载 [ 84%]

...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_示例 发布时间: 20241124

127. Sprite-节点控制 [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; this.ape1 = new Sprite(); this.ape2 = new Sprite(); th...

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

128. 文本-自动调整文本尺寸 [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { const Text = Laya.Text; // 该文本自动适应尺寸 var autoSizeText = this.createSampleText(); autoSizeText.overflow = Text.VISIBL...

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

129. Sprite-遮罩-放大镜 [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load([bgPath, maskPath], Laya.Handler.create(this, this.setup)); } setup() { const Sprite = Laya.Sprite; let bgRes = Laya.loader.getRes(bgPath), mas...

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

130. 文本-字符限制 [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { createLabel("只允许输入数字:").pos(50, 20); var input = createInput(); input.pos(50, 50); input.restrict ...

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