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

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

561. LayaAir 2.0 微信排行榜 离屏画布不能直接附加到组件纹理上 [ 82%]

...enDataContext({ state: 'init', openId: GlobalData.getInstance().openId }); this.rank = new Laya.Sprite(); this.box_rank.addChild(this.rank); Laya.Browser.window.sharedCanvas.width = this.box_rank.width; Laya.Browser.window.sharedCanvas.height = this.box_rank.height; //alwaysChange = true不好用了...

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

562. 动画添加了 滤镜,drawcall 次数暴增,这是为啥???? [ 82%]

...数暴增,这是为啥???? var url = App.animManager.getUrl(id); this.ani.loadAtlas(url,null,id); this.ani.alpha = 0.5; this.ani.play(0, true); var grayMat = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]; //创建一个颜色滤镜对象,灰图 var scaleFilter = new Laya...

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

563. UNITY导出的模型旋转不了 [ 82%]

...l,function(){ //obj.transform.rotate(vect,false,false); //}); })); })); })(this); class BoxControlScript extends Laya.Script3D { constructor() { super(); this.obj = null; this.rotation = new Laya.Vector3(0, 1, 0); } /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创...

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

564. 显示与切换图片(ActionScript-LayaAir基础篇(AS3)-位图) [ 82%]

...域的点击事件,触发后执行switchImg切换图片 img.on("click",this,switchImg); //将图片添加到舞台 Laya.stage.addChild(img); } private function switchImg(e:*=null):void { //清空图片 img.graphics.clear(); //获得要切换的图片资源路径 var imgUrl:String = (flag = !flag)?...

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

565. ToolTip鼠标悬停的使用 [ 82%]

...e.bgColor="#eeffcc"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { this._testTip=new TestTipsUI();//务必在Laya.init后去new实例,不可直接在全局变量处实例化 //切记,无论何种鼠标提示方式,...

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

566. localToGlobal坐标转换 [ 82%]

...是如下写的,感觉转换后还是局部坐标 var globalPos:Point = this._toolbar.btn_mian_recruit.localToGlobal(new Point(this._toolbar.btn_mian_recruit.x, this._toolbar.btn_mian_recruit.y)); 2016-08-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

567. VR场景-VR地球 [ 82%]

...r scene: Laya.Scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; this.rotation = new Laya.Vector3(0, 0.002, 0); //与3d场景的不同是添加了vr相机 var vrCamera: Laya.VRCamera = scene.addChild(new Laya.VRCamera(0.03, 0, 0, 0.1, 100)) as Laya.VRCamera; vrCamera.transform.translate(ne...

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

568. 内存优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 82%]

...颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1,this,onFrame); } private function onFrame():void { //如果创建对象时间为100帧间隔后 if(createTime>=100) { //每200帧间隔创建30个雪花 for(var i:int=0;i640+20||img1.scaleX(图2-1) 在一些特殊情况我...

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

569. 天理何在,一个轴心点位中心的addChild到一个父容器,父容器的轴线点也是中心 [ 82%]

...器,父容器的轴线点也是中心 constructor(skin:Box) { super(); this.mc = skin; this._name = this.mc.name; this.addChild(this.mc); var xx:number = this.mc.x; var yy:number = this.mc.y; this.x = xx; this.y = yy; //一个轴心点中心的addChild到另一个轴线点位中心的 this.size(77...

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

570. socket报错,on: reserved1 = 1, reserved2 = 1, reserved3 = 0 [ 82%]

... private var byte:Byte; public function SocketSample() { //初始化引擎 this.byte = new Byte(); this.byte.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket = new Socket(); this.socket.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket.on(Event.OPEN,this,open...

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