mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 02:26:00 +01:00
Switch to tiles with added wrapper-object for future additional data
This commit is contained in:
parent
e9785562d1
commit
cef202ebba
@ -1 +1 @@
|
||||
Subproject commit 19bab32ee0df78b882046a360362975ce87bb0dd
|
||||
Subproject commit e37ce837bf80a9273ed65f9eb54a4c7b852fbd8c
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user