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

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

191. UI加载完成后无法获取控件的大小——超详细版问题 [ 68%]

...   此时,参考Label的大小和坐标,可以得到准确的值[60,200,280,200]。     这就是现在的情况,初始化时 拿不到Label的位置和 宽高,在后续的触发事件中可以拿到。猜测是 我在初始化时获取位置信息,当时还没有完全加载。   5,...

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

192. drawToCanvas无法截取到有子元素。 [ 68%]

...ddChild(sp2); this.addChild(sp1); const htmlCanvas = sp1.drawToCanvas(640, 200, 0, 0); const canvas = htmlCanvas.getCanvas(); trace(canvas.toDataURL('image/png')); const texture = new Laya.Texture(htmlCanvas); const sp = new Sprite(); sp.graphics.drawTexture(texture); this.shot.addChild(sp);对,...

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

193. 物理引擎-牛顿摆 [ 68%]

...nitWorld() { var cradle = Matter.Composites.newtonsCradle(280, 100, 5, 30, 200); Matter.World.add(engine.world, cradle); Matter.Body.translate(cradle.bodies[0], { x: -180, y: -100 }); cradle = Matter.Composites.newtonsCradle(280, 380, 7, 20, 140); Matter.World.add(engine.world, cradle); Matter.Body....

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

194. GlowFilter和TimeLine/Tween一起用的问题 [ 68%]

...(var i = 0; i < 5; i++){             t.to(glowFilter, {blur: 10}, 200, null, 0);             t.to(glowFilter, {blur: 1}, 200, null, 0);         }         t.on(Event.COMPLETE, this, function(){             sp.filters = null;         });         t.play(0, true);  ...

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

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

..., this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 200, 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); } fun...

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

196. 字体切片组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 68%]

...123456789"; clipnum.value = "114499"; clipnum.spaceY = 10; testClipNum.pos(200, 300); testClipNum.sheet = "0123456789"; testClipNum.value = "0123456789"; clipnum1.pos(150, 100); clipnum1.direction = "vertical"; clipnum1.sheet = "0123456789"; clipnum1.value = "223388"; fontClip.pos(240, 200); fontCli...

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

197. 重写X Y在android studio里运行会变成00 [ 68%]

...stUI里 this.addChild(xSprite); 4 然后设置xSprite.x = 100; xSprite.y = 200; 5 然后再XSprite这个类里将XY复写比如 public set x(val: number) { this._x = val; } public get x(): number { return this._x; } public set y(val: number) { this._y = val; } public get y(): number { return this.__...

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

198. 使用mask后,只要调用 Laya.Resource.destroyUnusedResources() 就会引起报错 [ 68%]

...WebGL); let bgSprite = new Laya.Sprite(); bgSprite.graphics.drawRect(0, 0, 200, 200, "#0xFFFF00"); bgSprite.pos(300, 300); Laya.stage.addChild(bgSprite); let mask = new Laya.Sprite(); bgSprite.mask = mask; mask.graphics.drawCircle(0, 0, 100, "0x0000FF"); window.onblur = function() { console.log("onb...

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

199. 发布的时候,报错 [ERROR] Cannot read property 'dom_parser' of undefined [ 67%]

...ers\74741\AppData\Roaming\Tencent\QQ\Temp\%W@GJ$ACOF(TYDYECOKVDYB.png1.6.1.200~202/game/cocos/cocos2d-x-lite/cocos/./scripting/js-bindings/manual/jsb_global.cpp, 931): initWithImageFile: /data/user/0/com.vivo.hybrid/app_reso           [ERROR] (/opt/jenkins/workspace/vivo_vfile:///C:\Use...

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

200. 骨骼动画-Spine事件 [ 67%]

..., "20px Arial", "#ff0000", "center"); Tween.to(mLabelSprite, { y:mStartY - 200 }, 1000, null,Handler.create(this,playEnd)) } function playEnd() { mLabelSprite.removeSelf(); } })();module laya { import EventData = Laya.EventData; import Skeleton = Laya.Skeleton; import Templet = Laya.Templet; import ...

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