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

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

301. 设置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

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

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

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

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

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

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

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

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

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

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

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

307. pos会影响精灵缩放效果的问题 [ 71%]

...代码很简单,如下 let img2: Laya.Sprite = new Laya.Sprite(); img2.graphics.drawTexture(texture, 0, 0, 200, 200); img2.graphics.drawCircle(100, 100, 20, "#ffff00"); img2.scale(2, 2); img2.pos(0, 0); img2.pivot(0, 0);效果如图所示,正常,圆圈在螃蟹的中间。   但是,当我...

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

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

...e.height - boxHeight - 10, boxWidth, boxHeight); //画出盒子 Laya.stage.graphics.drawRect( this.chuanBox.x, this.chuanBox.y, this.chuanBox.width, this.chuanBox.height, "#FFFFEE", "#FFFFFF", 2); this.sageBox = new Laya.Rectangle(this.chuanBox.x+this.chuanBox.width/2,this.chuanBox.y+this.chuanBox.h...

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

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

... Sprite = Laya.Sprite, Event = Laya.Event; this.sp = new Sprite(); this.sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); this.sp.pivot(100, 100); this.sp.x = Laya.stage.width / 2; this.sp.y = Laya.stage.height / 2; this.sp.size(200, 200); Laya.stage.addChild(this.sp); this.sp.on(ROTATE, this, this.o...

来源: Laya2.0_示例 发布时间: 20240930

310. matterjs渲染laya的ui [ 71%]

...齐 layaSprite.anchorX = layaSprite.anchorY = 0.5; //背景色 layaSprite.graphics.drawCircle(120, 120, 120, '#ffffff'); ball.layaSprite = layaSprite; 2018-04-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 4 个回复 Laya...

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