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

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

11. sprite的rotation设置的位置不一样,子sprite的方向也不一样 [ 90%]

...ya.Sprite(); var s3 = new Laya.Sprite(); s1.width = 64; s1.height = 64; s1.pivot(32, 32); s1.rotation = 90; s2.addChild(s3); s1.addChild(s2);    var s1 = new Laya.Sprite(); var s2 = new Laya.Sprite(); var s3 = new Laya.Sprite(); s1.width = 64; s1.height = 64; s1.pivot(32, 32); s2.addChild(s3); s1....

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

12. laya.display.Sprite.graphics对象的旋转问题 [ 87%]

... cuixueying 赞同来自: 1、设置下你graphics线条的显示对象的pivot,也就是线条的中心点 2、然后针对你的显示对象进行rotate旋转 private function createTexts():void { var sp:Sprite=new Sprite(); Laya.stage.addChild(sp); sp.graphics.drawLine(0,0,200,200,'#FF00000'); ...

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

13. 计时器-间隔循环 [ 87%]

...ext(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t.width / 2, t.height / 2); t.pos(x, y); Laya.stage.addChild(t); return t; } function animateTimeBased() { rotateTimeBasedText.rotation += 1; } function animateFrameRateBased() { rotateFrameRateBasedText.rotation += 1; ...

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

14. 计时器-间隔循环 [ 87%]

...ext(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t.width / 2, t.height / 2); t.pos(x, y); Laya.stage.addChild(t); return t; } animateTimeBased() { this.rotateTimeBasedText.rotation += 1; } animateFrameRateBased() { this.rotateFrameRateBasedText.rotation += 1; } } new ...

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

15. 父物体旋转会导致子物体的世界坐标系不正确?(附demo) [ 84%]

...get_root").getChildByName("PendulumCircleTarget").getChildByName("MoveBlockPivot").getChildByName("TargetGuard") as Laya.Sprite3D; Laya.stage.on(Laya.Event.KEY_PRESS, this, this.KeyPress); this.pivot = s.getChildByName("target_root").getChildByName("PendulumCircleTarget").getChildByName("MoveBlockPi...

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

16. 鼠标交互-双指旋转(多点触控) [ 84%]

...s.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches =...

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

17. PIVOT [ 83%]

PIVOT 设置了PIVOT以后连位置都发生变化了 2017-09-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 kezhiyu 赞同来自: 我原先的定位要重新计算? 2017-09-29 0 0 分享 微博 QZONE 微信...

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

18. Sprite-旋转缩放 [ 83%]

...ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape.rotation += 2; //心跳缩放 scaleDelta += 0.02; var scaleValue = Math.sin(scale...

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

19. 鼠标交互-双指旋转(多点触控) [ 83%]

...0, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length...

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

20. Sprite-旋转缩放 [ 82%]

...e.addChild(this.ape); this.ape.loadImage("res/apes/monkey2.png"); this.ape.pivot(55, 72); // this.ape.pos( Laya.stage.width / 2, Laya.stage.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this.scaleDelta = 0; Laya.timer.frameLoop(1, this, this.animate); } animate(...

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