model-manager 0.0.3-1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. package/administration/insert.js +179 -0
  2. package/administration/insert_one.js +33 -0
  3. package/administration/test_data.js +46 -0
  4. package/administration.html +149 -0
  5. package/assets/css/admin.css +247 -0
  6. package/assets/css/basic.css +474 -0
  7. package/assets/css/checkout.css +517 -0
  8. package/assets/css/dialog.css +158 -0
  9. package/assets/css/dialog_admin.css +73 -0
  10. package/assets/css/dialog_checkout.css +177 -0
  11. package/assets/css/info.css +10 -0
  12. package/assets/logo.png +0 -0
  13. package/assets/partnerart.png +0 -0
  14. package/assets/spinner.gif +0 -0
  15. package/assets/spinner_2.gif +0 -0
  16. package/assets/three/GLTFLoader.js +4448 -0
  17. package/assets/three/ModelLoader.js +58 -0
  18. package/assets/three/OrbitControls.js +1252 -0
  19. package/assets/three/three.js +36819 -0
  20. package/assets/three/three.module.js +50708 -0
  21. package/assets/white/add_white_24dp.svg +1 -0
  22. package/assets/white/admin/check.svg +1 -0
  23. package/assets/white/admin/person_add_FILL0_wght400_GRAD0_opsz48.svg +1 -0
  24. package/assets/white/admin/person_remove_FILL0_wght400_GRAD0_opsz48.svg +1 -0
  25. package/assets/white/admin.svg +1 -0
  26. package/assets/white/arrow_forward.svg +1 -0
  27. package/assets/white/brush_white_24dp.svg +1 -0
  28. package/assets/white/close_white_24dp.svg +1 -0
  29. package/assets/white/code_white_24dp.svg +1 -0
  30. package/assets/white/dashboard_white_24dp.svg +1 -0
  31. package/assets/white/done_white_24dp.svg +1 -0
  32. package/assets/white/emoji_people_white_24dp.svg +1 -0
  33. package/assets/white/filter_list_white_24dp.svg +1 -0
  34. package/assets/white/info_white_24dp.svg +1 -0
  35. package/assets/white/minimize_white_24dp.svg +1 -0
  36. package/assets/white/receipt_white_24dp.svg +1 -0
  37. package/assets/white/rocket_launch_white_24dp.svg +1 -0
  38. package/assets/white/search_black_24dp.svg +1 -0
  39. package/assets/white/search_white_24dp.svg +1 -0
  40. package/assets/white/settings_white_24dp.svg +1 -0
  41. package/assets/white/shopping_cart_white_24dp.svg +1 -0
  42. package/assets/white/store_white_24dp.svg +1 -0
  43. package/assets/white/timeline_white_24dp.svg +1 -0
  44. package/assets/white/view_in_ar_white_24dp.svg +1 -0
  45. package/checkout.html +132 -0
  46. package/checkout_admin.html +141 -0
  47. package/icon.png +0 -0
  48. package/imgs/armchair.png +0 -0
  49. package/imgs/arrow_tnt.png +0 -0
  50. package/imgs/bed_wnm.png +0 -0
  51. package/imgs/big_bed.png +0 -0
  52. package/imgs/birdscythe.png +0 -0
  53. package/imgs/blue_tnt.png +0 -0
  54. package/imgs/bull.png +0 -0
  55. package/imgs/carpet.png +0 -0
  56. package/imgs/chest.png +0 -0
  57. package/imgs/coin_stash.png +0 -0
  58. package/imgs/creeper_tnt.png +0 -0
  59. package/imgs/garbage_can.png +0 -0
  60. package/imgs/generator.png +0 -0
  61. package/imgs/golden_sword.png +0 -0
  62. package/imgs/highbed.png +0 -0
  63. package/imgs/jetpack1.png +0 -0
  64. package/imgs/jetpack2.png +0 -0
  65. package/imgs/jetpack3.png +0 -0
  66. package/imgs/jetpack4.png +0 -0
  67. package/imgs/jetpack5.png +0 -0
  68. package/imgs/jetpack6.png +0 -0
  69. package/imgs/karmincross.png +0 -0
  70. package/imgs/light_tnt.png +0 -0
  71. package/imgs/lucky_block.png +0 -0
  72. package/imgs/lucky_block_2.png +0 -0
  73. package/imgs/mega_tnt.png +0 -0
  74. package/imgs/modern_lamp.png +0 -0
  75. package/imgs/multiply_tnt.png +0 -0
  76. package/imgs/nuke.png +0 -0
  77. package/imgs/oak_tree.png +0 -0
  78. package/imgs/oak_tree_2.png +0 -0
  79. package/imgs/old_globe.png +0 -0
  80. package/imgs/scificannon_1.png +0 -0
  81. package/imgs/scificannon_10.png +0 -0
  82. package/imgs/scificannon_11.png +0 -0
  83. package/imgs/scificannon_12.png +0 -0
  84. package/imgs/scificannon_13.png +0 -0
  85. package/imgs/scificannon_14.png +0 -0
  86. package/imgs/scificannon_2.png +0 -0
  87. package/imgs/scificannon_3.png +0 -0
  88. package/imgs/scificannon_4.png +0 -0
  89. package/imgs/scificannon_5.png +0 -0
  90. package/imgs/scificannon_6.png +0 -0
  91. package/imgs/scificannon_7.png +0 -0
  92. package/imgs/scificannon_8.png +0 -0
  93. package/imgs/scificannon_9.png +0 -0
  94. package/imgs/simple_chair.png +0 -0
  95. package/imgs/small_car.png +0 -0
  96. package/imgs/small_modern_lamp.png +0 -0
  97. package/imgs/small_wardrobe.png +0 -0
  98. package/imgs/small_wooden_table.png +0 -0
  99. package/imgs/spike_sword.png +0 -0
  100. package/imgs/stone_holder.png +0 -0
  101. package/imgs/stone_sword.png +0 -0
  102. package/imgs/street_lamp.png +0 -0
  103. package/imgs/sword_1.png +0 -0
  104. package/imgs/sword_with_hole.png +0 -0
  105. package/imgs/testing.png +0 -0
  106. package/imgs/timer_tnt.png +0 -0
  107. package/imgs/tiny_tnt.png +0 -0
  108. package/imgs/tnt_cannon.png +0 -0
  109. package/imgs/wing_tnt.png +0 -0
  110. package/imgs/wooden_stool.png +0 -0
  111. package/imgs/wooden_wardrobe.png +0 -0
  112. package/index.html +179 -0
  113. package/index_admin.html +189 -0
  114. package/js/db/push_model.js +30 -0
  115. package/js/dialoges.js +23 -0
  116. package/js/item_functionality.js +7 -0
  117. package/js/load_admin.js +32 -0
  118. package/js/load_cart.js +76 -0
  119. package/js/load_items.js +467 -0
  120. package/js/update.js +35 -0
  121. package/login.html +287 -0
  122. package/main.js +306 -0
  123. package/models/armchair.gltf +1 -0
  124. package/models/arrow_tnt.gltf +1 -0
  125. package/models/bedwnm.gltf +1 -0
  126. package/models/big_bed.gltf +1 -0
  127. package/models/birdscythe.gltf +1 -0
  128. package/models/blue_tnt.gltf +1 -0
  129. package/models/bull.gltf +1 -0
  130. package/models/carpet.gltf +1 -0
  131. package/models/chest.gltf +1 -0
  132. package/models/coin_stash.gltf +1 -0
  133. package/models/creeper_tnt.gltf +1 -0
  134. package/models/garbage_can.gltf +1 -0
  135. package/models/generator.gltf +1 -0
  136. package/models/golden_sword.gltf +1 -0
  137. package/models/highbed.gltf +1 -0
  138. package/models/jetpack1.gltf +1 -0
  139. package/models/jetpack2.gltf +1 -0
  140. package/models/jetpack3.gltf +1 -0
  141. package/models/jetpack4.gltf +1 -0
  142. package/models/jetpack5.gltf +1 -0
  143. package/models/jetpack6.gltf +1 -0
  144. package/models/karmincross.gltf +1 -0
  145. package/models/light_tnt.gltf +1 -0
  146. package/models/lucky_block.gltf +1 -0
  147. package/models/lucky_block_2.gltf +1 -0
  148. package/models/mega_tnt.gltf +1 -0
  149. package/models/modern_lamp.gltf +1 -0
  150. package/models/multiply_tnt.gltf +1 -0
  151. package/models/nuke.gltf +1 -0
  152. package/models/oak_tree.gltf +1 -0
  153. package/models/oak_tree_2.gltf +1 -0
  154. package/models/old globe.gltf +1 -0
  155. package/models/scificannon_1.gltf +1 -0
  156. package/models/scificannon_10.gltf +1 -0
  157. package/models/scificannon_11.gltf +1 -0
  158. package/models/scificannon_12.gltf +1 -0
  159. package/models/scificannon_13.gltf +1 -0
  160. package/models/scificannon_14.gltf +1 -0
  161. package/models/scificannon_2.gltf +1 -0
  162. package/models/scificannon_3.gltf +1 -0
  163. package/models/scificannon_4.gltf +1 -0
  164. package/models/scificannon_5.gltf +1 -0
  165. package/models/scificannon_6.gltf +1 -0
  166. package/models/scificannon_7.gltf +1 -0
  167. package/models/scificannon_8.gltf +1 -0
  168. package/models/scificannon_9.gltf +1 -0
  169. package/models/simple_chair.gltf +1 -0
  170. package/models/small_car.gltf +1 -0
  171. package/models/small_modern_lamp.gltf +1 -0
  172. package/models/small_wardrobe.gltf +1 -0
  173. package/models/small_wooden_table.gltf +1 -0
  174. package/models/spike_sword.gltf +1 -0
  175. package/models/stone_holder.gltf +1 -0
  176. package/models/stone_sword.gltf +1 -0
  177. package/models/street_lamp.gltf +1 -0
  178. package/models/sword_1.gltf +1 -0
  179. package/models/sword_with_hole.gltf +1 -0
  180. package/models/timer_tnt.gltf +1 -0
  181. package/models/tiny_tnt.gltf +1 -0
  182. package/models/tnt_cannon.gltf +1 -0
  183. package/models/wing_tnt.gltf +1 -0
  184. package/models/wooden_stool.gltf +1 -0
  185. package/models/wooden_wardrobe.gltf +1 -0
  186. package/package.json +42 -0
  187. package/preload.js +26 -0
