大约有 3,990 项符合查询结果, 库内数据总量为 31,629 项。 (搜索耗时: 0.0065 秒)
Laya_社区(2836) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(55)
...ketballCourt = this.scene3D.getChildByName("BasketballCourt") as Sprite3D; var collision:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collision.restitution = 0.1; this.ball = this.scene3D.getChildByName("Ball") as Sprite3D; this.ball.addCom...
来源: Laya_社区 发布时间: 20200512
...果可以当作图片源,再次绘制到其他Sprite里面,示例: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 var texture:Texture = new Texture(htmlCanvas);//使用htmlCanvas创建Texture var sp:Sprite = new Sprite().pos(0, 200);//创建精...
来源: laya_api 发布时间: 20170929
....canvas = Laya.Render.canvas; this.context = this.canvas.getContext('2d'); var my_gradient = this.context.createLinearGradient(0,0,0,1136); //创建一个线性渐变 my_gradient.addColorStop(0,"#FF0000"); my_gradient.addColorStop(1,"#0000FF"); let sprite = new Laya.Sprite(); Laya.stage.addChild(spr...
来源: Laya_社区 发布时间: 20180904
...式,不会生成场景类了,此时该如何获得场景内的元素 var 与 name 的详细区别是什么? 小游戏项目 加载有中文的json文件 报错 请问下loader如何强制加载一个文件,避免浏览器的缓存 .sk , .lm , .ltc , .lh, .ani等后缀名的文件是如何制...
来源: Laya_社区 发布时间: 20180508
... private function _onMouseDown(e:Event):void { var point:Point = this.getMousePoint(); if (_dragArea.contains(point.x, point.y)) this.startDrag(); else this.stopDrag(); } 找到这段代码,改引擎,做判...
来源: Laya_社区 发布时间: 20180719
...e(this,this.onModelOK),null,Laya.Sprite3D); 然后用这种方式来释放 var role3D:Laya.Sprite3D = Laya.loader.getRes("res/role3d/mesh/563001/563001.lh"); role3D.destroy(true); 是否会自动把该lh所引用的动画,模型,贴图等资源全部释放掉?如果是为什么CurMem没有掉...
来源: Laya_社区 发布时间: 20180409
..._02.png','player/chara_03.png','player/chara_04.png'], "RUN"); var body:laya.display.Animation=new laya.display.Animation(); body.x=48*8 body.y=48*3 body.interval=100; Laya.stage.addChild(body); body.play(0,true,"RUN") ...
来源: Laya_社区 发布时间: 20161012
...("res/text.txt", Handler.create(this, onAssetLoaded1), null, Loader.TEXT); var pic1 = Loader.getRes("res/2D特效/text.txt"); console.log(typeof pic1); 输出的类型为string 2017-06-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...
来源: Laya_社区 发布时间: 20170620
out.writeShort is not a function var out:ArrayBuffer = new ArrayBuffer(); out.writeShort(0); out.writeByte(0); out.writeInt(10011); Uncaught TypeError: out.writeShort is not a function 麻烦告诉下是哪里的问题,谢谢。 2017-06-02 添加评论 免费帖 --> 分享 微博 QZONE ...
来源: Laya_社区 发布时间: 20170602
...l 的值 Label创建: { type: "Label", props: { "var": "userscore", valign: "middle", text: 2e6, padding: "0,8,0,0", height: 20, fontSize: 20, color: "#eeeeee", centerY: 0 } }, 如何...
来源: Laya_社区 发布时间: 20170529