- BabylonJS 教程
- BabylonJS - 首頁
- BabylonJS - 簡介
- BabylonJS - 環境設定
- BabylonJS - 概述
- BabylonJS - 基本元素
- BabylonJS - 材質
- BabylonJS - 動畫
- BabylonJS - 攝像機
- BabylonJS - 光線
- BabylonJS - 引數形狀
- BabylonJS - 網格
- 向量位置和旋轉
- BabylonJS - 貼花
- BabylonJS - Curve3
- BabylonJS - 動態紋理
- BabylonJS - 視差對映
- BabylonJS - 鏡頭光暈
- BabylonJS - 建立螢幕截圖
- BabylonJS - 反射探測
- 標準渲染管道
- BabylonJS - ShaderMaterial
- BabylonJS - 骨骼和骨架
- BabylonJS - 物理引擎
- BabylonJS - 播放的聲音和音樂
- BabylonJS 的有用資源
- BabylonJS - 快速指南
- BabylonJS - 有用資源
- BabylonJS - 討論
BabylonJS - 地面
這是 MeshBuilder 使用的一種形狀。
語法
var ground = BABYLON.MeshBuilder.CreateGround("ground", {width: 150, height:15}, scene);
寬度和高度作為 {width:150,height:15} 傳遞給類。
球體
這是 MeshBuilder 使用的一種形狀。
語法
var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {diameter: 2, diameterX: 3, diameterY:3 , diameterZ:3, arc:1, slice:1, updatable:false}, scene);
引數
考慮用於建立地面以下引數 -
直徑 - 球體的直徑。
DiameterX - X 軸上的直徑。覆蓋直徑屬性。
DiameterY - Y 軸上的直徑。覆蓋直徑屬性。
DiameterZ - Z 軸上的直徑。覆蓋直徑屬性。
弧 - 0 到 1 之間的圓周比率。
切片 - 0 到 1 之間的高度比率。
可更新 - 預設情況下,它設定為 false。如果它需要在變形過程中更新,您可以將其設定為 true。
babylonjs_mesh.htm
廣告