Skip to content

Commit

Permalink
Merge pull request #45 from patrickdown/rename-glasses-xrrig
Browse files Browse the repository at this point in the history
Rename Glasses to XRRig
  • Loading branch information
patrickdown authored Nov 14, 2023
2 parents d0c1df2 + c71f861 commit 064ac48
Show file tree
Hide file tree
Showing 48 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion example/T5Glasses.tscn → example.gd/ExampleXRRig.tscn
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class_name T5GlassesBase extends SubViewport
class_name T5XRRig extends SubViewport

@onready var wand = $Origin/Wand_1

Expand Down
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion example/main.tscn → example.gd/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 064ac48

Please sign in to comment.