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

大约有 1,751 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0100 秒)

161. 急急急,如何设置按钮点击加载ani [ 84%]

...Loader;     import laya.net.ResourceVersion;     import laya.utils.Handler;     import laya.webgl.WebGL;     import laya.utils.Mouse;     import laya.ui.Button;     import laya.display.Sprite;     import laya.display.Animation;     import laya.maths.Rectangle;    ...

来源: Laya_社区 发布时间: 20180725

162. laya.device.media.Media_API3.0 [ 84%]

...10 Returns Media Methods Static getMedia getMedia(options: any, onSuccess: Handler, onError: Handler): void Defined in laya/device/media/Media.ts:28 获取用户媒体。 Parameters options: any 简单的可选项可以使{ audio:true, video:true }表示同时捕捉两者。详情见https://develope...

来源: Laya3.0_api 发布时间: 20231115

163. 滤镜-颜色滤镜 [ 84%]

...a.ColorFilter; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var ApePath = "../../res/apes/monkey2.png"; var apeTexture; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); ...

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

164. 获取位置信息 · LayaAir3.4 · 引擎文档 · LAYABOX [ 84%]

...BLE和Geolocation.TIMEOUT之一。 */ static getCurrentPosition(onSuccess: Handler, onError: Handler = null): void { Geolocation.navigator.geolocation.getCurrentPosition(function (pos: any): void { Geolocation.position.setPosition(pos); onSuccess.runWith(Geolocation.position); }, function (error: an...

来源: Laya3.0_文档 发布时间: 20251010

165. Laya.loader.create 加载进度问题 [ 84%]

... function ModelManager() { Laya.loader.create("res/Pipe/Pipe/a.lh", Laya.Handler.create(this, this.onCreateComplete()),Laya.Handler.create(this, this.onAssetsLoading)); } ModelManager.prototype.onCreateComplete = function () { console.log("onCreateComplete"); var pipe = Laya.loader.getRes("res/Pipe/...

来源: Laya_社区 发布时间: 20180514

166. QQ小游戏demo跑不起来 MiniFileMgr.fs.readFile无回调 [ 84%]

...问题: 1、Main.ts的 Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION); 该行能成功运行,执行了this.onVersionLoaded回调; 2、然后该行Laya.AtlasInfoManager.enable("fileconfig.json", Laya.Handler.c...

来源: Laya_社区 发布时间: 20200111

167. Sprite-遮罩-放大镜 [ 83%]

... Laya.stage.bgColor = "#232628"; Laya.loader.load([bgPath, maskPath], Laya.Handler.create(this, this.setup)); } setup() { const Sprite = Laya.Sprite; let bgRes = Laya.loader.getRes(bgPath), maskRes = Laya.loader.getRes(maskPath); let bg = new Sprite(); Laya.stage.addChild(bg); bg.graphics.drawTextur...

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

168. [LayaAir3]注册多个同类非覆盖一次性定时器后清除同类定时器时只清除了最后一个 [ 83%]

... 1、如下图一所示,在事件执行回调时候,Laya.timer里面的handlers,第一个hander的caller已经是null,已经被清除了的哈,不需要再自己手动清除内容了; 2、只打印数字1、2、3的原因就是因为添加了定时器清除导致的 3、如图二所示...

来源: Laya_社区 发布时间: 20240109

169. 分享 h5app后台挂机长时间切到前台卡顿的问题 [ 83%]

... 当切到前台时 定时器会补完所有的缺省调用 while (t >= handler.exeTime) { handler.exeTime += handler.delay; handler.run(false); } 在后台挂的时间越久 会短时间造成大量的更新 2020-10-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

来源: Laya_社区 发布时间: 20201020

170. UI-Clip [ 83%]

...ar Button = Laya.Button; var Clip = Laya.Clip; var Image = Laya.Image; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var buttonSkin = "../../res/ui/button-7.png"; var clipSkin = "../../res/ui/num0-9.png"; var bgSkin = "../../res/ui/coutDown.png"; var counter, currFrame, controller; (function()...

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