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

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

621. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 71%]

...; var sp:Sprite = new Sprite(); sp.loadImage(data,0,0,200,200); Laya.stage.addChild(sp); } } } ``` 通过data来当做url传递给loadImage这个方法引擎就会帮我们加载并解码显示出来。loadImage这个方法中的参数不仅仅接收地址形式的url还接受base64和svg的格式...

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

622. 图集动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 71%]

...s,this.onLoaded)); } private onLoaded():void{ //添加到舞台 Laya.stage.addChild(this.roleAni); } } new AtlasAniDemo(); ``` 运行代码,如图5所示。动画已加载到舞台上,默认是未播放状态的。 ![图5](img/5.png) (图5) #### 2.3 播放图集动画 图集动画使用loadAtlas...

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

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

...(3).png"); //设置位置 img.pos(165, 62.5); //加载到舞台 Laya.stage.addChild(img); } } } ```

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

624. CameraMoveScript,父对象Camera移除removeAllComponent后,还会继续获取鼠标事件 [ 71%]

...EARFLAG_SKY; this.m_sceneCamera.addComponent(CameraMoveScript); this.stage.addChild(this.m_scene); this.m_scene.addChild(this.m_sceneCamera); 在destory的时候 this.stage.removeChild(this.m_scene); this.m_sceneCamera.removeAllComponent(); this.m_scene.destroy(); this.m_scene = null; 只会这个Ca...

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

625. 粒子中引用的图片能合图吗 [ 71%]

...t.x = this.width / 2;     part.y = this.height - 100;     Laya.stage.addChild(part); } dian.png和dian.part放到demo的comp目录下。 dian.zip 2017-08-03 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 可否把可以体现问题的能运行的例子上传下呢,我测试没有重...

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

626. [LayaAir3]3.3版本绘制矢量图有BUG [ 71%]

..., Laya.stage.width, Laya.stage.height, '0xff0000');         Laya.stage.addChild(sp); 附件 : --> 2025-07-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 LayaAir小牛 赞同来自: 您好,在3.3正式版...

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

627. Panel滚动条滑块位于最下方 [ 71%]

...lBarSkin="comp/vscroll.png"; panel.width=300; panel.height=300; Laya.stage.addChild(panel); panel.addChild(img); panel.vScrollBar.min=1; panel.vScrollBar.max=500; panel.vScrollBar.value=panel.vScrollBar.max; Laya.timer.frameLoop(12,this,onLoop); } private function onLoop():void { trace(panel.vScroll...

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

628. 在Unity中设置动画事件(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 71%]

...onal/layaScene.ls", Laya.Handler.create(this, function(scene) { Laya.stage.addChild(scene); //获取cube对象 var cube = scene.getChildByName("Cube"); //添加组件(脚本) var _script = cube.addComponent(SceneScript); //label用于显示 var _lab = new Laya.Label(); _lab.text = "test"; _lab.heigh...

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

629. 报错:找不到基类,按照laya社区的解答做了,但是导致了另外一个类和接口出现一样的错 [ 71%]

...      Laya.stage.bgColor = "#ffff00";             Laya.stage.addChild(txt);         }     } } 2017-10-25 0 0 分享 微博 QZONE 微信 Monica - 知识达人 赞同来自: LayaAir引擎初始化之前不能继承,也不能进行实例化。。所以你这个报错是在引擎...

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

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

...FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(this.info);  Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta...

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