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

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

41. 引擎 TiledMap 居然不支持图块翻转 [ 69%]

...ection === 0) {                                 gridSprite.graphics.drawImage(tTileTexSet.texture, tX + tTileTexSet.offX, tY + tTileTexSet.offY);                                 // }                                 // else {                   ...

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

42. 关于创建Sprite获取大小 [ 69%]

...ow.Laya.loader.load(value.url, ls.Handler.create(this, function () { _this.graphics.clear() var texture = window.Laya.loader.getRes(value.url) _this.graphics.drawTexture(texture) _this.scaleX = _this.set_width / texture.sourceWidth _this.pivotX = _this.row_data.property.x_m * texture.sourceWidth _th...

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

43. 请教个问题(UI相关):有个区域180*180像素,我想给他弄个边框(2px solid #ccc)或背景色,我要用那个UI组件呢? [ 69%]

...sprite 绘制一个矢量图的方块背景。 加边框可以用矢量图 graphic 画一个。 或者让美术做一个漂亮的边框, 或者用发光滤镜。 2018-06-29 0 4 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Thylx 相关问...

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

44. 如何旋转2d的物理系统的矩形 [ 68%]

...来自: var Wall_TL = new Sprite(); Laya.stage.addChild(Wall_TL); Wall_TL.graphics.drawRect(0, 0, 400, 32, "#ffff00"); Wall_TL.pivot(200, 16);   var Collision_Wall_TL:any = Matter.Bodies.rectangle(200, 400, 400, 32, { layaSprite:Wall_TL,isStatic: true })  Matter.World.add(this.engine.world, [ Coll...

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

45. 关于intersects碰撞的疑问 [ 68%]

...如果还有不明白的我们再沟通!var sp1:Sprite=new Sprite(); sp1.graphics.drawRect(0,0,200,400,"#FF0000"); Laya.stage.addChild(sp1); var sp2:Sprite=new Sprite(); sp2.graphics.drawRect(0,0,300,400,"#0000FF"); sp2.pos(100,100); if(sp1.getBounds().intersects(sp2.getBounds())) { trace("相交...

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

46. LayaFlash getQualifiedClassName和组件定义问题 [ 67%]

...图集加载问题 关于适配采用showAll后留白部分的颜色问题 graphics alpha 问题 两个问题 有元件支援视频流渲染吗? Image元件读不了资料流 横屏模式在锁定竖屏的iphone上不能正常显示的问题 IDE创建的UI 层级问题 问题状态 最新活动: 2...

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

47. viewport 的用法 [ 67%]

...用法  var Sprite = Laya.Sprite;   var HitArea = Laya.HitArea;   var Graphic = Laya.Graphics;   var Event   = Laya.Event;   var Layer = Laya.Layer;   var Rectangle = Laya.Rectangle;   function layaSlot(info){       layaSlot.__super.call(this);       this.size(200,200);       this.g...

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

48. 【解决】富文本html下划线换行bug [ 66%]

...求。   修改2.0版本 laya.html.js库里的代码__proto.renderSelfToGraphic=function(graphic,gX,gY,recList){ var cssStyle=this.style; var words=this._getWords(); var i=0,len=0; if (words){ len=words.length; var a; if (cssStyle){ var font=cssStyle.font; var color=cssStyle.color; if (cssStyle.str...

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

49. 绘制的直线如何修改它的位置,使它产生连续绕一个点旋转的效果 [ 66%]

...的位置,使它产生连续绕一个点旋转的效果 this.gameView.sp.graphics._one[2] = x; this.gameView.sp.graphics._one[3] = y; 我这样写能实现,但是感觉不是正确的方法! IDE中有看到toX和toY属性,但是代码中不知如何获取 2018-02-23 添加评论 免费帖 --...

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

50. Sprite对象中的scrollRect如何使用?为什么是undefined [ 65%]

...  var w = 490,                 h = 770;             bimgBox.graphics.drawRect(0, 0, w, h, "#FF7F50");             var rect = new Rectangle(0,0,200,200);             bimgBox.scrollRect = rect;             bimgBox.optimizeScrollRect = true;    这是我的调用方...

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