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

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

281. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 48%]

...Texture: Laya.Texture init(){ let rect = this.img.getSelfBounds() this.img.pivot(Math.round(rect.width / 2), Math.round(rect.height / 2)) let bound = this.img.getBounds() this.cacheCanvas = this.img.drawToCanvas(Math.ceil(bound.width), Math.ceil(bound.height), Math.round(bound.width / 2), Math.round...

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

282. 关于matter.js用于tiledmap的碰撞 [ 48%]

...物理碰撞问题 matter.js mouseconstraint在微信小游戏中无效 将pivot设置为图片中心后,缩放结点,碰撞体和图片不是以相同锚点缩放 问题状态 最新活动: 2020-08-24 18:18 浏览: 1577 关注: 3 人 Laya_Aaron • 2018-07-15 15:18 引擎是有限的,人力...

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

283. ReferenceError: Loading_fly is not defined [ 48%]

...ay(0, true, 'loading') this.bounds = this.fly.getGraphicBounds(); this.fly.pivot(this.bounds.width / 2, this.bounds.height / 2); this.fly.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.diango.addChild(this.fly) this.diango.show(); this.diango.popup(); } _proto.onClose = function () { this.di...

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

284. 关于intersects碰撞的疑问 [ 48%]

...疑问 laya2.0 3d物理碰撞穿透问题 斜矩形怎么计算碰撞 将pivot设置为图片中心后,缩放结点,碰撞体和图片不是以相同锚点缩放 laya 3D碰撞器与 Unity 不一致问题 代码重用和公共函数的疑问,在TS里怎么使用? ui组件list数据源的疑...

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

285. 我用matter.js渲染一个篮球, 但是不会自动旋转.. 这个怎么设置呢? [ 47%]

...r ball_skin = new Laya.Sprite().loadImage("res/basketball.png"); ball_skin.pivot(ball_skin.width / 2, ball_skin.height / 2); this.ball = Matter.Bodies.circle(0, -100, 34, {     layaSprite: ball_skin, // 绑定一个laya的Sprite, 不能用render.sprite     density: 1, // 密度     restitution...

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

286. new Laya.Templet() 时,说这不是一个constructor [ 46%]

...r.getBounds(); //QUESTION=[无法获取图片宽度高度] this.aniFighter.pivot(512/2,304/2);//rectBounds.width/2,rectBounds.height/2); this.aniFighter.pos(Laya.stage.width/2,Laya.stage.height/2); iamnst • 2018-12-12 22:11 在编辑模式下,引入相关类库就可以了 狄 • 2018-11-30 16:...

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

287. ScrollRect设置会引起其他的UI资源无法正在显示 [ 46%]

...); private var arr:Array = []; public function TestView() { super(); _path.pivot(0,0); _path.pos(a.x,a.y); this.addChild(_path); _path.rotation = Math.atan2(b.y - a.y, b.x - a.x) / Math.PI * 180; var len:int = Math.floor(GetPathLen()/PATH_LEN)+2; var p:Image; for(var i:int = 0;i<len;i++){ p = new...

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

288. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...t >> 1); //位置 this.txtarea.size(500, 200); //大小 this.txtarea.pivot(this.txtarea.width/2, this.txtarea.height/2); //轴心点 this.txtarea.text = "大家好,欢迎各位开发者使用LayaAir IDE,这里是TextArea的文本内容,您可以基于此文本进行调试"; this.txtarea....

来源: Laya3.0_文档 发布时间: 20251010

289. 人物行走图动画 [ 45%]

...   console.log(ani.index);  var bounds = ani.getGraphicBounds();  ani.pivot(bounds.width / 2, bounds.height / 2);    ani.pos(Laya.stage.width / 2, Laya.stage.height / 2);  console.log(ani.index);  Laya.stage.addChild(ani);  console.log(ani.index); }   json代码如下 {"frames": [ {  "fil...

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

290. 怎么对graphics画出来的图片进行鼠标点击拖动??? [ 44%]

...码 //var texture: Texture = Laya.loader.getRes(this.ApePath); //this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; //这里是我加的代码 this.ape.graphics.drawCircle(50, 50, 30, "#ff0000"); this.ape.on(Event.MOUSE_DOWN,...

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