Switch to tiles with added wrapper-object for future additional data

This commit is contained in:
Lukas Rieger (Blue) 2022-07-31 18:06:57 +02:00
parent e9785562d1
commit cef202ebba
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
3 changed files with 11 additions and 11 deletions

@ -1 +1 @@
Subproject commit 19bab32ee0df78b882046a360362975ce87bb0dd
Subproject commit e37ce837bf80a9273ed65f9eb54a4c7b852fbd8c

View File

@ -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

View File

@ -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<String, BufferAttribute> 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