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

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

101. 新手引导 挖洞 不用 cacheAs="bitmap" 希望能帮助那些和我一样有需求的码农!你好我好大家好才是真的好!请各位大佬批评指教! [ 60%]

...   // 获取canvas元素对应的DOM对象         var canvas = document.getElementById('canvas');         var div1 = document.getElementById('div1');          // 获取在canvas上绘图的CanvasRenderingContext2D对象         var ctx = canvas.getContext('2d');...

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

102. 设置适配SCALE_FIXED_WIDTH,结果少部分andriod机型不能正确适配屏幕 [ 59%]

...       Laya.init(750, 1218, Laya.WebGL);             Laya.Browser.document.title = 'GG游戏;             if (Laya.Browser.onPC) {                 //设置舞台缩放模式                 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL;                 Laya.s...

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

103. [LayaAir3]升级到3.3.0-beta4版本后微信小程序加载代码分包没返回 [ 59%]

...的流程,如下图所示: 然后发现执行Browser.loadLib的Browser.document.body.appendChild函数后,并没有任何加载回调日志,如下所示:   后来看能正常运行的3.2.6版本源码,发现是调用了ILaya.Browser.miniGameContext的loadSubpackage函数加载分包的...

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

104. canvas定位后 点击区域偏移 [ 59%]

...自带的绝对定位,但也会导致点击区域偏移 var LayaCanvas = document.getElementsByTagName("canvas")[0] document.getElementById("aaa").appendChild(LayaCanvas); 3.在这里 http://ask.layabox.com/question/4533  问过,使用Laya.Render._mainCanvas.source.style来设置canvas的属...

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

105. 个人笔记:失焦或静音状态下播放背景音乐无效的解决方案 [ 58%]

...format,for optimal performance reason,please refer to the official website document."); return null; } } if(!SoundManager._isActive || SoundManager._muted || SoundManager._soundMuted){ return null; } }; var tSound; if (!Browser.onMiniGame){ tSound=Laya.loader.getRes(url); } if (!soundClass)soundClas...

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

106. 使用官方文档中qrcode生成二维码的代码,打包APP后无效 [ 58%]

...什么问题,谢谢! private initCode() { var div: any = Laya.Browser.document.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div, { width: 100, height: 100 }); var url: string = this.URL; this.qrcode.makeCode(url); Laya.stage.once("click", this, this.clickHandler); this.qrco...

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

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

...format,for optimal performance reason,please refer to the official website document."); return null; } } if (_soundMuted) return null; } var tSound:Sound; if (!Browser.onMiniGame) { tSound= Laya.loader.getRes(url); } if (!soundClass) soundClass = _soundClass; if (!tSound) { tSound = new soundClass()...

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

108. SCALE_FIXED_WIDTH适配屏幕的问题 [ 58%]

...       Laya.init(750, 1218, Laya.WebGL);             Laya.Browser.document.title = 'GG游戏;             if (Laya.Browser.onPC) {                 //设置舞台缩放模式                 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL;                 Laya.s...

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

109. 怎样在一个已有的canvas标签中初始化laya [ 58%]

...回复 trlanfeng 赞同来自: 已找到解决办法。   var parentDiv = document.getElementById("canvasDiv"); Browser.container = parentDiv; Laya.init(...); 2017-02-06 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 好的,有问题及时沟通! 2017-02-06 0 0 分享 微博 QZONE 微...

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

110. 【字节小游戏】游戏中播放视频 [ 57%]

... var videoElement:any = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElement); // 设置Video元素地样式和属性 videoElement.style.zInddex = Laya.Render.canvas.style.zIndex + 1; videoElement.src = "../../res/av/mov_bbb.mp4"; videoElement.controls = true; // ...

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