fix terrainTiles not found

This commit is contained in:
Brian Beck 2025-09-12 09:13:13 -07:00
parent 4337ee85e9
commit f57acbcbf4
11 changed files with 14 additions and 10 deletions

View file

@ -396,8 +396,11 @@ uniform float tiling5;
root.add(terrainMesh);
for (const obj of iterObjects(mission.objects)) {
const getProperty = (name) =>
obj.properties.find((p) => p.target.name === name);
const getProperty = (name) => {
const property = obj.properties.find((p) => p.target.name === name);
// console.log({ name, property });
return property;
};
const getPosition = () => {
const position = getProperty("position")?.value ?? "0 0 0";
@ -480,7 +483,8 @@ uniform float tiling5;
const [x, y, z] = getPosition(); // Match InteriorInstance coordinate order
const [scaleX, scaleY, scaleZ] = getScale();
const q = getRotation(true); // Match InteriorInstance rotation handling
const surfaceTexture = getProperty("surfaceTexture").value;
const surfaceTexture =
getProperty("surfaceTexture")?.value ?? "liquidTiles/BlueWater";
const geometry = new THREE.BoxGeometry(1, 1, 1);
const material = new THREE.MeshStandardMaterial({