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

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

991. 分离模式下使用自定义场景类 [ 51%]

..._proto.parseTsImport”,修改该函数体内容:__proto.parseTsImport=function(str){ var tStr = str.replace("import",""); str = 'from'; str = tStr.indexOf(str) > -1 ? str : '='; tStr = StringTool$1.trimSide(tStr.split(str)[0]); this.importDic[tStr] = true; }当然也可以把CodeManager.pars...

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

992. 重力感应 Accelerator 发布微信游戏后失效。是因为什么? [ 51%]

...? Accelerator.instance.on(Laya.Event.CHANGE, this, monitorAccelerator); function monitorAccelerator(acceleration, accelerationIncludingGravity, rotationRate, interval) {         let x = accelerationIncludingGravity.x;         let y = accelerationIncludingGravity.y; }   发布微信游戏...

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

993. [LayaAir3]LAYAAIR 3.3 和 LAYANATIVE 的VIDEO 支持 M3U8文件吗? [ 51%]

...eoTexture.element.load(); videoTexture["_video"] = videoTexture.element; } function playVideo(){ //这里就做一些video的参数设置,比如静音、循环、播放等设置即可 //video.muted = this._muted; //video.loop = this._loop; //video.onended = this._onended; //video.onclose = this._o...

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

994. layaUI.max.all.js 这个文件怎么生成的? [ 51%]

...文件怎么生成的? STATICATTR$(TestPageUI,         ['uiView',function(){return this.uiView={"type":"View","child":[{"props":{"x":0,"y":0,"skin":"comp/bg.png","sizeGrid":"30,4,4,4","width":600,"height":400},"type":"Image"},{"props":{"x":41,"y":56,"skin":"comp/button.png","label":"点我...

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

995. UI-FontClip [ 51%]

...ontClip.png"; private var _FontClip:string="res/comp/fontClip.png"; public function Font_Clip (){ // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.sta...

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

996. 【分享】微信小游戏解析xml适配 [ 51%]

...具导入Laya小游戏程序 报错了 xml.getElementsByTagName is not a function 2018-07-05 0 1 分享 微博 QZONE 微信 yminhao 赞同来自: 感谢分享,完美解决在微信开发工具中,用Laya.BitmapFont的loadFont方法,加载位图字体失败,报gameThirdScriptError的错误...

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

997. iframe页面嵌套下失焦(焦点在父窗口被聚焦),playMusic背景音乐播放无声音 [ 51%]

...父窗口被聚焦),playMusic背景音乐播放无声音 public static function playSound(url:String, loops:int = 1, complete:Handler = null, soundClass:Class = null, startTime:Number = 0):SoundChannel { if ((!_isActive && loops != 0) || !url) return null; if (_muted) return null; _recover...

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

998. 使用layaide进行打包,提示如下错误。 [ 51%]

...行打包,提示如下错误。 Block-scoped declarations (let, const, function, class) not yet supported outside strict mode   网上搜索答案,有的说是因为在tsconfig中,将target调整成了es6就不可以运行了,但是我的代码使用了一些es6的特性,请问应该如...

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

999. LayaAir中怎么使用node.js 的 socket.io [ 51%]

...ct(); as的使用方法 var xx:* = __JS__('io.connect()'); xx.on('connect',function():void{trace("dddd")}); piaobo80 • 2017-08-18 14:12 如果ts呢引入js后改怎样在ts中调用呢? Laya_XS • 2017-08-19 14:36 你需要弄个TS的接口提示文件,引入js在ts中是一样的 p...

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

1000. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 51%]

...res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }...

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