diff --git a/assets/models/greenhouse.bin b/assets/models/greenhouse.bin new file mode 100644 index 0000000..1de408c Binary files /dev/null and b/assets/models/greenhouse.bin differ diff --git a/assets/models/greenhouse.gltf b/assets/models/greenhouse.gltf new file mode 100644 index 0000000..01a429a --- /dev/null +++ b/assets/models/greenhouse.gltf @@ -0,0 +1,1547 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v4.2.70", + "version":"2.0" + }, + "extensionsUsed":[ + "KHR_materials_clearcoat" + ], + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Case", + "rotation":[ + 0, + 0.1950903683900833, + 0, + 0.9807853698730469 + ], + "translation":[ + 0, + 0.23286563158035278, + 0 + ] + }, + { + "mesh":1, + "name":"Door", + "rotation":[ + 0.6122022867202759, + 0, + 0, + 0.7907013297080994 + ], + "scale":[ + 0.31178590655326843, + 0.11264659464359283, + 0.31178587675094604 + ], + "translation":[ + 0, + 0.61408531665802, + 0.8026909828186035 + ] + }, + { + "mesh":2, + "name":"SolarPanel", + "rotation":[ + 0, + 0, + -0.7071068286895752, + 0.7071068286895752 + ], + "scale":[ + 0.009999990463256836, + 0.2550976872444153, + 0.14325003325939178 + ], + "translation":[ + 0.5749490261077881, + -1.239426851272583, + 0.20000000298023224 + ] + }, + { + "mesh":2, + "name":"SolarPanel.001", + "rotation":[ + 0, + 0, + -0.7071068286895752, + 0.7071068286895752 + ], + "scale":[ + 0.009999990463256836, + 0.2550976872444153, + 0.14325003325939178 + ], + "translation":[ + 0.5749490261077881, + -1.239426851272583, + -0.20000000298023224 + ] + }, + { + "mesh":2, + "name":"SolarPanel.002", + "rotation":[ + 0, + 0, + -0.7071068286895752, + 0.7071068286895752 + ], + "scale":[ + 0.009999990463256836, + 0.2550976872444153, + 0.14325003325939178 + ], + "translation":[ + 0, + -1.239422082901001, + 0.5699999928474426 + ] + }, + { + "mesh":2, + "name":"SolarPanel.003", + "rotation":[ + 0, + 0, + -0.7071068286895752, + 0.7071068286895752 + ], + "scale":[ + 0.009999990463256836, + 0.2550976872444153, + 0.14325003325939178 + ], + "translation":[ + 0, + -1.239422082901001, + -0.5699999928474426 + ] + }, + { + "mesh":3, + "name":"Lid", + "rotation":[ + 0, + 0.1950903683900833, + 0, + 0.9807853698730469 + ], + "translation":[ + 0, + -1.0868031978607178, + 0 + ] + }, + { + "mesh":2, + "name":"SolarPanel.004", + "rotation":[ + 0, + 0, + -0.7071068286895752, + 0.7071068286895752 + ], + "scale":[ + 0.009999990463256836, + 0.2550976872444153, + 0.14325003325939178 + ], + "translation":[ + -0.5749490261077881, + -1.239426851272583, + 0.20000000298023224 + ] + }, + { + "mesh":2, + "name":"SolarPanel.005", + "rotation":[ + 0, + 0, + -0.7071068286895752, + 0.7071068286895752 + ], + "scale":[ + 0.009999990463256836, + 0.2550976872444153, + 0.14325003325939178 + ], + "translation":[ + -0.5749490261077881, + -1.239422082901001, + -0.20000000298023224 + ] + }, + { + "mesh":2, + "name":"SolarPanel.006", + "rotation":[ + 0, + 0, + -0.7071068286895752, + 0.7071068286895752 + ], + "scale":[ + 0.009999990463256836, + 0.2550976872444153, + 0.14325003325939178 + ], + "translation":[ + 0, + -1.239422082901001, + -0.20000000298023224 + ] + }, + { + "mesh":2, + "name":"SolarPanel.007", + "rotation":[ + 0, + 0, + -0.7071068286895752, + 0.7071068286895752 + ], + "scale":[ + 0.009999990463256836, + 0.2550976872444153, + 0.14325003325939178 + ], + "translation":[ + 0, + -1.239422082901001, + 0.20000000298023224 + ] + }, + { + "mesh":4, + "name":"Plank", + "scale":[ + 0.019999980926513672, + 0.6311251521110535, + 0.019999980926513672 + ], + "translation":[ + -0.8213171362876892, + -0.4488329291343689, + -0.33487188816070557 + ] + }, + { + "mesh":4, + "name":"Plank.001", + "scale":[ + 0.019999980926513672, + 0.6311251521110535, + 0.019999980926513672 + ], + "translation":[ + -0.8213171362876892, + -0.4488329291343689, + 0.3348720073699951 + ] + }, + { + "mesh":4, + "name":"Plank.002", + "scale":[ + 0.019999980926513672, + 0.6311251521110535, + 0.019999980926513672 + ], + "translation":[ + 0.8213170170783997, + -0.4488329291343689, + 0.3348720073699951 + ] + }, + { + "mesh":4, + "name":"Plank.003", + "scale":[ + 0.019999980926513672, + 0.6311251521110535, + 0.019999980926513672 + ], + "translation":[ + 0.8213170170783997, + -0.4488329291343689, + -0.3348720073699951 + ] + }, + { + "mesh":4, + "name":"Plank.004", + "scale":[ + 0.019999980926513672, + 0.6311251521110535, + 0.019999980926513672 + ], + "translation":[ + -0.3348720073699951, + -0.4488329291343689, + 0.8213170170783997 + ] + }, + { + "mesh":4, + "name":"Plank.005", + "scale":[ + 0.019999980926513672, + 0.6311251521110535, + 0.019999980926513672 + ], + "translation":[ + -0.3348720073699951, + -0.4488329291343689, + -0.8213170170783997 + ] + }, + { + "mesh":4, + "name":"Plank.006", + "scale":[ + 0.019999980926513672, + 0.6311251521110535, + 0.019999980926513672 + ], + "translation":[ + 0.3348720073699951, + -0.4488329291343689, + -0.8213170170783997 + ] + }, + { + "mesh":4, + "name":"Plank.007", + "scale":[ + 0.019999980926513672, + 0.6311251521110535, + 0.019999980926513672 + ], + "translation":[ + 0.3348720073699951, + -0.4488329291343689, + 0.8213170170783997 + ] + }, + { + "mesh":5, + "name":"Tank", + "rotation":[ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "scale":[ + 0.17359797656536102, + 0.4528970718383789, + 0.17359796166419983 + ], + "translation":[ + -0.5883979797363281, + 0.014678657054901123, + 0.027288734912872314 + ] + }, + { + "mesh":6, + "name":"Tank.001", + "rotation":[ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "scale":[ + 0.17359797656536102, + 0.4528970718383789, + 0.17359796166419983 + ], + "translation":[ + -0.2250916063785553, + 0.014678657054901123, + 0.3043196201324463 + ] + }, + { + "mesh":7, + "name":"Tank.002", + "rotation":[ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "scale":[ + 0.17359797656536102, + 0.4528970718383789, + 0.17359796166419983 + ], + "translation":[ + 0.15778937935829163, + 0.014678657054901123, + 0.3043196201324463 + ] + }, + { + "mesh":8, + "name":"TankPipe", + "rotation":[ + 0.6278665661811829, + 0.32524386048316956, + -0.32524389028549194, + 0.6278665661811829 + ], + "scale":[ + 0.029999999329447746, + 0.10000000149011612, + 0.029999999329447746 + ], + "translation":[ + -0.39560550451278687, + 0.005645394325256348, + 0.27485743165016174 + ] + }, + { + "mesh":8, + "name":"TankPipe.001", + "rotation":[ + 0.5, + 0.5, + -0.5, + 0.5 + ], + "scale":[ + 0.029999999329447746, + 0.10000000149011612, + 0.029999999329447746 + ], + "translation":[ + -0.043397992849349976, + 0.005645394325256348, + 0.27485743165016174 + ] + }, + { + "mesh":9, + "name":"Collider", + "rotation":[ + 0.6122022867202759, + 0, + 0, + 0.7907013297080994 + ], + "scale":[ + 0.31178590655326843, + 0.11264659464359283, + 0.31178587675094604 + ], + "translation":[ + 0, + 0.61408531665802, + 0.8026909828186035 + ] + } + ], + "materials":[ + { + "doubleSided":true, + "name":"Material", + "pbrMetallicRoughness":{ + "metallicFactor":0.2142857164144516, + "roughnessFactor":0.6428571343421936 + } + }, + { + "alphaMode":"BLEND", + "doubleSided":true, + "name":"Glass", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 1, + 1, + 1, + 0.579365074634552 + ], + "baseColorTexture":{ + "index":0 + }, + "metallicFactor":0.579365074634552, + "roughnessFactor":0.6269841194152832 + } + }, + { + "doubleSided":true, + "name":"Metal", + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "index":1 + }, + "metallicFactor":0.8095238208770752, + "roughnessFactor":0.7301587462425232 + } + }, + { + "alphaMode":"BLEND", + "doubleSided":true, + "name":"Door", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.047713205218315125, + 0.39086204767227173, + 0.8006867170333862, + 0.4523809552192688 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + }, + { + "doubleSided":true, + "name":"Solar", + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "index":2 + }, + "metallicFactor":0.8240000009536743, + "roughnessFactor":0.25999999046325684 + } + }, + { + "doubleSided":true, + "name":"Metal.001", + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "index":3 + }, + "metallicFactor":0.8730158805847168, + "roughnessFactor":0.579365074634552 + } + }, + { + "doubleSided":true, + "extensions":{ + "KHR_materials_clearcoat":{ + "clearcoatFactor":0.5952380895614624 + } + }, + "name":"Paint", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1 + ], + "metallicFactor":0.2698412835597992, + "roughnessFactor":0.1507936418056488 + } + }, + { + "doubleSided":true, + "extensions":{ + "KHR_materials_clearcoat":{ + "clearcoatFactor":0.5952380895614624 + } + }, + "name":"Paint.001", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1 + ], + "metallicFactor":0.2698412835597992, + "roughnessFactor":0.1507936418056488 + } + } + ], + "meshes":[ + { + "name":"Cylinder.002", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1, + "TEXCOORD_0":2 + }, + "indices":3, + "material":0 + }, + { + "attributes":{ + "POSITION":4, + "NORMAL":5, + "TEXCOORD_0":6 + }, + "indices":7, + "material":1 + } + ] + }, + { + "name":"Cylinder.003", + "primitives":[ + { + "attributes":{ + "POSITION":8, + "NORMAL":9, + "TEXCOORD_0":10 + }, + "indices":11, + "material":2 + }, + { + "attributes":{ + "POSITION":12, + "NORMAL":13, + "TEXCOORD_0":14 + }, + "indices":15, + "material":3 + } + ] + }, + { + "name":"Solar", + "primitives":[ + { + "attributes":{ + "POSITION":16, + "NORMAL":17, + "TEXCOORD_0":18 + }, + "indices":19, + "material":4 + }, + { + "attributes":{ + "POSITION":20, + "NORMAL":21, + "TEXCOORD_0":22 + }, + "indices":23, + "material":5 + } + ] + }, + { + "name":"Cylinder.005", + "primitives":[ + { + "attributes":{ + "POSITION":24, + "NORMAL":25, + "TEXCOORD_0":26 + }, + "indices":27 + } + ] + }, + { + "name":"Cube.001", + "primitives":[ + { + "attributes":{ + "POSITION":28, + "NORMAL":29, + "TEXCOORD_0":30 + }, + "indices":31 + } + ] + }, + { + "name":"Mesh", + "primitives":[ + { + "attributes":{ + "POSITION":32, + "NORMAL":33, + "TEXCOORD_0":34 + }, + "indices":35, + "material":6 + } + ] + }, + { + "name":"Mesh", + "primitives":[ + { + "attributes":{ + "POSITION":36, + "NORMAL":37, + "TEXCOORD_0":38 + }, + "indices":35, + "material":6 + } + ] + }, + { + "name":"Mesh", + "primitives":[ + { + "attributes":{ + "POSITION":39, + "NORMAL":40, + "TEXCOORD_0":41 + }, + "indices":35, + "material":6 + } + ] + }, + { + "name":"Pipe", + "primitives":[ + { + "attributes":{ + "POSITION":42, + "NORMAL":43, + "TEXCOORD_0":44 + }, + "indices":45, + "material":7 + } + ] + }, + { + "name":"Collider", + "primitives":[ + { + "attributes":{ + "POSITION":46, + "NORMAL":47, + "TEXCOORD_0":48 + }, + "indices":49 + } + ] + } + ], + "textures":[ + { + "sampler":0, + "source":0 + }, + { + "sampler":0, + "source":1 + }, + { + "sampler":0, + "source":2 + }, + { + "sampler":0, + "source":1 + } + ], + "images":[ + { + "mimeType":"image/jpeg", + "name":"drops", + "uri":"textures/drops.jpg" + }, + { + "mimeType":"image/jpeg", + "name":"metal", + "uri":"textures/metal.jpg" + }, + { + "mimeType":"image/jpeg", + "name":"solarpanel", + "uri":"textures/solarpanel.jpg" + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":40, + "max":[ + 1, + 0.05000000074505806, + 1 + ], + "min":[ + -1, + -0.05000000074505806, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":40, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5126, + "count":40, + "type":"VEC2" + }, + { + "bufferView":3, + "componentType":5123, + "count":66, + "type":"SCALAR" + }, + { + "bufferView":4, + "componentType":5126, + "count":92, + "max":[ + 1, + 0.9499999284744263, + 1 + ], + "min":[ + -1, + 0.05000000074505806, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":5, + "componentType":5126, + "count":92, + "type":"VEC3" + }, + { + "bufferView":6, + "componentType":5126, + "count":92, + "type":"VEC2" + }, + { + "bufferView":7, + "componentType":5123, + "count":156, + "type":"SCALAR" + }, + { + "bufferView":8, + "componentType":5126, + "count":258, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":9, + "componentType":5126, + "count":258, + "type":"VEC3" + }, + { + "bufferView":10, + "componentType":5126, + "count":258, + "type":"VEC2" + }, + { + "bufferView":11, + "componentType":5123, + "count":1152, + "type":"SCALAR" + }, + { + "bufferView":12, + "componentType":5126, + "count":64, + "max":[ + 0.7990323305130005, + 0.8224536180496216, + 0.7990323305130005 + ], + "min":[ + -0.7990323305130005, + -0.8224536180496216, + -0.7990323305130005 + ], + "type":"VEC3" + }, + { + "bufferView":13, + "componentType":5126, + "count":64, + "type":"VEC3" + }, + { + "bufferView":14, + "componentType":5126, + "count":64, + "type":"VEC2" + }, + { + "bufferView":15, + "componentType":5123, + "count":180, + "type":"SCALAR" + }, + { + "bufferView":16, + "componentType":5126, + "count":4, + "max":[ + 1, + 1, + 1 + ], + "min":[ + 1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":17, + "componentType":5126, + "count":4, + "type":"VEC3" + }, + { + "bufferView":18, + "componentType":5126, + "count":4, + "type":"VEC2" + }, + { + "bufferView":19, + "componentType":5123, + "count":6, + "type":"SCALAR" + }, + { + "bufferView":20, + "componentType":5126, + "count":44, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -12.061988830566406, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":21, + "componentType":5126, + "count":44, + "type":"VEC3" + }, + { + "bufferView":22, + "componentType":5126, + "count":44, + "type":"VEC2" + }, + { + "bufferView":23, + "componentType":5123, + "count":66, + "type":"SCALAR" + }, + { + "bufferView":24, + "componentType":5126, + "count":48, + "max":[ + 1, + 0.030000030994415283, + 1 + ], + "min":[ + -1, + -0.030000025406479836, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":25, + "componentType":5126, + "count":48, + "type":"VEC3" + }, + { + "bufferView":26, + "componentType":5126, + "count":48, + "type":"VEC2" + }, + { + "bufferView":27, + "componentType":5123, + "count":84, + "type":"SCALAR" + }, + { + "bufferView":28, + "componentType":5126, + "count":24, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":29, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":30, + "componentType":5126, + "count":24, + "type":"VEC2" + }, + { + "bufferView":31, + "componentType":5123, + "count":36, + "type":"SCALAR" + }, + { + "bufferView":32, + "componentType":5126, + "count":1283, + "max":[ + 0.9166668057441711, + 0.9598767161369324, + 0.9166667461395264 + ], + "min":[ + -0.9166667461395264, + -0.9598767161369324, + -0.9166668057441711 + ], + "type":"VEC3" + }, + { + "bufferView":33, + "componentType":5126, + "count":1283, + "type":"VEC3" + }, + { + "bufferView":34, + "componentType":5126, + "count":1283, + "type":"VEC2" + }, + { + "bufferView":35, + "componentType":5123, + "count":6912, + "type":"SCALAR" + }, + { + "bufferView":36, + "componentType":5126, + "count":1283, + "max":[ + 0.9166668057441711, + 0.9598767161369324, + 0.9166667461395264 + ], + "min":[ + -0.9166667461395264, + -0.9598767161369324, + -0.9166668057441711 + ], + "type":"VEC3" + }, + { + "bufferView":37, + "componentType":5126, + "count":1283, + "type":"VEC3" + }, + { + "bufferView":38, + "componentType":5126, + "count":1283, + "type":"VEC2" + }, + { + "bufferView":39, + "componentType":5126, + "count":1283, + "max":[ + 0.9166668057441711, + 0.9598767161369324, + 0.9166667461395264 + ], + "min":[ + -0.9166667461395264, + -0.9598767161369324, + -0.9166668057441711 + ], + "type":"VEC3" + }, + { + "bufferView":40, + "componentType":5126, + "count":1283, + "type":"VEC3" + }, + { + "bufferView":41, + "componentType":5126, + "count":1283, + "type":"VEC2" + }, + { + "bufferView":42, + "componentType":5126, + "count":138, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":43, + "componentType":5126, + "count":138, + "type":"VEC3" + }, + { + "bufferView":44, + "componentType":5126, + "count":138, + "type":"VEC2" + }, + { + "bufferView":45, + "componentType":5123, + "count":396, + "type":"SCALAR" + }, + { + "bufferView":46, + "componentType":5126, + "count":4989, + "max":[ + 2.9631855487823486, + 1, + 5.714610576629639 + ], + "min":[ + -2.9631855487823486, + -18.55339813232422, + -2.59621000289917 + ], + "type":"VEC3" + }, + { + "bufferView":47, + "componentType":5126, + "count":4989, + "type":"VEC3" + }, + { + "bufferView":48, + "componentType":5126, + "count":4989, + "type":"VEC2" + }, + { + "bufferView":49, + "componentType":5123, + "count":23850, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":480, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":480, + "byteOffset":480, + "target":34962 + }, + { + "buffer":0, + "byteLength":320, + "byteOffset":960, + "target":34962 + }, + { + "buffer":0, + "byteLength":132, + "byteOffset":1280, + "target":34963 + }, + { + "buffer":0, + "byteLength":1104, + "byteOffset":1412, + "target":34962 + }, + { + "buffer":0, + "byteLength":1104, + "byteOffset":2516, + "target":34962 + }, + { + "buffer":0, + "byteLength":736, + "byteOffset":3620, + "target":34962 + }, + { + "buffer":0, + "byteLength":312, + "byteOffset":4356, + "target":34963 + }, + { + "buffer":0, + "byteLength":3096, + "byteOffset":4668, + "target":34962 + }, + { + "buffer":0, + "byteLength":3096, + "byteOffset":7764, + "target":34962 + }, + { + "buffer":0, + "byteLength":2064, + "byteOffset":10860, + "target":34962 + }, + { + "buffer":0, + "byteLength":2304, + "byteOffset":12924, + "target":34963 + }, + { + "buffer":0, + "byteLength":768, + "byteOffset":15228, + "target":34962 + }, + { + "buffer":0, + "byteLength":768, + "byteOffset":15996, + "target":34962 + }, + { + "buffer":0, + "byteLength":512, + "byteOffset":16764, + "target":34962 + }, + { + "buffer":0, + "byteLength":360, + "byteOffset":17276, + "target":34963 + }, + { + "buffer":0, + "byteLength":48, + "byteOffset":17636, + "target":34962 + }, + { + "buffer":0, + "byteLength":48, + "byteOffset":17684, + "target":34962 + }, + { + "buffer":0, + "byteLength":32, + "byteOffset":17732, + "target":34962 + }, + { + "buffer":0, + "byteLength":12, + "byteOffset":17764, + "target":34963 + }, + { + "buffer":0, + "byteLength":528, + "byteOffset":17776, + "target":34962 + }, + { + "buffer":0, + "byteLength":528, + "byteOffset":18304, + "target":34962 + }, + { + "buffer":0, + "byteLength":352, + "byteOffset":18832, + "target":34962 + }, + { + "buffer":0, + "byteLength":132, + "byteOffset":19184, + "target":34963 + }, + { + "buffer":0, + "byteLength":576, + "byteOffset":19316, + "target":34962 + }, + { + "buffer":0, + "byteLength":576, + "byteOffset":19892, + "target":34962 + }, + { + "buffer":0, + "byteLength":384, + "byteOffset":20468, + "target":34962 + }, + { + "buffer":0, + "byteLength":168, + "byteOffset":20852, + "target":34963 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":21020, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":21308, + "target":34962 + }, + { + "buffer":0, + "byteLength":192, + "byteOffset":21596, + "target":34962 + }, + { + "buffer":0, + "byteLength":72, + "byteOffset":21788, + "target":34963 + }, + { + "buffer":0, + "byteLength":15396, + "byteOffset":21860, + "target":34962 + }, + { + "buffer":0, + "byteLength":15396, + "byteOffset":37256, + "target":34962 + }, + { + "buffer":0, + "byteLength":10264, + "byteOffset":52652, + "target":34962 + }, + { + "buffer":0, + "byteLength":13824, + "byteOffset":62916, + "target":34963 + }, + { + "buffer":0, + "byteLength":15396, + "byteOffset":76740, + "target":34962 + }, + { + "buffer":0, + "byteLength":15396, + "byteOffset":92136, + "target":34962 + }, + { + "buffer":0, + "byteLength":10264, + "byteOffset":107532, + "target":34962 + }, + { + "buffer":0, + "byteLength":15396, + "byteOffset":117796, + "target":34962 + }, + { + "buffer":0, + "byteLength":15396, + "byteOffset":133192, + "target":34962 + }, + { + "buffer":0, + "byteLength":10264, + "byteOffset":148588, + "target":34962 + }, + { + "buffer":0, + "byteLength":1656, + "byteOffset":158852, + "target":34962 + }, + { + "buffer":0, + "byteLength":1656, + "byteOffset":160508, + "target":34962 + }, + { + "buffer":0, + "byteLength":1104, + "byteOffset":162164, + "target":34962 + }, + { + "buffer":0, + "byteLength":792, + "byteOffset":163268, + "target":34963 + }, + { + "buffer":0, + "byteLength":59868, + "byteOffset":164060, + "target":34962 + }, + { + "buffer":0, + "byteLength":59868, + "byteOffset":223928, + "target":34962 + }, + { + "buffer":0, + "byteLength":39912, + "byteOffset":283796, + "target":34962 + }, + { + "buffer":0, + "byteLength":47700, + "byteOffset":323708, + "target":34963 + } + ], + "samplers":[ + { + "magFilter":9729, + "minFilter":9987 + } + ], + "buffers":[ + { + "byteLength":371408, + "uri":"greenhouse.bin" + } + ] +} diff --git a/assets/models/mirror.glb b/assets/models/mirror.glb new file mode 100644 index 0000000..05a9e90 Binary files /dev/null and b/assets/models/mirror.glb differ diff --git a/assets/models/textures/drops.jpg b/assets/models/textures/drops.jpg new file mode 100644 index 0000000..d039d40 Binary files /dev/null and b/assets/models/textures/drops.jpg differ diff --git a/build.rs b/build.rs index 9bf945b..6245b55 100644 --- a/build.rs +++ b/build.rs @@ -29,6 +29,7 @@ fn main() -> std::io::Result<()> { write!(&file, "[\n")?; extract_scene(&mut file, "test", "src/blender/scene_test.blend")?; extract_scene(&mut file, "workshop", "src/blender/scene_workshop.blend")?; + extract_scene(&mut file, "greenhouse", "src/blender/scene_greenhouse.blend")?; write!(&file, "]\n")?; } Ok(()) diff --git a/src/blender/greenhouse.blend b/src/blender/greenhouse.blend new file mode 100644 index 0000000..1721248 Binary files /dev/null and b/src/blender/greenhouse.blend differ diff --git a/src/blender/mirror.blend b/src/blender/mirror.blend new file mode 100644 index 0000000..4c9c40a Binary files /dev/null and b/src/blender/mirror.blend differ diff --git a/src/blender/scene_greenhouse.blend b/src/blender/scene_greenhouse.blend new file mode 100644 index 0000000..198d2a3 Binary files /dev/null and b/src/blender/scene_greenhouse.blend differ diff --git a/src/cmd.rs b/src/cmd.rs index c7fac85..ca17b55 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -832,14 +832,19 @@ fn spawn_scenes( ew_spawn.send(SpawnEvent(state)); } - "fueltank" => { + "fueltank" | "fueltanksmall" => { state.model = Some("fueltank".to_string()); // command: name "Fuel Tank" state.name = Some("Fuel Tank".to_string()); - // command: scale 8 - state.model_scale = 8.0; + if template == "fueltank" { + // command: scale 8 + state.model_scale = 8.0; + } else { + // command: scale 4 + state.model_scale = 4.0; + } // command: angularmomentum 0 0 0 state.angular_momentum = DVec3::ZERO; @@ -902,6 +907,56 @@ fn spawn_scenes( ew_spawn.send(SpawnEvent(state)); } + "mirror" | "mirrorrotating" => { + state.model = Some("mirror".to_string()); + + // command: name "Mirror" + state.name = Some("Mirror".to_string()); + + // command: collider mesh + state.collider_is_one_mesh_of_scene = true; + state.collider_is_mesh = true; + + if template == "mirrorrotating" { + // command: angularmomentum 0.3 1.5 0.0 + state.angular_momentum = DVec3::new(0.3, 1.5, 0.0); + } else { + // command: angularmomentum 0 0 0 + state.angular_momentum = DVec3::ZERO; + } + + // command: scale 10.0 + state.model_scale = 10.0; + + ew_spawn.send(SpawnEvent(state)); + } + "greenhouse" => { + state.model = Some("greenhouse".to_string()); + + // command: name "Greenhouse" + state.name = Some("Greenhouse".to_string()); + + // command: collider handcrafted + state.collider_is_one_mesh_of_scene = true; + + // command: wants maxrotation 0 + state.wants_maxrotation = Some(0.0); + + // command: thrust 0 0 0 1000 0.1 + state.thrust_forward = 0.0; + state.thrust_back = 0.0; + state.thrust_sideways = 0.0; + state.reaction_wheels = 1000.0; + state.warmup_seconds = 0.1; + + // command: angularmomentum 0 0 0 + state.angular_momentum = DVec3::ZERO; + + // command: scale 10.0 + state.model_scale = 10.0; + + ew_spawn.send(SpawnEvent(state)); + } _ => { error!("Can't find template named `{template}' in cmd::spawn_scenes!"); } diff --git a/src/data/defs.txt b/src/data/defs.txt index 8556dd8..f43cc34 100644 --- a/src/data/defs.txt +++ b/src/data/defs.txt @@ -468,6 +468,9 @@ actor -8000 -1000 -100 monolith thrust 0 0 0 30 1 collider mesh +scene -3100 -200 -660 greenhouse + relativeto player + actor -3300 10 0 pizzeria name "Pizzeria Asteroid" relativeto player diff --git a/src/data/scenes.in b/src/data/scenes.in index 030022e..e394761 100644 --- a/src/data/scenes.in +++ b/src/data/scenes.in @@ -9,4 +9,24 @@ ("workshop", "shippingcontainer", [-0.52376616, 12.351211, -2.6598575], [-0.11791781, -0.02345992, 1.5838965]), ("workshop", "shippingcontainer", [-13.479424, 10.191104, -8.136984], [-0.05393797, -0.013098141, 1.7229813]), ("workshop", "shippingcontainer", [12.42811, 14.157182, -4.2369785], [-0.02553346, 0.042504273, 1.5108364]), +("greenhouse", "fueltank", [74.5485, 54.473938, 23.183126], [1.1660392, -0.0, -0.48993048]), +("greenhouse", "greenhouse", [56.82031, 0.0, 0.0], [0.0, -1.5707964, 0.0]), +("greenhouse", "mirror", [0.0, -17.0, -10.0], [-0.07591219, 0.0049197352, 1.7143301]), +("greenhouse", "mirror", [0.0, 17.0, -10.0], [-0.07587019, -0.0054108524, 1.4372792]), +("greenhouse", "mirror", [0.0, -17.0, 10.0], [0.08589277, -0.0056050196, 1.7142922]), +("greenhouse", "mirror", [0.0, 0.0, 20.0], [0.15707964, 0.0, 1.5707964]), +("greenhouse", "mirror", [0.0, 0.0, -20.0], [-0.15707964, -0.0, 1.5707964]), +("greenhouse", "mirror", [3.0, 34.0, 0.0], [-9.270864e-18, 6.3488335e-17, 1.2807964]), +("greenhouse", "mirror", [3.0, -34.0, 0.0], [0.0, 0.0, 1.8607775]), +("greenhouse", "mirror", [3.0, -34.0, 20.0], [0.16684353, -0.02862187, 1.8691753]), +("greenhouse", "mirror", [3.0, 34.0, 20.0], [0.14792228, 0.021559132, 1.2818513]), +("greenhouse", "mirror", [3.0, -34.0, -20.0], [-0.1775151, 0.02585048, 1.859278]), +("greenhouse", "mirror", [3.0, 34.0, -20.0], [-0.1592269, -0.013994377, 1.3089968]), +("greenhouse", "mirror", [3.0, -17.0, -30.0], [-0.25917134, 0.018069137, 1.7092348]), +("greenhouse", "mirror", [3.0, -17.0, 30.0], [0.22926316, -0.01600367, 1.7095735]), +("greenhouse", "mirror", [3.0, 17.0, 30.0], [0.22926316, 0.016003652, 1.4320191]), +("greenhouse", "mirror", [3.0, 17.0, -30.0], [-0.25917134, -0.018069115, 1.4323579]), +("greenhouse", "mirror", [3.0, 0.0, -40.0], [-0.33143952, -7.651644e-10, 1.5707964]), +("greenhouse", "mirror", [3.0, 0.0, 40.0], [0.34906584, -3.5681582e-9, 1.5707964]), +("greenhouse", "mirrorrotating", [0.0, 17.0, 10.0], [0.0073764813, -0.009006099, 1.2773504]), ] diff --git a/src/load.rs b/src/load.rs index 089ebfd..a6acc3a 100644 --- a/src/load.rs +++ b/src/load.rs @@ -45,6 +45,8 @@ pub fn asset_name_to_path(name: &str) -> &'static str { "hollow_asteroid" => "models/hollow_asteroid.glb#Scene0", "moonlet" => "models/moonlet.glb#Scene0", "monolith" => "models/monolith_neon.glb#Scene0", + "mirror" => "models/mirror.glb#Scene0", + "greenhouse" => "models/greenhouse.gltf#Scene0", "lightorb" => "models/lightorb.glb#Scene0", "orb_busstop" => "models/orb_busstop.glb#Scene0", "orb_busstop_dim" => "models/orb_busstop_dim.glb#Scene0",