大约有 89 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0041 秒)
...g"); plane.meshRender.material = material; //生成坐标中心,其实是球体 var sphere = scene.addChild(new MeshSprite3D(new SphereMesh(0.05,100,100))) as MeshSprite3D; var material = new StandardMaterial(); material.albedo = new Vector4(0, 0, 0, 1); sphere.meshRender.material = material; sphe...
来源: Laya_社区 发布时间: 20170314
...的材质添加给新创建的球: > ```typescript //代码创建一个球体 var sphere2 = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(0.5))); //将创建的球放置在导出球的同一点 this.sphere2.transform.position = this.sphere.transform.position; //将创建的...
来源: Laya2.0_文档 发布时间: 20210715
...空间中,创造点基本的元素,一个平面,一个方体,一个球体。以下我用laya自带的方法创建,这个环节不做过多介绍。 //初始化3d画布 Laya3D.init(0, 0, true); //设置全屏 Laya.stage.scaleMode = Stage.SCALE_FULL; //显示统计数据 Stat.show(); //给...
来源: Laya_社区 发布时间: 20161223
...的材质添加给新创建的球: > ```typescript //代码创建一个球体 var sphere2:MeshSprite3D = scene.addChild(new MeshSprite3D(PrimitiveMesh.createSphere(0.5))) as MeshSprite3D; //将创建的球放置在导出球的同一点 sphere2.transform.position = sphere.transform.position; //将...
来源: Laya2.0_文档 发布时间: 20210715
...ndBox(sprite3d4.meshFilter.sharedMesh.boundingBox); //用球模拟精灵的球体碰撞器 sphereMesh = new Laya.SphereMesh(1, 32, 32); sphereSprite3d = scene.addChild(new Laya.MeshSprite3D(sphereMesh)); var mat = new Laya.StandardMaterial(); mat.albedo = new Laya.Vector4(1, 1, 1, 0.5); mat.renderMo...
来源: Laya_示例 发布时间: 20260106
...的材质添加给新创建的球: > ```typescript //代码创建一个球体 var sphere2 = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(0.5))) as Laya.MeshSprite3D; //将创建的球放置在导出球的同一点 this.sphere2.transform.position = this.sphere.transform.posi...
来源: Laya2.0_文档 发布时间: 20210715
...。 在渲染阶段,引擎检测到200个使用相同材质与网格的球体,会自动进行批次合并优化。不同节点的CustomData数据会以InstanceBuffer的形式被合并提交,最终这200个球体只需一个渲染批次即可完成绘制,大幅提升了渲染效率。 7.2.2...
来源: Laya3.0_文档 发布时间: 20251010
... this.mat1.albedoTexture = tex; //添加一个球体 Laya.timer.once(100, this, () => { this.addBox(0); this.addBox(1); }); })); ...
来源: Laya_社区 发布时间: 20201120
... //创建球 this.addSphere(); } //添加球体 addSphere(){ let radius = 0.5; let sphere = this.scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(radius))); sphere.meshRenderer.material = this.mat2; ...
来源: Laya_社区 发布时间: 20191009
.../ 创建几何体(几何体和物理实体),添加到加农世界 // 球体,质量5,半径1 var mass:Object=50, radius:Object=1; var sphereShape:Object=new CANNON.Sphere(radius); sphereBody=new CANNON.Body({mass: mass, shape: sphereShape}); sphereBody.position.set(0, 0, 100); world.add(sph...
来源: Laya_社区 发布时间: 20170331