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

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

551. 创建材质(TypeScript-3D基础(TS)-LayaAir3D之Material材质) [ 66%]

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

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

552. 动画挂点(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 65%]

...Laya.Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res...

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

553. 动画挂点(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 65%]

...Laya.Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res...

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

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

...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

555. 图集动画(JavaScript-LayaAir基础篇(JS)-动画基础) [ 65%]

...后执行回调方法 this.roleAni.loadAtlas("res/atlas/role.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //添加到舞台 Laya.stage.addChild(this.roleAni); } ``` 运行代码,如图5所示。动画已加载到舞台上,默认是未播放状态的。 ![图5](img/5.png) (图...

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

556. 引用3d物理引擎失败,有文件丢失 Laya3D._physics3D.btVector3 找不到 [ 65%]

...omplete (file:///E:/ycyheroH5/ycyZYWZW/Client/bin/js/bundle.js:68463:8) at Handler.__proto.run (file:///E:/ycyheroH5/ycyZYWZW/Client/bin/js/bundle.js:36051:26) at onComplete (file:///E:/ycyheroH5/ycyZYWZW/Client/bin/js/bundle.js:51721:15) at Handler.__proto.runWith (file:///E:/ycyheroH5/ycyZYWZW/Cli...

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

557. Tree属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 65%]

... Stage = Laya.Stage; var Tree = Laya.Tree; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.sc...

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

558. 图片不能按轴心旋转 [ 65%]

... Laya.Sprite(); bg.loadImage("../res/image/interface/intro_bg.png",0,0,0,0,Handler.create(this,aa)); function aa(texture){ bg.pivot(texture.width,texture.height); bg.alpha = 1; bg.rotation = 10; } 2018-05-19 1 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已...

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

559. drawTexture时,Matrix对象,a=-1,无法实现水平翻转 [ 65%]

...回复 ssqhu 赞同来自: qihei Laya.loader.load("res/atlas/test0.png", Handler.create(this, function():void    {     var t:Texture = Laya.loader.getRes("res/atlas/test0.png");     ape = new Sprite();     var matrix:Matrix = new Matrix();     matrix.a = -1;     matrix.tx = 2*...

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

560. 对象池3D问题 [ 65%]

对象池3D问题 Laya.loader.create("fish/denglongyu/layaScene.lh", Laya.Handler.create(this, function(){     var layaMonkey =Laya.Sprite3D.load("fish/denglongyu/layaScene.lh"); scene.addChild(layaMonkey) layaMonkey.transform.localScale = new Laya.Vector3(0.04,0.04,0.04); layaMonkey.transform....

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