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

大约有 181 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0042 秒)

41. 物理刚体(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 79%]

...typescript //新建一个球体模型并添加到舞台上 var sphere:Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(PrimitiveMesh.createSphere(1))) as Laya.MeshSprite3D; //新建一个球形的碰撞盒 var sphereShape:Laya.SphereColliderShape = new Laya.SphereColliderShape(1); //给球...

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

42. WaterPrimaryMaterial的使用 [ 79%]

...l有demo吗? 我这里怎么调都是单一色块呢?   var box: Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(new Laya.PlaneMesh(10, 10))) as Laya.MeshSprite3D; // box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); // var material: Laya.BlinnPhongMaterial = new Laya.Bli...

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

43. 物理碰撞器(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 79%]

...图1所示。 ```typescript //平面 var plane = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createPlane(10, 10, 10, 10))) as Laya.MeshSprite3D; //新建材质 var planeMat:Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/threeDimen/Physics/grass.png", La...

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

44. 资源加载(JavaScript-3D基础(JS)-LayaAir3D之资源加载) [ 78%]

...(null, function(tex) { //使用纹理 var earth1 = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(5, 32, 32))); earth1.transform.translate(new Laya.Vector3(10, 20, -8)); var earthMat = new Laya.BlinnPhongMaterial(); earthMat.albedoTexture = tex; earthMat.albedoIntensity = 1; ea...

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

45. 1.7.17beta,微信小游戏预览加载问题 [ 77%]

...定义模型 Laya.URL.basePath="http://192.168.8.104:8080/" var box: Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(0.1, 0.1, 0.1))) as Laya.MeshSprite3D; box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); var material: Laya.StandardMaterial = new Laya.Standar...

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

46. 自定义shader-边缘光照shader [ 77%]

...ion = new Laya.Vector3(0, 0.5, 0); }); var earth = scene.addChild(new Laya.MeshSprite3D(new Laya.SphereMesh(0.5, 128, 128))); var customMaterial = new CustomMaterial(); customMaterial.setDiffuseTexture(Laya.Texture2D.load("../../res/threeDimen/texture/earth.png")); customMaterial.setMarginalColor(ne...

来源: Laya_示例 发布时间: 20240930

47. 自定义shader-地形shader [ 77%]

...); }); function setCustomMaterial(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var meshSprite3D = spirit3D; var customMaterial = new CustomTerrainMaterial(); customMaterial.setSplatAlphaTexture(Laya.Texture2D.load("../../res/threeDimen/scene/terrain/terrain/splatalpha 0.png")); customMat...

来源: Laya_示例 发布时间: 20240930

48. 多种碰撞器形状(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 77%]

...m() * 0.75 + 0.25; var sZ:int = Math.random() * 0.75 + 0.25; //创建盒型MeshSprite3D var box:MeshSprite3D = scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(sX, sY, sZ))) as MeshSprite3D; //创建刚体碰撞器 var rigidBody:Rigidbody3D = box.addComponent(Rigidbody3D); //创建盒子形...

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

49. 为什么rotation、scale赋值了不管用? [ 76%]

...cale赋值了不管用? 我创建了一个Sprite3D: this.role3D = Laya.MeshSprite3D.load("3d/ben/Export.lh") this.role3D.transform.scale = new Laya.Vector3(0.5,0.5,0.5); this.role3D.transform.position = new Laya.Vector3(0,20,0); 以上的scale、position设置均不起作用,但是我放到fra...

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

50. 3D的一些问题 [ 76%]

...原来必须使用.lm的文件才能解决第一个问题 var obj3D:Laya.MeshSprite3D = new Laya.MeshSprite3D(Laya.Mesh.load("Assets/FBX/scene_1-default001.lm")); 这样写就可以获得材质,而lh文件则不行,然而这样写的话,又出现了Laya.Event.HIERARCHY_LOADED事件并...

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