diff --git a/README.md b/README.md index 0392334..2daa421 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ -- import SVG in blender, draw cube meshes up from each room -- format: https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender -- parser,renderer: three +# Install + + npm install + npm install -g browserify + + node parse.js >> rooms.json + + # TODO doesnt work + browserify -t brfs index.js -o bundle.js + open index.html + +# TODO / Plan + +- Draw SVG-shapes over PDF maps in Inscape and set id to roomnumber. +- parse SVG into suitable json datastructur (room, coordinates, dimensions) + +- render with three.js like described below + +# Design + +- Black backgrund +- Wireframe of room per floor tagged with name of room +- Highlight room by drawing color semitransparent glowing cube on tob of room floor + - Controller by query param and browser controls diff --git a/data/neuf04.svg b/data/neuf04.svg new file mode 100644 index 0000000..59e61d6 --- /dev/null +++ b/data/neuf04.svg @@ -0,0 +1,394 @@ + + + + \ No newline at end of file diff --git a/data/rooms.json b/data/rooms.json new file mode 100644 index 0000000..0a8b7e2 --- /dev/null +++ b/data/rooms.json @@ -0,0 +1 @@ +{"rooms":[{"number":"447","pos":{"x":"53.564445","y":"-158.08394"},"size":{"height":"77.731247","width":"77.904381"}},{"number":"450","pos":{"x":"318.01108","y":"-185.0863"},"size":{"height":"69.93187","width":"36.000183"}},{"number":"448","pos":{"x":"354.71475","y":"-185.08415"},"size":{"height":"100.39677","width":"112.169"}},{"number":"423","pos":{"x":"466.89041","y":"-185.09079"},"size":{"height":"101.79505","width":"146.80646"}},{"number":"427","pos":{"x":"665.62469","y":"-230.11064"},"size":{"height":"45.028267","width":"76.190018"}},{"number":"437","pos":{"x":"756.34747","y":"-184.39943"},"size":{"height":"291.53769","width":"35.318886"}},{"number":["428","429"],"pos":{"x":"791.67664","y":"-184.38683"},"size":{"height":"146.09106","width":"117.69923"}},{"number":"430","pos":{"x":"793.05017","y":"-36.899376"},"size":{"height":"68.555847","width":"117.72215"}},{"number":"431","pos":{"x":"793.05017","y":"30.963974"},"size":{"height":"76.865646","width":"118.41465"}},{"number":"440","pos":{"x":"792.3576","y":"107.82961"},"size":{"height":"146.11398","width":"118.41465"}},{"number":"436","pos":{"x":"756.38678","y":"107.17565"},"size":{"height":"294.92099","width":"35.932209"}},{"number":"435","pos":{"x":"792.3576","y":"321.80695"},"size":{"height":"81.020546","width":"117.02967"}},{"number":"444","pos":{"x":"685.02264","y":"474.84579"},"size":{"height":"71.325775","width":"72.710747"}},{"number":"402","pos":{"x":"827.67426","y":"498.39026"},"size":{"height":"44.318932","width":"72.710747"}},{"number":"420","pos":{"x":"758.47394","y":"581.2832"},"size":{"height":"115.85214","width":"69.047668"}},{"number":"411","pos":{"x":"22.717258","y":"580.50562"},"size":{"height":"82.557472","width":"53.380753"}},{"number":"403","pos":{"x":"152.27817","y":"580.30676"},"size":{"height":"38.193451","width":"43.090046"}},{"number":"409","pos":{"x":"195.37247","y":"580.31085"},"size":{"height":"78.540001","width":"49.447254"}},{"number":"412","pos":{"x":"23.009211","y":"546.86469"},"size":{"height":"33.930614","width":"589.30219"}},{"number":"407","pos":{"x":"319.73325","y":"580.29822"},"size":{"height":"117.53546","width":"75.99839"}},{"number":"406","pos":{"x":"395.63904","y":"580.30676"},"size":{"height":"118.00798","width":"70.021324"}},{"number":"405","pos":{"x":"465.17068","y":"580.79633"},"size":{"height":"117.02865","width":"146.89789"}},{"number":"404","pos":{"x":"612.0686","y":"581.7757"},"size":{"height":"115.55968","width":"76.386887"}},{"number":"421","pos":{"x":"688.44983","y":"581.48309"},"size":{"height":"115.65492","width":"70.522224"}},{"number":"419","pos":{"x":"827.03021","y":"543.58331"},"size":{"height":"153.60759","width":"80.791679"}},{"number":"422","pos":{"x":"22.019121","y":"108.75488"},"size":{"height":"32.623585","width":"34.29538"}},{"number":"417","pos":{"x":"22.518375","y":"141.57167"},"size":{"height":"205.65706","width":"105.27682"}},{"number":"414","pos":{"x":"23.008051","y":"401.58087"},"size":{"height":"43.579708","width":"71.490303"}},{"number":"413","pos":{"x":"23.008051","y":"444.6709"},"size":{"height":"102.8285","width":"71.490265"}}]} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..26f3990 --- /dev/null +++ b/index.html @@ -0,0 +1,17 @@ + + +
+