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

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

1761. [LayaAir2] 在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 63%]

...rt default class VideoDom { htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.a...

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

1762. Laya.Browser获取宽高数值会变化,iphone6第一次加载正确,刷新几次就变大了。 [ 63%]

...wser.clientWidth, Laya.Browser.clientHeight, Laya.WebGL);         Laya.stage.bgColor = '#cccccc';         let txt: Laya.Text = new Laya.Text();         txt.text = GameMain.pxTimes + '倍ch/h=' + Laya.Browser.clientHeight + '/' + Laya.Browser.height +             ', cw/w' + Laya.Bro...

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

1763. 发布到微信画面显示不全 [ 63%]

发布到微信画面显示不全 Laya.stage.useRetinalCanvas = true useRetinalCanvas 也设置了 2021-09-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 4 个回复 132*****836 赞同来自:   2021-09-24 0 0 分享 ...

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

1764. 使用UrlLoader加载图片,flash获取data为byteArray,翻译成h5后data为image? [ 63%]

...:URLLoader; private var l:Loader; public function UrlImage() { super(); if(stage) { init(); } else { this.addEventListener(Event.ADDED_TO_STAGE,init); } } private function init(e:Event=null):void { urlLoader=new URLLoader(); urlLoader.dataFormat=URLLoaderDataFormat.BINARY; urlLoader.addEventListener...

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

1765. Laya2.2.0,官方demo,Iphone Xs Max 14.0 锁屏小游戏卡死 [ 63%]

...ppStatus = AppEvent.onShow; console.log(this.appStatus, '---------'); Laya.stage.renderingEnabled = true//恢复渲染 Laya.updateTimer.resume() //恢复onUpdate Laya.timer.resume(); //恢复时间 Laya.timer.scale = 1; }) window['wx'].onHide(() => { this.event(AppEvent.onHide); this.appStatus = ...

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

1766. Error: 代码包大小为 5533 kb,上限为 4096 kb,请删除文件后重试? [ 63%]

....Browser.height); this.current = { x: 0, y: Laya.Browser.height }; // Laya.stage.bgColor = "#3F51B5"; this.sp = new Laya.Sprite(); Laya.stage.addChild(this.sp); } render() { console.log("render"); var l = [ 0, 0, 0, -(Laya.Browser.height >> 1), (Laya.Browser.width>>1), -(Laya.Browser.hei...

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

1767. layabox怎样实现相对布局? [ 63%]

...3 苍蝇也是鸟 • 2018-05-23 17:21 @Laya_Aaron:现在比较常用的是Stage.SCALE_SHOWALL 就是有一边会留黑边。市面上的H5游戏大都这样做。但是我的需求是像APP一样做全屏适配,舞台宽度固定,高度自适应。子对像根据舞台高度做相对布局,...

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

1768. as hello world 背景还是黑色 [ 63%]

...ublic function LayaSample() { //初始化引擎 Laya.init(1136, 640); Laya.stage.bgColor = "#ffffff"; var sp : Label = new Label("hello world"); //sp.fontSize = 55; sp.pos(100, 100) ; //sp.color = "#000000"; Laya.stage.addChild(sp); } } } chrome 下查看源代码 <html> <head> <meta ...

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

1769. 使用方向键 控制精灵在格子中移动 [ 63%]

...RPG游戏开发 可以加我的微信 一起研究 13890999   事件 Laya.stage.on(Laya.Event.KEY_UP,this,this.onkeyup); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown); Laya.timer.frameLoop(1,this,this.loop);事件响应 onkeyup(e){ for(let i:number = 0;i<this.keyList.length;i++){ if(thi...

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

1770. 关于graphics镂空的问题https://ask.layabox.com/question/139 [ 63%]

...Box.autoSize = true; redBox.graphics.drawRect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox.on("mouseover",this,function(){ redBox.graphics.clear(); redBox.graphics.drawRect(0,0,100,100,'#00ff00'); }); redBox.on("mouseout",t...

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