summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Alexsander <michaelalexsander@protonmail.com>2021-07-29 17:27:46 -0300
committerVille Skyttä <ville.skytta@iki.fi>2021-12-13 20:33:46 +0000
commit3c064c850488ede673cc87dfd5da29d36384b8f4 (patch)
treec452413205989fcd93f8c939e3695420dba0b90d
parent3a1162227ddae817aa3fdc71129790f345fc1140 (diff)
downloadshared-mime-info-3c064c850488ede673cc87dfd5da29d36384b8f4.tar.gz
Add Godot engine files
-rw-r--r--data/freedesktop.org.xml.in32
-rw-r--r--tests/mime-detection/list12
-rw-r--r--tests/mime-detection/project.godot18
-rw-r--r--tests/mime-detection/test.escn160
-rw-r--r--tests/mime-detection/test.gd16
-rw-r--r--tests/mime-detection/test.gdshader8
-rw-r--r--tests/mime-detection/test.resbin0 -> 973 bytes
-rw-r--r--tests/mime-detection/test.scnbin0 -> 471 bytes
-rw-r--r--tests/mime-detection/test.tres11
-rw-r--r--tests/mime-detection/test.tscn24
10 files changed, 280 insertions, 1 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index ee392fa0..0c0cf9d9 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -523,6 +523,38 @@ command to generate the output files.
<match type="string" value="(;FF[4]" offset="0"/>
</magic>
</mime-type>
+ <mime-type type="application/x-godot-project">
+ <comment>Godot Engine project</comment>
+ <sub-class-of type="text/plain"/>
+ <glob pattern="project.godot"/>
+ </mime-type>
+ <mime-type type="application/x-godot-resource">
+ <comment>Godot Engine resource</comment>
+ <glob pattern="*.res"/>
+ <glob pattern="*.tres"/>
+ <magic>
+ <match type="string" value="[gd_resource " offset="0"/>
+ </magic>
+ </mime-type>
+ <mime-type type="application/x-godot-scene">
+ <comment>Godot Engine scene</comment>
+ <glob pattern="*.scn"/>
+ <glob pattern="*.tscn"/>
+ <glob pattern="*.escn"/>
+ <magic>
+ <match type="string" value="[gd_scene " offset="0"/>
+ </magic>
+ </mime-type>
+ <mime-type type="application/x-godot-shader">
+ <comment>Godot Engine shader</comment>
+ <sub-class-of type="text/plain"/>
+ <glob pattern="*.gdshader"/>
+ </mime-type>
+ <mime-type type="application/x-gdscript">
+ <comment>GDScript script</comment>
+ <sub-class-of type="text/plain"/>
+ <glob pattern="*.gd"/>
+ </mime-type>
<mime-type type="application/xliff+xml">
<comment>XLIFF translation file</comment>
<acronym>XLIFF</acronym>
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 07eb9774..85eeb79c 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -869,6 +869,16 @@ test.pysu application/x-pyspread-spreadsheet
# Dart source code
test.dart text/x-dart oxo
+# Godot files
+project.godot application/x-godot-project ox
+test.res application/x-godot-resource ox
+test.tres application/x-godot-resource
+test.scn application/x-godot-scene ox
+test.tscn application/x-godot-scene
+test.escn application/x-godot-scene
+test.gdshader application/x-godot-shader ox
+test.gd application/x-gdscript ox
+
# Kotlin source code
test.kt text/x-kotlin ox
@@ -880,4 +890,4 @@ test.avifs image/avif
# Org-mode file
test.org text/org ox
# OpenZIM file
-test.zim application/x-openzim \ No newline at end of file
+test.zim application/x-openzim
diff --git a/tests/mime-detection/project.godot b/tests/mime-detection/project.godot
new file mode 100644
index 00000000..2291cdef
--- /dev/null
+++ b/tests/mime-detection/project.godot
@@ -0,0 +1,18 @@
+; Engine configuration file.
+; It's best edited using the editor UI and not directly,
+; since the parameters that go here are not all obvious.
+;
+; Format:
+; [section] ; section goes between []
+; param=value ; assign values to parameters
+
+config_version=4
+
+[application]
+
+config/name="New Game Project"
+config/icon="res://icon.png"
+
+[rendering]
+
+environment/default_environment="res://default_env.tres"
diff --git a/tests/mime-detection/test.escn b/tests/mime-detection/test.escn
new file mode 100644
index 00000000..fd65e461
--- /dev/null
+++ b/tests/mime-detection/test.escn
@@ -0,0 +1,160 @@
+[gd_scene load_steps=1 format=2]
+
+[sub_resource id=1 type="Shader"]
+
+resource_name = "Shader Nodetree"
+code = "shader_type spatial;
+render_mode blend_mix, depth_draw_always, cull_back, diffuse_burley, specular_schlick_ggx;
+
+
+
+void node_bsdf_principled(vec4 color, float subsurface, vec4 subsurface_color,
+ float metallic, float specular, float roughness, float clearcoat,
+ float clearcoat_roughness, float anisotropy, float transmission,
+ float IOR, out vec3 albedo, out float sss_strength_out,
+ out float metallic_out, out float specular_out,
+ out float roughness_out, out float clearcoat_out,
+ out float clearcoat_gloss_out, out float anisotropy_out,
+ out float transmission_out, out float ior) {
+ metallic = clamp(metallic, 0.0, 1.0);
+ transmission = clamp(transmission, 0.0, 1.0);
+
+ subsurface = subsurface * (1.0 - metallic);
+
+ albedo = mix(color.rgb, subsurface_color.rgb, subsurface);
+ sss_strength_out = subsurface;
+ metallic_out = metallic;
+ specular_out = pow((IOR - 1.0)/(IOR + 1.0), 2)/0.08;
+ roughness_out = roughness;
+ clearcoat_out = clearcoat * (1.0 - transmission);
+ clearcoat_gloss_out = 1.0 - clearcoat_roughness;
+ anisotropy_out = clamp(anisotropy, 0.0, 1.0);
+ transmission_out = (1.0 - transmission) * (1.0 - metallic);
+ ior = IOR;
+}
+
+void vertex () {
+}
+
+void fragment () {
+
+ // node: 'Principled BSDF'
+ // type: 'ShaderNodeBsdfPrincipled'
+ // input sockets handling
+ vec4 node0_in0_basecolor = vec4(0.800000011920929, 0.800000011920929,
+ 0.800000011920929, 1.0);
+ float node0_in1_subsurface = float(0.0);
+ vec3 node0_in2_subsurfaceradius = vec3(1.0, 0.20000000298023224,
+ 0.10000000149011612);
+ vec4 node0_in3_subsurfacecolor = vec4(0.800000011920929, 0.800000011920929,
+ 0.800000011920929, 1.0);
+ float node0_in4_metallic = float(0.0);
+ float node0_in5_specular = float(0.5);
+ float node0_in6_speculartint = float(0.0);
+ float node0_in7_roughness = float(0.4000000059604645);
+ float node0_in8_anisotropic = float(0.0);
+ float node0_in9_anisotropicrotation = float(0.0);
+ float node0_in10_sheen = float(0.0);
+ float node0_in11_sheentint = float(0.5);
+ float node0_in12_clearcoat = float(0.0);
+ float node0_in13_clearcoatroughness = float(0.029999999329447746);
+ float node0_in14_ior = float(1.4500000476837158);
+ float node0_in15_transmission = float(0.0);
+ float node0_in16_transmissionroughness = float(0.0);
+ vec4 node0_in17_emission = vec4(0.0, 0.0, 0.0, 1.0);
+ float node0_in18_alpha = float(1.0);
+ vec3 node0_in19_normal = NORMAL;
+ vec3 node0_in20_clearcoatnormal = vec3(0.0, 0.0, 0.0);
+ vec3 node0_in21_tangent = TANGENT;
+ // output sockets definitions
+ vec3 node0_bsdf_out0_albedo;
+ float node0_bsdf_out1_sss_strength;
+ float node0_bsdf_out3_specular;
+ float node0_bsdf_out2_metallic;
+ float node0_bsdf_out4_roughness;
+ float node0_bsdf_out5_clearcoat;
+ float node0_bsdf_out6_clearcoat_gloss;
+ float node0_bsdf_out7_anisotropy;
+ float node0_bsdf_out8_transmission;
+ float node0_bsdf_out9_ior;
+
+ node_bsdf_principled(node0_in0_basecolor, node0_in1_subsurface,
+ node0_in3_subsurfacecolor, node0_in4_metallic, node0_in5_specular,
+ node0_in7_roughness, node0_in12_clearcoat, node0_in13_clearcoatroughness,
+ node0_in8_anisotropic, node0_in15_transmission, node0_in14_ior,
+ node0_bsdf_out0_albedo, node0_bsdf_out1_sss_strength, node0_bsdf_out2_metallic,
+ node0_bsdf_out3_specular, node0_bsdf_out4_roughness, node0_bsdf_out5_clearcoat,
+ node0_bsdf_out6_clearcoat_gloss, node0_bsdf_out7_anisotropy,
+ node0_bsdf_out8_transmission, node0_bsdf_out9_ior);
+
+
+ ALBEDO = node0_bsdf_out0_albedo;
+ SSS_STRENGTH = node0_bsdf_out1_sss_strength;
+ SPECULAR = node0_bsdf_out3_specular;
+ METALLIC = node0_bsdf_out2_metallic;
+ ROUGHNESS = node0_bsdf_out4_roughness;
+ CLEARCOAT = node0_bsdf_out5_clearcoat;
+ CLEARCOAT_GLOSS = node0_bsdf_out6_clearcoat_gloss;
+ NORMAL = node0_in19_normal;
+ // uncomment it when you need it
+ // TRANSMISSION = vec3(1.0, 1.0, 1.0) * node0_bsdf_out8_transmission;
+ // uncomment it when you are modifing TANGENT
+ // TANGENT = normalize(cross(cross(node0_in21_tangent, NORMAL), NORMAL));
+ // BINORMAL = cross(TANGENT, NORMAL);
+ // uncomment it when you have tangent(UV) set
+ // ANISOTROPY = node0_bsdf_out7_anisotropy;
+}
+"
+
+[sub_resource id=2 type="ShaderMaterial"]
+
+resource_name = ""
+shader = SubResource(1)
+
+[sub_resource id=3 type="ArrayMesh"]
+
+resource_name = "Cube"
+surfaces/0 = {
+ "material":SubResource(2),
+ "primitive":4,
+ "arrays":[
+ Vector3Array(1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0),
+ Vector3Array(0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0),
+ FloatArray(-1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0),
+ null, ; no Vertex Colors,
+ Vector2Array(0.625, 0.5, 0.875, 0.5, 0.875, 0.25, 0.625, 0.25, 0.375, 0.25, 0.625, 0.25, 0.625, 0.0, 0.375, 0.0, 0.375, 1.0, 0.625, 1.0, 0.625, 0.75, 0.375, 0.75, 0.125, 0.5, 0.375, 0.5, 0.375, 0.25, 0.125, 0.25, 0.375, 0.5, 0.625, 0.5, 0.625, 0.25, 0.375, 0.25, 0.375, 0.75, 0.625, 0.75, 0.625, 0.5, 0.375, 0.5),
+ null, ; No UV2,
+ null, ; No Bones,
+ null, ; No Weights,
+ IntArray(0, 2, 1, 0, 3, 2, 4, 6, 5, 4, 7, 6, 8, 10, 9, 8, 11, 10, 12, 14, 13, 12, 15, 14, 16, 18, 17, 16, 19, 18, 20, 22, 21, 20, 23, 22)
+ ],
+ "morph_arrays":[]
+}
+
+[node type="Spatial" name="Scene"]
+
+[node name="Cube" type="MeshInstance" parent="."]
+
+mesh = SubResource(3)
+visible = true
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
+
+[node name="Light" type="OmniLight" parent="."]
+
+light_specular = 1.0
+light_color = Color(1.0, 1.0, 1.0, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 10.0
+omni_range = 40.0
+transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 4.07625, 5.90386, -1.00545)
+light_negative = false
+shadow_enabled = true
+
+[node name="Camera" type="Camera" parent="."]
+
+far = 100.0
+near = 0.1
+size = 7.31429
+projection = 0
+fov = 39.5978
+transform = Transform(0.685921, -0.324014, 0.651558, 0.0, 0.895396, 0.445271, -0.727676, -0.305421, 0.61417, 7.35889, 4.95831, 6.92579)
diff --git a/tests/mime-detection/test.gd b/tests/mime-detection/test.gd
new file mode 100644
index 00000000..1eccaec1
--- /dev/null
+++ b/tests/mime-detection/test.gd
@@ -0,0 +1,16 @@
+extends Node
+
+
+# Declare member variables here. Examples:
+# var a = 2
+# var b = "text"
+
+
+# Called when the node enters the scene tree for the first time.
+func _ready():
+ pass # Replace with function body.
+
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+#func _process(delta):
+# pass
diff --git a/tests/mime-detection/test.gdshader b/tests/mime-detection/test.gdshader
new file mode 100644
index 00000000..4150990e
--- /dev/null
+++ b/tests/mime-detection/test.gdshader
@@ -0,0 +1,8 @@
+shader_type spatial;
+render_mode skip_vertex_transform;
+
+void vertex() {
+ // Disable the built-in modelview transform and do it manually.
+ VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
+ NORMAL = normalize((MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
+}
diff --git a/tests/mime-detection/test.res b/tests/mime-detection/test.res
new file mode 100644
index 00000000..93adbb4b
--- /dev/null
+++ b/tests/mime-detection/test.res
Binary files differ
diff --git a/tests/mime-detection/test.scn b/tests/mime-detection/test.scn
new file mode 100644
index 00000000..654bfda1
--- /dev/null
+++ b/tests/mime-detection/test.scn
Binary files differ
diff --git a/tests/mime-detection/test.tres b/tests/mime-detection/test.tres
new file mode 100644
index 00000000..0aa46492
--- /dev/null
+++ b/tests/mime-detection/test.tres
@@ -0,0 +1,11 @@
+[gd_resource type="Environment" load_steps=2 format=2]
+
+[sub_resource type="ProceduralSky" id=1]
+sun_color = Color( 0.972549, 0.905882, 0.611765, 1 )
+sun_energy = 2.0
+
+[resource]
+background_mode = 2
+background_sky = SubResource( 1 )
+background_energy = 4.0
+fog_enabled = true
diff --git a/tests/mime-detection/test.tscn b/tests/mime-detection/test.tscn
new file mode 100644
index 00000000..d24e4060
--- /dev/null
+++ b/tests/mime-detection/test.tscn
@@ -0,0 +1,24 @@
+[gd_scene load_steps=2 format=2]
+
+[ext_resource path="res://test.gd" type="Script" id=1]
+
+[node name="Root" type="Node"]
+script = ExtResource( 1 )
+
+[node name="Spatial" type="Spatial" parent="."]
+visible = false
+
+[node name="Control" type="Control" parent="."]
+margin_right = 40.0
+margin_bottom = 40.0
+__meta__ = {
+"_edit_lock_": true,
+"_edit_use_anchors_": false
+}
+
+[node name="Node2D" type="Node2D" parent="."]
+__meta__ = {
+"_edit_group_": true
+}
+
+[node name="Sprite" type="Sprite" parent="Node2D"]