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

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

221. LAYABOX游戏实时语音之APP版本 [ 57%]

...LoginView extends ui.LoginUI { constructor() { super(); this.login.on(Laya.Event.CLICK, this, this.Loginyim); this.joinroom.on(Laya.Event.CLICK, this, this.JoinRoom); this.RecordAudio.on(Laya.Event.MOUSE_DOWN, this, this.StartRecordAudio); this.RecordAudio.on(Laya.Event.MOUSE_UP, this, this.StopReco...

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

222. 使用webgl之后toDataUrl返回黑色的图像 [ 57%]

...,请参考以下代码 package { import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; import laya.utils.Stat; import laya.webgl.WebGL; public class LayaAirDemo { private var sp:Sprite ; public function LayaAirDemo() { //初始化引擎 Laya.init(Browser.width, Browser.h...

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

223. image.drawToCanvas方法获取的一直是空的png [ 57%]

...ya.stage.addChild(img); Laya.timer.once(500,this,onClick); //Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { var htmlCanvas:HTMLCanvas=img.drawToCanvas(100,100,0,0) as HTMLCanvas; var texture:Texture=new Texture(htmlCanvas); var sp:Sprite=new Sprite(); sp.graphics.drawTe...

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

224. 如何实现3d遮罩效果? [ 57%]

...mport laya.d3.resource.models.Mesh; import laya.display.Stage; import laya.events.Event; import laya.ui.Button; import laya.utils.Browser; import laya.utils.Handler; import laya.utils.Stat; import threeDimen.common.CameraMoveScript; public class D3Base_TargetTexture { private var skinMesh:MeshSprite...

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

225. dialog 遮挡 [ 57%]

...); createDialog("444",400,400); createDialog("555",500,500); Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { alert(Dialog.manager.numChildren+"");//manager是DialogManager的实例,创建多少个dialog,manager下就有多少的子对象 var dia:Dialog=Dialog.manager...

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

226. 如何让一个点击事件执行完立即移除 [ 56%]

...何让一个点击事件执行完立即移除 Laya.sg_paiui.zybut2.on(Laya.Event.CLICK,this,function(th,e){                                 Laya.sg_paiui.zybut1.visible = false; }) 比如说这个事件 如何让他执行完立即移除 2017-10-11 添加评论 免费帖 --> ...

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

227. 摄像机捕捉目标(ActionScript-3D基础(AS3)-LayaAir3D之Camera) [ 56%]

...w Vector3(0, 1, 0); ``` ```typescript //点击事件 changeActionButton.on(Event.CLICK, this, function():void{ index++; if (index % 3 === 1 ){ //摄像机捕捉模型目标 camera.transform.lookAt(box.transform.position, _up); } else if (index % 3 === 2){ //摄像机捕捉模型目标 camera.transfo...

来源: Laya2.0_文档 发布时间: 20210714

228. 画了一个封闭的曲线,获取鼠标点击处的像素,为何坐标对不上导致拿不到正确位置的Texture? [ 56%]

...ckage { import laya.display.Sprite; import laya.display.Stage; import laya.events.Event; import laya.resource.HTMLCanvas; import laya.resource.Texture; import rain.core.StageReferance; public class Main { private var _view:Sprite; public function Main() { Config.isAntialias = true;//抗锯齿 //初...

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

229. 我在dialog a上继续弹出dialog b 。需要关闭b的时候,a依然存在。怎么做? [ 56%]

...t; Here is DlgNote2"); this.closeEffect = null; this.closeBtn.on(Laya.Event.CLICK, this, this.toClose); //this.show(); } b的关闭方法: toClose():void{ //Laya.Scene.open("datiPage.scene"); this.close(); } a和b都是独立的ts类, export default class a extends ui.a {……} ...

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

230. iphoneX环境下新手引导的抠图透明区域为黑色,其它机型都是正常的。 [ 56%]

...tils.GuideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya.Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); maskArea.nam...

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