Skip to content

Commit

Permalink
Update template dependencies. (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Malcolmnixon authored Jul 7, 2024
1 parent b40f670 commit 13fba1b
Show file tree
Hide file tree
Showing 90 changed files with 866 additions and 649 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/gdlint-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,23 @@ jobs:
runs-on: ubuntu-latest

steps:
# Check out the repository
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Ensure python is installed
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

# Install gdtoolkit
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install 'gdtoolkit==4.*'
# Lint the components
- name: Lint Godot XR Template Components
run: |
gdlint components
Expand Down
5 changes: 5 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 4.3.0
- Upgrade Godot XR Tools to 4.3.3
- Upgrade Godot OpenXR Vendors to 2.0.4
- Added WebXR Export

# 4.2.0
- Upgrade to Godot 4.2
- Upgrade Godot XR Tools to 4.3.0
Expand Down
1 change: 1 addition & 0 deletions addons/godot-xr-tools/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ Other people who have helped out by submitting fixes, enhancements, etc are:
- [Carlos Padial](https://github.com/surreal6)
- [Julian Todd](https://github.com/goatchurchprime)
- [Kai Tödter](https://github.com/toedter)
- [Sam Sarette](https://github.com/lunarcloud)

Want to be on this list? We would love your help.
13 changes: 13 additions & 0 deletions addons/godot-xr-tools/VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 4.3.3
- Fix Viewport2Din3D property forwarding

# 4.3.2
- Move fade logic into effect
- Added collision fade support
- Added fix for slowly sliding on slopes
- Added fix for ground-control preventing jumping over objects
- Added property forwarding for Viewport2Din3D
- Added fix for open/close poses
- Added rumble manager for haptic feedback
- Fix unreliable wall-walking collision

# 4.3.1
- Fix saving project when using plugin-tools to set physics layers or enable OpenXR
- Fix updating the editor-preview hand-pose
Expand Down
1 change: 1 addition & 0 deletions addons/godot-xr-tools/editor/icons/rumble.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions addons/godot-xr-tools/editor/icons/rumble.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dsexrsb8t0vi2"
path="res://.godot/imported/rumble.svg-104961f6551a931675972887ab17d2bc.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/godot-xr-tools/editor/icons/rumble.svg"
dest_files=["res://.godot/imported/rumble.svg-104961f6551a931675972887ab17d2bc.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
79 changes: 79 additions & 0 deletions addons/godot-xr-tools/effects/fade.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
@tool
class_name XRToolsFade
extends Node3D


## XR Tools Fade Script
##
## This script manages fading the view.


# Dictionary of fade requests
var _faders : Dictionary = {}

# Fade update flag
var _update : bool = false

# Fade mesh
var _mesh : MeshInstance3D

# Fade shader material
var _material : ShaderMaterial


# Add support for is_xr_class on XRTools classes
func is_xr_class(name : String) -> bool:
return name == "XRToolsFade"


# Called when the fade node is ready
func _ready() -> void:
# Add to the fade_mesh group - in the future this should be replaced with
# static instances.
add_to_group("fade_mesh")

# Get the mesh and material
_mesh = $FadeMesh
_material = _mesh.get_surface_override_material(0)


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta : float) -> void:
# Skip if nothing to update
if not _update:
return

# Calculate the cumulative shade color
var fade := Color(1, 1, 1, 0)
var show := false
for whom in _faders:
var color := _faders[whom] as Color
fade = fade.blend(color)
show = true

# Set the shader and show if necessary
_material.set_shader_parameter("albedo", fade)
_mesh.visible = show
_update = false


# Set the fade level
func set_fade_level(p_whom : Variant, p_color : Color) -> void:
# Test if fading is needed
if p_color.a > 0:
# Set the fade level
_faders[p_whom] = p_color
_update = true
elif _faders.erase(p_whom):
# Fade erased
_update = true


## Set the fade level on the fade instance
static func set_fade(p_whom : Variant, p_color : Color) -> void:
# In the future this use of groups should be replaced by static instances.
var tree := Engine.get_main_loop() as SceneTree
for node in tree.get_nodes_in_group("fade_mesh"):
var fade := node as XRToolsFade
if fade:
fade.set_fade_level(p_whom, p_color)
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
shader_type spatial;
render_mode depth_test_disabled, skip_vertex_transform, unshaded, cull_disabled;

uniform float alpha = 0.0;
uniform vec4 albedo : source_color;

void vertex() {
POSITION = vec4(VERTEX.x, -VERTEX.y, 0.0, 1.0);
}

void fragment() {
ALBEDO = vec3(0.0, 0.0, 0.0);
ALPHA = alpha;
}
ALBEDO = albedo.rgb;
ALPHA = albedo.a;
}
21 changes: 21 additions & 0 deletions addons/godot-xr-tools/effects/fade.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[gd_scene load_steps=5 format=3 uid="uid://wtpox7m5vu2b"]

[ext_resource type="Script" path="res://addons/godot-xr-tools/effects/fade.gd" id="1_6667f"]
[ext_resource type="Shader" path="res://addons/godot-xr-tools/effects/fade.gdshader" id="1_tjen8"]

[sub_resource type="QuadMesh" id="QuadMesh_aqp6r"]
custom_aabb = AABB(-5000, -5000, -5000, 10000, 10000, 10000)
size = Vector2(2, 2)

[sub_resource type="ShaderMaterial" id="ShaderMaterial_xjgy8"]
render_priority = 50
shader = ExtResource("1_tjen8")
shader_parameter/albedo = Color(0, 0, 0, 1)

[node name="Fade" type="Node3D"]
script = ExtResource("1_6667f")

[node name="FadeMesh" type="MeshInstance3D" parent="."]
visible = false
mesh = SubResource("QuadMesh_aqp6r")
surface_material_override/0 = SubResource("ShaderMaterial_xjgy8")
2 changes: 1 addition & 1 deletion addons/godot-xr-tools/functions/movement_wall_walk.gd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const DEFAULT_MASK := 0b0000_0000_0000_0000_0000_0000_0000_1000
func physics_pre_movement(_delta: float, player_body: XRToolsPlayerBody):
# Test for collision with wall under feet
var wall_collision := player_body.move_and_collide(
player_body.up_player * -stick_distance, true, true, true)
player_body.up_player * -stick_distance, true)
if !wall_collision:
return

Expand Down
4 changes: 2 additions & 2 deletions addons/godot-xr-tools/hands/hand.gd
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func _update_pose() -> void:
if _animation_player.has_animation(open_name):
_animation_player.remove_animation(open_name)

_animation_player.add_animation(open_name, open_pose)
_animation_player.get_animation_library("").add_animation(open_name, open_pose)

var open_hand_obj : AnimationNodeAnimation = _tree_root.get_node("OpenHand")
if open_hand_obj:
Expand All @@ -355,7 +355,7 @@ func _update_pose() -> void:
if _animation_player.has_animation(closed_name):
_animation_player.remove_animation(closed_name)

_animation_player.add_animation(closed_name, closed_pose)
_animation_player.get_animation_library("").add_animation(closed_name, closed_pose)

var closed_hand_obj : AnimationNodeAnimation = _tree_root.get_node("ClosedHand1")
if closed_hand_obj:
Expand Down
2 changes: 2 additions & 0 deletions addons/godot-xr-tools/hands/model/Hand_Glove_L.gltf.import
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
2 changes: 2 additions & 0 deletions addons/godot-xr-tools/hands/model/Hand_Glove_R.gltf.import
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
2 changes: 2 additions & 0 deletions addons/godot-xr-tools/hands/model/Hand_Nails_L.gltf.import
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
2 changes: 2 additions & 0 deletions addons/godot-xr-tools/hands/model/Hand_Nails_R.gltf.import
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
2 changes: 2 additions & 0 deletions addons/godot-xr-tools/hands/model/Hand_low_L.gltf.import
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
2 changes: 2 additions & 0 deletions addons/godot-xr-tools/hands/model/Hand_low_R.gltf.import
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ 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
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
Loading

0 comments on commit 13fba1b

Please sign in to comment.