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

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

101. 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

102. 个人笔记:失焦或静音状态下播放背景音乐无效的解决方案 [ 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

103. 使用官方文档中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

104. 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

105. 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

106. 怎样在一个已有的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

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

... 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

108. LayaRender问题 Matter在LayaRender下出现不正常问题 [ 57%]

... //var runner = Runner.create(); var render = LayaRender.create({ element: document.body, engine: engine, options: { background: "#0E1115", wireframes: false, showDebug: true } }); //Runner.run(engine); LayaRender.run(render); World.add(engine.world, [ Bodies.rectangle(200, 150, 500, 20, {...

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

109. 物理引擎显示旋转问题 [ 57%]

...           width: 750,                 height: document.body.scrollHeight * window.devicePixelRatio,                 // background: '#00b6e4' //传入16进制颜色,或者图片路径,如 http://www.manfredhu.com/images/matterjs.png           ...

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

110. Socket能连接到服务器,客户端发请求也能收到服务端的数据,但是服务端主动推送数据,客户端就是收不到数据? [ 57%]

...vascript">     //显示信息     var log = function(s) {     if (document.readyState !== "complete") {     log.buffer.push(s);     } else {     document.getElementById("output").textContent += (s + "\n");     document.getElementById("outputdiv").scrollTop = document.getElementById(...

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