From cef202ebba8ad517659eb6eb4f8bae3d8a2baeba Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Sun, 31 Jul 2022 18:06:57 +0200 Subject: [PATCH] Switch to tiles with added wrapper-object for future additional data --- BlueMapCommon/BlueMapVue | 2 +- .../bluemap/core/map/hires/HiresTileModel.java | 2 ++ .../bluemap/core/threejs/BufferGeometry.java | 18 ++++++++---------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/BlueMapCommon/BlueMapVue b/BlueMapCommon/BlueMapVue index 19bab32e..e37ce837 160000 --- a/BlueMapCommon/BlueMapVue +++ b/BlueMapCommon/BlueMapVue @@ -1 +1 @@ -Subproject commit 19bab32ee0df78b882046a360362975ce87bb0dd +Subproject commit e37ce837bf80a9273ed65f9eb54a4c7b852fbd8c diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresTileModel.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresTileModel.java index 53de9ec1..7862e79e 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresTileModel.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresTileModel.java @@ -394,6 +394,7 @@ public void writeBufferGeometryJson(OutputStream out) throws IOException { JsonWriter json = gson.newJsonWriter(new BufferedWriter(new OutputStreamWriter(out, StandardCharsets.UTF_8), 81920)); json.beginObject(); // main-object + json.name("tileGeometry").beginObject(); // tile-geometry-object // set special values json.name("type").value("BufferGeometry"); @@ -415,6 +416,7 @@ public void writeBufferGeometryJson(OutputStream out) throws IOException { writeMaterialGroups(json); json.endObject(); // data + json.endObject(); // tile-geometry-object json.endObject(); // main-object // save and return diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferGeometry.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferGeometry.java index 5697456e..f68dd4b9 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferGeometry.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/threejs/BufferGeometry.java @@ -24,21 +24,17 @@ */ package de.bluecolored.bluemap.core.threejs; -import java.io.IOException; -import java.io.StringReader; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.UUID; - import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import java.util.*; +import java.util.Map.Entry; + public class BufferGeometry { public Map attributes; @@ -84,6 +80,7 @@ public String toJson() { JsonWriter json = gson.newJsonWriter(sw); json.beginObject(); // main-object + json.name("tileGeometry").beginObject(); // tile-geometry-object // set special values json.name("type").value("BufferGeometry"); @@ -114,6 +111,7 @@ public String toJson() { json.endArray(); // groups json.endObject(); // data + json.endObject(); // tile-geometry-object json.endObject(); // main-object // save and return