Commit ca674a8c authored by Gavin An's avatar Gavin An

타일 재구성

parent 4887d357
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cbnbhnurr1kpa"
path="res://.godot/imported/desert_3.glb-35bf013e2965493209e1b3a2fb754049.scn"
[deps]
source_file="res://assets/tile/desert/desert_3.glb"
dest_files=["res://.godot/imported/desert_3.glb-35bf013e2965493209e1b3a2fb754049.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
mesh_library/use_node_names_as_mesh_names=false
mesh_library/create_categories_from_hierarchy=false
array_mesh/deduplicate_surfaces=true
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1
gltf/texture_map_mode=1
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://chhqyeog67igb"
path.s3tc="res://.godot/imported/desert_3_base_color.png-33c74bb87163390e8a32c61c2b5c4d65.s3tc.ctex"
path.etc2="res://.godot/imported/desert_3_base_color.png-33c74bb87163390e8a32c61c2b5c4d65.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "1466ca4d0f123a1cfcb475dc0ad57f77"
}
[deps]
source_file="res://assets/tile/desert/desert_3_base_color.png"
dest_files=["res://.godot/imported/desert_3_base_color.png-33c74bb87163390e8a32c61c2b5c4d65.s3tc.ctex", "res://.godot/imported/desert_3_base_color.png-33c74bb87163390e8a32c61c2b5c4d65.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/high_quality_mode=0
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgvtbx4gg22c6"
path.s3tc="res://.godot/imported/desert_3_emissive.png-ef8b120a6b99ae0a15b2ebfed19de060.s3tc.ctex"
path.etc2="res://.godot/imported/desert_3_emissive.png-ef8b120a6b99ae0a15b2ebfed19de060.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "e3609de1022a164fe240a562c69367de"
}
[deps]
source_file="res://assets/tile/desert/desert_3_emissive.png"
dest_files=["res://.godot/imported/desert_3_emissive.png-ef8b120a6b99ae0a15b2ebfed19de060.s3tc.ctex", "res://.godot/imported/desert_3_emissive.png-ef8b120a6b99ae0a15b2ebfed19de060.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/high_quality_mode=0
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://qn505j1wvt8s"
path.s3tc="res://.godot/imported/desert_3_metallic_roughness.png-b925e777671179ab14327cad8b07fa1b.s3tc.ctex"
path.etc2="res://.godot/imported/desert_3_metallic_roughness.png-b925e777671179ab14327cad8b07fa1b.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "1b72f3a5a98119648dcefd9c7c0ac3dd"
}
[deps]
source_file="res://assets/tile/desert/desert_3_metallic_roughness.png"
dest_files=["res://.godot/imported/desert_3_metallic_roughness.png-b925e777671179ab14327cad8b07fa1b.s3tc.ctex", "res://.godot/imported/desert_3_metallic_roughness.png-b925e777671179ab14327cad8b07fa1b.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/high_quality_mode=0
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cupvbagipym47"
path.s3tc="res://.godot/imported/desert_3_normal.png-93358eceb1a6cdc2614ed36f6003a4a6.s3tc.ctex"
path.etc2="res://.godot/imported/desert_3_normal.png-93358eceb1a6cdc2614ed36f6003a4a6.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "60a9ddfa40b61a892212f378efa554b1"
}
[deps]
source_file="res://assets/tile/desert/desert_3_normal.png"
dest_files=["res://.godot/imported/desert_3_normal.png-93358eceb1a6cdc2614ed36f6003a4a6.s3tc.ctex", "res://.godot/imported/desert_3_normal.png-93358eceb1a6cdc2614ed36f6003a4a6.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/high_quality_mode=0
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://assets/tile/desert/desert_3_normal.png"
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
[gd_scene format=3 uid="uid://chhbasubajoie"]
[ext_resource type="PackedScene" uid="uid://cbnbhnurr1kpa" path="res://assets/tile/desert/desert_3.glb" id="1_4co3l"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_4rwku"]
points = PackedVector3Array(-0.94721806, -0.20277052, -0.950672, -0.6314836, -0.20536076, -0.5129635, -0.94721806, -0.20457584, 0.94780034, -0.95056504, -0.20269203, -0.29950154, -0.9498213, 0.18097772, -0.95011413, -0.6550986, 0.18180187, -0.950672, -0.3469879, -0.20265278, -0.950672, 0.51486665, -0.20485055, -0.9499282, 0.056326568, -0.2054, -0.16116041, -0.13352317, -0.2054, 0.22634369, -0.15323335, -0.2054, 0.69268733, -0.6472889, -0.20536076, 0.49503046, 0.4397449, -0.2054, -0.5049679, -0.9081696, -0.19174236, 0.94873005, -0.9278798, -0.18781775, 0.94873005, -0.9500072, -0.1994346, 0.9479863, -0.950751, -0.20265278, 0.94519717, -0.3903131, -0.20504679, 0.9474284, 0.3447271, -0.20481132, 0.94780034, 0.94514316, -0.20449735, 0.94817215, -0.52084637, -0.20261353, 0.94873005, -0.950751, -0.20253503, 0.18673795, -0.950751, 0.18113469, -0.44174755, -0.65100783, 0.18494157, -0.950672, -0.9496353, 0.1836072, 0.41600496, -0.82133335, 0.19047527, -0.4932536, -0.78897893, 0.1922021, -0.63122284, -0.7780082, 0.19279079, -0.63959026, -0.7616451, 0.19345798, -0.67101455, -0.7302204, 0.1945961, -0.7028107, -0.7023286, 0.19530253, -0.734049, -0.6785277, 0.195538, -0.76156855, -0.6357603, 0.19392891, -0.8487755, -0.63501656, 0.19192736, -0.9040004, -0.64301217, 0.18800275, -0.94974226, 0.94514316, 0.18125243, -0.950672, 0.9475605, -0.20245655, -0.95011413, 0.9479323, -0.20473282, -0.76975, 0.94514316, -0.20516452, -0.41404212, 0.30530673, -0.2054, 0.62537616, 0.9473745, -0.20504679, 0.78361315, 0.94514316, -0.2053215, 0.16293734, 0.7915527, 0.18117394, 0.948916, -0.9436851, -0.10909011, 0.94873005, -0.9498213, -0.17596544, 0.94817215, -0.9500072, 0.0049982667, 0.9479863, -0.950751, 0.008844376, 0.94519717, 0.94718856, -0.20453659, 0.9474284, 0.9479323, -0.17989005, 0.94780034, 0.94514316, -0.14060472, 0.94873005, 0.94161016, -0.15237854, 0.94873005, 0.9258049, -0.19566697, 0.94873005, 0.59389323, -0.20261353, 0.94873005, -0.9500072, 0.18097772, 0.94780034, -0.9496353, 0.1836072, 0.7480982, -0.22426432, 0.1882775, -0.94974226, 0.42003483, 0.18478458, -0.950672, -0.91207445, 0.18647216, 0.7479122, -0.88046384, 0.18800275, 0.70049685, -0.69898164, 0.19538103, -0.73051614, -0.6593753, 0.19526328, -0.78574103, -0.47324452, 0.19165264, 0.80350894, 0.7714706, 0.19173114, 0.73582596, 0.77983814, 0.19177039, 0.7166739, 0.759942, 0.19157414, 0.1432274, 0.7324222, 0.19145642, -0.12155461, 0.43584007, 0.19149567, -0.7145251, 0.86276954, 0.18949412, -0.8171653, 0.8584928, 0.18808125, -0.9080911, 0.84677833, 0.18706085, -0.9495563, -0.62795067, 0.19169189, -0.9079052, 0.83506376, 0.18529479, -0.95011413, 0.9475605, 0.1836072, -0.83706117, 0.94867617, 0.18113469, -0.87648094, 0.948862, 0.17799501, -0.9471391, 0.9479323, 0.16237508, -0.9499282, 0.94811827, -0.073690146, -0.94974226, 0.94867617, -0.14056547, -0.9397014, 0.94867617, -0.19566697, -0.927987, 0.9475605, -0.20512529, 0.49893528, 0.9473745, -0.20504679, -0.43784273, 0.94867617, -0.20257428, -0.5761839, 0.94867617, -0.20261353, -0.4220376, 0.94867617, -0.20277052, 0.94519717, 0.716245, 0.18407814, 0.94817215, 0.05242175, 0.18415664, 0.94817215, -0.65119374, 0.18121319, 0.94873005, -0.7066054, 0.18113469, 0.94873005, -0.94721806, 0.15837197, 0.94873005, -0.94721806, -0.02255249, 0.94873005, 0.94514316, 0.17807351, 0.94873005, 0.94514316, 0.18337174, 0.9479863, 0.9479323, 0.15448661, 0.94780034, -0.5959681, 0.18396042, 0.9479863, -0.7066054, 0.18364646, 0.9476144, -0.71850586, 0.18411739, 0.94519717, -0.5563619, 0.18972959, 0.88606745, -0.52493715, 0.19082849, 0.86226684, -0.85647696, 0.18859147, 0.65326744, -0.50876, 0.19129942, 0.839024, -0.48923576, 0.19145642, 0.82693774, 0.052049816, 0.19141717, 0.83883804, 0.7952716, 0.19157414, 0.7083065, 0.74023193, 0.19153492, 0.77561766, 0.8741122, 0.18933712, -0.7816503, 0.94514316, 0.18411739, -0.37053156, 0.9475605, 0.18364646, -0.45364782, 0.94811827, 0.18325399, 0.9450112, 0.94514316, 0.18407814, -0.7145251, 0.94867617, 0.18117394, -0.5720931, 0.94867617, 0.18117394, 0.8942489, 0.94867617, 0.15448661, 0.94519717, 0.94867617, 0.032509774, -0.9471391, 0.7006256, 0.18556951, 0.9450112, 0.075850785, 0.18454911, 0.94780034, 0.94514316, 0.18403889, 0.8981537, 0.72461253, 0.19078924, 0.8072278, 0.7047164, 0.18800275, 0.89406294, -0.62348795, 0.18498082, 0.9450112, 0.060231388, 0.18564801, 0.9450112, 0.04851687, 0.19027902, 0.87416714, 0.82316333, 0.1909462, 0.6770682, 0.854588, 0.18969034, 0.64136714, 0.94514316, 0.18407814, 0.70849234, 0.9475605, 0.1836072, 0.9061492)
[node name="desert_3" unique_id=758515760 instance=ExtResource("1_4co3l")]
[node name="mesh_node" parent="." index="0" unique_id=1320531976]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25, 0)
[node name="StaticBody3D" type="StaticBody3D" parent="mesh_node" index="0" unique_id=1875589917]
[node name="CollisionShape3D" type="CollisionShape3D" parent="mesh_node/StaticBody3D" index="0" unique_id=732331586]
shape = SubResource("ConvexPolygonShape3D_4rwku")
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
[ext_resource type="PackedScene" uid="uid://c8ptj6rqku047" path="res://assets/tile/desert/scenes/desert_1.tscn" id="1_3645r"] [ext_resource type="PackedScene" uid="uid://c8ptj6rqku047" path="res://assets/tile/desert/scenes/desert_1.tscn" id="1_3645r"]
[ext_resource type="PackedScene" uid="uid://by4dkbxmdacwp" path="res://assets/tile/desert/scenes/desert_2.tscn" id="2_y3dgu"] [ext_resource type="PackedScene" uid="uid://by4dkbxmdacwp" path="res://assets/tile/desert/scenes/desert_2.tscn" id="2_y3dgu"]
[ext_resource type="PackedScene" uid="uid://dq22se831vrre" path="res://assets/tile/desert/scenes/desert_road_1.tscn" id="3_ujoop"] [ext_resource type="PackedScene" uid="uid://dq22se831vrre" path="res://assets/tile/desert/scenes/desert_road_1.tscn" id="3_ujoop"]
[ext_resource type="PackedScene" uid="uid://chhbasubajoie" path="res://assets/tile/desert/scenes/desert_3.tscn" id="3_y3dgu"]
[ext_resource type="PackedScene" uid="uid://q25vkjnwmjik" path="res://assets/tile/desert/scenes/desert_road_2.tscn" id="4_55bf3"] [ext_resource type="PackedScene" uid="uid://q25vkjnwmjik" path="res://assets/tile/desert/scenes/desert_road_2.tscn" id="4_55bf3"]
[node name="DesertTiles" type="Node3D" unique_id=1542421002] [node name="DesertTiles" type="Node3D" unique_id=1542421002]
...@@ -13,6 +14,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 0) ...@@ -13,6 +14,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 0)
[node name="desert_2" parent="." unique_id=1104522346 instance=ExtResource("2_y3dgu")] [node name="desert_2" parent="." unique_id=1104522346 instance=ExtResource("2_y3dgu")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5, 0, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5, 0, 0)
[node name="desert_3" parent="." unique_id=758515760 instance=ExtResource("3_y3dgu")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.5)
[node name="desert_road_1" parent="." unique_id=1826525857 instance=ExtResource("3_ujoop")] [node name="desert_road_1" parent="." unique_id=1826525857 instance=ExtResource("3_ujoop")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5)
......
[gd_scene format=3 uid="uid://doj12ce3mmosn"] [gd_scene format=3 uid="uid://doj12ce3mmosn"]
[ext_resource type="MeshLibrary" uid="uid://dkcvdxf5wfxb6" path="res://assets/tile/desert/scenes/desert_mesh_library.tres" id="1_byiru"]
[node name="Stage1Map" type="GridMap" unique_id=875122487] [node name="Stage1Map" type="GridMap" unique_id=875122487]
mesh_library = ExtResource("1_byiru")
cell_scale = 1.2 cell_scale = 1.2
data = { data = {
"cells": PackedInt32Array(65531, 65531, 1048579, 65531, 65532, 2, 65531, 65533, 2, 65531, 65534, 2, 65531, 65535, 2, 65531, 0, 2, 65531, 1, 2, 65531, 2, 2, 65531, 3, 2, 65531, 4, 655363, 65532, 65531, 1441794, 65532, 65532, 1048576, 65532, 65533, 1048576, 65532, 65534, 1048576, 65532, 65535, 1048576, 65532, 0, 1048576, 65532, 1, 1048576, 65532, 2, 1048576, 65532, 3, 1048577, 65532, 4, 1441794, 65533, 65531, 1441794, 65533, 65532, 1048577, 65533, 65533, 1048577, 65533, 65534, 0, 65533, 65535, 1048577, 65533, 0, 1048577, 65533, 1, 0, 65533, 2, 0, 65533, 3, 1, 65533, 4, 1441794, 65534, 65532, 1048577, 65534, 65533, 1048577, 65534, 65534, 0, 65534, 65535, 1048577, 65534, 0, 1048577, 65534, 1, 1048577, 65534, 2, 1, 65534, 3, 1, 65534, 4, 1441794, 65535, 65532, 0, 65535, 65533, 0, 65535, 65534, 0, 65535, 65535, 1048577, 65535, 0, 0, 65535, 1, 1, 65535, 2, 1, 65535, 3, 1048577, 65535, 4, 1441794, 0, 65532, 0, 0, 65533, 1048577, 0, 65534, 0, 0, 65535, 0, 0, 0, 0, 0, 1, 1048577, 0, 2, 0, 0, 3, 1048577, 0, 4, 1441794, 1, 65532, 1048577, 1, 65533, 1048577, 1, 65534, 0, 1, 65535, 0, 1, 0, 1048577, 1, 1, 1048577, 1, 4, 1441794, 2, 65532, 1048577, 2, 65533, 0, 2, 65534, 1048577, 2, 65535, 1048577, 2, 0, 0, 2, 1, 0, 2, 4, 1441794, 3, 65531, 1441794, 3, 65532, 1048577, 3, 65533, 1048577, 3, 65534, 1048577, 3, 65535, 1048577, 3, 0, 1048577, 3, 1, 1048577, 3, 4, 1441794, 4, 65531, 3, 4, 65532, 2, 4, 65533, 2, 4, 65534, 2, 4, 65535, 2, 4, 0, 2, 4, 1, 2, 4, 2, 2, 4, 3, 2, 4, 4, 1441795, 1, 2, 0, 1, 3, 1048577, 2, 2, 0, 2, 3, 0, 3, 2, 1048577, 3, 3, 1048577, 5, 1, 23, 5, 0, 23, 5, 65535, 23, 65530, 0, 23, 65529, 0, 23, 65528, 1, 23, 65527, 1, 23, 65526, 1, 23, 65525, 1, 23, 65524, 1, 23, 65523, 1, 23, 65522, 1, 23, 65521, 1, 23, 65520, 1, 23, 65519, 2, 23, 65518, 2, 23, 65517, 2, 23, 65520, 2, 23, 65521, 2, 23, 65522, 2, 23, 65523, 2, 23, 65524, 2, 23, 65525, 2, 23, 65526, 2, 23, 65527, 2, 23, 65528, 2, 23, 65529, 2, 23, 65530, 2, 23, 65534, 65531, 1441794, 65535, 65531, 1441794, 0, 65531, 1441794, 1, 65531, 1441794, 2, 65531, 1441794, 5, 65532, 23, 5, 65533, 23, 5, 2, 23, 5, 3, 23) "cells": PackedInt32Array(65531, 65531, 1048579, 65531, 65532, 2, 65531, 65533, 2, 65531, 65534, 2, 65531, 65535, 2, 65531, 0, 2, 65531, 1, 2, 65531, 2, 2, 65531, 3, 2, 65531, 4, 655363, 65532, 65531, 1441794, 65532, 65532, 1179648, 65532, 65533, 1179648, 65532, 65534, 1179648, 65532, 65535, 1179648, 65532, 0, 1179648, 65532, 1, 1179648, 65532, 2, 1179648, 65532, 3, 1179648, 65532, 4, 1441794, 65533, 65531, 1441794, 65533, 65532, 1179648, 65533, 65533, 1179648, 65533, 65534, 1179648, 65533, 65535, 1179648, 65533, 0, 1179648, 65533, 1, 1179648, 65533, 2, 1179648, 65533, 3, 1179648, 65533, 4, 1441794, 65534, 65532, 1179648, 65534, 65533, 1179648, 65534, 65534, 1179648, 65534, 65535, 1179648, 65534, 0, 1179648, 65534, 1, 1179648, 65534, 2, 1179648, 65534, 3, 1179648, 65534, 4, 1441794, 65535, 65532, 1179648, 65535, 65533, 1179648, 65535, 65534, 1179648, 65535, 65535, 1179648, 65535, 0, 1179648, 65535, 1, 1179648, 65535, 2, 1179648, 65535, 3, 1179648, 65535, 4, 1441794, 0, 65532, 1179648, 0, 65533, 1179648, 0, 65534, 1179648, 0, 65535, 1179648, 0, 0, 1179648, 0, 1, 1179648, 0, 2, 1179648, 0, 3, 1179648, 0, 4, 1441794, 1, 65532, 1179648, 1, 65533, 1179648, 1, 65534, 1179648, 1, 65535, 1179648, 1, 0, 1179648, 1, 1, 1179648, 1, 4, 1441794, 2, 65532, 1179648, 2, 65533, 1179648, 2, 65534, 1179648, 2, 65535, 1179648, 2, 0, 1179648, 2, 1, 1179648, 2, 4, 1441794, 3, 65531, 1441794, 3, 65532, 1179648, 3, 65533, 1179648, 3, 65534, 1179648, 3, 65535, 1179648, 3, 0, 1179648, 3, 1, 1179648, 3, 4, 1441794, 4, 65531, 3, 4, 65532, 2, 4, 65533, 2, 4, 65534, 2, 4, 65535, 2, 4, 0, 2, 4, 1, 2, 4, 2, 2, 4, 3, 2, 4, 4, 1441795, 1, 2, 1179648, 1, 3, 1179648, 2, 2, 1179648, 2, 3, 1179648, 3, 2, 1179648, 3, 3, 1179648, 5, 1, 1, 5, 0, 1, 5, 65535, 1, 65530, 0, 1, 65529, 0, 1, 65528, 1, 1441792, 65526, 1, 1, 65525, 1, 1, 65523, 1, 23, 65522, 1, 23, 65521, 1, 23, 65520, 1, 23, 65519, 2, 23, 65518, 2, 23, 65517, 2, 23, 65520, 2, 23, 65521, 2, 23, 65522, 2, 23, 65523, 2, 23, 65525, 2, 1, 65526, 2, 1, 65528, 2, 1441792, 65529, 2, 1, 65530, 2, 1, 65534, 65531, 1441794, 65535, 65531, 1441794, 0, 65531, 1441794, 1, 65531, 1441794, 2, 65531, 1441794, 5, 65532, 1, 5, 65533, 1, 5, 2, 1, 5, 3, 1, 65528, 5, 0, 65528, 6, 0, 65528, 7, 0, 65529, 5, 0, 65529, 6, 0, 65529, 7, 0, 65530, 5, 0, 65530, 6, 0, 65530, 7, 0, 65531, 5, 0, 65531, 6, 0, 65531, 7, 0, 65532, 5, 0, 65532, 6, 0, 65532, 7, 1, 65533, 5, 0, 65533, 6, 0, 65533, 7, 0, 65534, 5, 0, 65534, 6, 0, 65534, 7, 0, 65535, 5, 0, 65535, 6, 0, 65535, 7, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 1, 5, 0, 1, 6, 0, 1, 7, 0, 2, 5, 0, 2, 6, 0, 2, 7, 0, 3, 5, 0, 3, 6, 0, 3, 7, 0, 4, 5, 0, 4, 6, 0, 4, 7, 0, 5, 5, 0, 5, 6, 0, 5, 7, 0, 6, 5, 0, 6, 6, 0, 6, 7, 0, 7, 5, 0, 7, 6, 0, 7, 7, 0, 8, 5, 0, 8, 6, 0, 8, 7, 0, 65528, 65528, 1, 65528, 65529, 1441792, 65528, 65530, 1441792, 65528, 65531, 1441792, 65528, 65532, 1441792, 65528, 65533, 1441792, 65528, 65534, 1441792, 65528, 65535, 1441792, 65528, 0, 1441792, 65528, 3, 1441792, 65528, 4, 1441792, 65529, 65528, 1, 65529, 65529, 1441792, 65529, 65530, 1, 65529, 65531, 1, 65529, 65532, 1, 65529, 65533, 1, 65529, 65534, 1, 65529, 65535, 1, 65529, 1, 1, 65529, 3, 1, 65529, 4, 1, 65530, 65528, 1, 65530, 65529, 1441792, 65530, 65530, 1, 65530, 65531, 1, 65530, 65532, 1, 65530, 65533, 1, 65530, 65534, 1, 65530, 65535, 1, 65530, 1, 1, 65530, 3, 1, 65530, 4, 1, 65531, 65528, 1, 65531, 65529, 1441792, 65531, 65530, 1, 65532, 65528, 1, 65532, 65529, 1441792, 65532, 65530, 1, 65533, 65528, 1, 65533, 65529, 1441792, 65533, 65530, 1, 65534, 65528, 1, 65534, 65529, 1441792, 65534, 65530, 1, 65535, 65528, 1, 65535, 65529, 1441792, 65535, 65530, 1, 0, 65528, 1048576, 0, 65529, 1441792, 0, 65530, 1, 1, 65528, 1048576, 1, 65529, 1441792, 1, 65530, 1, 2, 65528, 1, 2, 65529, 1441792, 2, 65530, 1, 3, 65528, 1, 3, 65529, 1441792, 3, 65530, 1, 4, 65528, 1, 4, 65529, 1441792, 4, 65530, 1, 5, 65528, 1441792, 5, 65529, 1441792, 5, 65530, 1, 6, 65528, 1441792, 6, 65529, 1441792, 6, 65530, 1441792, 7, 65528, 1441792, 7, 65529, 1441792, 7, 65530, 1441792, 8, 65528, 1, 8, 65529, 1, 8, 65530, 1, 5, 65531, 1, 5, 65534, 1, 5, 4, 1, 6, 65531, 1441792, 6, 65532, 1441792, 6, 65533, 1441792, 6, 65534, 1441792, 6, 65535, 1441792, 6, 0, 1441792, 6, 1, 1441792, 6, 2, 1441792, 6, 3, 1441792, 6, 4, 1441792, 7, 65531, 1441792, 7, 65532, 1441792, 7, 65533, 1441792, 7, 65534, 1441792, 7, 65535, 1, 7, 0, 1, 7, 1, 1441792, 7, 2, 1441792, 7, 3, 1441792, 7, 4, 1441792, 8, 65531, 1, 8, 65532, 1, 8, 65533, 1, 8, 65534, 1, 8, 65535, 1, 8, 0, 1, 8, 1, 1, 8, 2, 1, 8, 3, 1, 8, 4, 1, 9, 65528, 0, 9, 65529, 0, 9, 65530, 0, 9, 65531, 0, 9, 65532, 0, 9, 65533, 0, 9, 65534, 0, 9, 65535, 0, 9, 0, 0, 9, 1, 0, 9, 2, 0, 9, 3, 0, 9, 4, 0, 9, 5, 0, 9, 6, 0, 9, 7, 0, 65525, 65528, 1, 65525, 65529, 1, 65525, 65530, 1, 65525, 65531, 1, 65525, 65532, 1, 65525, 65533, 1, 65525, 65534, 1, 65525, 65535, 1, 65525, 0, 1, 65525, 3, 1, 65525, 4, 1, 65525, 5, 1, 65525, 6, 1, 65525, 7, 1, 65526, 65528, 1, 65526, 65529, 1, 65526, 65530, 1, 65526, 65531, 1, 65526, 65532, 1, 65526, 65533, 1, 65526, 65534, 1, 65526, 65535, 1, 65526, 0, 1, 65526, 3, 1, 65526, 4, 1, 65526, 5, 1, 65526, 6, 1, 65526, 7, 1, 65527, 65528, 1, 65527, 65529, 1, 65527, 65530, 1, 65527, 65531, 1, 65527, 65532, 1, 65527, 65533, 1, 65527, 65534, 1, 65527, 65535, 1, 65527, 0, 1, 65527, 1, 1, 65527, 2, 1, 65527, 3, 1, 65527, 4, 1, 65527, 5, 1, 65527, 6, 1, 65527, 7, 1, 65525, 65527, 1048576, 65526, 65527, 1048576, 65527, 65527, 1048576, 65528, 65527, 1048576, 65529, 65527, 1048576, 65530, 65527, 1048576, 65531, 65527, 1048576, 65532, 65527, 1048576, 65533, 65527, 1048576, 65534, 65527, 1048576, 65535, 65527, 1048576, 0, 65527, 1048576, 1, 65527, 1048576, 2, 65527, 1048576, 3, 65527, 1048576, 4, 65527, 1048576, 5, 65527, 1048576, 6, 65527, 1048576, 7, 65527, 1048576, 8, 65527, 1048576, 9, 65527, 1048576, 9, 8, 1048577, 8, 8, 1048577, 7, 8, 1048577, 6, 8, 1048577, 5, 8, 1048577, 4, 8, 1048577, 3, 8, 1048577, 2, 8, 1048577, 1, 8, 1048577, 0, 8, 1048577, 65535, 8, 1048577, 65534, 8, 1048577, 65533, 8, 1048577, 65532, 8, 1048577, 65531, 8, 1048577, 65530, 8, 1048577, 65529, 8, 1048577, 65528, 8, 1048577, 65527, 8, 1048577, 65526, 8, 1048577, 65525, 8, 1048577, 10, 65527, 1048577, 10, 65528, 1048577, 10, 65529, 1048577, 10, 65530, 1048577, 10, 65531, 1048577, 10, 65532, 1048577, 10, 65533, 1048577, 10, 65534, 1048577, 10, 65535, 1048577, 10, 0, 1048577, 10, 1, 1048577, 10, 2, 1048577, 10, 3, 1048577, 10, 4, 1048577, 10, 5, 1048577, 10, 6, 1048577, 10, 7, 1048577, 10, 8, 1048577)
} }
metadata/_editor_floor_ = Vector3(0, 0, 0) metadata/_editor_floor_ = Vector3(0, 0, 0)
...@@ -9,6 +9,16 @@ const TILE_SPACING := 2.5 ...@@ -9,6 +9,16 @@ const TILE_SPACING := 2.5
func _initialize() -> void: func _initialize() -> void:
for argument in OS.get_cmdline_user_args():
if argument.begins_with("--add-scene="):
var scene_path := argument.trim_prefix("--add-scene=")
if not _add_scene_to_mesh_library(scene_path):
quit(1)
return
print("Added scene to MeshLibrary: %s" % scene_path)
quit()
return
if "--library-only" in OS.get_cmdline_user_args(): if "--library-only" in OS.get_cmdline_user_args():
if not ResourceLoader.exists(COLLECTION_PATH, "PackedScene"): if not ResourceLoader.exists(COLLECTION_PATH, "PackedScene"):
push_error("Collection scene does not exist: %s" % COLLECTION_PATH) push_error("Collection scene does not exist: %s" % COLLECTION_PATH)
...@@ -66,6 +76,60 @@ func _initialize() -> void: ...@@ -66,6 +76,60 @@ func _initialize() -> void:
quit() quit()
func _add_scene_to_mesh_library(scene_path: String) -> bool:
var packed_scene := ResourceLoader.load(
scene_path,
"PackedScene",
ResourceLoader.CACHE_MODE_REPLACE
) as PackedScene
if packed_scene == null:
push_error("Cannot load scene: %s" % scene_path)
return false
var library := ResourceLoader.load(
LIBRARY_PATH,
"MeshLibrary",
ResourceLoader.CACHE_MODE_REPLACE
) as MeshLibrary
if library == null:
push_error("Cannot load MeshLibrary: %s" % LIBRARY_PATH)
return false
var tile_root := packed_scene.instantiate(PackedScene.GEN_EDIT_STATE_DISABLED) as Node3D
var mesh_instances: Array[MeshInstance3D] = []
_collect_mesh_instances(tile_root, mesh_instances)
if mesh_instances.is_empty():
push_error("No MeshInstance3D found in %s" % scene_path)
tile_root.free()
return false
var item_mesh := _combine_meshes(tile_root, mesh_instances)
if item_mesh == null:
tile_root.free()
return false
var item_name := scene_path.get_file().get_basename()
var item_id := library.get_last_unused_item_id()
for existing_id in library.get_item_list():
if library.get_item_name(existing_id) == item_name:
item_id = existing_id
break
if item_id not in library.get_item_list():
library.create_item(item_id)
library.set_item_name(item_id, item_name)
library.set_item_mesh(item_id, item_mesh)
library.set_item_mesh_transform(item_id, Transform3D.IDENTITY)
library.set_item_shapes(item_id, _collect_collision_shapes(tile_root))
tile_root.free()
var save_error := ResourceSaver.save(library, LIBRARY_PATH)
if save_error != OK:
push_error("Cannot save %s (error %d)" % [LIBRARY_PATH, save_error])
return false
print("Saved MeshLibrary item %d (%s): %s" % [item_id, item_name, LIBRARY_PATH])
return true
func _find_glb_files() -> PackedStringArray: func _find_glb_files() -> PackedStringArray:
var paths := PackedStringArray() var paths := PackedStringArray()
var directory := DirAccess.open(SOURCE_DIR) var directory := DirAccess.open(SOURCE_DIR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment