每個幾何圖形具有boundingSphere
屬性,你可以用它來計算出你的對象的大小。 https://threejs.org/docs/api/core/Geometry.html 如果屬性沒有使用值,可以計算它geometry.computeBoundingSphere();
至於燈光每個光源類型的還有與之關聯的輔助函數會告訴你那裏的光:
https://threejs.org/docs/index.html?q=Helper#Reference/Extras.Helpers/HemisphereLightHelper
https://threejs.org/docs/index.html?q=Helper#Reference/Extras.Helpers/DirectionalLightHelper
https://threejs.org/docs/index.html?q=Helper#Reference/Extras.Helpers/PointLightHelper
https://threejs.org/docs/index.html?q=Helper#Reference/Extras.Helpers/SpotLightHelper