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

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

551. 创建材质(JavaScript-3D基础(JS)-LayaAir3D之Material材质) [ 58%]

...new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function(tex){ //纹理加载完成后赋值 material.albedoTexture = tex; })); //将材质赋值给自定义模型 box.meshRenderer.material = material; ``` ![](img/1.png)(图1) 当然,这只是简单...

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

552. loadImage 加载图片显示不完全 [ 58%]

...全显示但没有回调 this.downImg.loadImage( `${asset}/${images[1]}`, Handler.create(this, this._onImgLoaded) );    附件 : --> 2021-01-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同来自...

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

553. Unity导出粒子特效,到laya变成纯黑色 [ 58%]

...黑色   Laya.Scene3D.load("res/unity1/Conventional/GameScene.lh", Laya.Handler.create(this, function(scene) { Laya.stage.addChild(this.m_scene); }));   附件 : --> EffectComplete.unitypackage_.zip 2020-06-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请...

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

554. fillTexture使用问题 [ 58%]

...4; constructor() { super(); Laya.loader.load("res/images/map_01.png", Laya.Handler.create(this, this.bgLoaded)); } bgLoaded(): void { let t: Laya.Texture = Laya.loader.getRes("res/images/map_01.png"); this.width = 1000; this.height = 500; this.graphics.fillTexture(t, 0, 0); this.zOrder = -1; } } 201...

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

555. 获取图片资源出错,求大神解答,附代码 [ 58%]

...同来自: kkLL        我测试你的代码没什么大问题,就是handler写成了handle,少了一个r,你看下是不是这个问题,建议你用fb调试并开启debugger模式,这样有助于你代码错误报错提示,可以减少语法层面的错误! 2017-03-31 1 1 分享 ...

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

556. sprite3d怎样使用Laya.Tween.to来做缓动呢?比如position或者scale [ 58%]

...ion;Laya.Tween.to(box.potOld,{     x:1     ,y:2     ,update:new Laya.Handler(box,function(){         this.transform.position = this.potOld;     }) }, ConstValue.animationTime,Laya.Ease.elasticOut,Laya.Handler.create(this, function(){     console.log("complete"); }),ConstValue.animation...

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

557. 从Unity中编辑并导出摄像机(TypeScript-3D基础(TS)-LayaAir3D之Camera) [ 58%]

...; //预加载角色动画资源 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 Came...

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

558. IDE创建动画调用问题 [ 57%]

...); ani.pos(300,300); Laya.stage.addChild(ani); ani.loadAnimation("AAA.ani",Handler.create(this,onLoadedAni,[ani])); } private function onLoadedAni(ani:Animation):void { ani.play(0,true); trace(ani.frames); }在加载完成之后去获取! 2017-08-03 0 0 分享 微博 QZONE 微信 为什么被折...

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

559. list图片路径没问题.为什么图片就是不显示.啊啊啊也,求解答 [ 57%]

...].amount}); } } this.otherItem_list.array = data; this.otherItem_list.mouseHandler = new Handler(this,otherItem_listRender); fengjingmeng • 2018-03-21 16:44 你这个是list的逻辑,item的更新逻辑呢。item拿到数据后你做了什么处理? z624697 • 2018-03-21 16:46 现在是我将...

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

560. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 57%]

...var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用size设置:** ```typescr...

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