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

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

101. 文本-字符限制 [ 86%]

...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

102. Sprite-切换纹理 [ 86%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55...

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

103. 鼠标交互-自定义事件 [ 86%]

...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() { this.createSprite(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; this.sp = new Sprite(); this.sp.g...

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

104. Sprite-遮罩-放大镜 [ 86%]

...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

105. 文本-字符限制 [ 86%]

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

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

106. 游戏铺满固定大小容器,火狐和谷歌正常,edge会有滚动条? [ 86%]

...ClientWidth);                         if(Laya.stage.scaleMode != Laya.Stage.SCALE_SHOWALL){                             Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL;                         }                 ...

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

107. 鼠标交互-键盘交互 [ 86%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { listenKeyboard(); createLogger(); Laya.timer.frameLoop(1, this, keyboardInspector); } function listenKeyboard() { keyDownList = []; //...

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

108. 输入设备-摇一摇 [ 86%]

...ion() { Laya.init(picW, Browser.height * picW / Browser.width); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; showShakePic(); showConsoleText(); startShake(); })(); function showShakePic() { var shakePic = new Sprite(); shakePic.loadImage("../../res/inputDevice/shake.png"); Laya.stage.addChild(shakePi...

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

109. UI-Dialog [ 86%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; assets = ["../../res/ui/dialog (1).png", "../../res/ui/close.png"]; Laya.loader.load(assets, Handler.create(this, onSkinLoadComplete)); })(); function onSkinLoa...

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

110. 网络和格式-POST [ 86%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; connect(); showLogger(); })(); function connect() { hr = new HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequ...

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