added some stuff for level select 3d menu
This commit is contained in:
BIN
Level_Select_Banner.png
Normal file
BIN
Level_Select_Banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
40
Level_Select_Banner.png.import
Normal file
40
Level_Select_Banner.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://drvs8v3bvlw18"
|
||||
path="res://.godot/imported/Level_Select_Banner.png-02be576872c60775ba554cde1d52fb99.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Level_Select_Banner.png"
|
||||
dest_files=["res://.godot/imported/Level_Select_Banner.png-02be576872c60775ba554cde1d52fb99.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
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=false
|
||||
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=1
|
||||
13
Scenes/FlowField/flow_field_editor.gd
Normal file
13
Scenes/FlowField/flow_field_editor.gd
Normal file
@@ -0,0 +1,13 @@
|
||||
class_name FlowFieldEditor
|
||||
extends Node
|
||||
|
||||
@export var flow_field: FlowField
|
||||
|
||||
|
||||
func create_grid(x: int, y: int, gap: int) -> Array[FlowNode]:
|
||||
#return flow_field.create_grid(x, y, gap)
|
||||
return []
|
||||
|
||||
|
||||
func create_node(pos: Vector3 = Vector3.ZERO, grid_id: int = -1, grid_x: int = 0, grid_y: int = 0) -> FlowNode:
|
||||
return flow_field.create_node(pos, grid_id, grid_x, grid_y)
|
||||
1
Scenes/FlowField/flow_field_editor.gd.uid
Normal file
1
Scenes/FlowField/flow_field_editor.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d348pxbcsomw4
|
||||
43
Shaders/wireframe.gdshader
Normal file
43
Shaders/wireframe.gdshader
Normal file
@@ -0,0 +1,43 @@
|
||||
shader_type spatial;
|
||||
|
||||
render_mode unshaded;
|
||||
|
||||
uniform vec4 modelColor : source_color;
|
||||
uniform vec4 wireframeColor : source_color;
|
||||
|
||||
uniform float width : hint_range(0.0, 15.) = 1.;
|
||||
uniform float modelOpacity : hint_range(0.0, 1.0) = 1.;
|
||||
|
||||
uniform bool filtered = false;
|
||||
|
||||
const vec3 vectors[3] = {
|
||||
vec3(1.0, 0.0 ,0.0),
|
||||
vec3(0.0, 1.0 ,0.0),
|
||||
vec3(0.0, 0.0 ,1.0)
|
||||
};
|
||||
|
||||
varying vec3 baryCoord;
|
||||
|
||||
void vertex()
|
||||
{
|
||||
baryCoord = vectors[VERTEX_ID % 3];
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec3 dBaryCoordX = dFdx(baryCoord);
|
||||
vec3 dBaryCoordY = dFdy(baryCoord);
|
||||
vec3 dBaryCoord = sqrt(dBaryCoordX*dBaryCoordX + dBaryCoordY*dBaryCoordY);
|
||||
|
||||
vec3 remap = smoothstep(
|
||||
vec3(0.0),
|
||||
dBaryCoord * width,
|
||||
baryCoord
|
||||
);
|
||||
|
||||
remap = filtered ? remap : step(.5, remap);
|
||||
|
||||
float closestEdge = min(min(remap.x, remap.y), remap.z);
|
||||
|
||||
ALBEDO = mix(wireframeColor, modelColor, closestEdge).xyz;
|
||||
ALPHA = mix(1., modelOpacity, closestEdge);
|
||||
}
|
||||
1
Shaders/wireframe.gdshader.uid
Normal file
1
Shaders/wireframe.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d35rx6xpni7ai
|
||||
12
Shaders/wireframe1.tres
Normal file
12
Shaders/wireframe1.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://wr1vi6yfhxhg"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://d35rx6xpni7ai" path="res://Shaders/wireframe.gdshader" id="1_jt35h"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_jt35h")
|
||||
shader_parameter/modelColor = Color(0, 0, 0, 1)
|
||||
shader_parameter/wireframeColor = Color(0, 0.92156863, 0, 1)
|
||||
shader_parameter/width = 2.814000133665
|
||||
shader_parameter/modelOpacity = 0.0
|
||||
shader_parameter/filtered = false
|
||||
12
Shaders/wireframe2.tres
Normal file
12
Shaders/wireframe2.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://dvvs2q42dl4od"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://d35rx6xpni7ai" path="res://Shaders/wireframe.gdshader" id="1_wyinq"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_wyinq")
|
||||
shader_parameter/modelColor = Color(1, 0, 0.016666412, 1)
|
||||
shader_parameter/wireframeColor = Color(0.92, 0, 0, 1)
|
||||
shader_parameter/width = 1.0
|
||||
shader_parameter/modelOpacity = 1.0
|
||||
shader_parameter/filtered = false
|
||||
265
Shaders/wireframetest.tscn
Normal file
265
Shaders/wireframetest.tscn
Normal file
@@ -0,0 +1,265 @@
|
||||
[gd_scene format=4 uid="uid://cdwjmtw3w72ll"]
|
||||
|
||||
[ext_resource type="ArrayMesh" uid="uid://dqu02w1dgudyq" path="res://brdigett.obj" id="1_e1ilk"]
|
||||
[ext_resource type="Material" uid="uid://wr1vi6yfhxhg" path="res://Shaders/wireframe1.tres" id="2_uicd7"]
|
||||
[ext_resource type="PackedScene" uid="uid://cxarqns8onckw" path="res://crt.glb" id="3_yfpqh"]
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="4_hm4ft"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://bfmuypokxn5la" path="res://cube.obj" id="5_yfpqh"]
|
||||
[ext_resource type="Material" uid="uid://dvvs2q42dl4od" path="res://Shaders/wireframe2.tres" id="6_bemc8"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_yfpqh"]
|
||||
sky_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1)
|
||||
ground_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1)
|
||||
|
||||
[sub_resource type="Sky" id="Sky_bemc8"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_yfpqh")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_gg6m7"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_bemc8")
|
||||
tonemap_mode = 2
|
||||
glow_enabled = true
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_gg6m7"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_myma4"]
|
||||
viewport_path = NodePath("SubViewport2")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ke55h"]
|
||||
resource_name = "Material"
|
||||
cull_mode = 2
|
||||
albedo_color = Color(0.9063318, 0.9063318, 0.9063318, 1)
|
||||
roughness = 0.5
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0i4ne"]
|
||||
resource_name = "Screen"
|
||||
cull_mode = 2
|
||||
albedo_color = Color(0.9063355, 0.30744696, 0.84215224, 1)
|
||||
roughness = 0.5
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_02qwi"]
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-0.23222329, -0.2910274, -0.24000001, 0.43629748, 0.4710274, 0.48000002),
|
||||
"format": 34359742465,
|
||||
"index_count": 264,
|
||||
"index_data": PackedByteArray("AAABAAIAAAADAAEABAABAAMABQADAAAABAAGAAEABgACAAEABwAEAAMABwADAAUABQAIAAcABwAIAAkABQAKAAgABwAJAAsACwAEAAcACwAJAAwADQAKAAUABQAAAA0ADQAOAAoADQAAAA8ADwAAAAIAEAAOAA0ADQAPABAAEAARAA4AEgARABAAEgATABEAEAAPABQAEAAUABIADwACABUAFAAPABUAFgAVAAIAFAAVABcABgAWAAIAGAATABIAGAAZABMAEgAUABoAEgAaABgAGwAaABQAGwAUABcAGAAaABwAHQAZABgAGAAcAB0AHQAeABkAHwAXABUAHwAbABcAFgAfABUAIAAaABsAIAAcABoAIQAbAB8AIQAgABsAIgAfABYAIgAhAB8AIAAjABwAJAAiABYAJAAWAAYAIQAlACAAIAAlACMAIgAmACEAIQAmACUAJAAnACIAIgAnACYAJQAoACMAJQAmACgAHAAjACgAJAApACcAHAAoACoAJgArACgAJgAnACsAKgAoACsAHQAcACoAJwApACwAJwAsACsALQApACQALQAsACkALQAkAAYALQAGAAQACwAtAAQALgArACwALgAsAC0AKgArAC4ALwAtAAsALwAuAC0ACwAMAC8ALwAMADAAMQAuAC8AMQAqAC4ALwAwADEAHQAqADEAMQAwAB4AMQAeAB0A"),
|
||||
"name": "Material",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
"vertex_count": 50,
|
||||
"vertex_data": PackedByteArray("1PhQPuxROD4K16M98cttvuxROD6QwnU+8cttvuxROD4K16M92z9BPuxROD6QwnU+7sxHPgAAAACQwnU+2z9BPoddIT4szl4+8cttvgAAAACQwnU+7sxHPgAAAAAszl4+mIokPgAAAAAszl4+hv0dPoddIb4szl4+hv0dPoddIT4szl4+2z9BPoddIb4szl4+f7YtPoddIb5yiZQ91PhQPoddIT5yiZQ9f7YtPoddIT5yiZQ91PhQPuxROD4K16O91PhQPoddIT5yiZS9f7YtPoddIT5yiZS92z9BPoddIT4szl6+hv0dPoddIT4szl6+2z9BPuxROD6QwnW+8cttvuxROD4K16O98cttvgAAAAAK16M98cttvuxROD6QwnW+7sxHPgAAAAAszl6+mIokPgAAAAAszl6+7sxHPgAAAACQwnW+8cttvgAAAACQwnW+2z9BPuxROL6QwnW+2z9BPoddIb4szl6+hv0dPoddIb4szl6+8cttvgAAAAAK16O98cttvuxROL6QwnW+8cttvuxROL4K16O98cttvuxROL4K16M92z9BPosBlb6QwnW+8cttvuxROL6QwnU+8cttvosBlb6QwnW+8cttvosBlb4K16O98cttvosBlb4K16M91PhQPosBlb4K16O98cttvosBlb6QwnU+1PhQPuxROL4K16O91PhQPosBlb4K16M92z9BPosBlb6QwnU+2z9BPuxROL6QwnU+1PhQPuxROL4K16M91PhQPoddIb5yiZQ9f7YtPoddIb5yiZS91PhQPoddIb5yiZS9")
|
||||
}, {
|
||||
"aabb": AABB(0.15428743, -0.15758334, -0.21758336, 0.021751568, 0.31516668, 0.43516672),
|
||||
"format": 34896613377,
|
||||
"index_count": 36,
|
||||
"index_data": PackedByteArray("AAABAAIAAAADAAEABAADAAAABAAFAAMABgAEAAAABwAAAAIABgAAAAcACAAGAAcABwACAAkACAAHAAoACgAHAAkACgAJAAsA"),
|
||||
"name": "Screen",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
"vertex_count": 12,
|
||||
"vertex_data": PackedByteArray("////f6mqAAAAAP////8AALS0//+pqgAASkv/f///AAC0tAAAqaoAAAAAAAD//wAAtLQAAFVVAAD///9/VVUAAAAAAAAAAAAAtLT//1VVAABKS/9/AAAAAAAA//8AAAAA")
|
||||
}]
|
||||
blend_shape_mode = 0
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_vgnnb"]
|
||||
resource_name = "crt_Cube"
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-0.23222329, -0.2910274, -0.24000001, 0.43629748, 0.4710274, 0.48000002),
|
||||
"attribute_data": PackedByteArray("AAAgP6yqqj4AAGA/AACAPgAAYD+sqqo+AAAgPwAAgD4AACA/VlXVPgAAYD9WVdU+AAAgPwAAAD8AAGA/AAAAPwAAAD8AAIA+AAAgPwAAAAAAACA/AACAPgAAAD8AAAAAAADAPgAAgD4AAMA+AAAAAAAAwD4AAAAAAADAPgAAgD4AAAA/VlVVPwAAID8AAEA/AAAgP1VVVT8AAAA/AABAPwAAAD+rqmo/AAAgP6uqaj8AAAA/AACAPwAAID8AAIA/AADAPgAAgD8AAMA+VlVVPwAAwD4AAEA/AADAPgAAQD8AAMA+VlVVPwAAwD6rqmo/AADAPquqaj8AAMA+AACAPwAAwD5WVdU+AADAPqyqqj4AAMA+rKqqPgAAwD5WVdU+avjHPjxX0z5q+Mc+xqisPmr4xz48V9M+avjHPrIF+j5q+Mc+sgX6Pmr4xz48V9M+avjHPsaorD5q+Mc+xqisPmr4xz5Q+oU+avjHPlD6hT4AAAA/AABAPwAAID8AAAA/AAAgPwAAQD8AAAA/AAAAPwAAwD4AAEA/AADAPgAAAD8AAMA+AAAAPwAAwD4AAEA/AAAAP7AF+j4AAMA+AAAAP2r4xz6yBfo+AAAAPwAAAD8AAAA/UPqFPgAAID8AAIA+ywMcP076hT4AAAA/AACAPssDHD88V9M+AAAgPwAAAD/LAxw/sAX6PgAAID9WVdU+avjHPsaorD4AAMA+AACAPmr4xz5Q+oU+AADAPqyqqj4AAAA/UPqFPmr4xz5Q+oU+avjHPlD6hT4AAAA/UPqFPssDHD9O+oU+ywMcP076hT7LAxw/xKisPssDHD9O+oU+ywMcP076hT7LAxw/xKisPssDHD88V9M+ywMcPzxX0z7LAxw/sAX6PssDHD+wBfo+AAAAP7AF+j7LAxw/sAX6PssDHD+wBfo+AAAAP7AF+j5q+Mc+sgX6Pmr4xz6yBfo+avjHPrIF+j4AAMA+VlXVPmr4xz48V9M+AADAPgAAAD/LAxw/TvqFPgAAID+sqqo+ywMcP8SorD4AACA/AACAPssDHD/EqKw+AAAgP1ZV1T7LAxw/PFfTPgAAID+sqqo+avjHPlD6hT4AAAA/AACAPgAAAD9Q+oU+AADAPgAAgD7LAxw/sAX6PgAAAD8AAAA/AAAAP7AF+j4AACA/AAAAPwAAAD6sqqo+AADAPgAAgD4AAMA+rKqqPgAAAD4AAIA+AAAAPlZV1T4AAMA+VlXVPgAAAD4AAAA/AADAPgAAAD8AAMA+AAAAPwAAwD5WVdU+AADAPlZV1T4AAMA+AAAAPwAAwD6sqqo+AADAPgAAgD4AAMA+AACAPgAAwD6sqqo+"),
|
||||
"format": 34359742487,
|
||||
"index_count": 264,
|
||||
"index_data": PackedByteArray("AAABAAIAAAADAAEABAAAAAIABAACAAUABgAEAAUABgAFAAcACAAJAAoACAALAAkADAALAAgADAANAAsADAAOAA0ADAAPAA4AEAARABIAEAATABEAFAAQABIAFAASABUAFgAUABUAFgAVABcAGAAUABYAGQATABAAGQAaABMAGQAbABoAGQAcABsAHQAZABAAHQAcABkAHQAQABQAGAAdABQAHQAeABwAGAAeAB0AGAAfAB4AIAAhACIAIAAjACEAJAAgACIAJAAiACUAJgAnACgAJgApACcAKgApACYAKgArACkALAArACoALAAtACsALgAvADAALgAxAC8AMgAxAC4AMgAzADEAMgA0ADMAMgA1ADQANgA3ADgANgA5ADcAOgA7ADwAOgA9ADsAPgA/AEAAPgBBAD8AQgBDAEQAQgBFAEMARgBHAEgARgBJAEcASgBJAEYASgBLAEkATABNAE4ATABPAE0AUABPAEwAUABRAE8AUgBRAFAAUgBTAFEAVABVAFYAVABXAFUAWABXAFQAWABZAFcAWgBbAFwAWgBdAFsAXgBfAGAAXgBhAF8AYgBjAGQAYgBlAGMAZgBnAGgAZgBpAGcAagBrAGwAagBtAGsAbgBvAHAAbgBxAG8AcgBuAHAAcgBwAHMAdAByAHMAdABzAHUAdgB3AHgAdgB5AHcAegB7AHwAegB9AHsA"),
|
||||
"material": SubResource("StandardMaterial3D_ke55h"),
|
||||
"name": "Material",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
"vertex_count": 126,
|
||||
"vertex_data": PackedByteArray("1PhQPuxROD4K16M98cttvuxROD6QwnU+8cttvuxROD4K16M92z9BPuxROD6QwnU+1PhQPuxROD4K16O98cttvuxROD4K16O92z9BPuxROD6QwnW+8cttvuxROD6QwnW+7sxHPgAAAACQwnU+8cttvuxROD6QwnU+2z9BPuxROD6QwnU+8cttvgAAAACQwnU+2z9BPuxROL6QwnU+8cttvuxROL6QwnU+8cttvosBlb6QwnU+2z9BPosBlb6QwnU+8cttvgAAAAAK16O98cttvuxROD6QwnW+8cttvuxROD4K16O98cttvgAAAACQwnW+8cttvgAAAAAK16M98cttvuxROD4K16M98cttvgAAAACQwnU+8cttvuxROD6QwnU+8cttvuxROL6QwnU+8cttvuxROL4K16O98cttvuxROL6QwnW+8cttvosBlb6QwnW+8cttvosBlb4K16O98cttvuxROL4K16M98cttvosBlb4K16M98cttvosBlb6QwnU+1PhQPuxROL4K16O91PhQPosBlb4K16M91PhQPuxROL4K16M91PhQPosBlb4K16O91PhQPoddIb5yiZS91PhQPoddIb5yiZQ91PhQPoddIb5yiZS9hv0dPoddIb4szl6+2z9BPoddIb4szl6+f7YtPoddIb5yiZS91PhQPoddIb5yiZQ9f7YtPoddIb5yiZQ92z9BPoddIb4szl4+hv0dPoddIb4szl4+8cttvgAAAACQwnW+2z9BPuxROD6QwnW+8cttvuxROD6QwnW+7sxHPgAAAACQwnW+8cttvuxROL6QwnW+2z9BPuxROL6QwnW+2z9BPosBlb6QwnW+8cttvosBlb6QwnW+7sxHPgAAAAAszl6+2z9BPuxROL6QwnW+2z9BPoddIb4szl6+7sxHPgAAAACQwnW+7sxHPgAAAAAszl4+2z9BPuxROD6QwnU+2z9BPoddIT4szl4+7sxHPgAAAACQwnU+1PhQPoddIT5yiZS92z9BPuxROD6QwnW+2z9BPoddIT4szl6+1PhQPuxROD4K16O91PhQPoddIb5yiZQ92z9BPuxROL6QwnU+2z9BPoddIb4szl4+1PhQPuxROL4K16M97sxHPgAAAAAszl4+hv0dPoddIb4szl4+2z9BPoddIb4szl4+mIokPgAAAAAszl4+2z9BPoddIT4szl4+hv0dPoddIT4szl4+1PhQPoddIT5yiZQ9hv0dPoddIT4szl4+2z9BPoddIT4szl4+f7YtPoddIT5yiZQ91PhQPoddIT5yiZS9f7YtPoddIT5yiZS92z9BPoddIT4szl6+hv0dPoddIT4szl6+7sxHPgAAAAAszl6+hv0dPoddIT4szl6+2z9BPoddIT4szl6+mIokPgAAAAAszl6+2z9BPoddIb4szl6+hv0dPoddIb4szl6+2z9BPoddIb4szl6+1PhQPuxROL4K16O91PhQPoddIb5yiZS92z9BPuxROL6QwnW+2z9BPoddIT4szl4+1PhQPuxROD4K16M91PhQPoddIT5yiZQ92z9BPuxROD6QwnU+1PhQPoddIT5yiZQ91PhQPuxROD4K16O91PhQPoddIT5yiZS91PhQPuxROD4K16M92z9BPoddIb4szl4+7sxHPgAAAACQwnU+7sxHPgAAAAAszl4+2z9BPuxROL6QwnU+2z9BPoddIT4szl6+7sxHPgAAAACQwnW+7sxHPgAAAAAszl6+2z9BPuxROD6QwnW+8cttvosBlb4K16M92z9BPosBlb6QwnU+1PhQPosBlb4K16M98cttvosBlb6QwnU+8cttvosBlb4K16O91PhQPosBlb4K16O98cttvosBlb6QwnW+2z9BPosBlb6QwnW+2z9BPuxROL6QwnW+1PhQPosBlb4K16O91PhQPuxROL4K16O92z9BPosBlb6QwnW+1PhQPuxROL4K16M92z9BPosBlb6QwnU+2z9BPuxROL6QwnU+1PhQPosBlb4K16M9/3///wAA/7//f///AAD/v/9///8AAP+//3///wAA/7//f///AAD/v/9///8AAP+//3///wAA/7//f///AAD/v/9//3+VgLP//3//f9p+bP//f/9/mnvM/f9//3+UgLT//3//f1CDVv7/f/9//3////9//3////8//3//f////z8AAP9//3/+/wAA/3//f/7/AAD/f/9//v8AAP9//3///wAA/3//f///AAD/f/9///8AAP9//3///wAA/3//f///AAD/f/9///8AAP9//3///wAA/3//f///AAD/f////78AAP9/////vwAA/3//f///AAD/f////78AAP9/////v////3//f/7/////f////7////9//3///////3////+/////f/9//v////9//3////9///////+//3///////7//f///////v/9///////+//3///////7//f///////v/9///////+//3///////7//////an+0//////+ufFb+//////9/////////aX+z//////8kgWz//////2SEzP3/////////v/////////+/HPlne62Ep/0c+Wd7roSo/Rz5Z3uuhKj9HPlne62Ep/1m++KGUXun/Wb74oZQe6j9ZvvihlB7qP1m++KGUnun/aT4nW1RiP/7pPidbQ2Iz/uk+J1tD4i8+6T4nW1liAH8nO1Zh613//uc7VmH8XfP+5ztWYfvd7z7nO1Zh5l3Afz/////////v/////////+//////////7//////////v/////////+//////////7//fwAA////v/9/AAD///+//38AAP///7//fwAA////v/9/AAD///+//38AAP///7//fwAA////v/9/AAD///+//3//f////z//f/9/////P/9//3////8//3//f////z//f/9/////P/9//3////8/pPhhkqZ39/uk+GGSAHjW+6T4YZICeND7pPhhkpl39/uc7aV4WIj3+5ztpXj+h9b7nO2lePyH0Puc7aV4ZYj3+////3//f/7/////f/9///////9//3///////3//f/7/Zvscea6EqP1m+xx5rYSn/Wb7HHmthKf9Zvscea6EqP0c+ZeEUHuo/Rz5l4RRe6f9HPmXhFF7p/0c+ZeEUHuo/f9/AAD///+//38AAP///7//fwAA////v/9/AAD///+//38AAP///7//fwAA////v/9/AAD///+//38AAP///7///zSL////v///NIv///+///80i////7///zSL////v8r0/3////8/yvT/f////z/K9P9/////P8r0/3////8/")
|
||||
}, {
|
||||
"aabb": AABB(0.15428743, -0.15758334, -0.21758336, 0.021751568, 0.31516668, 0.43516672),
|
||||
"attribute_data": PackedByteArray("VFX/fwAAAABUVQAAAAD/f////3+pqgAA//8AAKmq/3+pqv9/VFUAAKmqAABUVf9/qar//1RV/3+pqv9/VFX///////+pqv9/////f6mq//9UVf//AAD/f1RV/38AAP//"),
|
||||
"format": 34896613399,
|
||||
"index_count": 36,
|
||||
"index_data": PackedByteArray("AAABAAIAAAADAAEABAAFAAYABAAHAAUACAAJAAoACAALAAkADAANAA4ADAAPAA0AEAARABIAEAATABEAFAAVABYAFAAXABUA"),
|
||||
"material": SubResource("StandardMaterial3D_0i4ne"),
|
||||
"name": "Screen",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
"vertex_count": 24,
|
||||
"vertex_data": PackedByteArray("////f6mqt7sAAP////+3u7S0//+pqre7Skv/f///t7tKS/9/AABPxLS0//9VVU/EAAD//wAAT8T///9/VVVPxP///39VVQPAtLT//6mqA8C0tP//VVUDwP///3+pqgPAtLQAAFVVA8D///9/qaoDwP///39VVQPAtLQAAKmqA8AAAAAAAABPxP///39VVU/ESkv/fwAAT8S0tAAAVVVPxLS0AACpqre7Skv/f///t7v///9/qaq3uwAAAAD//7e7OYXAAjmFwAI5hcACOYXAAriEPAK4hDwCuIQ8AriEPAL+hH8C/oR/Av6EfwL+hH8CgH3+BIB9/gSAff4EgH3+BMN9uATDfbgEw324BMN9uAQ/fTkFP305BT99OQU/fTkF")
|
||||
}]
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_02qwi")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_yfpqh"]
|
||||
viewport_path = NodePath("SubViewport3")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bemc8"]
|
||||
resource_local_to_scene = true
|
||||
render_priority = 0
|
||||
shader = ExtResource("4_hm4ft")
|
||||
shader_parameter/albedo = SubResource("ViewportTexture_yfpqh")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 1.0
|
||||
|
||||
[node name="Node3D" type="Node3D" unique_id=1786088061]
|
||||
|
||||
[node name="Scene" type="Node3D" parent="." unique_id=1533098042]
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1350446878]
|
||||
environment = SubResource("Environment_gg6m7")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=362020946]
|
||||
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
|
||||
shadow_enabled = true
|
||||
directional_shadow_max_distance = 1.0
|
||||
|
||||
[node name="CSGMesh3D" type="CSGMesh3D" parent="." unique_id=1679858116]
|
||||
layers = 8
|
||||
mesh = ExtResource("1_e1ilk")
|
||||
material = ExtResource("2_uicd7")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="." unique_id=1993539768]
|
||||
transparent_bg = true
|
||||
size = Vector2i(320, 240)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="SubViewport" unique_id=165137694]
|
||||
transform = Transform3D(-0.7255305, -0.40619677, 0.55552644, -2.5359103e-08, 0.80722827, 0.59023935, -0.68819, 0.4282367, -0.5856688, 12.024443, 12.675274, -16.443657)
|
||||
cull_mask = 1047560
|
||||
projection = 1
|
||||
size = 46.279
|
||||
|
||||
[node name="SubViewport2" type="SubViewport" parent="." unique_id=1201223922]
|
||||
transparent_bg = true
|
||||
size = Vector2i(320, 240)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="SubViewport2" unique_id=1732616409]
|
||||
transform = Transform3D(-0.7255305, -0.40619677, 0.55552644, -2.5359103e-08, 0.80722827, 0.59023935, -0.68819, 0.4282367, -0.5856688, 12.024443, 12.675274, -16.443657)
|
||||
cull_mask = 1047568
|
||||
projection = 1
|
||||
size = 46.279
|
||||
|
||||
[node name="SubViewport3" type="SubViewport" parent="." unique_id=2135320534]
|
||||
size = Vector2i(320, 240)
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="SubViewport3" unique_id=828173881]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
texture = SubResource("ViewportTexture_gg6m7")
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="SubViewport3" unique_id=1787937781]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
texture = SubResource("ViewportTexture_myma4")
|
||||
|
||||
[node name="crt" parent="." unique_id=160903959 instance=ExtResource("3_yfpqh")]
|
||||
|
||||
[node name="Cube" parent="crt" index="0" unique_id=354048758]
|
||||
visible = false
|
||||
layers = 16
|
||||
|
||||
[node name="Camera" parent="crt" index="1" unique_id=893808235]
|
||||
cull_mask = 1047568
|
||||
|
||||
[node name="Cube_002" parent="crt" index="2" unique_id=980601324]
|
||||
layers = 16
|
||||
|
||||
[node name="Cube_003" parent="crt" index="3" unique_id=159882388]
|
||||
layers = 16
|
||||
|
||||
[node name="Cube_004" parent="crt" index="4" unique_id=1709101676]
|
||||
layers = 16
|
||||
|
||||
[node name="Cube_005" parent="crt" index="5" unique_id=326657677]
|
||||
layers = 16
|
||||
|
||||
[node name="Plane" parent="crt" index="6" unique_id=1575857192]
|
||||
layers = 16
|
||||
|
||||
[node name="Cube_006" parent="crt" index="7" unique_id=1005745260]
|
||||
layers = 16
|
||||
|
||||
[node name="Cube_007" parent="crt" index="8" unique_id=1370352225]
|
||||
layers = 16
|
||||
|
||||
[node name="CSGMesh3D2" type="CSGMesh3D" parent="." unique_id=435094222]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.2234993, 0, -3.9383547)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D4" type="CSGMesh3D" parent="." unique_id=1491056449]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3316536, 0, -3.8139849)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D6" type="CSGMesh3D" parent="." unique_id=2061347890]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.042532, 0, -3.979811)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D8" type="CSGMesh3D" parent="." unique_id=2036193578]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.291277, 0, -3.7725298)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D34" type="CSGMesh3D" parent="." unique_id=1862208915]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.042532, 0, -9.749714)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D36" type="CSGMesh3D" parent="." unique_id=699572748]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.291277, 0, -9.542433)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D15" type="CSGMesh3D" parent="." unique_id=517123821]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.291277, 0, 1.843663)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D19" type="CSGMesh3D" parent="." unique_id=366796490]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.0263176, 0, 7.898925)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D21" type="CSGMesh3D" parent="." unique_id=1362275418]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.5966144, 0, 7.898926)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D23" type="CSGMesh3D" parent="." unique_id=990271930]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.2234993, 0, 12.744411)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D25" type="CSGMesh3D" parent="." unique_id=1974128882]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3316536, 0, 12.868781)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="CSGMesh3D29" type="CSGMesh3D" parent="." unique_id=1403086199]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.291277, 0, 12.910236)
|
||||
layers = 16
|
||||
mesh = ExtResource("5_yfpqh")
|
||||
material = ExtResource("6_bemc8")
|
||||
|
||||
[node name="Cube" type="MeshInstance3D" parent="." unique_id=679301436]
|
||||
transform = Transform3D(0.9332891, 0, -0.35912594, 0, 1, 0, 0.35912594, 0, 0.9332891, -0.021253854, 0, -0.11329776)
|
||||
layers = 16
|
||||
mesh = SubResource("ArrayMesh_vgnnb")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_bemc8")
|
||||
|
||||
[editable path="crt"]
|
||||
BIN
Worlds/GreenPlanet/Levels/Bridge/bridge_widget.glb
Normal file
BIN
Worlds/GreenPlanet/Levels/Bridge/bridge_widget.glb
Normal file
Binary file not shown.
50
Worlds/GreenPlanet/Levels/Bridge/bridge_widget.glb.import
Normal file
50
Worlds/GreenPlanet/Levels/Bridge/bridge_widget.glb.import
Normal file
@@ -0,0 +1,50 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dxyx6rhy6fkc2"
|
||||
path="res://.godot/imported/bridge_widget.glb-ac80e4548395483ae360d6203e10a1c2.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Worlds/GreenPlanet/Levels/Bridge/bridge_widget.glb"
|
||||
dest_files=["res://.godot/imported/bridge_widget.glb-ac80e4548395483ae360d6203e10a1c2.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
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=false
|
||||
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={
|
||||
"materials": {
|
||||
"Material.001": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://Shaders/wireframe1.tres",
|
||||
"use_external/path": "uid://wr1vi6yfhxhg"
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=2
|
||||
gltf/embedded_image_handling=1
|
||||
12
brdigett.mtl
Normal file
12
brdigett.mtl
Normal file
@@ -0,0 +1,12 @@
|
||||
# Blender 5.0.1 MTL File: 'brdigett.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Material.001
|
||||
Ns 250.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.500000
|
||||
d 1.000000
|
||||
illum 2
|
||||
1543
brdigett.obj
Normal file
1543
brdigett.obj
Normal file
File diff suppressed because it is too large
Load Diff
25
brdigett.obj.import
Normal file
25
brdigett.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://dqu02w1dgudyq"
|
||||
path="res://.godot/imported/brdigett.obj-f018ff53a72e07aafbd19b940585e82e.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/brdigett.obj-f018ff53a72e07aafbd19b940585e82e.mesh"]
|
||||
|
||||
source_file="res://brdigett.obj"
|
||||
dest_files=["res://.godot/imported/brdigett.obj-f018ff53a72e07aafbd19b940585e82e.mesh", "res://.godot/imported/brdigett.obj-f018ff53a72e07aafbd19b940585e82e.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=false
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
55
crt.glb.import
Normal file
55
crt.glb.import
Normal file
@@ -0,0 +1,55 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cxarqns8onckw"
|
||||
path="res://.godot/imported/crt.glb-f7ec05cffb82b2e8c0fd0c833619c93a.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://crt.glb"
|
||||
dest_files=["res://.godot/imported/crt.glb-f7ec05cffb82b2e8c0fd0c833619c93a.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
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=false
|
||||
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={
|
||||
"materials": {
|
||||
"Screen": {
|
||||
"use_external/enabled": false,
|
||||
"use_external/fallback_path": "res://crt_screen.tres",
|
||||
"use_external/path": "uid://cis5sbogdn4os"
|
||||
},
|
||||
"Wood": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://generic_wood.tres",
|
||||
"use_external/path": "uid://bdlgg2ei0yrvd"
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=2
|
||||
gltf/embedded_image_handling=1
|
||||
BIN
crt_Level_Select_Banner.png
Normal file
BIN
crt_Level_Select_Banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
44
crt_Level_Select_Banner.png.import
Normal file
44
crt_Level_Select_Banner.png.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://df5skwtn84n1p"
|
||||
path.s3tc="res://.godot/imported/crt_Level_Select_Banner.png-b93eca1be55c70b39419869f2e64ce6d.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "b798ace04f034a43207bc1e65eefe9f0"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://crt_Level_Select_Banner.png"
|
||||
dest_files=["res://.godot/imported/crt_Level_Select_Banner.png-b93eca1be55c70b39419869f2e64ce6d.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
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
|
||||
10
crt_screen_tester.tres
Normal file
10
crt_screen_tester.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://co725vuobwshh"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_4l81e"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_4l81e")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 1.0
|
||||
BIN
crt_steel1.png
Normal file
BIN
crt_steel1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 489 B |
44
crt_steel1.png.import
Normal file
44
crt_steel1.png.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://3rvy1up8f1k5"
|
||||
path.s3tc="res://.godot/imported/crt_steel1.png-1421a6154113d1324830bea2a4343485.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "97569a5489f5b2ed001ce20310e8deb2"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://crt_steel1.png"
|
||||
dest_files=["res://.godot/imported/crt_steel1.png-1421a6154113d1324830bea2a4343485.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
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
|
||||
BIN
crt_tree1_bark.png
Normal file
BIN
crt_tree1_bark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 585 B |
44
crt_tree1_bark.png.import
Normal file
44
crt_tree1_bark.png.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bs0lypwyo5jf6"
|
||||
path.s3tc="res://.godot/imported/crt_tree1_bark.png-1dead196d22dff548392d132e81f26e3.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "3a9eb64baf1362d22626d5e08a5eea2e"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://crt_tree1_bark.png"
|
||||
dest_files=["res://.godot/imported/crt_tree1_bark.png-1dead196d22dff548392d132e81f26e3.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
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
|
||||
2
cube.mtl
Normal file
2
cube.mtl
Normal file
@@ -0,0 +1,2 @@
|
||||
# Blender 5.0.1 MTL File: 'level_select.blend'
|
||||
# www.blender.org
|
||||
73
cube.obj
Normal file
73
cube.obj
Normal file
@@ -0,0 +1,73 @@
|
||||
# Blender 5.0.1
|
||||
# www.blender.org
|
||||
mtllib cube.mtl
|
||||
o Cube.001
|
||||
v -1.000000 -1.000000 1.000000
|
||||
v -1.000000 1.000000 1.000000
|
||||
v -1.000000 -1.000000 -1.000000
|
||||
v -1.000000 1.000000 -1.000000
|
||||
v 1.000000 -1.000000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 1.000000 -1.000000 -1.000000
|
||||
v 1.000000 1.000000 -1.000000
|
||||
v -1.000000 -1.000000 -1.000000
|
||||
v -1.000000 -1.000000 -1.000000
|
||||
v -1.000000 -1.000000 -1.000000
|
||||
v -1.000000 -1.000000 1.000000
|
||||
v -1.000000 -1.000000 1.000000
|
||||
v -1.000000 -1.000000 1.000000
|
||||
v -1.000000 -1.000000 1.000000
|
||||
v -1.000000 1.000000 1.000000
|
||||
v -1.000000 1.000000 1.000000
|
||||
v -1.000000 1.000000 1.000000
|
||||
v -1.000000 1.000000 -1.000000
|
||||
v -1.000000 1.000000 -1.000000
|
||||
v -1.000000 1.000000 -1.000000
|
||||
v -1.000000 1.000000 -1.000000
|
||||
v 1.000000 -1.000000 -1.000000
|
||||
v 1.000000 -1.000000 -1.000000
|
||||
v 1.000000 -1.000000 -1.000000
|
||||
v 1.000000 -1.000000 -1.000000
|
||||
v 1.000000 1.000000 -1.000000
|
||||
v 1.000000 1.000000 -1.000000
|
||||
v 1.000000 1.000000 -1.000000
|
||||
v 1.000000 -1.000000 1.000000
|
||||
v 1.000000 -1.000000 1.000000
|
||||
v 1.000000 -1.000000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vt 0.625000 0.000000
|
||||
vt 0.375000 0.250000
|
||||
vt 0.375000 0.000000
|
||||
vt 0.625000 0.250000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.625000 0.500000
|
||||
vt 0.375000 0.750000
|
||||
vt 0.625000 0.750000
|
||||
vt 0.375000 1.000000
|
||||
vt 0.125000 0.750000
|
||||
vt 0.125000 0.500000
|
||||
vt 0.875000 0.500000
|
||||
vt 0.625000 1.000000
|
||||
vt 0.875000 0.750000
|
||||
s 0
|
||||
f 16/1/1 9/2/1 12/3/1
|
||||
f 22/4/2 23/5/2 11/2/2
|
||||
f 8/6/3 30/7/3 25/5/3
|
||||
f 36/8/4 13/9/4 32/7/4
|
||||
f 7/5/5 1/10/5 3/11/5
|
||||
f 4/12/6 6/8/6 29/6/6
|
||||
f 17/1/1 19/4/1 10/2/1
|
||||
f 20/4/2 27/6/2 24/5/2
|
||||
f 28/6/3 33/8/3 31/7/3
|
||||
f 34/8/4 18/13/4 14/9/4
|
||||
f 26/5/5 5/7/5 15/10/5
|
||||
f 21/12/6 2/14/6 35/8/6
|
||||
25
cube.obj.import
Normal file
25
cube.obj.import
Normal file
@@ -0,0 +1,25 @@
|
||||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://bfmuypokxn5la"
|
||||
path="res://.godot/imported/cube.obj-ecd20c75680354919967c1f74dc43511.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/cube.obj-ecd20c75680354919967c1f74dc43511.mesh"]
|
||||
|
||||
source_file="res://cube.obj"
|
||||
dest_files=["res://.godot/imported/cube.obj-ecd20c75680354919967c1f74dc43511.mesh", "res://.godot/imported/cube.obj-ecd20c75680354919967c1f74dc43511.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
generate_lods=false
|
||||
generate_shadow_mesh=true
|
||||
generate_lightmap_uv2=false
|
||||
generate_lightmap_uv2_texel_size=0.2
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
force_disable_mesh_compression=false
|
||||
55
flow_field_tester.gd
Normal file
55
flow_field_tester.gd
Normal file
@@ -0,0 +1,55 @@
|
||||
class_name FlowFieldTester extends Control
|
||||
|
||||
var flow_field: FlowField
|
||||
var flow_field_tool: FlowFieldEditor
|
||||
var node_boxes: Array[ColorRect]
|
||||
var offset: Vector2
|
||||
var hovered: ColorRect
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
flow_field = FlowField.new()
|
||||
var flow_field_data: FlowFieldData = FlowFieldData.new()
|
||||
flow_field.data_file = flow_field_data
|
||||
flow_field_tool = FlowFieldEditor.new()
|
||||
add_child(flow_field)
|
||||
add_child(flow_field_tool)
|
||||
flow_field_tool.flow_field = flow_field
|
||||
flow_field_tool.create_grid(10, 10, 1)
|
||||
var furthest_negative_vector: Vector2 = Vector2.ZERO
|
||||
for node: FlowNode in flow_field.nodes:
|
||||
var box: ColorRect = ColorRect.new()
|
||||
box.position = Vector2(node.position.x * 15.0, node.position.z * 15.0)
|
||||
if node.position.x * 15.0 < furthest_negative_vector.x:
|
||||
furthest_negative_vector.x = node.position.x * 15.0
|
||||
if node.position.z * 15.0 < furthest_negative_vector.y:
|
||||
furthest_negative_vector.y = node.position.z * 15.0
|
||||
box.size = Vector2(10.0, 10.0)
|
||||
box.mouse_entered.connect(box_hovered.bind(box))
|
||||
node_boxes.append(box)
|
||||
$CanvasLayer.add_child(box)
|
||||
print(furthest_negative_vector)
|
||||
$CanvasLayer.offset = -furthest_negative_vector
|
||||
update_colors()
|
||||
|
||||
|
||||
func box_hovered(box: ColorRect) -> void:
|
||||
hovered = box
|
||||
update_colors()
|
||||
|
||||
|
||||
func update_colors() -> void:
|
||||
var x: int = 0
|
||||
for box: ColorRect in node_boxes:
|
||||
if flow_field.nodes[x].traversable:
|
||||
box.color = Color.GREEN
|
||||
else:
|
||||
box.color = Color.RED
|
||||
if box == hovered:
|
||||
box.color = Color.AQUAMARINE
|
||||
x += 1
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton and event.button_index == 0:
|
||||
pass
|
||||
1
flow_field_tester.gd.uid
Normal file
1
flow_field_tester.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://io82eo46is7q
|
||||
14
flow_field_tester.tscn
Normal file
14
flow_field_tester.tscn
Normal file
@@ -0,0 +1,14 @@
|
||||
[gd_scene format=3 uid="uid://dn50ruo00vbyt"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://io82eo46is7q" path="res://flow_field_tester.gd" id="1_rs8ix"]
|
||||
|
||||
[node name="Control" type="Control" unique_id=815879095]
|
||||
physics_interpolation_mode = 0
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
script = ExtResource("1_rs8ix")
|
||||
metadata/_custom_type_script = "uid://io82eo46is7q"
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=420705436]
|
||||
offset = Vector2(21.645, 26.07)
|
||||
transform = Transform2D(1, 0, 0, 1, 21.645, 26.07)
|
||||
12
generic_wood.tres
Normal file
12
generic_wood.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://bdlgg2ei0yrvd"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_f4i1m"]
|
||||
[ext_resource type="Texture2D" uid="uid://bs0lypwyo5jf6" path="res://crt_tree1_bark.png" id="2_dt32w"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_f4i1m")
|
||||
shader_parameter/albedo = ExtResource("2_dt32w")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 1.0
|
||||
10
level_magec.gd
Normal file
10
level_magec.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends Node3D
|
||||
|
||||
@export var level_scene: PackedScene
|
||||
@export var widget_scene: PackedScene
|
||||
@export var level_parent: Node3D
|
||||
@export var widget_parent: Node3D
|
||||
|
||||
|
||||
func create_widget(mesh: Mesh) -> void:
|
||||
pass
|
||||
1
level_magec.gd.uid
Normal file
1
level_magec.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b2ta3p7n7g1dx
|
||||
21
level_mageccc.tscn
Normal file
21
level_mageccc.tscn
Normal file
@@ -0,0 +1,21 @@
|
||||
[gd_scene format=3 uid="uid://cr2et2egnogvb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2ta3p7n7g1dx" path="res://level_magec.gd" id="1_w3kbw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cxarqns8onckw" path="res://crt.glb" id="2_75n78"]
|
||||
[ext_resource type="PackedScene" uid="uid://ca174636iktc6" path="res://Worlds/GreenPlanet/Levels/Bridge/bridge.glb" id="2_kfofo"]
|
||||
[ext_resource type="PackedScene" uid="uid://dse6msy2hrctc" path="res://wire_frame.tscn" id="3_kfofo"]
|
||||
|
||||
[node name="MainMenu" type="Node3D" unique_id=984017026 node_paths=PackedStringArray("level_parent", "widget_parent")]
|
||||
script = ExtResource("1_w3kbw")
|
||||
level_scene = ExtResource("2_kfofo")
|
||||
widget_scene = ExtResource("3_kfofo")
|
||||
level_parent = NodePath("Level")
|
||||
widget_parent = NodePath("ScreenWidget")
|
||||
|
||||
[node name="crt" parent="." unique_id=160903959 instance=ExtResource("2_75n78")]
|
||||
|
||||
[node name="ScreenWidget" type="Node3D" parent="." unique_id=1191885845]
|
||||
|
||||
[node name="Level" type="Node3D" parent="." unique_id=1122428329]
|
||||
|
||||
[editable path="crt"]
|
||||
BIN
steel1.png
Normal file
BIN
steel1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 489 B |
40
steel1.png.import
Normal file
40
steel1.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d02g31nntdjmw"
|
||||
path="res://.godot/imported/steel1.png-48f9afe4f43ffe832b24316c988ae25e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://steel1.png"
|
||||
dest_files=["res://.godot/imported/steel1.png-48f9afe4f43ffe832b24316c988ae25e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
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=false
|
||||
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=1
|
||||
80
unroll_mesh.gd
Normal file
80
unroll_mesh.gd
Normal file
@@ -0,0 +1,80 @@
|
||||
extends Object
|
||||
|
||||
func new_array_from_typeid(typeid: Variant.Type) -> Variant:
|
||||
return type_convert(null, typeid)
|
||||
|
||||
|
||||
func array_custom_granularity(custom_format: Mesh.ArrayCustomFormat) -> int:
|
||||
match custom_format:
|
||||
Mesh.ARRAY_CUSTOM_RGBA8_UNORM, Mesh.ARRAY_CUSTOM_RGBA8_SNORM, Mesh.ARRAY_CUSTOM_RG_HALF:
|
||||
return 4
|
||||
Mesh.ARRAY_CUSTOM_RGBA_HALF:
|
||||
return 8
|
||||
Mesh.ARRAY_CUSTOM_R_FLOAT:
|
||||
return 1
|
||||
Mesh.ARRAY_CUSTOM_RG_FLOAT:
|
||||
return 2
|
||||
Mesh.ARRAY_CUSTOM_RGB_FLOAT:
|
||||
return 3
|
||||
Mesh.ARRAY_CUSTOM_RGBA_FLOAT:
|
||||
return 4
|
||||
return 0
|
||||
|
||||
|
||||
func array_granularity(arr_id: Mesh.ArrayType, format: Mesh.ArrayFormat) -> int:
|
||||
match arr_id:
|
||||
Mesh.ARRAY_VERTEX, Mesh.ARRAY_NORMAL, Mesh.ARRAY_COLOR, Mesh.ARRAY_TEX_UV, Mesh.ARRAY_TEX_UV2:
|
||||
return 1
|
||||
Mesh.ARRAY_TANGENT:
|
||||
return 4
|
||||
Mesh.ARRAY_CUSTOM0:
|
||||
return array_custom_granularity((format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK)
|
||||
Mesh.ARRAY_CUSTOM1:
|
||||
return array_custom_granularity((format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK)
|
||||
Mesh.ARRAY_CUSTOM2:
|
||||
return array_custom_granularity((format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK)
|
||||
Mesh.ARRAY_CUSTOM3:
|
||||
return array_custom_granularity((format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK)
|
||||
Mesh.ARRAY_BONES, Mesh.ARRAY_WEIGHTS:
|
||||
if (format & Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS) != 0:
|
||||
return 8
|
||||
else:
|
||||
return 4
|
||||
# Unhandled:
|
||||
# ARRAY_INDEX
|
||||
return 0
|
||||
|
||||
## "Unroll" array mesh.
|
||||
## Known limitations:
|
||||
## - ignores blend shapes
|
||||
## - ignores LODs
|
||||
func duplicate_vertices(input: ArrayMesh) -> ArrayMesh:
|
||||
var output: ArrayMesh = ArrayMesh.new()
|
||||
for surf: int in input.get_surface_count():
|
||||
var arrays: Array = input.surface_get_arrays(surf)
|
||||
var indices: int = arrays[Mesh.ARRAY_INDEX]
|
||||
var format: Mesh.ArrayFormat = input.surface_get_format(surf)
|
||||
var new_arrays: Array = []
|
||||
new_arrays.resize(Mesh.ARRAY_MAX)
|
||||
|
||||
for arr_id: int in len(arrays):
|
||||
if arr_id == Mesh.ARRAY_INDEX: # this is the one we want to eliminate
|
||||
continue
|
||||
if arrays[arr_id] == null:
|
||||
continue
|
||||
var arr_in: Array = arrays[arr_id]
|
||||
var typeid: int = typeof(arr_in)
|
||||
var new_arr: Variant = new_array_from_typeid(typeid)
|
||||
assert(typeof(new_arr) == typeid)
|
||||
var granularity: int = array_granularity(arr_id, format)
|
||||
for idx: int in indices:
|
||||
for subidx: int in granularity:
|
||||
new_arr.push_back(arr_in[idx * granularity + subidx])
|
||||
|
||||
print(arr_id, ' ', typeid, ' ', granularity, ' ', len(arr_in), '->', len(new_arr))
|
||||
|
||||
new_arrays[arr_id] = new_arr
|
||||
|
||||
output.add_surface_from_arrays(input.surface_get_primitive_type(surf), new_arrays, [], {}, format & ~Mesh.ARRAY_FORMAT_INDEX)
|
||||
|
||||
return output
|
||||
1
unroll_mesh.gd.uid
Normal file
1
unroll_mesh.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://2q567ytsw7h0
|
||||
8
wire_frame.gd
Normal file
8
wire_frame.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
class_name WireFrame extends Node3D
|
||||
|
||||
@export var level_mesh: CSGMesh3D
|
||||
@export var blocker_mesh: CSGMesh3D
|
||||
|
||||
|
||||
func spawn_level(mesh: Mesh) -> void:
|
||||
pass
|
||||
1
wire_frame.gd.uid
Normal file
1
wire_frame.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b151rww6qt0nj
|
||||
22
wire_frame.tscn
Normal file
22
wire_frame.tscn
Normal file
@@ -0,0 +1,22 @@
|
||||
[gd_scene format=3 uid="uid://dse6msy2hrctc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b151rww6qt0nj" path="res://wire_frame.gd" id="1_54sar"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://dqu02w1dgudyq" path="res://brdigett.obj" id="2_se1r1"]
|
||||
[ext_resource type="Material" uid="uid://wr1vi6yfhxhg" path="res://Shaders/wireframe1.tres" id="3_0233w"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://bfmuypokxn5la" path="res://cube.obj" id="4_d7s2u"]
|
||||
[ext_resource type="Material" uid="uid://dvvs2q42dl4od" path="res://Shaders/wireframe2.tres" id="5_mv1ww"]
|
||||
|
||||
[node name="WireFrame" type="Node3D" unique_id=2007807907 node_paths=PackedStringArray("level_mesh", "blocker_mesh")]
|
||||
script = ExtResource("1_54sar")
|
||||
level_mesh = NodePath("CSGMesh3D")
|
||||
blocker_mesh = NodePath("CSGMesh3D2")
|
||||
|
||||
[node name="CSGMesh3D" type="CSGMesh3D" parent="." unique_id=1190322190]
|
||||
visible = false
|
||||
mesh = ExtResource("2_se1r1")
|
||||
material = ExtResource("3_0233w")
|
||||
|
||||
[node name="CSGMesh3D2" type="CSGMesh3D" parent="." unique_id=1566640748]
|
||||
visible = false
|
||||
mesh = ExtResource("4_d7s2u")
|
||||
material = ExtResource("5_mv1ww")
|
||||
36
wireframe_generator.gd
Normal file
36
wireframe_generator.gd
Normal file
@@ -0,0 +1,36 @@
|
||||
@tool
|
||||
extends EditorScenePostImport
|
||||
|
||||
const OUT_PATH: String = "res://wireframes/"
|
||||
|
||||
func _post_import(scene: Node) -> Object:
|
||||
var children: Array[Node] = scene.get_children()
|
||||
print('Updating meshes to wireframe ', scene.name)
|
||||
|
||||
for child: Node in children:
|
||||
if not is_instance_of(child, MeshInstance3D):
|
||||
continue
|
||||
|
||||
var mesh_in: ArrayMesh = child.mesh
|
||||
|
||||
assert(mesh_in.surface_get_primitive_type(0) == Mesh.PRIMITIVE_TRIANGLES)
|
||||
var mesh_out := MeshUtils.unroll_vertices(mesh_in, [Mesh.ARRAY_VERTEX, Mesh.ARRAY_TEX_UV, Mesh.ARRAY_CUSTOM0])
|
||||
assert(mesh_out.surface_get_primitive_type(0) == Mesh.PRIMITIVE_TRIANGLES)
|
||||
|
||||
var material := ShaderMaterial.new()
|
||||
material.shader = preload("res://shader.gdshader")
|
||||
mesh_out.surface_set_material(0, material)
|
||||
|
||||
#child.mesh = mesh_out
|
||||
#child.set_surface_override_material(0, material)
|
||||
#print('Updated ', child)
|
||||
|
||||
var filename_out := OUT_PATH + scene.name + ".res"
|
||||
#mesh_out.take_over_path(filename_out)
|
||||
ResourceSaver.save(mesh_out, filename_out)
|
||||
# doesn't seem to help
|
||||
#, ResourceSaver.SaverFlags.FLAG_CHANGE_PATH | ResourceSaver.SaverFlags.FLAG_REPLACE_SUBRESOURCE_PATHS)
|
||||
|
||||
break # only export first mesh
|
||||
|
||||
return scene # Return the modified root node when you're done.
|
||||
1
wireframe_generator.gd.uid
Normal file
1
wireframe_generator.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cas5vkde5k78e
|
||||
Reference in New Issue
Block a user