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

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

301. 微信小游戏截图问题 [ 71%]

...vas.height, destWidth: canvas.width, destHeight: canvas.height }) this.ctx.graphics.loadImage(wxhtmlC, 0, 0,this.ctx.width,this.ctx.height); 然后用drawTextture,很多问题都是有这个,可以带到下面那些东西怎么转成图片呢? var htmlC = Laya.stage.drawToTexture(Laya.stage.wi...

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

302. 鼠标交互-自定义事件 [ 71%]

...28"; createSprite(); })(); function createSprite() { sp = new Sprite(); sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); sp.pivot(100, 100); sp.x = Laya.stage.width / 2; sp.y = Laya.stage.height / 2; sp.size(200, 200); Laya.stage.addChild(sp); sp.on(ROTATE, this, onRotate); // 侦听自定义的事...

来源: Laya_示例 发布时间: 20251209

303. Sprite生成的mask对Sprite作用时显示不正确 [ 71%]

...题   let miniMap = new Laya.Sprite(); miniMap.autoSize = true; miniMap.graphics.drawRect(0,0,100,100, '#000000'); let mapMask = new Laya.Sprite(); mapMask.autoSize = true; mapMask.graphics.drawRect(0,0,miniMap.width,miniMap.height, '#ff0000'); miniMap.mask = mapMask; Laya.stage.addChild(miniMap) 2...

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

304. 多重遮罩显示异常 [ 71%]

...ructor() { super(); this.init(); } init() { let bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 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....

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

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

...ight) 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, width, height, undefined, "#00ff00", 1) this.sp.pos(500, 500) Laya.stage.addChild(this.sp); } } new GameMain();这是运行...

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

306. 用ide打包后的图片,Texture显示不出来? [ 71%]

...xture.load('comp/zzw.png' );     setTimeout( function(){         aa.graphics.drawTexture(texture,0,0);     }, 1000 ) } 3Q 2017-12-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同来自: qq...

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

307. 如何给List添加一个自适应高度的背景颜色? [ 71%]

...接 提交 1 个回复 Monica - 知识达人 赞同来自: sfsmmc 用list.graphics.drawRect()绘制即可 2017-08-15 1 9 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 sfsmmc 相关问题 两个对象new了一个相...

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

308. Panel中添加图片无法显示,文本可以 [ 71%]

...r.getRes("comp/image.png");     var ape1 = new Laya.Sprite();     ape1.graphics.drawTexture(t, 0, 0);     Laya.stage.addChild(ape1);     //面板     var panel = new laya.ui.Panel();     panel.width = 500;     panel.height = 500;     panel.x = 200;     var label = new laya.ui.Label...

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

309. layabox 支持渲染到纹理吗 [ 71%]

...aya_XS 赞同来自: 截图的功能,你把文理信息,传给sprite的graphics的drawtocanvas,然后得到一个htmlcanvas,通过htmlcanvas的source方法,可以过得原生的canvas,再通过原生保存的接口就可以做你说的事情了! 2017-02-18 0 0 分享 微博 QZONE 微...

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

310. drawPath的绘制问题 [ 71%]

...ush(["lineTo" , x , gridHeightPx]); } paths.push(["closePath"]); gridShape.graphics.drawPath(0 , 0 , paths , {fillStyle:"#0000ff"});能麻烦帮忙看下什么问题么 附件 : --> 2017-09-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...

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