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

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

161. 鼠标交互-滑动 [ 74%]

... WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { createSprtie(); drawTrack(); } function createSprtie() { const w = 50; const h = 30; button = new Sprite(); but...

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

162. UI-List [ 74%]

... 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 List = Laya.List, Handler = Laya.Handler; let list = new List(); Laya.stage.addChild(list)...

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

163. UI-List [ 74%]

... WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { var list = new List(); list.itemRender = Item; list.repeatX = 1; list.repeatY = 4; list.x = (Laya.sta...

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

164. 2D物理-桥 [ 74%]

...tage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBridge(); this.eventListener(); } createBridge() { const startPosX = 250, startPosY = 450; let ground = ne...

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

165. 鼠标交互-滑动 [ 73%]

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

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

166. 文本-滚动文本 [ 73%]

... WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createText(); })(); function createText() { txt = new Text(); txt.overflow = Text.SCROLL; txt.text = "Layabox是HTML5引擎技术提供...

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

167. 文本-滚动文本 [ 73%]

... WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createText(); } createText() { const Text = Laya.Text, Event = Laya.Event; this.txt = new Text(); Laya.stage.addChild(this.txt); t...

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

168. 输入设备-指南针 [ 72%]

...GL); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { // 创建罗盘 createCompass(); // 创建方位指示器 createDirectionIndicator();...

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

169. 输入设备-指南针 [ 72%]

... 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(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // ...

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

170. 超出文本区域的处理&滚动文本(JavaScript-LayaAir基础篇(JS)-文本) [ 70%]

... WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { var t1 = createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); var t2 = createText();...

来源: Laya2.0_文档 发布时间: 20210714