@@ -0,0 +1,179 @@
1
+ const { MongoClient, ServerApiVersion } = require('mongodb');
2
+ const uri = "mongodb+srv://adminmn:eQJ62Cszrvi7VgD@mnmodeldatabase.zsxqn.mongodb.net/myFirstDatabase?retryWrites=true&w=majority";
3
+ const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true, serverApi: ServerApiVersion.v1 });
4
+
5
+ const database = client.db("modeldatabase");
6
+ const models = database.collection("models");
7
+
8
+ client.connect(err => {
9
+ if (err) throw err;
10
+
11
+ models.deleteMany();
12
+
13
+ // cars
14
+ var modelobj1 = {released: true, model_name: "Jetpack 1", model_creator: "Mine-North", model_path: "./models/jetpack1.gltf", thumbnail: "./imgs/jetpack1.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
15
+ var modelobj2 = {released: true, model_name: "Jetpack 2", model_creator: "Mine-North", model_path: "./models/jetpack2.gltf", thumbnail: "./imgs/jetpack2.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
16
+ var modelobj3 = {released: true, model_name: "Jetpack 3", model_creator: "Mine-North", model_path: "./models/jetpack3.gltf", thumbnail: "./imgs/jetpack3.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
17
+ var modelobj4 = {released: true, model_name: "Jetpack 4", model_creator: "Mine-North", model_path: "./models/jetpack4.gltf", thumbnail: "./imgs/jetpack4.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
18
+ var modelobj5 = {released: true, model_name: "Jetpack 5", model_creator: "Mine-North", model_path: "./models/jetpack5.gltf", thumbnail: "./imgs/jetpack5.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
19
+ var modelobj6 = {released: true, model_name: "Jetpack 6", model_creator: "Mine-North", model_path: "./models/jetpack6.gltf", thumbnail: "./imgs/jetpack6.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
20
+ var modelobj7 = {released: true, model_name: "Small Car", model_creator: "Mine-North", model_path: "./models/small_car.gltf", thumbnail: "./imgs/small_car.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
21
+
22
+ // deco
23
+ var armchair = {released: true, model_name: "Armchair", model_creator: "Mine-North", model_path: "./models/armchair.gltf", thumbnail: "./imgs/armchair.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
24
+ var bed_no_matress = {released: true, model_name: "Bed without Matress", model_creator: "Mine-North", model_path: "./models/bedwnm.gltf", thumbnail: "./imgs/bed_wnm.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
25
+ var big_bed = {released: true, model_name: "Big Bed", model_creator: "Mine-North", model_path: "./models/big_bed.gltf", thumbnail: "./imgs/big_bed.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
26
+
27
+ var carpet = {released: true, model_name: "Carpet", model_creator: "Mine-North", model_path: "./models/carpet.gltf", thumbnail: "./imgs/carpet.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
28
+ var chest = {released: true, model_name: "Chest", model_creator: "Mine-North", model_path: "./models/chest.gltf", thumbnail: "./imgs/chest.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
29
+ var garbage_can = {released: true, model_name: "Garbage Can", model_creator: "Mine-North", model_path: "./models/garbage_can.gltf", thumbnail: "./imgs/garbage_can.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
30
+
31
+ var high_bed = {released: true, model_name: "High Bed", model_creator: "Mine-North", model_path: "./models/highbed.gltf", thumbnail: "./imgs/highbed.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
32
+ var karmin_cross = {released: true, model_name: "Karmin", model_creator: "Mine-North", model_path: "./models/karmincross.gltf", thumbnail: "./imgs/karmincross.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
33
+ var modern_lamp = {released: true, model_name: "Modern Lamp", model_creator: "Mine-North", model_path: "./models/modern_lamp.gltf", thumbnail: "./imgs/modern_lamp.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
34
+
35
+ var old_globe = {released: true, model_name: "Old Globe", model_creator: "Mine-North", model_path: "./models/old globe.gltf", thumbnail: "./imgs/old_globe.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
36
+ var simple_chair = {released: true, model_name: "Simple Chair", model_creator: "Mine-North", model_path: "./models/simple_chair.gltf", thumbnail: "./imgs/simple_chair.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
37
+ var small_modern_lamp = {released: true, model_name: "Small modern Lamp", model_creator: "Mine-North", model_path: "./models/small_modern_lamp.gltf", thumbnail: "./imgs/small_modern_lamp.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
38
+
39
+ var small_wardrobe = {released: true, model_name: "Small Wardrobe", model_creator: "Mine-North", model_path: "./models/small_wardrobe.gltf", thumbnail: "./imgs/small_wardrobe.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
40
+ var small_wooden_table = {released: true, model_name: "Small wooden table", model_creator: "Mine-North", model_path: "./models/small_wooden_table.gltf", thumbnail: "./imgs/small_wooden_table.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
41
+ var street_lamp = {released: true, model_name: "Street Lamp", model_creator: "Mine-North", model_path: "./models/street_lamp.gltf", thumbnail: "./imgs/street_lamp.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
42
+
43
+ var wooden_wardrobe = {released: true, model_name: "Wooden Wardrobe", model_creator: "Mine-North", model_path: "./models/wooden_wardrobe.gltf", thumbnail: "./imgs/wooden_wardrobe.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
44
+ var wooden_stool = {released: true, model_name: "Wooden Stool", model_creator: "Mine-North", model_path: "./models/wooden_stool.gltf", thumbnail: "./imgs/wooden_stool.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
45
+
46
+
47
+
48
+
49
+
50
+
51
+ var bull = {released: true, model_name: "Bull", model_creator: "Mine-North", model_path: "./models/bull.gltf", thumbnail: "./imgs/bull.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
52
+ models.insertOne(bull)
53
+
54
+
55
+ var generator = {released: true, model_name: "Generator", model_creator: "Mine-North", model_path: "./models/generator.gltf", thumbnail: "./imgs/generator.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
56
+ models.insertOne(generator)
57
+
58
+ var scifi_1 = {released: true, model_name: "SciFi Cannon 1", model_creator: "Mine-North", model_path: "./models/scificannon_1.gltf", thumbnail: "./imgs/scificannon_1.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
59
+ var scifi_2 = {released: true, model_name: "SciFi Cannon 2", model_creator: "Mine-North", model_path: "./models/scificannon_2.gltf", thumbnail: "./imgs/scificannon_2.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
60
+ var scifi_3 = {released: true, model_name: "SciFi Cannon 3", model_creator: "Mine-North", model_path: "./models/scificannon_3.gltf", thumbnail: "./imgs/scificannon_3.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
61
+ var scifi_4 = {released: true, model_name: "SciFi Cannon 4", model_creator: "Mine-North", model_path: "./models/scificannon_4.gltf", thumbnail: "./imgs/scificannon_4.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
62
+ var scifi_5 = {released: true, model_name: "SciFi Cannon 5", model_creator: "Mine-North", model_path: "./models/scificannon_5.gltf", thumbnail: "./imgs/scificannon_5.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
63
+ var scifi_6 = {released: true, model_name: "SciFi Cannon 6", model_creator: "Mine-North", model_path: "./models/scificannon_6.gltf", thumbnail: "./imgs/scificannon_6.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
64
+ var scifi_7 = {released: true, model_name: "SciFi Cannon 7", model_creator: "Mine-North", model_path: "./models/scificannon_7.gltf", thumbnail: "./imgs/scificannon_7.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
65
+ var scifi_8 = {released: true, model_name: "SciFi Cannon 8", model_creator: "Mine-North", model_path: "./models/scificannon_8.gltf", thumbnail: "./imgs/scificannon_8.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
66
+ var scifi_9 = {released: true, model_name: "SciFi Cannon 9", model_creator: "Mine-North", model_path: "./models/scificannon_9.gltf", thumbnail: "./imgs/scificannon_9.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
67
+ var scifi_10 = {released: true, model_name: "SciFi Cannon 10", model_creator: "Mine-North", model_path: "./models/scificannon_10.gltf", thumbnail: "./imgs/scificannon_10.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
68
+ var scifi_11 = {released: true, model_name: "SciFi Cannon 11", model_creator: "Mine-North", model_path: "./models/scificannon_11.gltf", thumbnail: "./imgs/scificannon_11.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
69
+ var scifi_12 = {released: true, model_name: "SciFi Cannon 12", model_creator: "Mine-North", model_path: "./models/scificannon_12.gltf", thumbnail: "./imgs/scificannon_12.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
70
+ var scifi_13 = {released: true, model_name: "SciFi Cannon 13", model_creator: "Mine-North", model_path: "./models/scificannon_13.gltf", thumbnail: "./imgs/scificannon_13.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
71
+ var scifi_14 = {released: true, model_name: "SciFi Cannon 14", model_creator: "Mine-North", model_path: "./models/scificannon_14.gltf", thumbnail: "./imgs/scificannon_14.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
72
+
73
+ models.insertOne(scifi_1);
74
+ models.insertOne(scifi_2);
75
+ models.insertOne(scifi_3);
76
+ models.insertOne(scifi_4);
77
+ models.insertOne(scifi_5);
78
+ models.insertOne(scifi_6);
79
+ models.insertOne(scifi_7);
80
+ models.insertOne(scifi_8);
81
+ models.insertOne(scifi_9);
82
+ models.insertOne(scifi_10);
83
+ models.insertOne(scifi_11);
84
+ models.insertOne(scifi_12);
85
+ models.insertOne(scifi_13);
86
+ models.insertOne(scifi_14);
87
+
88
+
89
+ var eiche = {released: true, model_name: "Oak Tree 1", model_creator: "Mine-North", model_path: "./models/oak_tree.gltf", thumbnail: "./imgs/oak_tree.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
90
+ var eiche2 = {released: true, model_name: "Oak Tree 2", model_creator: "Mine-North", model_path: "./models/oak_tree_2.gltf", thumbnail: "./imgs/oak_tree_2.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
91
+
92
+ models.insertOne(eiche);
93
+ models.insertOne(eiche2);
94
+
95
+
96
+ var birdscythe = {released: true, model_name: "BirdScythe", model_creator: "Mine-North", model_path: "./models/birdscythe.gltf", thumbnail: "./imgs/birdscythe.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
97
+ var goldensword = {released: true, model_name: "GoldenSword", model_creator: "Mine-North", model_path: "./models/golden_sword.gltf", thumbnail: "./imgs/golden_sword.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
98
+ var sword = {released: true, model_name: "Sword", model_creator: "Mine-North", model_path: "./models/sword_1.gltf", thumbnail: "./imgs/sword_1.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
99
+ var stone_sword = {released: true, model_name: "Stone Sword", model_creator: "Mine-North", model_path: "./models/stone_sword.gltf", thumbnail: "./imgs/stone_sword.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
100
+ var hole_sword = {released: true, model_name: "Hole Sword", model_creator: "Mine-North", model_path: "./models/sword_with_hole.gltf", thumbnail: "./imgs/sword_with_hole.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
101
+ var spike_sword = {released: true, model_name: "Spike Sword", model_creator: "Mine-North", model_path: "./models/spike_sword.gltf", thumbnail: "./imgs/spike_sword.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
102
+ models.insertOne(birdscythe);
103
+ models.insertOne(goldensword);
104
+ models.insertOne(sword);
105
+ models.insertOne(stone_sword);
106
+ models.insertOne(hole_sword);
107
+ models.insertOne(spike_sword);
108
+
109
+
110
+ var arrow_tnt = {released: true, model_name: "Arrow TnT", model_creator: "Mine-North", model_path: "./models/arrow_tnt.gltf", thumbnail: "./imgs/arrow_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
111
+ var blue_tnt = {released: true, model_name: "Blue TnT", model_creator: "Mine-North", model_path: "./models/blue_tnt.gltf", thumbnail: "./imgs/blue_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
112
+ // var big_red_button = {released: true, model_name: "Big Red Button", model_creator: "Mine-North", model_path: "./models/big_red_button.gltf", thumbnail: "./imgs/big_red_button.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
113
+ var coin_stash = {released: true, model_name: "Coin Stash", model_creator: "Mine-North", model_path: "./models/coin_stash.gltf", thumbnail: "./imgs/coin_stash.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
114
+ var creeper_tnt = {released: true, model_name: "Creeper TnT", model_creator: "Mine-North", model_path: "./models/creeper_tnt.gltf", thumbnail: "./imgs/creeper_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
115
+
116
+ var light_tnt = {released: true, model_name: "Light TnT", model_creator: "Mine-North", model_path: "./models/light_tnt.gltf", thumbnail: "./imgs/light_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
117
+ var lucky_block = {released: true, model_name: "Luckyblock", model_creator: "Mine-North", model_path: "./models/lucky_block.gltf", thumbnail: "./imgs/lucky_block.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
118
+ var lucky_block_2 = {released: true, model_name: "Luckyblock 2", model_creator: "Mine-North", model_path: "./models/lucky_block_2.gltf", thumbnail: "./imgs/lucky_block_2.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
119
+ var mega_tnt = {released: true, model_name: "Mega TnT", model_creator: "Mine-North", model_path: "./models/mega_tnt.gltf", thumbnail: "./imgs/mega_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
120
+ var multiply_tnt = {released: true, model_name: "Multiply TnT", model_creator: "Mine-North", model_path: "./models/multiply_tnt.gltf", thumbnail: "./imgs/multiply_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
121
+ var nuke = {released: true, model_name: "Nuke", model_creator: "Mine-North", model_path: "./models/nuke.gltf", thumbnail: "./imgs/nuke.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
122
+ var stone_holder = {released: true, model_name: "Stone Holder", model_creator: "Mine-North", model_path: "./models/stone_holder.gltf", thumbnail: "./imgs/stone_holder.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
123
+ var timer_tnt = {released: true, model_name: "Timer TnT", model_creator: "Mine-North", model_path: "./models/timer_tnt.gltf", thumbnail: "./imgs/timer_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
124
+ var tiny_tnt = {released: true, model_name: "Tiny TnT", model_creator: "Mine-North", model_path: "./models/tiny_tnt.gltf", thumbnail: "./imgs/tiny_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
125
+ var tnt_cannon = {released: true, model_name: "TnT Cannon", model_creator: "Mine-North", model_path: "./models/tnt_cannon.gltf", thumbnail: "./imgs/tnt_cannon.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
126
+ var wing_tnt = {released: true, model_name: "Wing TnT", model_creator: "Mine-North", model_path: "./models/wing_tnt.gltf", thumbnail: "./imgs/wing_tnt.png", has_anims: true, has_behavior: true, has_textures: true, animations: [], behavior: [], textures: [], tags: []}
127
+ models.insertOne(arrow_tnt);
128
+ models.insertOne(blue_tnt);
129
+ models.insertOne(coin_stash);
130
+ models.insertOne(creeper_tnt);
131
+ models.insertOne(light_tnt);
132
+ models.insertOne(lucky_block);
133
+ models.insertOne(lucky_block_2);
134
+ models.insertOne(mega_tnt);
135
+ models.insertOne(multiply_tnt);
136
+ models.insertOne(nuke);
137
+ models.insertOne(stone_holder);
138
+ models.insertOne(timer_tnt);
139
+ models.insertOne(tiny_tnt);
140
+ models.insertOne(tnt_cannon);
141
+ models.insertOne(wing_tnt);
142
+
143
+
144
+
145
+
146
+ models.insertOne(armchair);
147
+ models.insertOne(bed_no_matress);
148
+ models.insertOne(big_bed);
149
+ models.insertOne(carpet);
150
+ models.insertOne(chest);
151
+ models.insertOne(garbage_can);
152
+ models.insertOne(high_bed);
153
+ models.insertOne(karmin_cross);
154
+ models.insertOne(modern_lamp);
155
+ models.insertOne(old_globe);
156
+ models.insertOne(simple_chair);
157
+ models.insertOne(small_modern_lamp);
158
+ models.insertOne(small_wardrobe);
159
+ models.insertOne(small_wooden_table);
160
+ models.insertOne(street_lamp);
161
+ models.insertOne(wooden_wardrobe)
162
+ models.insertOne(wooden_stool);
163
+
164
+
165
+ models.insertOne(modelobj1);
166
+ models.insertOne(modelobj2);
167
+ models.insertOne(modelobj3);
168
+ models.insertOne(modelobj4);
169
+ models.insertOne(modelobj5);
170
+ models.insertOne(modelobj6);
171
+ models.insertOne(modelobj7);
172
+
173
+
174
+ models.find().forEach( function(item) {
175
+ item.animations.forEach(function (item,index) {
176
+ console.log(item)
177
+ });
178
+ });
179
+ });
@@ -0,0 +1,33 @@
1
+
2
+ const { MongoClient, ServerApiVersion } = require('mongodb');
3
+ const uri = "mongodb+srv://adminmn:eQJ62Cszrvi7VgD@mnmodeldatabase.zsxqn.mongodb.net/myFirstDatabase?retryWrites=true&w=majority";
4
+ const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true, serverApi: ServerApiVersion.v1 });
5
+ const database = client.db("modeldatabase");
6
+ const models = database.collection("models");
7
+
8
+
9
+ const readline = require("readline");
10
+
11
+ const rl = readline.createInterface({
12
+ input: process.stdin,
13
+ output: process.stdout,
14
+ });
15
+
16
+ rl.question("What is your name? ", function (answer) {
17
+ rl.question("What", function(e) {
18
+ });
19
+ });
20
+
21
+
22
+ // client.connect(err => {
23
+ // if (err) throw err;
24
+
25
+ // var modelobj1 = {released: true, model_name: "Diamond Pickaxe", model_creator: "Prisemut", model_path: "./models/bird.geo.gltf", thumbnail: "./imgs/testing.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
26
+ // models.insertOne(modelobj1);
27
+
28
+ // models.find().forEach( function(item) {
29
+ // item.animations.forEach(function (item,index) {
30
+ // console.log(item)
31
+ // });
32
+ // });
33
+ // });
@@ -0,0 +1,46 @@
1
+
2
+ // insert document
3
+ // client.connect(err => {
4
+ // if (err) throw err;
5
+
6
+ // var userobj = {name: "test", pwd: "test", access: 1}
7
+ // client.db("modeldatabase").collection("users").insertOne(userobj, function(err, res) {
8
+ // if (err) throw err;
9
+ // console.log("1 document inserted");
10
+ // client.db.close();
11
+ // });
12
+ // // });
13
+
14
+ // const { MongoClient, ServerApiVersion } = require('mongodb');
15
+ // const uri = "mongodb+srv://adminmn:eQJ62Cszrvi7VgD@mnmodeldatabase.zsxqn.mongodb.net/myFirstDatabase?retryWrites=true&w=majority";
16
+ // const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true, serverApi: ServerApiVersion.v1 });
17
+
18
+ // const database = client.db("modeldatabase");
19
+ // const models = database.collection("models");
20
+
21
+ // client.connect(err => {
22
+ // if (err) throw err;
23
+
24
+ // models.deleteMany();
25
+
26
+ // var modelobj1 = {released: true, model_name: "Diamond Pickaxe", model_creator: "Prisemut", model_path: "./models/bird.geo.gltf", thumbnail: "./imgs/testing.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
27
+ // var modelobj2 = {released: true, model_name: "Diamond Sword", model_creator: "Prisemut", model_path: "./models/jellyfish.gltf", thumbnail: "./imgs/testing.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
28
+ // var modelobj3 = {released: true, model_name: "Airplane", model_creator: "Prisemut", model_path: "./models/stone_golem.geo.gltf", thumbnail: "./imgs/testing.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
29
+ // var modelobj4 = {released: true, model_name: "Jet", model_creator: "Prisemut", model_path: "./models/stone_golem.geo.gltf", thumbnail: "./imgs/testing.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
30
+ // var modelobj5 = {released: true, model_name: "Jeep", model_creator: "Prisemut", model_path: "./models/stone_golem.geo.gltf", thumbnail: "./imgs/testing.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
31
+ // var modelobj6 = {released: true, model_name: "Guy", model_creator: "Prisemut", model_path: "./models/stone_golem.geo.gltf", thumbnail: "./imgs/testing.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
32
+ // var modelobj7 = {released: true, model_name: "Woman", model_creator: "Prisemut", model_path: "./models/stone_golem.geo.gltf", thumbnail: "./imgs/testing.png", has_anims: true, has_behavior: true, has_textures: true, animations: ["idle","walk"], behavior: ["hostile mob", "aggressive mob"], textures: ["red", "blue", "green", "orange", "yellow"], tags: ["test", "template"]}
33
+ // models.insertOne(modelobj1);
34
+ // models.insertOne(modelobj2);
35
+ // models.insertOne(modelobj3);
36
+ // models.insertOne(modelobj4);
37
+ // models.insertOne(modelobj5);
38
+ // models.insertOne(modelobj6);
39
+ // models.insertOne(modelobj7);
40
+
41
+ // models.find().forEach( function(item) {
42
+ // item.animations.forEach(function (item,index) {
43
+ // console.log(item)
44
+ // });
45
+ // });
46
+ // });
@@ -0,0 +1,149 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
6
+ <link href="./assets/css/basic.css" rel="stylesheet">
7
+ <link href="./assets/css/dialog_admin.css" rel="stylesheet">
8
+ <link href="./assets/css/admin.css" rel="stylesheet">
9
+ <title>Administration</title>
10
+ </head>
11
+ <body>
12
+
13
+
14
+ <section id="head">
15
+ <div class="drag-field-head">
16
+ <p class="drag-field-text">ModelManager</p>
17
+ </div>
18
+ <div class="win-btn">
19
+ <a class="btn-win" id="close-button">
20
+ <img src="assets/white/close_white_24dp.svg" style="display: flex;">
21
+ </a>
22
+ </div>
23
+ </section>
24
+
25
+
26
+ <section id="sidebar">
27
+ <section class="title-container">
28
+ <img src="assets/logo.png" width="70px" alt="logo">
29
+ </section>
30
+ <section class="links-container">
31
+ <div class="links" id="home-side">
32
+ <div class="icon">
33
+ <img src="assets/white/store_white_24dp.svg">
34
+ </div>
35
+ <span class="underline-hovered">Browse</span>
36
+ </div>
37
+ <div class="links" id="checkout-side">
38
+ <div class="icon">
39
+ <img src="assets/white/receipt_white_24dp.svg">
40
+ </div>
41
+ <span class="underline-hovered">Checkout</span>
42
+ </div>
43
+ <div class="links active" id="admin_panel">
44
+ <div class="icon">
45
+ <img width="32px" height="37px" src="assets/white/admin.svg">
46
+ </div>
47
+ <span>Admin</span>
48
+ </div>
49
+ </section>
50
+ </section>
51
+
52
+
53
+
54
+ <section id="main-content">
55
+ <div class="admin-content">
56
+ <div class="div2">
57
+ <div class="order_list">
58
+ <h2>Current orders:</h2>
59
+ <ul id="order-listing">
60
+ <div id="loading">
61
+ <h3 id="loading-text">loading...</h3>
62
+ <img id="loading-image" src="assets/spinner_2.gif" alt="Loading..." width="70px"/>
63
+ </div>
64
+
65
+ </ul>
66
+ </div>
67
+ </div>
68
+ </div>
69
+
70
+ </section>
71
+
72
+ <!--Popup renderer-->
73
+ <div id="body-overlay"></div>
74
+ <div class="dialog" id="dialog">
75
+ <a href="#" role="button" class="dialog-close-button" id="dialog-close-button">
76
+ <image src="assets/white/close_white_24dp.svg"> </image>
77
+ </a>
78
+ <pre id="item-listing">
79
+ <h1>Items:</h1>
80
+ </pre>
81
+ </div>
82
+
83
+
84
+ <script>
85
+
86
+ document.getElementById("close-button").addEventListener('click', event => {
87
+ window.api.send("toMain", "closeWindow");
88
+ });
89
+ document.getElementById("checkout-side").onclick = function () {
90
+ location.href = "./checkout_admin.html";
91
+ };
92
+ document.getElementById("home-side").onclick = function () {
93
+ location.href = "./index_admin.html";
94
+ };
95
+
96
+ var ul = document.getElementById('order-listing');
97
+ ul.addEventListener('click', function(e) {
98
+ if (e.target.tagName === 'LI'){
99
+ var target = e.target; // Clicked element
100
+ document.getElementById("dialog").classList.add("visable");
101
+ document.getElementById("body-overlay").classList.add("visable");
102
+
103
+ var items = document.createElement('code')
104
+ var splitted_text = target.dataset.item_obj.split(",")
105
+
106
+ for (item in splitted_text) {
107
+ items.innerHTML = items.innerHTML + "\n" + splitted_text[item]
108
+ }
109
+
110
+
111
+ var h1 = document.createElement('h1')
112
+ h1.innerHTML = "Items ordered:"
113
+ document.getElementById("item-listing").innerHTML = ""
114
+ document.getElementById("item-listing").appendChild(h1)
115
+ document.getElementById("item-listing").appendChild(items)
116
+ }
117
+ });
118
+
119
+ document.getElementById('body-overlay').addEventListener('click', function(e) {
120
+ document.getElementById("dialog").classList.remove("visable");
121
+ document.getElementById("body-overlay").classList.remove("visable");
122
+ });
123
+
124
+
125
+ document.getElementById('dialog-close-button').addEventListener('click', function(e) {
126
+ document.getElementById("dialog").classList.remove("visable");
127
+ document.getElementById("body-overlay").classList.remove("visable");
128
+ });
129
+
130
+ document.onkeydown = function(evt) {
131
+ evt = evt || window.event;
132
+ var isEscape = false;
133
+ if ("key" in evt) {
134
+ isEscape = (evt.key === "Escape" || evt.key === "Esc");
135
+ } else {
136
+ isEscape = (evt.keyCode === 27);
137
+ }
138
+ if (isEscape) {
139
+ document.getElementById("dialog").classList.remove("visable");
140
+ document.getElementById("body-overlay").classList.remove("visable");
141
+ }
142
+ };
143
+
144
+
145
+ </script>
146
+ <script src="js/load_admin.js"></script>
147
+
148
+ </body>
149
+ </html>