| @@ -2845,7 +2845,7 @@ document.addEventListener("DOMContentLoaded", () => { | |||||
| if (param === null) { | if (param === null) { | ||||
| scenes["Default"](); | |||||
| scenes["Empty"](); | |||||
| } | } | ||||
| else { | else { | ||||
| @@ -2861,7 +2861,7 @@ document.addEventListener("DOMContentLoaded", () => { | |||||
| importScene(data); | importScene(data); | ||||
| } catch (err) { | } catch (err) { | ||||
| console.error(err); | console.error(err); | ||||
| scenes["Default"](); | |||||
| scenes["Empty"](); | |||||
| // probably wasn't valid data | // probably wasn't valid data | ||||
| } | } | ||||
| @@ -1,10 +1,12 @@ | |||||
| const scenes = {}; | const scenes = {}; | ||||
| scenes["Default"] = () => { | |||||
| importScene({ "entities": [{ "name": "Fen", "scale": 1, "view": "back", "x": "0", "y": "0" }], "world": { "height": 2.9053707516337908, "unit": "meters" }, "version": 0 }); | |||||
| fitWorld(true); | |||||
| } | |||||
| scenes["Example"] = () => { | |||||
| importScene({"entities":[{"name":"Fen","customName":"Fen","scale":5.436062065275549,"view":"back","x":"0","y":"0","priority":0,"brightness":1},{"name":"Cars","customName":"Cars","scale":1,"view":"Honda Civic (Top)","x":"3.6430974462612693","y":"7.408826784765282","priority":0,"brightness":1},{"name":"Two-Story Home","customName":"Two-Story Home","scale":1,"view":"building","x":"9.566315322175566","y":"0","priority":0,"brightness":1},{"name":"Human","customName":"Human","scale":1,"view":"man1","x":"0","y":"0","priority":0,"brightness":1},{"name":"Buses","customName":"Buses","scale":1,"view":"City Bus (Side)","x":"-8.725600526884504","y":"0","priority":0,"brightness":1},{"name":"Street Lamps","customName":"Street Lamps","scale":1,"view":"residential","x":"3.1463114308620046","y":"0","priority":0,"brightness":1}],"world":{"height":13.411200000000004,"unit":"meters","x":0.6256284987277357,"y":0},"version":3}) | |||||
| } | |||||
| scenes["Empty"] = () => { | |||||
| importScene({ "entities": [], "world": { "height": 3, "unit": "meters" }, "version": 0 }); | |||||
| } | |||||
| function makeSlice(min, max) { | function makeSlice(min, max) { | ||||
| return () => { | return () => { | ||||
| const characters = availableEntities["characters"].filter(x => { | const characters = availableEntities["characters"].filter(x => { | ||||