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

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

1. DOM元素-视频 [ 100%]

...Element("video"); Laya.Browser.document.body.appendChild(videoElement); // 设置Video元素地样式和属性 videoElement.style.zIndex = Laya.Render.canvas.style.zIndex + 1; videoElement.src = "res/av/mov_bbb.mp4"; videoElement.controls = true; // 阻止IOS视频全屏 videoElement.setAttribute("w...

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

2. 输入设备-地图 [ 93%]

...iduCoord(data) { if (data.status == 0) { let position = data.points[0]; // 设置标注物位置 marker.setPosition(position); map.panTo(position); map.setZoom(17); } } onError(e) { const Geolocation = Laya.Geolocation; if (e.code == Geolocation.TIMEOUT) alert("获取位置超时"); else if (e.code ...

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

3. 鼠标交互-滑动 [ 77%]

...aphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = (Laya.stage.width - TrackLength) / 2; this.button.y = Laya.stage.height / 2; this.button.on(Event.MOUSE...

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

4. UI-RefreshList [ 66%]

...moveLimit, distance= 0, time= 2000){ if (eventName === "dragTopLimit") { //设置下拉的最大橡皮筋高度,只有在启用了停止滚动的功能后有效 this.refreshList.scrollBar.topMoveLimit = moveLimit; } else if (eventName === "dragBottomLimit") { this.refreshList.scrollBar.bottomMoveLim...

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