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

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

2691. 从Unity中编辑并导出摄像机(JavaScript-3D基础(JS)-LayaAir3D之Camera) [ 63%]

...色动画资源 Laya.loader.create("monkey/monkey.ls",Laya.Handler.create(this,this.onSceneOK)); } onSceneOK() { //添加3D场景 var scene = Laya.loader.getRes("monkey/monkey.ls"); Laya.stage.addChild(scene); //从场景中获取摄像机 var camera = scene.getChildByName("Main Camera"); //后续...

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

2692. Sprite-缓存为静态图像 [ 63%]

...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.Stat.show(); this.cacheText(); } cacheText() { const Sprite = Laya.Sprite, Text = Laya.Text; let textBox = new Sprite(); Laya.stage.addChild(textBox); // 随机摆放文本 let text; for (let i = 0; i < 1000; i++) { text = new Text(); tex...

来源: Laya2.0_示例 发布时间: 20251223

2693. 简单粒子效果,发布成单机版apk在移动端安装运行,结果显示不出来 [ 63%]

... ) 主要就是: Laya.loader.load("SnowParticle.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON);           public function onAssetsLoaded(settings:ParticleSetting):void         {             sp = new Particle2D(settings);             sp.emitter.sta...

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

2694. BlinnPhong材质详解(TypeScript-3D基础(TS)-模型材质详解) [ 63%]

...aya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture) { //设置材质纹理 material.albedoTexture = texture; })); earth2.meshRenderer.material = material; ``` ![](img/4.png)(图4) ##### 法线贴图 **Normal maps(法线贴图)**是一个灰度图,可...

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

2695. 当使用Image作为一个对象的遮罩时,设置Image的ScaleX为0时遮罩失效! [ 63%]

...d([{url:"res/atlas/comp.json",type:Laya.Loader.ATLAS}],Laya.Handler.create(this,this.loaded,null)); } private loaded():void{ var img:Laya.Image = new Laya.Image(); img.skin = "comp/img_pro.png"; Laya.stage.addChild(img); var imgMask:Laya.Image = new Laya.Image(); imgMask.skin = img.skin; imgMask.sca...

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

2696. 使用js压缩工具报错 [ 63%]

...ZONE 微信 kylin 赞同来自: 第813行 Config.FunRestart=Handler.create(this,this.on重启); 定义的变量、函数名等,不要出现中文等非ASCII字符,变量的命名最好要符合规范。   LayaAirIDE里的压缩工具会分析代码,类似的中文命名的变量,通不过...

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

2697. layacmd mac 系统安装不上,急 [ 63%]

...pm ERR! npm ERR! Failed at the electron@1.8.6 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /var/root/.npm/_logs/2018-05-08T04_07_13_726Z-debug.log   环境: mac...

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

2698. 用最新版本的IDE开发,用AS语言开发,用HttpRequest加载图片报错,用JS语言开发却可以加载 [ 63%]

...Sprite(); var xhr:HttpRequest = new HttpRequest(); xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.send("res/monkey2.png","","get","arraybuffer"); } private function completeHandler(data:Object):void { //加载完成返回的data是arraybuffer; //..........

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

2699. 同一个Animation,创建多个实例只能显示一个(测试项目已上传) [ 63%]

.../////////////wheelas.as public function wheel(){ this.graphics.drawCircle(0,0,40,"#fff"); _wheel= new Animation(); _wheel.loadAnimation("wheeling.ani"); } public function init():void{ this.addChild(_wheel); _wheel.play(); }   附件 : --> 相关链接 : https://ask.layabox...

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

2700. 关于多个小动画打包到一个图集动画的问题 [ 63%]

...集 Laya.loader.load(&quot;res/atlas/hero.json&quot;,Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) //先把四张小图拿出来 var hero_down1=Laya.loader.getRes(&quot;hero/hero_down1.jpg&quot;); var hero_down2=Laya.loader.getRes(&quot;hero/hero_down2.jpg&quot;); var hero_down3=Laya.lo...

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