diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml index bc23bc4..8cdd033 100644 --- a/.github/workflows/build-on-push.yml +++ b/.github/workflows/build-on-push.yml @@ -112,7 +112,7 @@ jobs: run: | mkdir plugin mkdir plugin/addons - cp -r source/example/addons/tiltfive plugin/addons + cp -r source/example.gd/addons/tiltfive plugin/addons cp source/LICENSE.txt plugin/addons/tiltfive cp source/CONTRIBUTORS.md plugin/addons/tiltfive cp source/CHANGES.md plugin/addons/tiltfive diff --git a/README.md b/README.md index d2043a8..aa9d9dc 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Scons should be run from an environment that has the Microsoft x64 development t > `scons target=[template_debug | template_release]` Build the shared library. Result is in `build\bin` -> `scons example target=[template_debug | template_release]` Copy build products to the `example\addons\tilt-five\bin` +> `scons example target=[template_debug | template_release]` Copy build products to the `example.gd\addons\tilt-five\bin` ## Starting with a new project diff --git a/SConstruct b/SConstruct index 8a16c0d..3fa320d 100644 --- a/SConstruct +++ b/SConstruct @@ -37,8 +37,8 @@ if env['platform'] == 'windows': source=sources, ) -f1 = env.Command('example/addons/tiltfive/bin/libgdtiltfive{}{}'.format(env['suffix'], env['SHLIBSUFFIX']), library, Copy('$TARGET', '$SOURCE') ) -f2 = env.Command('example/addons/tiltfive/bin/TiltFiveNative.dll', tilt_five_library_path + '/TiltFiveNative.dll', Copy('$TARGET', '$SOURCE') ) +f1 = env.Command('example.gd/addons/tiltfive/bin/libgdtiltfive{}{}'.format(env['suffix'], env['SHLIBSUFFIX']), library, Copy('$TARGET', '$SOURCE') ) +f2 = env.Command('example.gd/addons/tiltfive/bin/TiltFiveNative.dll', tilt_five_library_path + '/TiltFiveNative.dll', Copy('$TARGET', '$SOURCE') ) env.Alias('example', [f1, f2]) diff --git a/example/Controls.tscn b/example.gd/Controls.tscn similarity index 100% rename from example/Controls.tscn rename to example.gd/Controls.tscn diff --git a/example/T5Glasses.tscn b/example.gd/ExampleXRRig.tscn similarity index 98% rename from example/T5Glasses.tscn rename to example.gd/ExampleXRRig.tscn index 6c219b9..06fc2dc 100644 --- a/example/T5Glasses.tscn +++ b/example.gd/ExampleXRRig.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=17 format=3 uid="uid://dl3mv76qkuscf"] [ext_resource type="Script" path="res://XROrigin3D.gd" id="1_qprko"] -[ext_resource type="PackedScene" uid="uid://je0clrdu7o76" path="res://addons/tiltfive/scenes/T5GlassesBase.tscn" id="1_uq4nw"] +[ext_resource type="PackedScene" uid="uid://je0clrdu7o76" path="res://addons/tiltfive/scenes/T5XRRig.tscn" id="1_uq4nw"] [ext_resource type="Script" path="res://pointer_control.gd" id="2_qcruj"] [ext_resource type="PackedScene" uid="uid://dnx42xctfl3mx" path="res://Controls.tscn" id="3_udc3i"] [ext_resource type="PackedScene" uid="uid://b1cd3jc00rhal" path="res://addons/tiltfive/assets/T5GlassesModel.tscn" id="3_xuir6"] diff --git a/example/XROrigin3D.gd b/example.gd/XROrigin3D.gd similarity index 100% rename from example/XROrigin3D.gd rename to example.gd/XROrigin3D.gd diff --git a/example/addons/tiltfive/T5Interface.gd b/example.gd/addons/tiltfive/T5Interface.gd similarity index 100% rename from example/addons/tiltfive/T5Interface.gd rename to example.gd/addons/tiltfive/T5Interface.gd diff --git a/example/addons/tiltfive/T5Manager.gd b/example.gd/addons/tiltfive/T5Manager.gd similarity index 86% rename from example/addons/tiltfive/T5Manager.gd rename to example.gd/addons/tiltfive/T5Manager.gd index 18e57fa..262998a 100644 --- a/example/addons/tiltfive/T5Manager.gd +++ b/example.gd/addons/tiltfive/T5Manager.gd @@ -2,25 +2,25 @@ class_name T5Manager extends "res://addons/tiltfive/T5ManagerBase.gd" ## Create a instance of an XR rig for each pair of Tilt Five glasses ## -## This node will create an instance of the T5GlassesBase or derived scene +## This node will create an instance of the T5XRRig or derived scene ## for each pair of Tilt Five glasses that are found. The glasses ## scene is an XR rig with an SubViewport, T5Origin, Camera, and wand. -## If the glasses scene is not specified then T5GlassesBase.tscn is used. +## If the glasses scene is not specified then T5XRRig.tscn is used. ## ## This should be persistent. ## Signal when the glasses scene is added to the main scene -signal glasses_scene_was_added(glasses : T5GlassesBase) +signal glasses_scene_was_added(glasses : T5XRRig) ## Signal when the glasses scene is removed from the main scene -signal glasses_scene_will_be_removed(glasses : T5GlassesBase) +signal glasses_scene_will_be_removed(glasses : T5XRRig) const xr_origin_node := ^"Origin" const xr_camera_node := ^"Origin/Camera" const wand_node_list := [^"Origin/Wand_1", ^"Origin/Wand_2"] -## [PackedScene] that will instanced for a pair of Tilt Five glasses. Defaults to T5GlassesBase.tscn -@export var glasses_scene : PackedScene = preload("res://addons/tiltfive/scenes/T5GlassesBase.tscn") +## [PackedScene] that will instanced for a pair of Tilt Five glasses. Defaults to T5XRRig.tscn +@export var glasses_scene : PackedScene = preload("res://addons/tiltfive/scenes/T5XRRig.tscn") ## A [T5Gameboard] node in the scene that will be used to set the location and content scale of the ## [T5Origin] in the glasses scene diff --git a/example/addons/tiltfive/T5ManagerBase.gd b/example.gd/addons/tiltfive/T5ManagerBase.gd similarity index 100% rename from example/addons/tiltfive/T5ManagerBase.gd rename to example.gd/addons/tiltfive/T5ManagerBase.gd diff --git a/example/addons/tiltfive/T5ProjectSettings.gd b/example.gd/addons/tiltfive/T5ProjectSettings.gd similarity index 100% rename from example/addons/tiltfive/T5ProjectSettings.gd rename to example.gd/addons/tiltfive/T5ProjectSettings.gd diff --git a/example/addons/tiltfive/T5_Icon_RGB.svg.import b/example.gd/addons/tiltfive/T5_Icon_RGB.svg.import similarity index 100% rename from example/addons/tiltfive/T5_Icon_RGB.svg.import rename to example.gd/addons/tiltfive/T5_Icon_RGB.svg.import diff --git a/example/addons/tiltfive/assets/T5-glasses.glb b/example.gd/addons/tiltfive/assets/T5-glasses.glb similarity index 100% rename from example/addons/tiltfive/assets/T5-glasses.glb rename to example.gd/addons/tiltfive/assets/T5-glasses.glb diff --git a/example/addons/tiltfive/assets/T5-glasses.glb.import b/example.gd/addons/tiltfive/assets/T5-glasses.glb.import similarity index 100% rename from example/addons/tiltfive/assets/T5-glasses.glb.import rename to example.gd/addons/tiltfive/assets/T5-glasses.glb.import diff --git a/example/addons/tiltfive/assets/T5-wand.glb b/example.gd/addons/tiltfive/assets/T5-wand.glb similarity index 100% rename from example/addons/tiltfive/assets/T5-wand.glb rename to example.gd/addons/tiltfive/assets/T5-wand.glb diff --git a/example/addons/tiltfive/assets/T5-wand.glb.import b/example.gd/addons/tiltfive/assets/T5-wand.glb.import similarity index 100% rename from example/addons/tiltfive/assets/T5-wand.glb.import rename to example.gd/addons/tiltfive/assets/T5-wand.glb.import diff --git a/example/addons/tiltfive/assets/T5GlassesModel.tscn b/example.gd/addons/tiltfive/assets/T5GlassesModel.tscn similarity index 100% rename from example/addons/tiltfive/assets/T5GlassesModel.tscn rename to example.gd/addons/tiltfive/assets/T5GlassesModel.tscn diff --git a/example/addons/tiltfive/assets/T5WandModel.tscn b/example.gd/addons/tiltfive/assets/T5WandModel.tscn similarity index 100% rename from example/addons/tiltfive/assets/T5WandModel.tscn rename to example.gd/addons/tiltfive/assets/T5WandModel.tscn diff --git a/example/addons/tiltfive/assets/T5_border.glb b/example.gd/addons/tiltfive/assets/T5_border.glb similarity index 100% rename from example/addons/tiltfive/assets/T5_border.glb rename to example.gd/addons/tiltfive/assets/T5_border.glb diff --git a/example/addons/tiltfive/assets/T5_border.glb.import b/example.gd/addons/tiltfive/assets/T5_border.glb.import similarity index 100% rename from example/addons/tiltfive/assets/T5_border.glb.import rename to example.gd/addons/tiltfive/assets/T5_border.glb.import diff --git a/example/addons/tiltfive/assets/T5_border_XE.glb b/example.gd/addons/tiltfive/assets/T5_border_XE.glb similarity index 100% rename from example/addons/tiltfive/assets/T5_border_XE.glb rename to example.gd/addons/tiltfive/assets/T5_border_XE.glb diff --git a/example/addons/tiltfive/assets/T5_border_XE.glb.import b/example.gd/addons/tiltfive/assets/T5_border_XE.glb.import similarity index 100% rename from example/addons/tiltfive/assets/T5_border_XE.glb.import rename to example.gd/addons/tiltfive/assets/T5_border_XE.glb.import diff --git a/example/addons/tiltfive/assets/T5_border_XE_raised.glb b/example.gd/addons/tiltfive/assets/T5_border_XE_raised.glb similarity index 100% rename from example/addons/tiltfive/assets/T5_border_XE_raised.glb rename to example.gd/addons/tiltfive/assets/T5_border_XE_raised.glb diff --git a/example/addons/tiltfive/assets/T5_border_XE_raised.glb.import b/example.gd/addons/tiltfive/assets/T5_border_XE_raised.glb.import similarity index 100% rename from example/addons/tiltfive/assets/T5_border_XE_raised.glb.import rename to example.gd/addons/tiltfive/assets/T5_border_XE_raised.glb.import diff --git a/example/addons/tiltfive/assets/board.svg b/example.gd/addons/tiltfive/assets/board.svg similarity index 100% rename from example/addons/tiltfive/assets/board.svg rename to example.gd/addons/tiltfive/assets/board.svg diff --git a/example/addons/tiltfive/assets/board.svg.import b/example.gd/addons/tiltfive/assets/board.svg.import similarity index 100% rename from example/addons/tiltfive/assets/board.svg.import rename to example.gd/addons/tiltfive/assets/board.svg.import diff --git a/example/addons/tiltfive/assets/glasses.svg b/example.gd/addons/tiltfive/assets/glasses.svg similarity index 100% rename from example/addons/tiltfive/assets/glasses.svg rename to example.gd/addons/tiltfive/assets/glasses.svg diff --git a/example/addons/tiltfive/assets/glasses.svg.import b/example.gd/addons/tiltfive/assets/glasses.svg.import similarity index 100% rename from example/addons/tiltfive/assets/glasses.svg.import rename to example.gd/addons/tiltfive/assets/glasses.svg.import diff --git a/example/addons/tiltfive/assets/materials/Black.tres b/example.gd/addons/tiltfive/assets/materials/Black.tres similarity index 100% rename from example/addons/tiltfive/assets/materials/Black.tres rename to example.gd/addons/tiltfive/assets/materials/Black.tres diff --git a/example/addons/tiltfive/assets/materials/T5BorderMat.tres b/example.gd/addons/tiltfive/assets/materials/T5BorderMat.tres similarity index 100% rename from example/addons/tiltfive/assets/materials/T5BorderMat.tres rename to example.gd/addons/tiltfive/assets/materials/T5BorderMat.tres diff --git a/example/addons/tiltfive/assets/materials/T5_border_tex.png b/example.gd/addons/tiltfive/assets/materials/T5_border_tex.png similarity index 100% rename from example/addons/tiltfive/assets/materials/T5_border_tex.png rename to example.gd/addons/tiltfive/assets/materials/T5_border_tex.png diff --git a/example/addons/tiltfive/assets/materials/T5_border_tex.png.import b/example.gd/addons/tiltfive/assets/materials/T5_border_tex.png.import similarity index 100% rename from example/addons/tiltfive/assets/materials/T5_border_tex.png.import rename to example.gd/addons/tiltfive/assets/materials/T5_border_tex.png.import diff --git a/example/addons/tiltfive/assets/materials/White.tres b/example.gd/addons/tiltfive/assets/materials/White.tres similarity index 100% rename from example/addons/tiltfive/assets/materials/White.tres rename to example.gd/addons/tiltfive/assets/materials/White.tres diff --git a/example/addons/tiltfive/materials/highlight_overlay_material.tres b/example.gd/addons/tiltfive/materials/highlight_overlay_material.tres similarity index 100% rename from example/addons/tiltfive/materials/highlight_overlay_material.tres rename to example.gd/addons/tiltfive/materials/highlight_overlay_material.tres diff --git a/example/addons/tiltfive/plugin.cfg b/example.gd/addons/tiltfive/plugin.cfg similarity index 100% rename from example/addons/tiltfive/plugin.cfg rename to example.gd/addons/tiltfive/plugin.cfg diff --git a/example/addons/tiltfive/plugin.gd b/example.gd/addons/tiltfive/plugin.gd similarity index 100% rename from example/addons/tiltfive/plugin.gd rename to example.gd/addons/tiltfive/plugin.gd diff --git a/example/addons/tiltfive/scenes/T5Pointer.gd b/example.gd/addons/tiltfive/scenes/T5Pointer.gd similarity index 100% rename from example/addons/tiltfive/scenes/T5Pointer.gd rename to example.gd/addons/tiltfive/scenes/T5Pointer.gd diff --git a/example/addons/tiltfive/scenes/T5GlassesBase.gd b/example.gd/addons/tiltfive/scenes/T5XRRig.gd similarity index 84% rename from example/addons/tiltfive/scenes/T5GlassesBase.gd rename to example.gd/addons/tiltfive/scenes/T5XRRig.gd index cfeb497..17b15e0 100644 --- a/example/addons/tiltfive/scenes/T5GlassesBase.gd +++ b/example.gd/addons/tiltfive/scenes/T5XRRig.gd @@ -1,4 +1,4 @@ -class_name T5GlassesBase extends SubViewport +class_name T5XRRig extends SubViewport @onready var wand = $Origin/Wand_1 diff --git a/example/addons/tiltfive/scenes/T5GlassesBase.tscn b/example.gd/addons/tiltfive/scenes/T5XRRig.tscn similarity index 83% rename from example/addons/tiltfive/scenes/T5GlassesBase.tscn rename to example.gd/addons/tiltfive/scenes/T5XRRig.tscn index 5da1db5..2e4c656 100644 --- a/example/addons/tiltfive/scenes/T5GlassesBase.tscn +++ b/example.gd/addons/tiltfive/scenes/T5XRRig.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=2 format=3 uid="uid://je0clrdu7o76"] -[ext_resource type="Script" path="res://addons/tiltfive/scenes/T5GlassesBase.gd" id="1_tymyw"] +[ext_resource type="Script" path="res://addons/tiltfive/scenes/T5XRRig.gd" id="1_tymyw"] -[node name="T5GlassesBase" type="SubViewport"] +[node name="T5XRRig" type="SubViewport"] size = Vector2i(2, 2) render_target_update_mode = 0 script = ExtResource("1_tymyw") diff --git a/example/addons/tiltfive/scenes/helpers/PushBodyBase.gd b/example.gd/addons/tiltfive/scenes/helpers/PushBodyBase.gd similarity index 100% rename from example/addons/tiltfive/scenes/helpers/PushBodyBase.gd rename to example.gd/addons/tiltfive/scenes/helpers/PushBodyBase.gd diff --git a/example/addons/tiltfive/scenes/helpers/PushBodyBase.tscn b/example.gd/addons/tiltfive/scenes/helpers/PushBodyBase.tscn similarity index 100% rename from example/addons/tiltfive/scenes/helpers/PushBodyBase.tscn rename to example.gd/addons/tiltfive/scenes/helpers/PushBodyBase.tscn diff --git a/example/addons/tiltfive/scenes/helpers/SelectableBody.gd b/example.gd/addons/tiltfive/scenes/helpers/SelectableBody.gd similarity index 100% rename from example/addons/tiltfive/scenes/helpers/SelectableBody.gd rename to example.gd/addons/tiltfive/scenes/helpers/SelectableBody.gd diff --git a/example/addons/tiltfive/tiltfive.gdextension b/example.gd/addons/tiltfive/tiltfive.gdextension similarity index 100% rename from example/addons/tiltfive/tiltfive.gdextension rename to example.gd/addons/tiltfive/tiltfive.gdextension diff --git a/example/icon.png b/example.gd/icon.png similarity index 100% rename from example/icon.png rename to example.gd/icon.png diff --git a/example/icon.png.import b/example.gd/icon.png.import similarity index 100% rename from example/icon.png.import rename to example.gd/icon.png.import diff --git a/example/main.gd b/example.gd/main.gd similarity index 100% rename from example/main.gd rename to example.gd/main.gd diff --git a/example/main.tscn b/example.gd/main.tscn similarity index 99% rename from example/main.tscn rename to example.gd/main.tscn index 19c9256..857d1d6 100644 --- a/example/main.tscn +++ b/example.gd/main.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://main.gd" id="1_xvgge"] [ext_resource type="Script" path="res://addons/tiltfive/T5Manager.gd" id="2_dibvp"] -[ext_resource type="PackedScene" uid="uid://dl3mv76qkuscf" path="res://T5Glasses.tscn" id="3_i6xar"] +[ext_resource type="PackedScene" uid="uid://dl3mv76qkuscf" path="res://ExampleXRRig.tscn" id="3_i6xar"] [ext_resource type="Script" path="res://addons/tiltfive/scenes/helpers/SelectableBody.gd" id="3_jespo"] [ext_resource type="Material" uid="uid://blq3i2qbhoyum" path="res://addons/tiltfive/materials/highlight_overlay_material.tres" id="5_cq8r1"] diff --git a/example/pointer_control.gd b/example.gd/pointer_control.gd similarity index 100% rename from example/pointer_control.gd rename to example.gd/pointer_control.gd diff --git a/example/project.godot b/example.gd/project.godot similarity index 100% rename from example/project.godot rename to example.gd/project.godot