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

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

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

192. 物理引擎-牛顿摆 [ 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_示例 发布时间: 20241118

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

194. 鼠标交互-双指旋转(多点触控) [ 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_示例 发布时间: 20241118

195. 重写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

196. 使用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

197. 发布的时候,报错 [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

198. 骨骼动画-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_示例 发布时间: 20241118

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

...} createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let w = 200, h = 300; this.sp = new Sprite(); Laya.stage.addChild(this.sp); this.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); ...

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

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

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

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