大约有 2,033 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0058 秒)
Laya_社区(1424) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(44) Laya2.0_api(7) laya_api(6)
...label); sp.size(200,200); Laya.stage.addChild(sp); Laya.timer.frameLoop(60,this,function():void{ var htmlC:HTMLCanvas=sp.drawToCanvas(200,200,0,0); var texture:Texture=new Texture(htmlC); var sp2:Sprite=new Sprite(); sp2.graphics.drawTexture(texture,100,100,100,100); sp2.pos(300,0); Laya.stage.addCh...
来源: Laya_社区 发布时间: 20180403
...码把绘制过程理了一遍,找到了实现方式,这是代码: this.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.addCo...
来源: Laya_社区 发布时间: 20180803
...script //加载模型 Sprite3D.load("Conventional/shoot.lh",Handler.create(this,function(sp:Sprite3D):void{ var cube:MeshSprite3D = sp.getChildAt(0) as MeshSprite3D; //获取物理碰撞器 var cubeCollider:PhysicsCollider = cube.getComponent(PhysicsCollider); })); ```
来源: Laya2.0_文档 发布时间: 20210714
....result; cropper = $('.imageBox').cropbox(options); } reader.readAsDataURL(this.files[0]); }) $('#btnCrop').on('click', function(){ var img = cropper.getDataURL(); //$('.cropped').append('<img src="'+img+'">'); }) } 如果直接在ts里面写,报错,那么如果放在js里面。。如何...
来源: Laya_社区 发布时间: 20180101
...fff"; //加载资源 Laya.loader.load("res/atlas/comp.json",Handler.create(this,completeLoad),null,Loader.ATLAS); } public function completeLoad():void { //原始位图 createImg(200,50); //红色滤镜 createRedFilter(); //创建发光滤镜位图**/ createGlowFilter(); //创建阴影滤镜位图 c...
来源: Laya_社区 发布时间: 20170811
...ton; private onKeyDown(e):void{ if(e.keyCode == 49 || e.keyCode == 97){ if(this.te == null){ this.te = new Laya.Templet(); this.te.on(Laya.Event.COMPLETE, this, this.teComplete); this.te.loadAni("res/wing_01_side.sk"); } } else if(e.keyCode == 50 || e.keyCode == 98) { if(this.te != null){ this.te.de...
来源: Laya_社区 发布时间: 20190320
...40x240的动画,代码如下_proto_.onAnimation_BirdSing = function () { this.aniBirdSing = new Laya.Animation(); this.aniBirdSing.loadAtlas("res/atlas/birdsing.json"); this.aniBirdSing.interval = 35; // 设置播放间隔(单位:毫秒) this.aniBirdSing.index = 0; // 当前播放索引 this...
来源: Laya_社区 发布时间: 20171026
...继承于IDE创建的testUI.as。 在此文件中发送事件,如: this.event("TEST"); 在其他类中,new 出此类,但监听不到。如: var t:test = new test(); t.on("TEST", this, this.onTest); 是写法上有问题么? 2018-01-05 添加评论 免费帖 --> 分享 微博 QZONE...
来源: Laya_社区 发布时间: 20180105
... btn_bottom[i].hitArea = rect; btn_bottom[i].on("click", this, bottomClick, [i]);[/i][/i][/i][/i][/i] 不加hitArea时,点击区域在左上方一小块,加了后完全无效 附件 : --> test2.rar 2016-12-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...
来源: Laya_社区 发布时间: 20161202
...e0.name = 'sprite0'; Laya.stage.addChild(sprite0); sprite0.on(Event.CLICK, this, handler_click); 怎么让sp透明区域不可点,有像素的地方才能接受到事件; hitArea,目前只支持圆形,矩形,多边形,而sp绘制的是一个不规则图形,请问这个怎么解决啊 201...
来源: Laya_社区 发布时间: 20170428