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

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

1. 区块地图-滚动地图 [ 100%]

.../ 地图加载完成的回调 completeHandler() { Laya.stage.on(Laya.Event.RESIZE, this.resize); this.resize(); } // 鼠标按下拖动地图 mouseDown() { mLastMouseX = Laya.stage.mouseX; mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); } mouseMove() { le...

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

2. DOM元素-视频 [ 79%]

...Video的位置,对齐的位置和refence重合 Laya.stage.on(Laya.Event.RESIZE, this, Laya.Utils.fitDOMElementInArea, [videoElement, reference, 0, 0, reference.width, reference.height]); } } new DOM_Video();class DOM_Video { constructor() { Laya.init(800, 600); Laya.stage.bgColor = "#FFFFFF"; Laya...

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

3. DOM元素-表单输入 [ 73%]

...t.type = "date"; passwordInput.type = "password"; Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements, [emailInput, birthdayInput, passwordInput]); } showLabel(label, x, y) { const Text = Laya.Text; let t = new Laya.Text(); t.height = this.rowHeight; t.valign = "middle"; t.fontSize = 15; t.fo...

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

4. 屏幕适配-屏幕适配 [ 69%]

...出坐标信息 Laya.stage.on("click", this, this.onClick); Laya.stage.on("resize", this, this.onResize); } onBoyClick(e) { //点击后小人会放大缩小 let boy = e.target; if (boy.scaleX === 1) { boy.scale(1.2, 1.2); } else { boy.scale(1, 1); } } onTxtClick(e) { //点击后切换适配模式 e....

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

5. 其他引擎的Demo-Example_05 [ 68%]

... = Stage.SCALE_FULL; setup(); })(); function setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } i...

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