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

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

1. Sprite-显示图片 [ 100%]

...wser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 2D场景显示时打开 Laya.Config.isAntialias = true; // 2D场景显示错乱时打开 Laya.Config.useWebGL2 = false; // 支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage...

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

2. Sprite-切换纹理 [ 89%]

...vot(55, 72); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); // 显示默认纹理 this.switchTexture(); this.ape.on("click", this, this.switchTexture); } private switchTexture(): void { var textureUrl: string = (this.flag = !this.flag) ? this.texture1 : this.texture2; // 更换纹理 thi...

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

3. 输入设备-指南针 [ 81%]

...reateDirectionIndicator(); // // 画出其他UI this.drawUI(); // // 创建显示角度的文本 this.createDegreesText(); Gyroscope.instance.on(Event.CHANGE, this, this.onOrientationChange); } // 方位指示器指向当前所朝方位 createCompass() { const Sprite = Laya.Sprite; compassImg = new ...

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

4. UI-RefreshList [ 45%]

...ntName, this, () => { console.log("达到了滚动限制:" + eventName); //显示加载进度ui this.refreshLoading.visible = true; //处理加载ui的位置 if (eventName === "dragTopLimit") { //先清理bottom的状态,避免top计算出错 this.refreshLoading.bottom = NaN; this.refreshLoading.t...

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