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

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

151. DOM元素-表单输入 [ 82%]

...言、LayaAirIDE让项目开发更高效。Laya.init(600, 400); Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stage.screenMode = Laya.Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#FFFFFF"; this.form =...

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

152. 音频-播放演示 [ 82%]

...换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; var gap = 10; //...

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

153. 音频-播放演示 [ 82%]

...as 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"; setup(); })(); function setup() { var gap = 10; //创建一个Sprite充当音效播放按...

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

154. 物理引擎-牛顿摆 [ 82%]

...动切换至Canvas Laya.init(stageWidth, stageHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { initMatter(); initWorld(); Laya.stage.on("resize", this, o...

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

155. 输入设备-摇一摇 [ 82%]

...持WebGL时自动切换至Canvas Laya.init(700, 1024, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showShakePic(); this.showConsoleText(); this.startShake(); } showShakePic() {...

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

156. 鼠标交互-双指旋转(多点触控) [ 82%]

...as 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"; setup(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMo...

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

157. UI-FontClip [ 82%]

...L = Laya.WebGL, Stage = Laya.Stage; Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(assets, Laya.Handler.create(this, this.ShowContent)); } ShowCon...

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

158. DOM元素-表单输入 [ 82%]

...支持WebGL时自动切换至Canvas Laya.init(600, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#fff"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.w...

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

159. 鼠标交互-双指旋转(多点触控) [ 82%]

...as Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = 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(); Laya.stage.on(Event....

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

160. 鼠标交互-Hold [ 81%]

...as 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"; Laya.loader.load(apePath, Handler.create(this, createApe)); })(); function createApe() { /...

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