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

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

1. 设置pivot后,精灵位置显示位置不正确 [ 100%]

...背景色 Laya.stage.bgColor = "#ffffff" this.sp = new Laya.Sprite(); let width = 660 let height = 420 this.sp.size(width, height) this.sp.pivot(Math.round(width / 2), Math.round(height / 2)) this.sp.graphics.drawCircle(0, 0, 5, "#000000") this.sp.graphics.drawRect(-this.sp.pivotX, -this.sp.pivotY, ...

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

2. 在一个矩形之上画另一个矩形,只显示一个矩形 [ 94%]

...L = laya.webgl.WebGL; Laya.init(480, 800, WebGL); //串盒子的宽 var boxWidth = 440; //串盒子的高 var boxHeight = 500; //串盒子 this.chuanBox = new Laya.Rectangle(Laya.stage.width - boxWidth >> 1, Laya.stage.height - boxHeight - 10, boxWidth, boxHeight); //画出盒子 Laya.stage.gr...

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

3. LAYA js 1.7.12 Tween 使用时回调时 core报错 [ 89%]

...fig[this.type].imgBang, Laya.Handler.create(this, this.onLoad)); this.body.width = config[this.type].width this.body.height = config[this.type].height onLoad(){ Tween.to(this.body, { x: (config[this.type].width / 2) + 10, y: (config[this.type].heightp / 2) + 45 }, 500,callback) } 2017-11-14 0 0 分...

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

4. 多重遮罩显示异常 [ 88%]

...500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.panel.height = 500; this.panel.vScrollBarSkin = ''; this.panel.hScrollBarSkin = ''; this.addChild(this.panel); let line = new Laya.Sprite(); line.size(1000, 20); line.pos(200, 200); line.graphics.drawRect(0,...

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

5. 分享:Panel下动态修改子容器宽高并刷新显示! [ 85%]

...yaUISample() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height); //ui组件,除了image和clip外,其他皮肤均需要预加载资源,此处添加button和panel垂直滚动条的皮肤使用 Laya.loader.load(['button-4.png','ui/vscroll.png','ui/vscroll$bar.pn...

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

6. HTMLDIVElement设置innerHTML时报错 [ 85%]

...设置innerHTML时报错 如图所示。测试代码Laya.init(Laya.Browser.width, Laya.Browser.height); var html = new Laya.HTMLDivElement(); html.style.fontSize = 30; html.style.whiteSpace = "nowrap"; html.innerHTML = '<span style="color:#ffffff">test</span>'; html.pos(500, 300); html.s...

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

7. 不带格式后缀的图片无法成功加载 [ 83%]

...his, () => { let picTemp = Laya.Loader.getRes(url); console.log(picTemp.width) // undefined let nodee = new Laya.Sprite() nodee.texture = picTemp nodee.width = 500 nodee.height = 250 nodee.x = 100 nodee.y = 350 Laya.stage.addChild(nodee) }));上面这个图片无法正常显示,打印 texture ...

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

8. 2.3微信截图分享问题 [ 82%]

...做分享。 var tempFilePath = canvas.toTempFilePathSync( { x: 0, y: 0, width: 100, height: 100, destWidth: 100, destHeight: 100, fileType: 'jpg', quality: 1.0 });   var canvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0).getCanvas();   这是第二种写法。翻了几次...

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

9. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 81%]

...(0,0,90,100,"#faaff0"); testPan.on(Event.CLICK,this,onMouseClick); testPan.width = 90; testPan.height = 100; var mcSp:Sprite = new Sprite(); mcSp.graphics.drawRect(0,0,90,100,"#fff000"); testPan.addChild( mcSp); mcSp.pos( -25,-90 ); } private function onMouseClick(e:Event):void { trace( e.target ); ...

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

10. 2.3微信截图分享问题 [ 81%]

...分享。 var tempFilePath = canvas.toTempFilePathSync( { x: 0, y: 0, width: 100, height: 100, destWidth: 100, destHeight: 100, fileType: 'jpg', quality: 1.0 });   var canvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0).getCanvas();   这是第二种写法。...

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