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

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

1. 1.7.11 Sprite.loadimage [ 100%]

...版本) (64 位)  应该是目前最新的了 一 关于Sprite 的 width height 1. sp.loadImage('xxx.png',0,0,0,0,callback)调用方式 能否获取 立即调用宽高属性 no 回调 yes 延时(能够确保load的时间) yes没毛病 2. sp.loadImage('xxx.png',0,0,100,100,callback)调用方...

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

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

...背景色 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

3. 为什么Laya.Panel的子节点在(0,0)位置会不显示呢? [ 96%]

...QZONE 微信 Devilsparta 赞同来自: var panel = new Laya.Panel(); panel.width = 800; panel.y = 30; panel.hScrollBarSkin = null; var sp = new Laya.Sprite(); panel.addChild(sp); sp.x = 0; sp.y = 0; // 用下面这组数据是可显示的 // sp.y = 1; // sp.x = 1; sp.graphics.drawRect(0, 0, 200, 200...

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

4. sharedCanvas现在在laya里面不能用了吗???急 在线等 [ 94%]

...) { clearDrawOpenData(layout); var sp: Laya.Sprite = new Laya.Sprite(); sp.width = layout.width; sp.height = layout.height; var openDataContext = wx.getOpenDataContext(); var sharedCanvas = openDataContext.canvas sharedCanvas.width = layout.width; sharedCanvas.height = layout.height; //先清空绘...

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

5. 微信小游戏开放域缩放问题 [ 93%]

...Sprite(); var  sharedCanvas:* = Browser.window.sharedCanvas; sharedCanvas.width = Laya.stage.width; sharedCanvas.height = Laya.stage.height; _sp.graphics.drawTexture(rankTexture,0,0,rankTexture.width,rankTexture.height); Laya.stage.addChild(_sp); 开放域那边初始化的时候宽高和主域宽...

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

6. 我自己绘制的矩形如何以自身中心点旋转不能实现啊 [ 93%]

...; public class HelloLaya { public function HelloLaya() { Laya.init(Browser.width, Browser.height,WebGL); Laya.stage.bgColor="#eeffcc"; var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,200,300,"#000fff"); Laya.stage.addChild(sp); sp.size(200,300); sp.pivot(sp.width/2,sp.height/2); sp.pos(200,200)...

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

7. laya2.3图集含空白裁切后,锚点旋转bug,demo重现 [ 92%]

...反而是对的,这按理是bug吧         // sp3.pos(Laya.stage.width/2,0);         Laya.stage.addChild(sp3);         Laya.timer.frameLoop(2,null,function()             {                 sp3.rotation = sp3.rotation+10;             } ...

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

8. 分享:图集资源做位图文本的工具类(知道fontclip组件的可以略过了,之前一直没注意到这个组件) [ 92%]

...atic fontPool: Laya.Sprite = ; /** * * @param resFix 资源前缀 * @param width 宽度 * @param align 水平排列方式 * @param padding 间距 */ public constructor(resFix: string, width: number, align: string = "left",padding: number=0) { super(); this.width = width; this.resFix = resFix; this._...

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

9. 为何对sp的监听事件没有反应呢? [ 92%]

...ffffff"); xxx.size(100, 100); xxx.mouseEnabled = true; xxx.x = (Laya.stage.width - xxx.width) / 2; xxx.y = (Laya.stage.height - xxx.height) / 2; Laya.stage.addChild(xxx); xxx.on(Laya.Event.CLICK, this, this.onXXX); private onXXX() {    console.debug("Hello"); } 2017-06-06 添加评论 免费帖 --...

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

10. hitTestPrior点击穿透 [ 92%]

...tPrior window[`hitTestPrior`] = () => { let box1 = new Laya.Box(); box1.width = box1.height = 500; let sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, box1.width, box1.height, `#999900`); box1.addChild(sp); box1.clickHandle = () => { lizheng.log(`点击了box1`); } box1.hitTestPrior = false...

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