Skip to content

Commit

Permalink
Fix missing code changes (the-mirror-gdp#6)
Browse files Browse the repository at this point in the history
This was caused by a clone not pulling the most recent commit on head
  • Loading branch information
RevoluPowered committed Mar 16, 2024
1 parent d89a330 commit 204f875
Show file tree
Hide file tree
Showing 213 changed files with 2,380 additions and 1,539 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Godot 4+ specific ignores
.godot/

# System specific ignores
.directory
.DS_Store
*~

# NodeJS
node_modules

# System specific executables
*.exe
*.x86_64
*.arm64
*.app/
*.app.zip
*.app.zip
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/AnonymousPro-Bold.ttf-9d8fef4d357af5b52cd60af
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/AnonymousPro-BoldItalic.ttf-4274bf704d3d6b9cd
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/AnonymousPro-Italic.ttf-9989590b02137b799e13d
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/AnonymousPro-Regular.ttf-856c843fd6f89964d2ca
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/CourierPrime-Bold.ttf-1f003c66d63ebed70964e77
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/CourierPrime-BoldItalic.ttf-65ebcc61dd5e1dfa8
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/CourierPrime-Italic.ttf-baa9156a73770735a0f72
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/CourierPrime-Regular.ttf-3babe7e4a7a588dfc9a8
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/LobsterTwo-Bold.ttf-7c7f734103b58a32491a47881
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/LobsterTwo-BoldItalic.ttf-227406a33e84448e6aa
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/LobsterTwo-Italic.ttf-f93abf6c25390c85ad5fb6c
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/LobsterTwo-Regular.ttf-f3fcfa01cd671c8da433dd
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func _export_preflight(state: GLTFState, root: Node) -> Error:

func _export_node(state: GLTFState, _gltf_node: GLTFNode, json: Dictionary, node: Node) -> Error:
if node is ModelPrimitive:
var extensions: Dictionary = json.get_or_set_default("extensions", {})
var extensions: Dictionary = json.get_or_add("extensions", {})
var mi_model_ext: Dictionary = node.serialize_to_mi_model_gltf_extension()
extensions["MIRROR_model_primitive"] = mi_model_ext
state.add_used_extension("MIRROR_model_primitive", false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func _export_node(gltf_state: GLTFState, gltf_node: GLTFNode, json: Dictionary,
if scene_node == constraint.source_node:
constraint.source_node_index = i
break
var extensions: Dictionary = json.get_or_set_default("extensions", {})
var extensions: Dictionary = json.get_or_add("extensions", {})
extensions["VRMC_node_constraint"] = constraint.to_dictionary()
node.remove_meta(&"GLTFBoneNodeConstraint")
return OK
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
[feature_flags]
preview=true
hardcoded_servers=false
user_api_requests=false
show_advanced_settings=true
support_pck_uploads=false
map_builder=true
os_shell=false
suicide_keybinding=true
enable_space_listing_pages=true
the-mirror-tutorials=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ const OUTPUT_TABLE_HEADER: PackedStringArray = ["Output Name", "Data Type"]

const PAGE_HEADER: String = """---
sidebar_position: 3.9
title: Visual Scripting API Reference
sidebar_label: VS API Reference
note: This page is auto-generated from the script API, do not manually edit it. See res://addons/mirror_internal/script_api_dumper/script_api_dumper.gd in the Godot app.
---
# API Reference
# Visual Scripting API Reference
This page contains a reference of the entire visual scripting API available to you in The Mirror.
"""
Expand Down Expand Up @@ -107,7 +109,7 @@ static func all_script_blocks_to_markdown(script_blocks: Array[Dictionary]) -> S
var blocks_by_category: Dictionary = {}
for block in script_blocks:
var category_name: String = block.get("category", "Misc")
var category_blocks: Array = blocks_by_category.get_or_set_default(category_name, [])
var category_blocks: Array = blocks_by_category.get_or_add(category_name, [])
category_blocks.append(block)
var ret: String = ""
for category_name in blocks_by_category:
Expand Down
2 changes: 1 addition & 1 deletion mirror-godot-app/addons/omi_extensions/misc/omi_seat.gd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func _export_node(state: GLTFState, _gltf_node: GLTFNode, json: Dictionary, node
if node.has_meta(&"OMI_seat"):
var omi_seat_ext: Dictionary = _export_omi_seat(node.get_meta(&"OMI_seat"))
# Write to the GLTF node JSON.
var extensions: Dictionary = json.get_or_set_default("extensions", {})
var extensions: Dictionary = json.get_or_add("extensions", {})
extensions["OMI_seat"] = omi_seat_ext
state.add_used_extension("OMI_seat", false)
return OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ func _convert_scene_node(state: GLTFState, gltf_node: GLTFNode, scene_node: Node

func _get_or_create_state_constraints_in_state(state: GLTFState) -> Array:
var state_json: Dictionary = state.get_json()
var state_extensions: Dictionary = state_json.get_or_set_default("extensions", {})
var omi_physics_joint_doc_ext: Dictionary = state_extensions.get_or_set_default("OMI_physics_joint", {})
var state_extensions: Dictionary = state_json.get_or_add("extensions", {})
var omi_physics_joint_doc_ext: Dictionary = state_extensions.get_or_add("OMI_physics_joint", {})
state.add_used_extension("OMI_physics_joint", false)
var state_constraints: Array = omi_physics_joint_doc_ext.get_or_set_default("constraints", [])
var state_constraints: Array = omi_physics_joint_doc_ext.get_or_add("constraints", [])
return state_constraints


Expand Down Expand Up @@ -137,7 +137,7 @@ func _export_node(state: GLTFState, gltf_node: GLTFNode, json: Dictionary, _node
var gltf_physics_joint: GLTFPhysicsJoint = gltf_node.get_additional_data("GLTFPhysicsJoint")
if gltf_physics_joint == null:
return OK
var node_extensions = json.get_or_set_default("extensions", {})
var node_extensions = json.get_or_add("extensions", {})
var omi_physics_joint_node_ext: Dictionary = {}
# Populate the constraints.
var constraints: Array = gltf_physics_joint.get_constraints()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ func _convert_scene_node(state: GLTFState, gltf_node: GLTFNode, scene_node: Node

func _get_or_create_state_wheels_in_state(gltf_state: GLTFState) -> Array:
var state_json: Dictionary = gltf_state.get_json()
var state_extensions: Dictionary = state_json.get_or_set_default("extensions", {})
var omi_vehicle_wheel_ext: Dictionary = state_extensions.get_or_set_default("OMI_vehicle_wheel", {})
var state_extensions: Dictionary = state_json.get_or_add("extensions", {})
var omi_vehicle_wheel_ext: Dictionary = state_extensions.get_or_add("OMI_vehicle_wheel", {})
gltf_state.add_used_extension("OMI_vehicle_wheel", false)
var state_wheels: Array = omi_vehicle_wheel_ext.get_or_set_default("wheels", [])
var state_wheels: Array = omi_vehicle_wheel_ext.get_or_add("wheels", [])
return state_wheels


Expand All @@ -95,12 +95,12 @@ func _export_node(state: GLTFState, gltf_node: GLTFNode, node_json: Dictionary,
var gltf_vehicle_body: GLTFVehicleBody = gltf_node.get_additional_data(&"GLTFVehicleBody")
if gltf_vehicle_body != null:
gltf_vehicle_body.pilot_seat_index = _node_index_from_scene_node(state, gltf_vehicle_body.pilot_seat_node)
var node_extensions = node_json.get_or_set_default("extensions", {})
var node_extensions = node_json.get_or_add("extensions", {})
state.add_used_extension("OMI_vehicle_body", false)
node_extensions["OMI_vehicle_body"] = gltf_vehicle_body.to_dictionary()
var gltf_vehicle_wheel: GLTFVehicleWheel = gltf_node.get_additional_data(&"GLTFVehicleWheel")
if gltf_vehicle_wheel != null:
var node_extensions = node_json.get_or_set_default("extensions", {})
var node_extensions = node_json.get_or_add("extensions", {})
var state_wheels = _get_or_create_state_wheels_in_state(state)
var size = state_wheels.size()
var omi_vehicle_wheel_ext: Dictionary = {}
Expand Down
18 changes: 9 additions & 9 deletions mirror-godot-app/art/pcks/explosion01/explosion01.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
[ext_resource type="Texture2D" uid="uid://dfvy5ayk6pa8l" path="res://art/pcks/explosion01/images/colormap_explosion_5x5.png" id="1_sdkkw"]
[ext_resource type="Texture2D" uid="uid://4r6oiycrk55r" path="res://art/pcks/explosion01/images/flowmap_explosion-flow.png" id="2_47cur"]

[sub_resource type="JSphereShape3D" id="JSphereShape3D_y05nc"]
radius = 1.5

[sub_resource type="Shader" id="Shader_xomp8"]
code = "shader_type spatial;
render_mode blend_mix,diffuse_burley,specular_schlick_ggx,unshaded;
Expand Down Expand Up @@ -74,28 +77,25 @@ shader_parameter/texture_flowmap = ExtResource("2_47cur")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ndw05"]
emission_shape = 1
emission_sphere_radius = 2.5
emission_sphere_radius = 1.0
gravity = Vector3(0, 1, 0)
anim_speed_min = 1.0
anim_speed_max = 1.0

[sub_resource type="QuadMesh" id="QuadMesh_n15qf"]
size = Vector2(6, 6)

[sub_resource type="SphereShape3D" id="SphereShape3D_iccbm"]
radius = 0.8

[node name="Explosion01" type="StaticBody3D"]
[node name="Explosion01" type="JBody3D"]
body_mode = 0
shape = SubResource("JSphereShape3D_y05nc")
metadata/imported_jbody_mode = true

[node name="Explosion01" type="GPUParticles3D" parent="."]
material_override = SubResource("ShaderMaterial_5fry4")
amount = 7
speed_scale = 0.65
explosiveness = 0.03
randomness = 0.07
visibility_aabb = AABB(-2.99332, -3.00471, -3.1658, 5.78655, 6.55868, 6.36531)
process_material = SubResource("ParticleProcessMaterial_ndw05")
draw_pass_1 = SubResource("QuadMesh_n15qf")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.167677, 0)
shape = SubResource("SphereShape3D_iccbm")
34 changes: 15 additions & 19 deletions mirror-godot-app/art/pcks/fire/fire.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[gd_scene load_steps=52 format=3 uid="uid://bphc6yd3mfbrf"]

[ext_resource type="Shader" uid="uid://dbifx7w3uxmev" path="res://art/pcks/fire/fire.tres" id="1_kwp77"]
[ext_resource type="Texture2D" uid="uid://cwitpxm8ohkex" path="res://art/pcks/fire/PNG/flame_04.png" id="2_loap5"]
[ext_resource type="Texture2D" uid="uid://buqhqnkuixure" path="res://art/pcks/fire/PNG/trace_01.png" id="3_i8tqf"]
[ext_resource type="Texture2D" uid="uid://cwitpxm8ohkex" path="res://art/pcks/fire/png/flame_04.png" id="2_loap5"]
[ext_resource type="Texture2D" uid="uid://buqhqnkuixure" path="res://art/pcks/fire/png/trace_01.png" id="3_i8tqf"]

[sub_resource type="JSphereShape3D" id="JSphereShape3D_6dh5j"]

[sub_resource type="Gradient" id="Gradient_3uhp5"]
interpolation_mode = 2
Expand Down Expand Up @@ -50,11 +52,11 @@ point_count = 3
curve = SubResource("Curve_nowea")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_81otj"]
angle_min = -180.0
angle_max = 180.0
gravity = Vector3(0, 5, 0)
damping_min = 1.06
damping_max = 2.0
angle_min = -180.0
angle_max = 180.0
scale_curve = SubResource("CurveTexture_vcvfe")
color_ramp = SubResource("GradientTexture1D_cxj22")

Expand Down Expand Up @@ -364,32 +366,30 @@ curve = SubResource("Curve_jxraa")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hlrar"]
lifetime_randomness = 0.19
emission_shape = 2
emission_sphere_radius = 0.4
particle_flag_align_y = true
particle_flag_rotate_y = true
emission_shape = 2
emission_sphere_radius = 0.4
angle_min = -30.0
angle_max = 30.0
direction = Vector3(1, 0, 1)
spread = 144.2
gravity = Vector3(0, 7, 0)
initial_velocity_min = 0.5
initial_velocity_max = 1.0
gravity = Vector3(0, 7, 0)
radial_accel_min = -1.1
radial_accel_max = 1.06
angle_min = -30.0
angle_max = 30.0
scale_min = 0.1
scale_max = 0.25
scale_curve = SubResource("CurveTexture_h5pj0")
turbulence_noise_speed = Vector3(0.4, 0.5, 0.4)

[sub_resource type="QuadMesh" id="QuadMesh_kxsio"]

[sub_resource type="SphereShape3D" id="SphereShape3D_oyayp"]
radius = 0.419023

[node name="Fire" type="StaticBody3D"]
collision_layer = 1036
collision_mask = 240
[node name="Fire" type="JBody3D"]
body_mode = 0
shape = SubResource("JSphereShape3D_6dh5j")
metadata/imported_jbody_mode = true

[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
material_override = SubResource("ShaderMaterial_5jsy0")
Expand All @@ -414,7 +414,3 @@ draw_pass_1 = SubResource("QuadMesh_kxsio")
[node name="OmniLight3D" type="OmniLight3D" parent="."]
light_color = Color(1, 0.941176, 0.858824, 1)
omni_range = 1.90284

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(0.999806, 0.019686, 0, -0.019686, 0.999806, 0, 0, 0, 1, 0, 0, 0)
shape = SubResource("SphereShape3D_oyayp")
21 changes: 21 additions & 0 deletions mirror-godot-app/art/pcks/healthbar01/healthbar01.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends JBody3D

@onready var sprite_3d = $Sprite3D


func _ready():
sprite_3d.material_override = sprite_3d.material_override.duplicate()


func _process(delta):
var current_so: SpaceObject = Util.get_space_object(self)
if not is_instance_valid(current_so):
return
var so_name: String = current_so.get_space_object_name()
# name of current space object is id of object to attach to
var search = Zone.instance_manager.get_all_instances().filter(func(x): return so_name == x.name)
if search.size() != 1 or not is_instance_valid(search[0]):
return
var target = search[0]
var value = target.get_health()/100.0
sprite_3d.material_override.set_shader_parameter("health", value)
Loading

0 comments on commit 204f875

Please sign in to comment.