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

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

701. 请问2.0射线到底如何使用呢? [ 68%]

... function 构造函数() { // 添加鼠标点击事件 Laya.stage.on( Event.MOUSE_DOWN, this, onMouseDown ); // 射线初始化 ray = new Ray( new Vector3(0,0,0), new Vector3(0,0,0) ); } // 鼠标点击方法 function onMouseDown(){     // 获取鼠标在屏幕点击的位置     var po...

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

702. 用JS原生态window.location.href跳转 [ 68%]

...器上运行是正常的package { import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; public class LayaAirTest { public function LayaAirTest() { Laya.init(550,400); var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FFFF00"); Laya.stage.addChild(sp); sp.size(...

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

703. cavans上触发不了input的点击事件 [ 68%]

...添加一个sprite,给sprite添加一个点击事件,this.hitimg.on(Laya.Event.CLICK,this,this.onStart); onStart: _proto.onStart = function(){ console.log(111111122222); $("#fileInput").trigger('click'); } 可以打印数字,但是触发不了input控件。 <input id="fileInput" type="fil...

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

704. 微信小游戏分包实战(TypeScript-小游戏适配文档-微信小游戏) [ 68%]

...钮btnA的点击事件,触发后处理 this.GameMain.newUI.btnA.on(Laya.Event.CLICK, this, this.showB); } //显示B页 private showB():void { this.GameMain.showUI(this.ui.bUI,this.GameMain.newUI) //监听按钮btnB的点击事件,触发后处理 this.GameMain.newUI.btnB.on(Laya.Event.CLICK, this...

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

705. 微信飞机大战中“开始页面”逻辑功能关于js继承问题 [ 68%]

...出错 this.btn_start.visible=false; //监听界面是否关闭 this.once(Event.CLOSE,this,onClose); //加载剩余游戏资源、音乐,加载完成与加载进度回调方法 Laya.loader.load(assetArr,Handler.create(this,onComplete),Handler.create(this,onProgress)) } return GameStart(); })();  ...

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

706. 获取相机renderTexture 作为阴影 的UV [ 67%]

...mouseHandler 怎么获取条目 如何获取图片每个像素点的RGB? Event.MOUSE_WHEEL 如何获取鼠标滚轮是放大开始缩小 lh文件内meshSprite添加阴影属性无效 怎么获取对象的坐标 怎样获取浏览器地址传过来的GET参数 分享:LayaAir下如何获取图集...

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

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

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

708. 材质-BlinnPhong材质加载 [ 67%]

...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 laya.webgl.WebGLContext; import common.CameraMoveScript; import common.Tool; /** * ... * @author */ pub...

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

709. MovieClip 报错 [ 67%]

...代码来添加保护:var data:*; data=Loader.getRes(_url); if (!data) { event(Event.ERROR,"file not find"); return; } //保护修改-----start------------------ var atlasData:Object = Loader.getAtlas(_atlasPath); if(!atlasData) { event(Event.ERROR,"file not find"); return; } //保护修改-----en...

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

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

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