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

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

641. dialog的popup方法不会关闭其他弹窗 [ 71%]

...new NormalDialog(context); this.normalDialog.popup(true, true); Laya.stage.addChild(this.normalDialog);  }  }     // 弹窗代码   class NormalDialog extends ui.normalDialogUI { constructor( text: string ) { super(); // 设置label文字 this.context.text = text; this.btn_close.on(Laya.Event.C...

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

642. WebGl下 graphics画出东西后 移动sprite 不起效果 [ 71%]

...wSomething()     {         sp = new Sprite();         Laya.stage.addChild(sp);               //绘制圆角矩形,自定义路径         sp.graphics.drawPath(0, 0, [             ["moveTo", 5, 0],             ["lineTo", 105, 0],             ["arcTo", 110, 0, ...

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

643. 把摄像机添加到一个物体上,然后绕着这个物体旋转 [ 71%]

...t3D,给它添加一个cameraMoveScript脚本组件,然后​cameraroot.addchild创建一个摄像机,设置好摄像机的默认位置角度使其朝向物体就行了 var map: Laya.Sprite3D = Laya.loader.getRes("cj/cj.lh"); this.scene.addChild(map); var cjd0: Laya.Sprite3D = new Laya.Sprite3D...

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

644. 陀螺仪与加速计(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 71%]

..."#FFFFFF";  info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(info);     Gyroscope.instance.on(Event.CHANGE, this, onDeviceorientation); }   private function onDeviceorientation(absolute:Boolean, rotationInfo:RotationInfo):void  {  info.text =   "alpha:" + Math....

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

645. LayaAirIDE中第一个程序“Hello Layabox”(ActionScript-LayaAir基础篇(AS3)-快速上手) [ 71%]

...  //将文本内容添加到舞台              Laya.stage.addChild(txt);               }     }   } ``` ​ **步骤五**:完成代码编写后,用F5快捷键编译并运行结果如下图所示: ​ ![blob.png](img/5.png) ​ 图(5) ​ **步骤六**:...

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

646. laya空项目怎么加载unity带出的.ls文件 [ 71%]

...e_xfg/layaScene.ls",Laya.Handler.create(this,function(_s){ Laya.stage.addChild(_s); })); 这样还是报错 说secne是void

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

647. ProgressBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 71%]

....changeHandler = new Handler(this, onChange); //加载到舞台 Laya.stage.addChild(progressBar); //时间间隔循环,每100毫秒改变一次数据 Laya.timer.loop(100, this, changeValue); } /***时间间隔循环回调,更新进度条***/ private function changeValue():void { //最大为1,...

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

648. 加上size设置后,精灵不能点击. [ 71%]

...Event.CLICK, this, () => { img.y -= 10; }) img.pos(100, 300) Laya.stage.addChild(img) } function createFlower() { var f = new Laya.Sprite(); var r = Math.random(); var s = r > 0.66 ? "img/flower1.jpg" : r > 0.33 ? "img/flower2.png" : "img/flower3.jpg" f.loadImage(s); f.on(Laya.Event.CLICK, ...

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

649. 滤镜的集中实现 [ 70%]

... createImg(w,h){ var Img = new Laya.Sprite(); //添加到舞台 Laya.stage.addChild(Img); //加载显示图片 Img.loadImage("res/tt.png",w,h); return Img; } /**创建红色滤镜位图方法**/ function creteRedFilter(){ //颜色滤镜矩阵,红色 var colorMatrix = [ 1, 0, 0, 0, 0, //R 0, 0, 0, 0,...

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

650. drawToCanvas转出图片与游戏内显示颜色差距过大 [ 70%]

... init() {         Laya.stage.bgColor='#ffffff';         Laya.stage.addChild(new Laya.Image('comp/img/img1.png'));         Laya.timer.once(1000, this, this.delayShow);     }     delayShow() {         let canvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0); ...

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