Merge pull request #157 from Nitwel/imp2
Add Mipmaps for text, improve and restructure code, upgrade to Godot 4.3
This commit is contained in:
commit
39bf59d78f
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 DmitriySalnikov
|
||||
Copyright (c) 2024 DmitriySalnikov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the Software), to deal
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
![icon](/images/icon.png)
|
||||
![icon](/images/icon_3d_128.png)
|
||||
|
||||
# Debug drawing utility for Godot
|
||||
|
||||
This is an add-on for debug drawing in 3D and for some 2D overlays, which is written in `C++` and can be used with `GDScript` or `C#`.
|
||||
|
||||
Based on my previous addon, which was developed only for C# https://github.com/DmitriySalnikov/godot_debug_draw_cs, and which was inspired by Zylann's GDScript addon https://github.com/Zylann/godot_debug_draw
|
||||
Based on my previous addon, which was developed [only for C#](https://github.com/DmitriySalnikov/godot_debug_draw_cs), and which was inspired by [Zylann's GDScript addon](https://github.com/Zylann/godot_debug_draw)
|
||||
|
||||
## [Documentation](https://dd3d.dmitriysalnikov.ru/docs/)
|
||||
|
||||
## [Godot 3 version](https://github.com/DmitriySalnikov/godot_debug_draw_3d/tree/godot_3)
|
||||
|
||||
|
@ -12,11 +14,11 @@ Based on my previous addon, which was developed only for C# https://github.com/D
|
|||
|
||||
Your support adds motivation to develop my public projects.
|
||||
|
||||
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/I2I53VZ2D)
|
||||
<a href="https://boosty.to/dmitriysalnikov/donate"><img src="./docs/images/boosty.png" alt="Boosty" width=150px/></a>
|
||||
|
||||
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/dmitriysalnikov)
|
||||
<img src="./docs/images/USDT-TRC20.png" alt="USDT-TRC20" width=150px/>
|
||||
|
||||
[<img src="https://upload.wikimedia.org/wikipedia/commons/8/8f/QIWI_logo.svg" alt="qiwi" width=90px/>](https://qiwi.com/n/DMITRIYSALNIKOV)
|
||||
<b>USDT-TRC20 TEw934PrsffHsAn5M63SoHYRuZo984EF6v</b>
|
||||
|
||||
## Features
|
||||
|
||||
|
@ -32,6 +34,7 @@ Your support adds motivation to develop my public projects.
|
|||
* Line
|
||||
* Line Path
|
||||
* Line with Arrow
|
||||
* Plane
|
||||
* Points
|
||||
* Position 3D (3 crossing axes)
|
||||
* Sphere
|
||||
|
@ -49,26 +52,32 @@ Overlay:
|
|||
Precompiled for:
|
||||
|
||||
* Windows
|
||||
* Linux
|
||||
* macOS
|
||||
* Android
|
||||
* Linux (built on Ubuntu 20.04)
|
||||
* macOS (10.14+)
|
||||
* Android (5.0+)
|
||||
* iOS
|
||||
* Web (Firefox not supported)
|
||||
|
||||
This addon also supports working with several World3D and different Viewports.
|
||||
|
||||
## [Interactive Web Demo](https://dd3d.dmitriysalnikov.ru/demo/)
|
||||
|
||||
[![screenshot_web](/images/screenshot_web.png)](https://dd3d.dmitriysalnikov.ru/demo/)
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> * Firefox most likely can't run this demo
|
||||
|
||||
## Download
|
||||
|
||||
To download, use the [Godot Asset Library](https://godotengine.org/asset-library/asset/1766) or download the archive by clicking the button at the top of the main repository page: `Code -> Download ZIP`, then unzip it to your project folder. Or use one of the stable versions from the [GitHub Releases](https://github.com/DmitriySalnikov/godot_debug_draw_3d/releases) page (just download one of the `Source Codes` in assets).
|
||||
|
||||
## Usage
|
||||
### Installation
|
||||
|
||||
* Close editor
|
||||
* Copy `addons/debug_draw_3d` to your `addons` folder, create it if the folder doesn't exist
|
||||
* Launch editor
|
||||
|
||||
### C\#
|
||||
|
||||
When you start the engine for the first time, bindings for `C#` will be generated automatically. If this does not happen, you can manually generate them through the `Project - Tools - Debug Draw` menu.
|
||||
|
||||
![project_tools_menu](/images/project_tools_menu.png)
|
||||
|
||||
## Examples
|
||||
|
||||
More examples can be found in the `examples_dd3d/` folder.
|
||||
|
@ -77,65 +86,29 @@ Simple test:
|
|||
|
||||
```gdscript
|
||||
func _process(delta: float) -> void:
|
||||
var _time = Time.get_ticks_msec() / 1000.0
|
||||
var box_pos = Vector3(0, sin(_time * 4), 0)
|
||||
var line_begin = Vector3(-1, sin(_time * 4), 0)
|
||||
var line_end = Vector3(1, cos(_time * 4), 0)
|
||||
var _time = Time.get_ticks_msec() / 1000.0
|
||||
var box_pos = Vector3(0, sin(_time * 4), 0)
|
||||
var line_begin = Vector3(-1, sin(_time * 4), 0)
|
||||
var line_end = Vector3(1, cos(_time * 4), 0)
|
||||
|
||||
DebugDraw3D.draw_box(box_pos, Vector3(1, 2, 1), Color(0, 1, 0))
|
||||
DebugDraw3D.draw_line(line_begin, line_end, Color(1, 1, 0))
|
||||
DebugDraw2D.set_text("Time", _time)
|
||||
DebugDraw2D.set_text("Frames drawn", Engine.get_frames_drawn())
|
||||
DebugDraw2D.set_text("FPS", Engine.get_frames_per_second())
|
||||
DebugDraw2D.set_text("delta", delta)
|
||||
```
|
||||
|
||||
```csharp
|
||||
public override void _Process(float delta)
|
||||
{
|
||||
var _time = Time.GetTicksMsec() / 1000.0f;
|
||||
var box_pos = new Vector3(0, Mathf.Sin(_time * 4f), 0);
|
||||
var line_begin = new Vector3(-1, Mathf.Sin(_time * 4f), 0);
|
||||
var line_end = new Vector3(1, Mathf.Cos(_time * 4f), 0);
|
||||
|
||||
DebugDraw3D.DrawBox(box_pos, new Vector3(1, 2, 1), new Color(0, 1, 0));
|
||||
DebugDraw3D.DrawLine(line_begin, line_end, new Color(1, 1, 0));
|
||||
DebugDraw2D.SetText("Time", _time);
|
||||
DebugDraw2D.SetText("Frames drawn", Engine.GetFramesDrawn());
|
||||
DebugDraw2D.SetText("FPS", Engine.GetFramesPerSecond());
|
||||
DebugDraw2D.SetText("delta", delta);
|
||||
}
|
||||
DebugDraw3D.draw_box(box_pos, Vector3(1, 2, 1), Color(0, 1, 0))
|
||||
DebugDraw3D.draw_line(line_begin, line_end, Color(1, 1, 0))
|
||||
DebugDraw2D.set_text("Time", _time)
|
||||
DebugDraw2D.set_text("Frames drawn", Engine.get_frames_drawn())
|
||||
DebugDraw2D.set_text("FPS", Engine.get_frames_per_second())
|
||||
DebugDraw2D.set_text("delta", delta)
|
||||
```
|
||||
|
||||
![screenshot_1](/images/screenshot_1.png)
|
||||
|
||||
## API
|
||||
|
||||
A list of all functions is available in the documentation inside the editor.
|
||||
This project has a separate [documentation](https://dd3d.dmitriysalnikov.ru/docs/) page.
|
||||
|
||||
Also, a list of all functions is available in the documentation inside the editor (see `DebugDraw3D` and `DebugDraw2D`).
|
||||
|
||||
![screenshot_4](/images/screenshot_4.png)
|
||||
|
||||
Besides `DebugDraw2D/3D`, you can also use `Dbg2/3`.
|
||||
|
||||
```gdscript
|
||||
DebugDraw3D.draw_box_xf(Transform3D(), Color.GREEN)
|
||||
Dbg3.draw_box_xf(Transform3D(), Color.GREEN)
|
||||
|
||||
DebugDraw2D.set_text("delta", delta)
|
||||
Dbg2.set_text("delta", delta)
|
||||
```
|
||||
|
||||
But unfortunately at the moment `GDExtension` does not support adding documentation.
|
||||
|
||||
## Exporting a project
|
||||
|
||||
Most likely, when exporting a release version of a game, you don't want to export the debug library along with it. But since there is still no `Conditional Compilation` in `GDScript`, so I decided to create a `dummy` library that has the same API as a regular library, but has minimal impact on performance, even if calls to its methods occur. The `dummy` library is used by default in the release version. However if you need to use debug rendering in the release version, then you can add the `forced_dd3d` feature when exporting. In this case, the release library with all the functionality will be used.
|
||||
|
||||
![export_features](/images/export_features.png)
|
||||
|
||||
In C#, these tags are not taken into account at compile time, so the Release build will use Runtime checks to disable draw calls. If you want to avoid this, you can manually specify the `FORCED_DD3D` symbol.
|
||||
|
||||
![csharp_compilation_symbols](/images/csharp_compilation_symbols.png)
|
||||
|
||||
## Known issues and limitations
|
||||
|
||||
Enabling occlusion culing can lower fps instead of increasing it. At the moment I do not know how to speed up the calculation of the visibility of objects.
|
||||
|
@ -155,29 +128,3 @@ The entire text overlay can only be placed in one corner, unlike `DataGraphs`.
|
|||
|
||||
`DebugDrawDemoScene.tscn` in play mode
|
||||
![screenshot_3](/images/screenshot_3.png)
|
||||
|
||||
## Build
|
||||
|
||||
As well as for the engine itself, you will need to configure the [environment](https://docs.godotengine.org/en/4.1/contributing/development/compiling/index.html).
|
||||
And also you need to apply several patches:
|
||||
|
||||
```bash
|
||||
cd godot-cpp
|
||||
git apply --ignore-space-change --ignore-whitespace ../patches/always_build_fix.patch
|
||||
git apply --ignore-space-change --ignore-whitespace ../patches/1165.patch
|
||||
# Optional
|
||||
## Build only the necessary classes
|
||||
git apply --ignore-space-change --ignore-whitespace ../patches/godot_cpp_exclude_unused_classes.patch
|
||||
## Faster build
|
||||
git apply --ignore-space-change --ignore-whitespace ../patches/unity_build.patch
|
||||
```
|
||||
|
||||
Then you can just run scons as usual:
|
||||
|
||||
```bash
|
||||
# build for the current system.
|
||||
# target=editor is used for both the editor and the debug template.
|
||||
scons target=editor dev_build=yes debug_symbols=yes
|
||||
# build for the android. ANDROID_NDK_ROOT is required in your environment variables.
|
||||
scons platform=android target=template_release arch=arm64v8
|
||||
```
|
||||
|
|
|
@ -1,55 +1,90 @@
|
|||
[configuration]
|
||||
|
||||
entry_symbol = "debug_draw_3d_library_init"
|
||||
compatibility_minimum = "4.1"
|
||||
compatibility_minimum = "4.1.3"
|
||||
reloadable = false
|
||||
|
||||
[dependencies]
|
||||
|
||||
# example.x86_64 = { "relative or absolute path to the dependency" : "the path relative to the exported project", }
|
||||
; example.x86_64 = { "relative or absolute path to the dependency" : "the path relative to the exported project", }
|
||||
; -------------------------------------
|
||||
; debug
|
||||
|
||||
macos = { }
|
||||
windows.x86_64 = { }
|
||||
linux.x86_64 = { }
|
||||
|
||||
web.wasm32 = {}
|
||||
|
||||
android.arm32 = { }
|
||||
android.arm64 = { }
|
||||
android.x86_32 = { }
|
||||
android.x86_64 = { }
|
||||
ios = {}
|
||||
|
||||
; -------------------------------------
|
||||
; release no debug draw
|
||||
|
||||
macos.template_release = { }
|
||||
windows.template_release.x86_64 = { }
|
||||
linux.template_release.x86_64 = { }
|
||||
|
||||
web.template_release.wasm32 = { }
|
||||
|
||||
android.template_release.arm32 = { }
|
||||
android.template_release.arm64 = { }
|
||||
android.template_release.x86_32 = { }
|
||||
android.template_release.x86_64 = { }
|
||||
ios.template_release = {}
|
||||
|
||||
; -------------------------------------
|
||||
; release forced debug draw
|
||||
|
||||
macos.template_release.forced_dd3d = { }
|
||||
windows.template_release.x86_64.forced_dd3d = { }
|
||||
linux.template_release.x86_64.forced_dd3d = { }
|
||||
|
||||
web.template_release.wasm32.forced_dd3d = { }
|
||||
ios.template_release.forced_dd3d = {}
|
||||
|
||||
[libraries]
|
||||
|
||||
macos = "libs/libdd3d.macos.editor.universal.dylib"
|
||||
; -------------------------------------
|
||||
; debug
|
||||
|
||||
macos = "libs/libdd3d.macos.editor.universal.framework"
|
||||
windows.x86_64 = "libs/libdd3d.windows.editor.x86_64.dll"
|
||||
linux.x86_64 = "libs/libdd3d.linux.editor.x86_64.so"
|
||||
|
||||
web.wasm32 = "libs/libdd3d.web.template_debug.wasm32.wasm"
|
||||
|
||||
android.arm32 = "libs/libdd3d.android.template_debug.arm32.so"
|
||||
android.arm64 = "libs/libdd3d.android.template_debug.arm64.so"
|
||||
android.x86_32 = "libs/libdd3d.android.template_debug.x86_32.so"
|
||||
android.x86_64 = "libs/libdd3d.android.template_debug.x86_64.so"
|
||||
ios = "libs/libdd3d.ios.template_debug.universal.dylib"
|
||||
|
||||
macos.template_release = "libs/libdd3d.macos.template_release.universal.dylib"
|
||||
; -------------------------------------
|
||||
; release no debug draw
|
||||
|
||||
macos.template_release = "libs/libdd3d.macos.template_release.universal.framework"
|
||||
windows.template_release.x86_64 = "libs/libdd3d.windows.template_release.x86_64.dll"
|
||||
linux.template_release.x86_64 = "libs/libdd3d.linux.template_release.x86_64.so"
|
||||
|
||||
web.template_release.wasm32 = "libs/libdd3d.web.template_release.wasm32.wasm"
|
||||
|
||||
android.template_release.arm32 = "libs/libdd3d.android.template_release.arm32.so"
|
||||
android.template_release.arm64 = "libs/libdd3d.android.template_release.arm64.so"
|
||||
android.template_release.x86_32 = "libs/libdd3d.android.template_release.x86_32.so"
|
||||
android.template_release.x86_64 = "libs/libdd3d.android.template_release.x86_64.so"
|
||||
ios.template_release = "libs/libdd3d.ios.template_release.universal.dylib"
|
||||
|
||||
macos.template_release.forced_dd3d = "libs/libdd3d.macos.template_release.universal.enabled.dylib"
|
||||
; -------------------------------------
|
||||
; release forced debug draw
|
||||
|
||||
macos.template_release.forced_dd3d = "libs/libdd3d.macos.template_release.universal.enabled.framework"
|
||||
windows.template_release.x86_64.forced_dd3d = "libs/libdd3d.windows.template_release.x86_64.enabled.dll"
|
||||
linux.template_release.x86_64.forced_dd3d = "libs/libdd3d.linux.template_release.x86_64.enabled.so"
|
||||
|
||||
android.template_release.arm32.forced_dd3d = "libs/libdd3d.android.template_release.arm32.enabled.so"
|
||||
android.template_release.arm64.forced_dd3d = "libs/libdd3d.android.template_release.arm64.enabled.so"
|
||||
android.template_release.x86_32.forced_dd3d = "libs/libdd3d.android.template_release.x86_32.enabled.so"
|
||||
android.template_release.x86_64.forced_dd3d = "libs/libdd3d.android.template_release.x86_64.enabled.so"
|
||||
web.template_release.wasm32.forced_dd3d = "libs/libdd3d.web.template_release.wasm32.enabled.wasm"
|
||||
ios.template_release.forced_dd3d = "libs/libdd3d.ios.template_release.universal.enabled.dylib"
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0fb41898f762f555f379bc351a0d2d82bc9cbf3b701a1f9fe8035646ddad44b5
|
||||
size 2928328
|
||||
oid sha256:978f336aeab12a1dbae7810d5b741d48d4dfacbb09795d822381c35d1d873ed9
|
||||
size 2130424
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1dfdb52ffe2e428ea0a0b9ff951b986546291f383f37c957d7de4c367f79892f
|
||||
size 2993032
|
||||
oid sha256:fe483e08b7c1dea385c44648eff6169d6cd82a082e7fa92a1558aff187017f18
|
||||
size 2081864
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5c580b7b4d44342c56d1990ab09358b63fa60cf99846a355c86ceb2cb5023b14
|
||||
size 3057172
|
||||
oid sha256:34ed0395761d9cf747349d6a0da81747ade72e8359eeff2cb9f577bf66db907c
|
||||
size 2270604
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b6c2b95269938e60e709539c8166cd9e5f450bd3fbd2b6bdfdf652fca3f594db
|
||||
size 2977744
|
||||
oid sha256:1fb3bf518db7c16cd08ec134c15bc45a909f183392820d2cff03674442cebfd5
|
||||
size 2088832
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c40f93bd53bc4b132d075f18814b1198e71df6b9f2601c11f0cfbc2494698cf
|
||||
size 1804756
|
||||
oid sha256:2b8175a62d44c4fd39d0003b17aef3da9157d70049dc586ed1c7a06920482d7c
|
||||
size 1119180
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0181cc7c1a08ecc39de983b1b1e35f66572479da533f744190fa803cbde44612
|
||||
size 2001576
|
||||
oid sha256:d7176ff1995b280131ce6e9157a820adb2680a5e00a38edf9b8a2b362a720321
|
||||
size 1197480
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:24497f5a2ad8a7d99e2acb62d6c526017d7c365f8fd7fd6ae3042d96bd6e980a
|
||||
size 1996072
|
||||
oid sha256:7804c45cc8457c01ceac20f3d076d63e723b9ff526bff4b490cb03038f60ae62
|
||||
size 1293232
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6eab3ff00fc2d7347a6b166e67a3800d6117fa84bcfa3317429d6e0bff896654
|
||||
size 2028472
|
||||
oid sha256:7963d06c72a3c89c84118c40f585a084d676e59e9e354f2d8f54d1340d8b1ec1
|
||||
size 1230440
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:354cf1623f4d5f4f04f352bb6a6d661d0b6837fecfe566946e215fe549edb23c
|
||||
size 958088
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d4f164f9e56953e805ae68472d91a4473e894952736cb3c34c1307df81748275
|
||||
size 645216
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1d159c981d0f12b3083e50a9883842e99997403fbae35be0a1ec73cde4d687d4
|
||||
size 941448
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9b39c1ca40f0a22e66e742daba8e050884caa7a3ff959824b0c99a7e061fd869
|
||||
size 3806144
|
||||
oid sha256:1a72e1c797dfc643b589ef90a2f28b423a374420f2305f14130602c2f6a51d7e
|
||||
size 3126080
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4bfbec2037276c6858cbfc4019bb0381eb9bd83cdcdfcfa3cc802bfc0d5f427b
|
||||
size 3072224
|
||||
oid sha256:17cc6ed1e9f3ec13b5c45b8326e0c625510c12f2a67643a6dda343908263cc70
|
||||
size 2239208
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7efcb3de6de7d5a878c4a221931a94a74f3741a6aeb7d7e9a4f19fb07bf1115c
|
||||
size 2193840
|
||||
oid sha256:1ea1c91354de2e491548673778e5ecf04c705614431bcc01b3104cdde223eb6f
|
||||
size 1403568
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:818647a1234354725573918ce71972193812dd19d9ffb4bbe35f4a17ff48341f
|
||||
size 5739144
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>libdd3d.macos.editor.universal</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Debug Draw 3D</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Debug Draw 3D</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>ru.dmitriysalnikov.dd3d</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) Dmitriy Salnikov.</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.4.1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.1</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Binary file not shown.
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5bbf87c77f9c9fe6643948257e91f271825a2874172c97cdbd915a6203a6eff3
|
||||
size 3339680
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b0f280b00b057266534e477e4b33e476f108b41d1927d4db39e8d1e3a781adc5
|
||||
size 4689496
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>libdd3d.macos.template_release.universal.enabled</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Debug Draw 3D</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Debug Draw 3D</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>ru.dmitriysalnikov.dd3d</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) Dmitriy Salnikov.</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.4.1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.1</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Binary file not shown.
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>libdd3d.macos.template_release.universal</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Debug Draw 3D</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Debug Draw 3D</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>ru.dmitriysalnikov.dd3d</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) Dmitriy Salnikov.</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.4.1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4.1</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ac3ac3647171c53e2f47564df2e25eff19fbfab8bf763d0078fe1c82476d8761
|
||||
size 1291264
|
||||
oid sha256:8b5d2a0b653d41b603acbf68a8bc1d681c114e592d0ce6379abeb256350c8919
|
||||
size 1543168
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3d3113daaa53fe431ca8ce55f127c0e41ef4243ab5aadd359dc6d2c63b31f057
|
||||
size 680448
|
||||
oid sha256:16e0f6b6bdbea5a57f6ea0b6d205d85fed55b5a436740d902cb17760494260de
|
||||
size 663040
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:af5ae3a80d09e6212d21e4cf608aa38f711d230914918d0f2f427bdcc5488e24
|
||||
size 862208
|
||||
oid sha256:d1290dd070bb6255caa4aabfe9346f1b7eb16f1f00b12770751c0a37947ab828
|
||||
size 961536
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ac3ac3647171c53e2f47564df2e25eff19fbfab8bf763d0078fe1c82476d8761
|
||||
size 1291264
|
||||
oid sha256:8b5d2a0b653d41b603acbf68a8bc1d681c114e592d0ce6379abeb256350c8919
|
||||
size 1543168
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:59d5063a65a06775814e6a8d0ce94ba11292e6d262fd908d4e9511bd08d3879f
|
||||
size 1545632
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e82ab01c93b949e0ba617774946dcdd7f2706253ee880d90a76e29db5ce742e1
|
||||
size 1421072
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c70e5b762ad7e6a252d05b7942979b6e3fb6ff3954f519ef62de0d9babb5ce35
|
||||
size 1711880
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:32a3af490a43567c353013f5a5d453c0fc415715a91de67931cfde1d608c7064
|
||||
size 1645056
|
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:726491737bb6a42253fae56d22d51c43b2ca2ee6a0e0b5bc77b18683a388b8c6
|
||||
size 2367488
|
||||
oid sha256:6ce9734e2f9ae8ce55b1eafb5b798cf4fa00f4e69829355aaf8b9b8b2a56481b
|
||||
size 1219584
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0d209ab5f1224b52f0e5c523a26c7dd0be853762c53cd54241eba48cd0148e75
|
||||
size 2343936
|
||||
oid sha256:7ec8f5fa085da2d53df1f9350ac602f359eded02e8dfd8af4b5f26585298491a
|
||||
size 1025536
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,48 +0,0 @@
|
|||
# Change history for the Godot OpenXR loaders asset
|
||||
|
||||
## 3.0.0
|
||||
- Merge GDExtension into a single implementation
|
||||
- Upgrade Android, Gradle, Godot and Kotlin dependencies
|
||||
- Add XR_FB_face_tracking support
|
||||
- Update to OpenXR 1.0.34 headers
|
||||
- Add XR_FB_render_model extension wrapper and OpenXRFBRenderModel node
|
||||
- Add XR_FB_passthrough extension wrapper
|
||||
- Add XR_FB_hand_tracking_mesh extension wrapper and OpenXRFbHandTrackingMesh node
|
||||
- Add XR_FB_hand_tracking_aim support
|
||||
- Update Meta OpenXR mobile SDK to version 62
|
||||
|
||||
## 2.0.3
|
||||
- Migrate the export scripts from gdscript to C++ via gdextension
|
||||
- Manually request eye tracking permission if it's included in the app manifest
|
||||
- Change how singletons are accessed
|
||||
- Fix the plugin version for the export plugins
|
||||
- Add OpenXR extension wrappers for fb_scene, fb_spatial_entity, fb_spatial_entity_query, fb_spatial_entity_container
|
||||
|
||||
## 2.0.0
|
||||
- Update to the new Godot 4.2 Android plugin packaging format
|
||||
- Update the plugin to Godot v2 Android plugin
|
||||
- Update to the Godot 4.2 Android library
|
||||
- Add warning when multiple loaders are selected
|
||||
- Add configs for the OpenXR Eye gaze interaction extension
|
||||
- Add the ability to customize supported Meta devices
|
||||
- Add support for Quest 3 devices
|
||||
- Update the directory structure for the v2 plugin
|
||||
- Update Meta OpenXR mobile SDK to version 57
|
||||
- Update the java version to 17
|
||||
- Rename the plugin to 'Godot OpenXR Vendors'
|
||||
- Add godot-cpp dependency
|
||||
- Add OpenXR 1.0.30 headers
|
||||
- Add support for the Meta scene capture API (Donated by [Migeran](https://migeran.com))
|
||||
|
||||
## 1.1.0
|
||||
- Update Meta OpenXR loader to version 54
|
||||
- Update PICO OpenXR loader to version 2.2.0
|
||||
- Bump dependencies versions to match the latest Godot 4.x stable version (v4.0.3)
|
||||
|
||||
## 1.0.0
|
||||
- First version
|
||||
- Added support for Meta Quest loader
|
||||
- Added support for Pico loader
|
||||
- Added support for Khronos loader (Magic Leap 2, HTC, etc.)
|
||||
- Added support for Lynx loader
|
||||
- Add logic to automatically publish the Godot OpenXR loaders libraries to mavencentral on release
|
|
@ -1,203 +0,0 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
Copyright © Facebook Technologies, LLC and its affiliates. All rights reserved.
|
||||
|
||||
Your use of this SDK or tool is subject to the Oculus SDK License Agreement, available at https://developer.oculus.com/licenses/oculussdk/
|
|
@ -1,63 +0,0 @@
|
|||
The Pico OpenXR loader binary is part of the [Pico OpenXR SDK](https://developer-global.pico-interactive.com/sdk?deviceId=1&platformId=3&itemId=11) v2.2.0 licensed under the "PICO IMMERSIVE PTE. LTD – SDK LICENSE TERMS" printed below. In communication with Godot developers, Pico explicitly clarified that the redistribution of the loader binary as part of the Godot export plugin and its repositories is permitted under these terms.
|
||||
|
||||
---
|
||||
|
||||
# PICO IMMERSIVE PTE. LTD – SDK LICENSE TERMS
|
||||
|
||||
These license terms are between You ("You") and Pico Immersive Pte. Ltd ("Pico") regarding Your use of the Pico Software Development Kit and any associated documentation, software code or other materials made available by Pico (collectively referred to in this agreement as the "SDK").
|
||||
|
||||
The SDK is made available by PICO to enable developers to build software applications for the Pico Platform.
|
||||
|
||||
BY INSTALLING, ACCESSING OR OTHERWISE USING THE SDK, YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT AND CONSENT TO THE TRANSMISSION OF CERTAIN COMPUTER INFORMATION DURING USE AND FOR INTERNET-BASED SERVICES. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE AGREEMENT, DO NOT INSTALL, ACCESS OR USE THE SDK.
|
||||
|
||||
1. _Installation._ You may install and use any number of copies of the SDK on your devices to design, develop and test your programs. Each copy must be complete, including all copyright and trademark notices. You must require end users to agree to terms of use that protect the SDK as much as these License terms.
|
||||
|
||||
2. _Use._ You may use the SDK solely for the purpose of creating "Authorized Applications" which for the purpose of this license are applications, such as client-based applications, in object code form that are designed to run on PICO hardware devices. You are not authorized to pre-install or embed applications created using this SDK on third-party devices. You may not rent, lease or lend any of Your rights in the SDK or access to the Pico Services. You may reproduce the SDK, provided that You reproduce only complete copies, including without limitation all "read me" files, copyright notices, and other legal notices and terms that Pico has included in the SDK, and provided that You may not distribute any copy You make of the SDK.
|
||||
|
||||
3. _Scope of License._ The SDK is licensed, not sold. This license only gives You some rights to use the SDK. Pico reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the SDK only as expressly permitted in this license. In doing so, You must comply with any technical limitations in the SDK that only allow You to use it in certain ways. You may not:
|
||||
|
||||
3.1. work around any technical limitations in the SDK;
|
||||
|
||||
3.2. reverse engineer, decompile or disassemble the SDK, except and only to the extent that applicable law expressly permits, despite this limitation;
|
||||
|
||||
3.3. make more copies of the SDK than specified in this license or allowed by, except and only to the extent applicable law expressly permits, despite this limitation; or
|
||||
|
||||
3.4. publish the SDK for others to copy.
|
||||
|
||||
4. _Use of the services._ Your use of the Pico Services is governed by the then-current TOUs which can be found on: https://developer-global.pico-interactive.com/terms. If any SDK for which You are granted rights hereunder make use of the Pico Services (as governed by the applicable TOU), then those SDK rights are granted subject to your compliance with the applicable TOU.
|
||||
|
||||
5. _EXPORT RESTRICTIONS._ THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGdlATIONS. YOU MUST COMPLY WITH ALL UNITED STATES, AND INTERNATIONAL EXPORT LAWS AND REGdlATIONS, WHICH INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
|
||||
|
||||
6. _Support._ Pico is not obligated to provide any technical or other support ("Support Services") for the SDK or Pico Services to You. However, if Pico chooses to provide any Support Services to You, Your use of such Support Services will be governed by then-current Pico policies. With respect to any technical or other information You provide to Pico in connection with the Support Services, You agree that Pico has an unrestricted right to use such information for its business purposes, including for product support and development. Pico will not use such information in a form that personally identifies You.
|
||||
|
||||
7. _Fees._ Pico may choose in the future to charge for use of the SDK and/or Services. If Pico in its sole discretion chooses to establish fees and payment terms for such use, Pico will provide notice of such terms as provided in Section 10 below, and You may elect to stop using the SDK and/or Services rather than incurring fees.
|
||||
|
||||
8. _Termination._ Pico reserves the right to discontinue offering the SDK and Pico Services or to modify the SDK and Pico Services at any time in its sole discretion. If You are dissatisfied with any aspect of the SDK or Pico Services at any time, Your sole and exclusive remedy is to cease using them. Notwithstanding anything contained in the license to the contrary, Pico may also, in its sole discretion, terminate or suspend access to the SDK and Pico Services to You or any end user at any time. You acknowledge that termination and/or monetary damages may not be a sufficient remedy if You breach this license and that Pico will be entitled, without waiving any other rights or remedies, to injunctive or equitable relief as may be deemed proper by a court of competent jurisdiction in the event of a breach. Sections 8, 9, 11, 13 and 14 will survive termination of this license or any discontinuation of the offering of the SDK or Pico Services, along with any other provisions that wodld reasonably be deemed to survive such events.
|
||||
|
||||
9. _Reservation of Rights._ Except for the licenses expressly granted under this license, Pico and its suppliers retain all right, title and interest in and to the SDK, Pico Services, and all intellectual property rights therein. You are not authorized to alter, modify, copy, edit, format, create derivative works of or otherwise use any materials, content or technology provided under this license except as explicitly provided in this license or approved in advance in writing by Pico.
|
||||
|
||||
10. _Modifications; Notices._ If we change this contract, then we will give you notice before the change is in force. If you do not agree to these changes, then you must cancel and stop using the SDK and Pico Services before the changes are in force. If you do not stop using the SDK or Pico Services, then your use of the SDK or Pico Services will continue under the changed contract. Pico may give notices to You, at Pico's option, by posting on any portion of https://developer-global.pico-interactive.com/console#/notification or by electronic mail to any e-mail address provided by You to Pico.
|
||||
|
||||
11. _Governing Law._ If You acquired the SDK in the United States, California state law governs the interpretation of this license and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where You live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort. If you acquired the SDK in any other country, the laws of that country apply.
|
||||
|
||||
12. _Legal Effect._ This agreement describes certain legal rights. You may have other rights under the laws of Your country. This agreement does not change Your rights under the laws of Your country if the laws of Your country do not permit it to do so.
|
||||
|
||||
13. _Disclaimer of Warranty._ The SDK is licensed "as-is." You bear the risk of using it. Pico gives no express or implied warranties, guarantees or conditions. You may have additional consumer rights under Your local laws which this agreement cannot change. To the extent permitted under Your local laws, Pico excludes the implied warranties of merchantability, fitness for a particdlar purpose and non-infringement.
|
||||
|
||||
14. _Limitation and Exclusion of Remedies and Damages._ You can recover from Pico and its suppliers only direct damages up to U.S. $100.00. You cannot recover any other damages, including consequential, lost profits, special, indirect or incidental damages. This limitation applies to
|
||||
|
||||
14.1. anything related to the SDK, Pico Services, content (including code) on third party Internet sites, or third party programs; and
|
||||
|
||||
14.2. claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
|
||||
|
||||
15. _Eyetracking._ If you are going to develop the contents regarding eye tracking, you should follow
|
||||
|
||||
15.1. before get and transfer the eye tracking data, you should make sure that you get the approval of end users.
|
||||
|
||||
15.2. offer manual to end users to clarify the purpose to store and transfer eye tracking data, and declare that these data won’t be used for another purposes.
|
||||
|
||||
15.3. inform the end users the time when your applications start to store and transfer eye tracking date.
|
||||
|
||||
15.4. inform end users why they need to approve the storage and transfer of eye tracking data, and what you will obtain after the usage and analysis of the data.
|
||||
|
||||
It applies even if Pico knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to You because Your country may not allow the exclusion or limitation of incidental, consequential or other damages.
|
|
@ -1,35 +1,30 @@
|
|||
extends RefCounted
|
||||
class_name Promise
|
||||
|
||||
|
||||
enum Status {
|
||||
RESOLVED,
|
||||
REJECTED
|
||||
}
|
||||
|
||||
|
||||
signal settled(status: PromiseResult)
|
||||
signal resolved(value: Variant)
|
||||
signal rejected(reason: Rejection)
|
||||
|
||||
|
||||
## Generic rejection reason
|
||||
const PROMISE_REJECTED := "Promise rejected"
|
||||
|
||||
|
||||
var is_settled := false
|
||||
|
||||
|
||||
func _init(callable: Callable):
|
||||
resolved.connect(
|
||||
func(value: Variant):
|
||||
is_settled = true
|
||||
is_settled=true
|
||||
settled.emit(PromiseResult.new(Status.RESOLVED, value)),
|
||||
CONNECT_ONE_SHOT
|
||||
)
|
||||
rejected.connect(
|
||||
func(rejection: Rejection):
|
||||
is_settled = true
|
||||
is_settled=true
|
||||
settled.emit(PromiseResult.new(Status.REJECTED, rejection)),
|
||||
CONNECT_ONE_SHOT
|
||||
)
|
||||
|
@ -43,7 +38,6 @@ func _init(callable: Callable):
|
|||
rejected.emit(rejection)
|
||||
)
|
||||
|
||||
|
||||
func then(resolved_callback: Callable) -> Promise:
|
||||
resolved.connect(
|
||||
resolved_callback,
|
||||
|
@ -51,7 +45,6 @@ func then(resolved_callback: Callable) -> Promise:
|
|||
)
|
||||
return self
|
||||
|
||||
|
||||
func catch(rejected_callback: Callable) -> Promise:
|
||||
rejected.connect(
|
||||
rejected_callback,
|
||||
|
@ -59,11 +52,10 @@ func catch(rejected_callback: Callable) -> Promise:
|
|||
)
|
||||
return self
|
||||
|
||||
|
||||
static func from(input_signal: Signal) -> Promise:
|
||||
return Promise.new(
|
||||
func(resolve: Callable, _reject: Callable):
|
||||
var number_of_args := input_signal.get_object().get_signal_list() \
|
||||
var number_of_args:=input_signal.get_object().get_signal_list() \
|
||||
.filter(func(signal_info: Dictionary) -> bool: return signal_info["name"] == input_signal.get_name()) \
|
||||
.map(func(signal_info: Dictionary) -> int: return signal_info["args"].size()) \
|
||||
.front() as int
|
||||
|
@ -73,23 +65,21 @@ static func from(input_signal: Signal) -> Promise:
|
|||
resolve.call(null)
|
||||
else:
|
||||
# only one arg in signal is allowed for now
|
||||
var result = await input_signal
|
||||
var result=await input_signal
|
||||
resolve.call(result)
|
||||
)
|
||||
|
||||
|
||||
static func from_many(input_signals: Array[Signal]) -> Array[Promise]:
|
||||
return input_signals.map(
|
||||
func(input_signal: Signal):
|
||||
return Promise.from(input_signal)
|
||||
)
|
||||
|
||||
|
||||
static func all(promises: Array[Promise]) -> Promise:
|
||||
return Promise.new(
|
||||
func(resolve: Callable, reject: Callable):
|
||||
var resolved_promises: Array[bool] = []
|
||||
var results := []
|
||||
var resolved_promises: Array[bool]=[]
|
||||
var results:=[]
|
||||
results.resize(promises.size())
|
||||
resolved_promises.resize(promises.size())
|
||||
resolved_promises.fill(false)
|
||||
|
@ -97,8 +87,8 @@ static func all(promises: Array[Promise]) -> Promise:
|
|||
for i in promises.size():
|
||||
promises[i].then(
|
||||
func(value: Variant):
|
||||
results[i] = value
|
||||
resolved_promises[i] = true
|
||||
results[i]=value
|
||||
resolved_promises[i]=true
|
||||
if resolved_promises.all(func(value: bool): return value):
|
||||
resolve.call(results)
|
||||
).catch(
|
||||
|
@ -107,12 +97,11 @@ static func all(promises: Array[Promise]) -> Promise:
|
|||
)
|
||||
)
|
||||
|
||||
|
||||
static func any(promises: Array[Promise]) -> Promise:
|
||||
return Promise.new(
|
||||
func(resolve: Callable, reject: Callable):
|
||||
var rejected_promises: Array[bool] = []
|
||||
var rejections: Array[Rejection] = []
|
||||
var rejected_promises: Array[bool]=[]
|
||||
var rejections: Array[Rejection]=[]
|
||||
rejections.resize(promises.size())
|
||||
rejected_promises.resize(promises.size())
|
||||
rejected_promises.fill(false)
|
||||
|
@ -123,14 +112,13 @@ static func any(promises: Array[Promise]) -> Promise:
|
|||
resolve.call(value)
|
||||
).catch(
|
||||
func(rejection: Rejection):
|
||||
rejections[i] = rejection
|
||||
rejected_promises[i] = true
|
||||
rejections[i]=rejection
|
||||
rejected_promises[i]=true
|
||||
if rejected_promises.all(func(value: bool): return value):
|
||||
reject.call(PromiseAnyRejection.new(PROMISE_REJECTED, rejections))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class PromiseResult:
|
||||
var status: Status
|
||||
var payload: Variant
|
||||
|
@ -139,7 +127,6 @@ class PromiseResult:
|
|||
status = _status
|
||||
payload = _payload
|
||||
|
||||
|
||||
class Rejection:
|
||||
var reason: String
|
||||
var stack: Array
|
||||
|
@ -148,7 +135,6 @@ class Rejection:
|
|||
reason = _reason
|
||||
stack = get_stack() if OS.is_debug_build() else []
|
||||
|
||||
|
||||
func as_string() -> String:
|
||||
return ("%s\n" % reason) + "\n".join(
|
||||
stack.map(
|
||||
|
@ -156,7 +142,6 @@ class Rejection:
|
|||
return "At %s:%i:%s" % [dict["source"], dict["line"], dict["function"]]
|
||||
))
|
||||
|
||||
|
||||
class PromiseAnyRejection extends Rejection:
|
||||
var group: Array[Rejection]
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
4.3.dev6
|
||||
4.3.dev
|
||||
|
|
|
@ -7,9 +7,10 @@ sky_material = SubResource("ProceduralSkyMaterial_i4xao")
|
|||
|
||||
[resource]
|
||||
background_mode = 1
|
||||
background_color = Color(0.441, 0.962033, 0.98, 1)
|
||||
background_color = Color(1, 1, 1, 1)
|
||||
sky = SubResource("Sky_vhymk")
|
||||
ambient_light_source = 2
|
||||
ambient_light_color = Color(1, 1, 1, 1)
|
||||
ssao_radius = 6.52
|
||||
ssao_intensity = 5.68
|
||||
adjustment_contrast = 2.23
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
sky_material = SubResource("ProceduralSkyMaterial_i4xao")
|
||||
|
||||
[resource]
|
||||
background_color = Color(0, 0, 0, 0)
|
||||
background_color = Color(1, 1, 1, 0)
|
||||
background_energy_multiplier = 0.0
|
||||
sky = SubResource("Sky_vhymk")
|
||||
ambient_light_source = 2
|
||||
|
|
|
@ -14,20 +14,27 @@ dest_files=["res://.godot/imported/Montserrat-VariableFont_wght.ttf-e7d36c45e6f3
|
|||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
generate_mipmaps=true
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
msdf_size=100
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
oversampling=3.0
|
||||
oversampling=4.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
preload=[{
|
||||
"chars": [],
|
||||
"glyphs": [],
|
||||
"name": "New Configuration",
|
||||
"size": Vector2i(16, 0),
|
||||
"variation_embolden": 0.0
|
||||
}]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
|
|
|
@ -14,20 +14,27 @@ dest_files=["res://.godot/imported/base_icons.woff2-e891c7009d71889de458845dfeb3
|
|||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
generate_mipmaps=true
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
msdf_size=100
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
oversampling=4.0
|
||||
oversampling=3.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
preload=[{
|
||||
"chars": [],
|
||||
"glyphs": [],
|
||||
"name": "New Configuration",
|
||||
"size": Vector2i(16, 0),
|
||||
"variation_embolden": 0.0
|
||||
}]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
|
|
|
@ -48,8 +48,6 @@ func _ready():
|
|||
)
|
||||
|
||||
func set_state(stateInfo):
|
||||
print("Setting state: ", stateInfo)
|
||||
|
||||
if stateInfo == null:
|
||||
view.texture = null
|
||||
mesh.visible = true
|
||||
|
|
|
@ -9,5 +9,5 @@ func _ready():
|
|||
|
||||
if movable:
|
||||
movable.on_moved.connect(func():
|
||||
House.body.save_all_entities()
|
||||
App.house.save_all_entities()
|
||||
)
|
||||
|
|
|
@ -26,7 +26,7 @@ func _ready():
|
|||
remove_child(chart_button)
|
||||
|
||||
chart_button.on_button_down.connect(func():
|
||||
House.body.create_entity(entity_id, global_position, "line_chart")
|
||||
App.house.create_entity(entity_id, global_position, "line_chart")
|
||||
remove_child(chart_button)
|
||||
)
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ func set_state(stateInfo):
|
|||
if stateInfo == null:
|
||||
return
|
||||
|
||||
print(stateInfo)
|
||||
|
||||
var state = stateInfo["state"]
|
||||
var attributes = stateInfo["attributes"]
|
||||
|
||||
|
@ -39,7 +37,7 @@ func set_state(stateInfo):
|
|||
animation.play("clear-night")
|
||||
"cloudy":
|
||||
weather_label.text = "Cloudy"
|
||||
animation.play("cloudy")
|
||||
animation.play("partly-cloudy-day")
|
||||
"fog":
|
||||
weather_label.text = "Fog"
|
||||
animation.play("fog")
|
||||
|
|
|
@ -30426,8 +30426,7 @@ transform = Transform3D(0.28, 0, 0, 0, 0.28, 0, 0, 0, 0.28, -0.14, 0.01, 0)
|
|||
pixel_size = 0.001
|
||||
render_priority = 15
|
||||
sprite_frames = SubResource("SpriteFrames_71wxj")
|
||||
animation = &"sleet"
|
||||
frame_progress = 0.689981
|
||||
animation = &"partly-cloudy-day"
|
||||
|
||||
[node name="WeatherLabel" type="Label3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.05, 0.02, 0)
|
||||
|
|
|
@ -2,20 +2,19 @@ extends Node3D
|
|||
|
||||
const VoiceAssistant = preload ("res://content/system/assist/assist.tscn")
|
||||
const environment_passthrough_material = preload ("res://assets/environment_passthrough.tres")
|
||||
const Menu = preload ("res://content/ui/menu/menu.gd")
|
||||
const OnboardingScene = preload ("res://content/ui/onboarding/onboarding.tscn")
|
||||
|
||||
@onready var environment: WorldEnvironment = $WorldEnvironment
|
||||
@onready var camera: XRCamera3D = $XROrigin3D/XRCamera3D
|
||||
@onready var controller_left = $XROrigin3D/XRControllerLeft
|
||||
@onready var controller_right = $XROrigin3D/XRControllerRight
|
||||
@onready var camera: XRCamera3D = %XRCamera3D
|
||||
@onready var controller_left = %XRControllerLeft
|
||||
@onready var controller_right = %XRControllerRight
|
||||
@onready var house = $House
|
||||
@onready var menu = $Menu
|
||||
@onready var keyboard = $Keyboard
|
||||
@onready var menu: Menu = $Menu
|
||||
@onready var xr: XRToolsStartXR = $StartXR
|
||||
var voice_assistant = null
|
||||
|
||||
func _ready():
|
||||
# In case we're running on the headset, use the passthrough sky
|
||||
|
||||
if OS.get_name() == "Android":
|
||||
# OS.request_permissions()
|
||||
environment.environment = environment_passthrough_material
|
||||
|
@ -25,51 +24,24 @@ func _ready():
|
|||
|
||||
create_voice_assistant()
|
||||
|
||||
controller_left.button_pressed.connect(func(name):
|
||||
_emit_action(name, true, false)
|
||||
)
|
||||
|
||||
controller_right.button_pressed.connect(func(name):
|
||||
_emit_action(name, true, true)
|
||||
)
|
||||
|
||||
controller_left.button_released.connect(func(name):
|
||||
_emit_action(name, false, false)
|
||||
)
|
||||
|
||||
controller_right.button_released.connect(func(name):
|
||||
_emit_action(name, false, true)
|
||||
)
|
||||
|
||||
remove_child(keyboard)
|
||||
|
||||
EventSystem.on_action_down.connect(func(action):
|
||||
if action.name == "menu_button":
|
||||
toggle_menu()
|
||||
elif action.name == "by_button":
|
||||
House.body.mini_view.small.value=!House.body.mini_view.small.value
|
||||
)
|
||||
|
||||
EventSystem.on_focus_in.connect(func(event):
|
||||
if keyboard.is_inside_tree():
|
||||
return
|
||||
|
||||
add_child(keyboard)
|
||||
keyboard.global_transform=menu.get_node("AnimationContainer/KeyboardPlace").global_transform
|
||||
)
|
||||
|
||||
EventSystem.on_focus_out.connect(func(event):
|
||||
if !keyboard.is_inside_tree():
|
||||
return
|
||||
|
||||
remove_child(keyboard)
|
||||
)
|
||||
|
||||
xr.xr_started.connect(func():
|
||||
if HomeApi.has_connected() == false:
|
||||
HomeApi.start()
|
||||
)
|
||||
|
||||
HomeApi.on_connect.connect(func():
|
||||
start_setup_flow.call_deferred()
|
||||
)
|
||||
|
||||
func start_setup_flow():
|
||||
var onboarding = OnboardingScene.instantiate()
|
||||
add_child(onboarding)
|
||||
|
||||
await onboarding.tree_exited
|
||||
|
||||
if Store.house.state.rooms.size() == 0:
|
||||
house.create_room("Room 1")
|
||||
|
||||
func create_voice_assistant():
|
||||
if Store.settings.is_loaded() == false:
|
||||
await Store.settings.on_loaded
|
||||
|
@ -85,47 +57,37 @@ func create_voice_assistant():
|
|||
voice_assistant.queue_free()
|
||||
)
|
||||
|
||||
func toggle_menu():
|
||||
menu.show_menu.value = !menu.show_menu.value
|
||||
|
||||
func _emit_action(name: String, value, right_controller: bool=true):
|
||||
var event = EventAction.new()
|
||||
event.name = name
|
||||
event.value = value
|
||||
event.right_controller = right_controller
|
||||
|
||||
match typeof(value):
|
||||
TYPE_BOOL:
|
||||
EventSystem.emit("action_down" if value else "action_up", event)
|
||||
TYPE_FLOAT, TYPE_VECTOR2:
|
||||
EventSystem.emit("action_value", event)
|
||||
|
||||
func _process(delta):
|
||||
if OS.get_name() != "Android":
|
||||
|
||||
var camera_basis = camera.get_global_transform().basis
|
||||
|
||||
camera_basis.x.y = 0
|
||||
camera_basis.z.y = 0
|
||||
camera_basis.y = Vector3(0, 1, 0)
|
||||
camera_basis.x = camera_basis.x.normalized()
|
||||
camera_basis.z = camera_basis.z.normalized()
|
||||
|
||||
var movement = camera_basis * vector_key_mapping(KEY_D, KEY_A, KEY_S, KEY_W) * delta
|
||||
|
||||
camera.position += movement
|
||||
controller_left.position += movement
|
||||
controller_right.position += movement
|
||||
_move_camera_pc(delta)
|
||||
|
||||
func _input(event):
|
||||
|
||||
# Debugging Features
|
||||
if event is InputEventKey and Input.is_key_pressed(KEY_F10):
|
||||
var vp = get_viewport()
|
||||
vp.debug_draw = (vp.debug_draw + 1) % 5
|
||||
|
||||
if event is InputEventKey and Input.is_key_pressed(KEY_M):
|
||||
toggle_menu()
|
||||
menu.toggle_open()
|
||||
|
||||
func vector_key_mapping(key_positive_x: int, key_negative_x: int, key_positive_y: int, key_negative_y: int):
|
||||
func _move_camera_pc(delta):
|
||||
if OS.get_name() == "Android": return
|
||||
|
||||
var camera_basis = camera.get_global_transform().basis
|
||||
|
||||
camera_basis.x.y = 0
|
||||
camera_basis.z.y = 0
|
||||
camera_basis.y = Vector3(0, 1, 0)
|
||||
camera_basis.x = camera_basis.x.normalized()
|
||||
camera_basis.z = camera_basis.z.normalized()
|
||||
|
||||
var movement = camera_basis * _vector_key_mapping(KEY_D, KEY_A, KEY_S, KEY_W) * delta
|
||||
|
||||
camera.position += movement
|
||||
controller_left.position += movement
|
||||
controller_right.position += movement
|
||||
|
||||
func _vector_key_mapping(key_positive_x: int, key_negative_x: int, key_positive_y: int, key_negative_y: int):
|
||||
var x = 0
|
||||
var y = 0
|
||||
if Input.is_physical_key_pressed(key_positive_y):
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
[ext_resource type="PackedScene" uid="uid://ctltchlf2j2r4" path="res://addons/xr-simulator/XRSimulator.tscn" id="5_3qc8g"]
|
||||
[ext_resource type="PackedScene" uid="uid://biu66ihmvmku3" path="res://content/system/controller_right/controller_right.tscn" id="7_0b3tc"]
|
||||
[ext_resource type="PackedScene" uid="uid://c3kdssrmv84kv" path="res://content/ui/menu/menu.tscn" id="8_du83w"]
|
||||
[ext_resource type="PackedScene" uid="uid://lrehk38exd5n" path="res://content/system/keyboard/keyboard.tscn" id="9_e5n3p"]
|
||||
[ext_resource type="PackedScene" uid="uid://cbemihbxkd4ll" path="res://content/system/house/house.tscn" id="9_np6mw"]
|
||||
[ext_resource type="Script" path="res://lib/utils/screenshot.gd" id="12_e13ym"]
|
||||
[ext_resource type="PackedScene" uid="uid://ds60i5n211hi3" path="res://content/system/miniature/miniature.tscn" id="12_lmxhs"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhyddd1f0ry1x" path="res://content/ui/onboarding/onboarding.tscn" id="12_uq2nj"]
|
||||
|
||||
[node name="Main" type="Node3D"]
|
||||
transform = Transform3D(1, -0.000296142, 0.000270963, 0.000296143, 1, -4.5899e-06, -0.000270962, 4.67014e-06, 1, 0, 0, 0)
|
||||
script = ExtResource("1_uvrd4")
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
|
@ -22,6 +21,7 @@ environment = ExtResource("2_lsndp")
|
|||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(1, -2.51787e-05, 0.000567105, -0.000567105, 4.3985e-08, 1, -2.51784e-05, -1, 2.97105e-08, -4.65661e-10, 7.21041, 2.06458)
|
||||
visible = false
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="StartXR" parent="." instance=ExtResource("1_i4c04")]
|
||||
|
@ -30,43 +30,40 @@ enable_passthrough = true
|
|||
[node name="XROrigin3D" type="XROrigin3D" parent="."]
|
||||
|
||||
[node name="XRCamera3D" parent="XROrigin3D" instance=ExtResource("3_rj4ac")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="XRControllerLeft" parent="XROrigin3D" instance=ExtResource("2_2lraw")]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(0.999999, -1.39633e-11, 0, 9.48075e-12, 1, 0, 0, 0, 1, -0.355145, 0.550439, -0.477945)
|
||||
|
||||
[node name="IndexTip" parent="XROrigin3D/XRControllerLeft" index="4"]
|
||||
transform = Transform3D(0.967526, 0.252326, -0.0150302, -0.0150302, 0.116784, 0.993043, 0.252326, -0.960569, 0.116784, -0.00665808, 0.0427912, -0.169868)
|
||||
transform = Transform3D(0.967526, 0.252326, -0.0150302, -0.0150302, 0.116784, 0.993043, 0.252326, -0.960569, 0.116784, -0.00665802, 0.0427912, -0.169868)
|
||||
|
||||
[node name="ThumbTip" parent="XROrigin3D/XRControllerLeft" index="5"]
|
||||
transform = Transform3D(0.967043, 0.24582, -0.0663439, -0.0663439, 0.494837, 0.86645, 0.24582, -0.833492, 0.494837, 0.0261569, 0.0891963, -0.0934418)
|
||||
transform = Transform3D(0.967043, 0.24582, -0.0663439, -0.0663439, 0.494837, 0.866449, 0.24582, -0.833492, 0.494837, 0.0261569, 0.0891963, -0.0934418)
|
||||
|
||||
[node name="MiddleTip" parent="XROrigin3D/XRControllerLeft" index="6"]
|
||||
transform = Transform3D(0.98042, 0.196912, 0.00149799, 0.001498, -0.015065, 0.999885, 0.196912, -0.980305, -0.0150651, -0.00327212, -0.00771427, -0.176318)
|
||||
|
||||
[node name="Palm" parent="XROrigin3D/XRControllerLeft" index="7"]
|
||||
transform = Transform3D(1, 3.12361e-06, -3.13859e-06, -3.12371e-06, 1, -1.97886e-05, 3.13859e-06, 1.97889e-05, 1, 0.0307807, -0.0419722, -0.0399505)
|
||||
|
||||
[node name="XRControllerRight" parent="XROrigin3D" instance=ExtResource("7_0b3tc")]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(0.999999, -1.39635e-11, 0, 1.31553e-10, 1, 0, 0, 0, 1, 0.336726, 0.575093, -0.437942)
|
||||
|
||||
[node name="XRSimulator" parent="." instance=ExtResource("5_3qc8g")]
|
||||
min_camera_height = 0.01
|
||||
xr_origin = NodePath("../XROrigin3D")
|
||||
|
||||
[node name="House" parent="." instance=ExtResource("9_np6mw")]
|
||||
|
||||
[node name="Miniature" parent="." instance=ExtResource("12_lmxhs")]
|
||||
|
||||
[node name="Menu" parent="." instance=ExtResource("8_du83w")]
|
||||
transform = Transform3D(0.999999, -1.39633e-11, 0, 1.60657e-10, 1, -4.54747e-13, 0, 0, 0.999999, -0.0165677, 0.766337, -0.634317)
|
||||
|
||||
[node name="Keyboard" parent="." instance=ExtResource("9_e5n3p")]
|
||||
transform = Transform3D(0.5, 5.24309e-05, 0.000144384, -0.000139169, 0.353553, 0.353553, -6.50204e-05, -0.353553, 0.353553, -0.0199266, 0.550784, -0.47368)
|
||||
|
||||
[node name="Rooms" type="Node3D" parent="."]
|
||||
|
||||
[node name="House" parent="." instance=ExtResource("9_np6mw")]
|
||||
|
||||
[node name="Onboarding" parent="." instance=ExtResource("12_uq2nj")]
|
||||
transform = Transform3D(1, -1.39636e-11, 0, 4.42413e-11, 1, 0, 0, 0, 1, -0.576793, 0.820168, -0.60016)
|
||||
|
||||
[node name="Node" type="Node" parent="."]
|
||||
[node name="Screenshot" type="Node" parent="."]
|
||||
script = ExtResource("12_e13ym")
|
||||
|
||||
[editable path="XROrigin3D/XRControllerLeft"]
|
||||
|
|
|
@ -17,7 +17,6 @@ var effect: AudioEffectCapture
|
|||
@onready var chat_user: Chat = $ChatUser
|
||||
@onready var chat_assistant: Chat = $ChatAssistant
|
||||
@onready var loader: Node3D = $Loader
|
||||
@onready var camera = $"/root/Main/XROrigin3D/XRCamera3D"
|
||||
|
||||
var running := false
|
||||
var voice_assistant: VoiceAssistant
|
||||
|
@ -50,9 +49,9 @@ func _ready():
|
|||
loader.visible=true
|
||||
chat_user.visible=false
|
||||
chat_assistant.visible=false
|
||||
global_position=camera.global_position + camera.global_transform.basis.z * - 0.5
|
||||
global_position=App.camera.global_position + App.camera.global_transform.basis.z * - 0.5
|
||||
global_position.y *= 0.7
|
||||
global_transform.basis=Basis.looking_at((camera.global_position - global_position) * - 1)
|
||||
global_transform.basis=Basis.looking_at((App.camera.global_position - global_position) * - 1)
|
||||
running=true
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ func _physics_process(_delta):
|
|||
update_room()
|
||||
|
||||
func update_room():
|
||||
var room = House.body.find_room_at(global_position)
|
||||
var room = App.house.find_room_at(global_position)
|
||||
|
||||
if room != last_room:
|
||||
if room:
|
||||
|
|
|
@ -5,9 +5,8 @@ const Initiator = preload ("res://lib/utils/pointer/initiator.gd")
|
|||
const Finger = preload ("res://lib/utils/touch/finger.gd")
|
||||
const Touch = preload ("res://lib/utils/touch/touch.gd")
|
||||
const Collide = preload ("res://lib/utils/touch/collide.gd")
|
||||
const Miniature = preload ("res://content/system/house/mini/miniature.gd")
|
||||
const Miniature = preload ("res://content/system/miniature/miniature.gd")
|
||||
|
||||
@onready var main = $"/root/Main"
|
||||
@onready var hand = $hand_l
|
||||
@onready var hand_mesh = $hand_l/Armature/Skeleton3D/mesh_Hand_L
|
||||
@onready var auto_hand = $AutoHandtracker
|
||||
|
@ -35,6 +34,13 @@ var pressed = false
|
|||
var grabbed = false
|
||||
|
||||
func _ready():
|
||||
button_pressed.connect(func(action_name):
|
||||
EventSystem.emit_action(action_name, true, false)
|
||||
)
|
||||
|
||||
button_released.connect(func(action_name):
|
||||
EventSystem.emit_action(action_name, false, false)
|
||||
)
|
||||
|
||||
_setup_hand()
|
||||
|
||||
|
@ -43,7 +49,7 @@ func _process(_delta):
|
|||
if quick_actions.is_inside_tree(): palm.remove_child(quick_actions)
|
||||
return
|
||||
|
||||
if main.camera.global_transform.basis.z.dot(palm.global_transform.basis.x) > 0.85:
|
||||
if App.camera.global_transform.basis.z.dot(palm.global_transform.basis.x) > 0.85:
|
||||
if quick_actions.is_inside_tree() == false: palm.add_child(quick_actions)
|
||||
else:
|
||||
if quick_actions.is_inside_tree(): palm.remove_child(quick_actions)
|
||||
|
@ -74,7 +80,7 @@ func _physics_process(_delta):
|
|||
func _setup_hand():
|
||||
TouchManager.add_finger(Finger.Type.INDEX_LEFT, $IndexTip/TouchArea)
|
||||
|
||||
collide = Collide.new(hand, hand_mesh, index_tip)
|
||||
collide = Collide.new(hand, hand_mesh, index_tip.get_node("Marker3D"))
|
||||
add_child(collide)
|
||||
|
||||
auto_hand.hand_active_changed.connect(func(hand: int, active: bool):
|
||||
|
@ -87,21 +93,21 @@ func _setup_hand():
|
|||
)
|
||||
|
||||
mini_view_button.on_button_up.connect(func():
|
||||
House.body.mini_view.small.value=!House.body.mini_view.small.value
|
||||
App.miniature.small.value=!App.miniature.small.value
|
||||
)
|
||||
|
||||
temperature_button.on_button_up.connect(func():
|
||||
if House.body.mini_view.heatmap_type.value == Miniature.HeatmapType.TEMPERATURE:
|
||||
House.body.mini_view.heatmap_type.value=Miniature.HeatmapType.NONE
|
||||
if App.miniature.heatmap_type.value == Miniature.HeatmapType.TEMPERATURE:
|
||||
App.miniature.heatmap_type.value=Miniature.HeatmapType.NONE
|
||||
else:
|
||||
House.body.mini_view.heatmap_type.value=Miniature.HeatmapType.TEMPERATURE
|
||||
App.miniature.heatmap_type.value=Miniature.HeatmapType.TEMPERATURE
|
||||
)
|
||||
|
||||
humidity_button.on_button_up.connect(func():
|
||||
if House.body.mini_view.heatmap_type.value == Miniature.HeatmapType.HUMIDITY:
|
||||
House.body.mini_view.heatmap_type.value=Miniature.HeatmapType.NONE
|
||||
if App.miniature.heatmap_type.value == Miniature.HeatmapType.HUMIDITY:
|
||||
App.miniature.heatmap_type.value=Miniature.HeatmapType.NONE
|
||||
else:
|
||||
House.body.mini_view.heatmap_type.value=Miniature.HeatmapType.HUMIDITY
|
||||
App.miniature.heatmap_type.value=Miniature.HeatmapType.HUMIDITY
|
||||
)
|
||||
|
||||
initiator.type = Initiator.Type.HAND_LEFT
|
||||
|
|
|
@ -55,6 +55,7 @@ use_external_skeleton = true
|
|||
external_skeleton = NodePath("../hand_l/Armature/Skeleton3D")
|
||||
|
||||
[node name="Marker3D" type="Marker3D" parent="IndexTip"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.01, 0)
|
||||
gizmo_extents = 0.02
|
||||
|
||||
[node name="TouchArea" type="Area3D" parent="IndexTip"]
|
||||
|
|
|
@ -5,9 +5,8 @@ const Initiator = preload ("res://lib/utils/pointer/initiator.gd")
|
|||
const Finger = preload ("res://lib/utils/touch/finger.gd")
|
||||
const Touch = preload ("res://lib/utils/touch/touch.gd")
|
||||
const Collide = preload ("res://lib/utils/touch/collide.gd")
|
||||
const Miniature = preload ("res://content/system/house/mini/miniature.gd")
|
||||
const Miniature = preload ("res://content/system/miniature/miniature.gd")
|
||||
|
||||
@onready var main = $"/root/Main"
|
||||
@onready var ray: RayCast3D = $Raycast
|
||||
@onready var hand: Node3D = $hand_r
|
||||
@onready var hand_mesh = $hand_r/Armature/Skeleton3D/mesh_Hand_R
|
||||
|
@ -28,9 +27,17 @@ var pressed = false
|
|||
var grabbed = false
|
||||
|
||||
func _ready():
|
||||
button_pressed.connect(func(action_name):
|
||||
EventSystem.emit_action(action_name, true, true)
|
||||
)
|
||||
button_released.connect(func(action_name):
|
||||
EventSystem.emit_action(action_name, false, true)
|
||||
)
|
||||
|
||||
func _setup_hand():
|
||||
TouchManager.add_finger(Finger.Type.INDEX_RIGHT, $IndexTip/TouchArea)
|
||||
|
||||
collide = Collide.new(hand, hand_mesh, index_tip)
|
||||
collide = Collide.new(hand, hand_mesh, index_tip.get_node("Marker3D"))
|
||||
add_child(collide)
|
||||
|
||||
initiator.type = Initiator.Type.HAND_RIGHT
|
||||
|
|
|
@ -45,6 +45,7 @@ use_external_skeleton = true
|
|||
external_skeleton = NodePath("../hand_r/Armature/Skeleton3D")
|
||||
|
||||
[node name="Marker3D" type="Marker3D" parent="IndexTip"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.01, 0)
|
||||
gizmo_extents = 0.02
|
||||
|
||||
[node name="TouchArea" type="Area3D" parent="IndexTip"]
|
||||
|
|
|
@ -16,8 +16,6 @@ var touched_enter = 0.0
|
|||
var moved_ran = false
|
||||
var touch_ran = false
|
||||
|
||||
var miniature = House.body.mini_view
|
||||
|
||||
func _ready():
|
||||
R.effect(func(_arg):
|
||||
label.text=entity.icon.value
|
||||
|
@ -37,15 +35,15 @@ func _ready():
|
|||
)
|
||||
|
||||
func _on_click(_event: EventPointer):
|
||||
if entity.has_method("quick_action")&&miniature.entity_select.selection_active() == false:
|
||||
if entity.has_method("quick_action")&&App.miniature.entity_select.selection_active() == false:
|
||||
entity.quick_action()
|
||||
snap_sound.play()
|
||||
else:
|
||||
miniature.entity_select.toggle(entity)
|
||||
App.miniature.entity_select.toggle(entity)
|
||||
|
||||
func _on_press_move(_event: EventPointer):
|
||||
if moved_ran: return
|
||||
miniature.entity_select.toggle(entity)
|
||||
App.miniature.entity_select.toggle(entity)
|
||||
moved_ran = true
|
||||
|
||||
func _on_press_up(_event: EventPointer):
|
||||
|
@ -58,15 +56,15 @@ func _on_touch_enter(_event: EventTouch):
|
|||
func _on_touch_move(_event: EventTouch):
|
||||
if touch_ran||Time.get_ticks_msec() - touched_enter < TOUCH_LONG: return
|
||||
|
||||
miniature.entity_select.toggle(entity)
|
||||
App.miniature.entity_select.toggle(entity)
|
||||
|
||||
touch_ran = true
|
||||
|
||||
func _on_touch_leave(_event: EventTouch):
|
||||
if touch_ran: return
|
||||
|
||||
if entity.has_method("quick_action")&&miniature.entity_select.selection_active() == false:
|
||||
if entity.has_method("quick_action")&&App.miniature.entity_select.selection_active() == false:
|
||||
snap_sound.play()
|
||||
entity.quick_action()
|
||||
else:
|
||||
miniature.entity_select.toggle(entity)
|
||||
App.miniature.entity_select.toggle(entity)
|
||||
|
|
|
@ -21,8 +21,6 @@ shape = SubResource("SphereShape3D_3wgjq")
|
|||
[node name="Label3D" type="Label3D" parent="."]
|
||||
pixel_size = 0.002
|
||||
billboard = 1
|
||||
render_priority = 15
|
||||
outline_render_priority = 14
|
||||
text = "lightbulb"
|
||||
font = ExtResource("4_504vw")
|
||||
font_size = 100
|
||||
|
|
|
@ -19,7 +19,7 @@ extends Node3D
|
|||
edge.visible = !disabled
|
||||
|
||||
func _ready():
|
||||
update_initial_positions()
|
||||
update_initial_positions.call_deferred()
|
||||
|
||||
corner1.get_node("Movable").on_move.connect(func(position, rotation):
|
||||
edge.align_to_corners(corner1.global_position, corner2.global_position)
|
||||
|
@ -40,8 +40,11 @@ func _ready():
|
|||
return corner1.position + delta_new_pos_corner1
|
||||
|
||||
func update_initial_positions():
|
||||
if App.main.is_node_ready() == false:
|
||||
await App.main.ready
|
||||
|
||||
edge.align_to_corners(corner1.global_position, corner2.global_position)
|
||||
marker.global_transform = House.body.transform
|
||||
marker.global_transform = App.house.transform
|
||||
|
||||
func get_new_transform():
|
||||
marker.scale = Vector3(1, 1, 1)
|
||||
|
|
|
@ -50,8 +50,8 @@ func edit(door):
|
|||
break
|
||||
|
||||
if existing_door != null:
|
||||
room1 = House.body.find_room(existing_door.room1)
|
||||
room2 = House.body.find_room(existing_door.room2)
|
||||
room1 = App.house.find_room(existing_door.room1)
|
||||
room2 = App.house.find_room(existing_door.room2)
|
||||
|
||||
room1_corner1 = WallCornerScene.instantiate()
|
||||
room1_corner1.global_position = existing_door.room1_position1
|
||||
|
@ -73,13 +73,13 @@ func edit(door):
|
|||
room2_corner2.get_node("Clickable").on_grab_move.connect(_move_corner.bind(room2, room2_corner2))
|
||||
add_child(room2_corner2)
|
||||
|
||||
for room in House.body.get_rooms(0):
|
||||
for room in App.house.get_rooms():
|
||||
if room != room1&&room != room2:
|
||||
room.get_node("WallCollision/Clickable").on_click.connect(_add_corner.bind(room))
|
||||
else:
|
||||
room.get_node("WallCollision/Clickable").on_click.disconnect(_add_corner.bind(room))
|
||||
|
||||
for room in House.body.get_rooms(0):
|
||||
for room in App.house.get_rooms():
|
||||
if door != null:
|
||||
room.get_node("WallCollision/Clickable").on_click.connect(_add_corner.bind(room))
|
||||
else:
|
||||
|
|
|
@ -2,15 +2,12 @@ extends Node3D
|
|||
|
||||
const Room = preload ("./room/room.tscn")
|
||||
const RoomType = preload ("./room/room.gd")
|
||||
const Miniature = preload ("./mini/miniature.gd")
|
||||
const Doors = preload ("./doors/doors.gd")
|
||||
const AlignReference = preload ("./align_reference.gd")
|
||||
|
||||
@onready var levels = $Levels
|
||||
@onready var collision_shape = $Levels/CollisionShape3D
|
||||
@onready var rooms = $Rooms
|
||||
@onready var align_reference: AlignReference = $AlignReference
|
||||
@onready var mini_view: Miniature = $Levels/Miniature
|
||||
@onready var doors: Doors = $Levels/Doors
|
||||
@onready var doors: Doors = $Doors
|
||||
|
||||
var fixing_reference: bool = false
|
||||
var editing_room: RoomType = null
|
||||
|
@ -23,7 +20,7 @@ func _ready():
|
|||
|
||||
func update_house():
|
||||
loaded.value = false
|
||||
for old_room in get_rooms(0):
|
||||
for old_room in get_rooms():
|
||||
old_room.get_parent().remove_child(old_room)
|
||||
old_room.queue_free()
|
||||
|
||||
|
@ -37,7 +34,7 @@ func update_house():
|
|||
Store.house.save_local()
|
||||
continue
|
||||
|
||||
create_room(new_room.name, 0)
|
||||
create_room(new_room.name)
|
||||
|
||||
for entity_index in range(Store.house.state.entities.size()):
|
||||
var entity = Store.house.state.entities[entity_index]
|
||||
|
@ -53,7 +50,7 @@ func update_house():
|
|||
|
||||
loaded.value = true
|
||||
|
||||
func create_room(room_name: String, level: int) -> RoomType:
|
||||
func create_room(room_name: String) -> RoomType:
|
||||
var existing_room = Store.house.get_room(room_name)
|
||||
|
||||
if existing_room == null:
|
||||
|
@ -66,7 +63,7 @@ func create_room(room_name: String, level: int) -> RoomType:
|
|||
var room = Room.instantiate()
|
||||
room.name = room_name
|
||||
|
||||
get_level(level).add_child(room)
|
||||
rooms.add_child(room)
|
||||
|
||||
return room
|
||||
|
||||
|
@ -116,13 +113,13 @@ func is_editiong(room_name):
|
|||
return editing_room != null&&editing_room.name == room_name
|
||||
|
||||
func find_room(room_name):
|
||||
for room in get_rooms(0):
|
||||
for room in get_rooms():
|
||||
if room.name == room_name:
|
||||
return room
|
||||
return null
|
||||
|
||||
func find_room_at(entity_position: Vector3):
|
||||
for room in get_rooms(0):
|
||||
for room in get_rooms():
|
||||
if room.has_point(entity_position):
|
||||
return room
|
||||
return null
|
||||
|
@ -143,11 +140,8 @@ func rename_room(old_room: String, new_name: String):
|
|||
save_all_entities()
|
||||
Store.house.save_local()
|
||||
|
||||
func get_level(level: int):
|
||||
return levels.get_child(level)
|
||||
|
||||
func get_level_aabb(level: int):
|
||||
var rooms = get_level(level).get_children()
|
||||
func get_rooms_aabb():
|
||||
var rooms = get_rooms()
|
||||
if rooms.size() == 0:
|
||||
return AABB()
|
||||
|
||||
|
@ -168,8 +162,8 @@ func get_level_aabb(level: int):
|
|||
|
||||
return AABB(min_pos, max_pos - min_pos)
|
||||
|
||||
func get_rooms(level: int):
|
||||
return get_level(level).get_children()
|
||||
func get_rooms():
|
||||
return rooms.get_children()
|
||||
|
||||
func create_entity(entity_id: String, entity_position: Vector3, type=null):
|
||||
var room = find_room_at(entity_position)
|
||||
|
@ -218,7 +212,7 @@ func fix_reference():
|
|||
|
||||
func save_reference():
|
||||
if fixing_reference:
|
||||
for room in get_rooms(0):
|
||||
for room in get_rooms():
|
||||
room.editable = true
|
||||
|
||||
var align_transform = align_reference.global_transform
|
||||
|
@ -227,7 +221,7 @@ func save_reference():
|
|||
|
||||
align_reference.update_store()
|
||||
|
||||
for room in get_rooms(0):
|
||||
for room in get_rooms():
|
||||
room.editable = false
|
||||
|
||||
save_all_entities()
|
||||
|
@ -241,7 +235,7 @@ func save_reference():
|
|||
func save_all_entities():
|
||||
Store.house.state.entities.clear()
|
||||
|
||||
for room in get_rooms(0):
|
||||
for room in get_rooms():
|
||||
for entity in room.get_node("Entities").get_children():
|
||||
var entity_data = {
|
||||
"id": entity.entity_id,
|
||||
|
|
|
@ -1,21 +1,16 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://cbemihbxkd4ll"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cbemihbxkd4ll"]
|
||||
|
||||
[ext_resource type="Script" path="res://content/system/house/house.gd" id="1_p8amj"]
|
||||
[ext_resource type="PackedScene" uid="uid://jls16btb8nko" path="res://content/system/house/align_reference.tscn" id="3_e1tcn"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8nh8582vwc8u" path="res://content/system/house/doors/doors.tscn" id="4_bb3c2"]
|
||||
[ext_resource type="PackedScene" uid="uid://ds60i5n211hi3" path="res://content/system/house/mini/miniature.tscn" id="4_qjbly"]
|
||||
|
||||
[node name="House" type="Node3D"]
|
||||
script = ExtResource("1_p8amj")
|
||||
|
||||
[node name="Levels" type="Node3D" parent="."]
|
||||
|
||||
[node name="Level0" type="Node3D" parent="Levels"]
|
||||
|
||||
[node name="Miniature" parent="Levels" instance=ExtResource("4_qjbly")]
|
||||
|
||||
[node name="Doors" parent="Levels" instance=ExtResource("4_bb3c2")]
|
||||
[node name="Rooms" type="Node3D" parent="."]
|
||||
|
||||
[node name="AlignReference" parent="." instance=ExtResource("3_e1tcn")]
|
||||
visible = false
|
||||
disabled = true
|
||||
|
||||
[node name="Doors" parent="." instance=ExtResource("4_bb3c2")]
|
||||
|
|
|
@ -20,9 +20,35 @@ var caps = false:
|
|||
update_labels()
|
||||
|
||||
func _ready():
|
||||
get_parent().remove_child.call_deferred(self)
|
||||
|
||||
_create_keys()
|
||||
_prepare_keyboard_spawn()
|
||||
_connect_key_events()
|
||||
|
||||
func _prepare_keyboard_spawn():
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
|
||||
EventSystem.on_focus_in.connect(func(event):
|
||||
if is_inside_tree():
|
||||
return
|
||||
|
||||
App.main.add_child(self)
|
||||
global_transform=App.menu.get_node("AnimationContainer/KeyboardPlace").global_transform
|
||||
)
|
||||
|
||||
EventSystem.on_focus_out.connect(func(event):
|
||||
if !is_inside_tree():
|
||||
return
|
||||
|
||||
App.main.remove_child(self)
|
||||
)
|
||||
|
||||
func _create_keys():
|
||||
for row in key_list:
|
||||
for key in row:
|
||||
var key_node = create_key(key)
|
||||
var key_node = _create_key(key)
|
||||
keys.add_child(key_node)
|
||||
|
||||
if Engine.is_editor_hint():
|
||||
|
@ -37,6 +63,7 @@ func _ready():
|
|||
|
||||
keys.columns = key_list[0].size()
|
||||
|
||||
func _connect_key_events():
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
|
||||
|
@ -67,7 +94,7 @@ func _ready():
|
|||
_emit_event("key_up", KEY_INSERT)
|
||||
)
|
||||
|
||||
func create_key(key: Key):
|
||||
func _create_key(key: Key):
|
||||
var key_node = button_scene.instantiate()
|
||||
|
||||
key_node.label = EventKey.key_to_string(key, caps)
|
||||
|
|
|
@ -4,20 +4,17 @@ const DotScene = preload ("res://content/system/dot/dot.tscn")
|
|||
const Entity = preload ("res://content/entities/entity.gd")
|
||||
|
||||
@onready var dots = $"../Small/Dots"
|
||||
@onready var main = $"/root/Main"
|
||||
|
||||
var active_type = null
|
||||
var editing = R.state([])
|
||||
var group_entity = null
|
||||
|
||||
var house_small = null
|
||||
|
||||
func _ready():
|
||||
await House.body.ready
|
||||
await App.main.ready
|
||||
|
||||
# Update Group Entity
|
||||
R.effect(func(_arg):
|
||||
if house_small.value == false||editing.value.size() == 0:
|
||||
if App.miniature.small.value == false||editing.value.size() == 0:
|
||||
if group_entity != null:
|
||||
remove_child(group_entity)
|
||||
group_entity.queue_free()
|
||||
|
@ -29,19 +26,19 @@ func _ready():
|
|||
if entity_node is Movable:
|
||||
entity_node.disabled=true
|
||||
|
||||
group_entity.transform=Transform3D().looking_at(to_local((main.camera.global_position)), Vector3.UP, true)
|
||||
group_entity.transform=Transform3D().looking_at(to_local((App.camera.global_position)), Vector3.UP, true)
|
||||
add_child(group_entity)
|
||||
else:
|
||||
HomeApi.groups.update_entities(group_entity.entity_id, editing.value.map(func(entity): return entity.entity_id))
|
||||
)
|
||||
|
||||
var dots_disabled = R.computed(func(_arg):
|
||||
return House.body.mini_view.small.value == false
|
||||
return App.miniature.small.value == false
|
||||
)
|
||||
|
||||
# Update Entities
|
||||
R.effect(func(_arg):
|
||||
if House.body.loaded.value == false:
|
||||
if App.house.loaded.value == false:
|
||||
return
|
||||
|
||||
if Store.house.state.entities.size() == 0:
|
||||
|
@ -51,11 +48,11 @@ func _ready():
|
|||
dots.remove_child(old_dot)
|
||||
old_dot.free()
|
||||
|
||||
for room in House.body.get_rooms(0):
|
||||
for room in App.house.get_rooms():
|
||||
for entity in room.get_node("Entities").get_children():
|
||||
var dot=DotScene.instantiate()
|
||||
|
||||
dot.position=House.body.to_local(entity.global_position)
|
||||
dot.position=App.house.to_local(entity.global_position)
|
||||
dot.entity=entity
|
||||
dot.active=R.computed(func(_arg2):
|
||||
return editing.value.has(entity)
|
|
@ -1,14 +1,14 @@
|
|||
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://bcfcough6ucvc"]
|
||||
|
||||
[ext_resource type="Shader" path="res://content/system/house/mini/mini_wall_shader.gdshader" id="1_sbr3e"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbuq4wn7e5o2q" path="res://content/system/house/mini/temp_gradient.tres" id="2_3lwi8"]
|
||||
[ext_resource type="Shader" path="res://content/system/miniature/mini_wall_shader.gdshader" id="1_sbr3e"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbuq4wn7e5o2q" path="res://content/system/miniature/temp_gradient.tres" id="2_3lwi8"]
|
||||
|
||||
[resource]
|
||||
render_priority = 9
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_sbr3e")
|
||||
shader_parameter/data = PackedFloat32Array()
|
||||
shader_parameter/data_size = 0
|
||||
shader_parameter/alpha = 0.3
|
||||
shader_parameter/alpha = 1.0
|
||||
shader_parameter/roughness = 0.15
|
||||
shader_parameter/edge_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/color_gradient = ExtResource("2_3lwi8")
|
|
@ -1,5 +1,5 @@
|
|||
shader_type spatial;
|
||||
render_mode blend_mix, depth_draw_opaque, cull_disabled, diffuse_burley, specular_schlick_ggx, shadows_disabled;
|
||||
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_burley, specular_schlick_ggx, shadows_disabled;
|
||||
|
||||
uniform vec4 data[100];
|
||||
uniform int data_size: hint_range(0, 100, 1);
|
||||
|
@ -27,7 +27,7 @@ float SchlickFresnel(float u) {
|
|||
}
|
||||
|
||||
void vertex() {
|
||||
color = vec3(1.0, 1.0, 1.0);
|
||||
color = vec3(0.9, 0.9, 0.9);
|
||||
|
||||
if(data_size > 0) {
|
||||
float distances[100];
|
||||
|
@ -68,16 +68,16 @@ void vertex() {
|
|||
|
||||
void fragment() {
|
||||
ALBEDO = vec3(color.xyz);
|
||||
ALPHA = alpha;
|
||||
//ALPHA = alpha;
|
||||
|
||||
float VdotN = dot(VIEW, NORMAL);
|
||||
float fresnel = clamp(SchlickFresnel(VdotN), 0.0, 1.0);
|
||||
|
||||
// apply glass look
|
||||
float a = mix(0.001, 1.0, ALPHA);
|
||||
ALPHA = mix(fresnel * edge_color.a, 1.0, a);
|
||||
ALBEDO = mix(edge_color.rgb * edge_color.a, ALBEDO, a);
|
||||
//float a = mix(0.001, 1.0, ALPHA);
|
||||
//ALPHA = mix(fresnel * edge_color.a, 1.0, a);
|
||||
//ALBEDO = mix(edge_color.rgb * edge_color.a, ALBEDO, a);
|
||||
ROUGHNESS = roughness;
|
||||
SPECULAR = 0.5 * inversesqrt(ALPHA);
|
||||
//SPECULAR = 0.5 * inversesqrt(ALPHA);
|
||||
DEPTH = FRAGCOORD.z - 0.00001;
|
||||
}
|
|
@ -11,7 +11,6 @@ const temperature_gradient = preload ("./temp_gradient.tres")
|
|||
@onready var player = $Body/Small/Player
|
||||
@onready var collision_shape = $Body/CollisionShape3D
|
||||
@onready var entity_select = $Body/EntitySelect
|
||||
@onready var main = $"/root/Main"
|
||||
|
||||
enum HeatmapType {
|
||||
NONE = 0,
|
||||
|
@ -39,7 +38,10 @@ func _ready():
|
|||
wall_material.set_shader_parameter("data", [])
|
||||
wall_material.set_shader_parameter("data_size", 0)
|
||||
|
||||
entity_select.house_small = small
|
||||
EventSystem.on_action_down.connect(func(action):
|
||||
if action.name == "by_button":
|
||||
small.value=!small.value
|
||||
)
|
||||
|
||||
if Store.house.is_loaded() == false:
|
||||
await Store.house.on_loaded
|
||||
|
@ -87,7 +89,7 @@ func _ready():
|
|||
tween.set_parallel(true)
|
||||
if small.value:
|
||||
|
||||
var aabb=House.body.get_level_aabb(0)
|
||||
var aabb=App.house.get_level_aabb(0)
|
||||
var height=aabb.size.y
|
||||
|
||||
aabb.position.y=- 0.03
|
||||
|
@ -99,9 +101,8 @@ func _ready():
|
|||
collision_shape.position=center * 0.1
|
||||
entity_select.position=Vector3(0, height * 0.1 + 0.1, 0)
|
||||
|
||||
var camera=$"/root/Main/XROrigin3D/XRCamera3D"
|
||||
var camera_position=camera.global_position
|
||||
var camera_direction=- camera.global_transform.basis.z
|
||||
var camera_position=App.camera.global_position
|
||||
var camera_direction=- App.camera.global_transform.basis.z
|
||||
|
||||
camera_position.y *= 0.5
|
||||
camera_direction.y=0
|
||||
|
@ -119,10 +120,7 @@ func _ready():
|
|||
|
||||
# Update Walls
|
||||
R.effect(func(_arg):
|
||||
var show_map=heatmap_type.value != HeatmapType.NONE
|
||||
var show_small=small.value
|
||||
|
||||
model.visible=show_map||show_small
|
||||
model.visible=heatmap_type.value != HeatmapType.NONE||small.value
|
||||
)
|
||||
|
||||
# Update Heatmap
|
||||
|
@ -144,7 +142,7 @@ func _ready():
|
|||
)
|
||||
|
||||
func _process(delta):
|
||||
var cam_pos = main.camera.global_position
|
||||
var cam_pos = App.camera.global_position
|
||||
cam_pos.y += 0.1
|
||||
player.mesh.height = cam_pos.y
|
||||
player.position = Vector3(cam_pos.x, cam_pos.y / 2, cam_pos.z)
|
||||
|
@ -157,7 +155,7 @@ func get_base_scale() -> Vector2:
|
|||
func get_sensor_data():
|
||||
var data_list = []
|
||||
|
||||
for room in House.body.get_rooms(0):
|
||||
for room in App.house.get_rooms():
|
||||
for entity in room.get_node("Entities").get_children():
|
||||
if entity is SensorEntity:
|
||||
var sensor = entity as SensorEntity
|
||||
|
@ -165,14 +163,14 @@ func get_sensor_data():
|
|||
if data == null:
|
||||
continue
|
||||
|
||||
var sensor_pos = House.body.to_local(sensor.global_position)
|
||||
var sensor_pos = App.house.to_local(sensor.global_position)
|
||||
|
||||
data_list.append(Vector4(sensor_pos.x, sensor_pos.y, sensor_pos.z, float(data)))
|
||||
|
||||
return data_list
|
||||
|
||||
func get_sensor_unit():
|
||||
for room in House.body.get_rooms(0):
|
||||
for room in App.house.get_rooms():
|
||||
for entity in room.get_node("Entities").get_children():
|
||||
if entity is SensorEntity:
|
||||
var sensor = entity as SensorEntity
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://ds60i5n211hi3"]
|
||||
|
||||
[ext_resource type="Script" path="res://content/system/house/mini/miniature.gd" id="1_b53yn"]
|
||||
[ext_resource type="Script" path="res://content/system/miniature/miniature.gd" id="1_b53yn"]
|
||||
[ext_resource type="Script" path="res://content/functions/movable.gd" id="2_x7oed"]
|
||||
[ext_resource type="Script" path="res://content/system/house/mini/Entity.gd" id="3_tgpny"]
|
||||
[ext_resource type="Script" path="res://content/system/miniature/entity_select.gd" id="3_tgpny"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_bckw3"]
|
||||
|
|
@ -73,7 +73,7 @@ func _ready():
|
|||
trash_bin_large=false
|
||||
trash_bin_visible=false
|
||||
|
||||
House.body.save_all_entities()
|
||||
App.house.save_all_entities()
|
||||
)
|
||||
|
||||
func _get_entity(node: Node):
|
||||
|
|
|
@ -20,7 +20,7 @@ func _ready():
|
|||
entities_page.on_select_entity.connect(func(entity_name):
|
||||
spawn_sound.play()
|
||||
|
||||
var entity=House.body.create_entity(entity_name, global_position)
|
||||
var entity=App.house.create_entity(entity_name, global_position)
|
||||
|
||||
if typeof(entity) == TYPE_BOOL&&entity == false:
|
||||
EventSystem.notify("Entity is not in Room", EventNotify.Type.INFO)
|
||||
|
|
|
@ -6,18 +6,15 @@ const Notification = preload ("res://content/ui/components/notification/notifica
|
|||
@onready var open_sound = $OpenSound
|
||||
@onready var close_sound = $CloseSound
|
||||
@onready var notify_place = $AnimationContainer/NotifyPlace
|
||||
@onready var main = $"/root/Main"
|
||||
|
||||
var show_menu = R.state(false)
|
||||
|
||||
func _ready():
|
||||
await main.ready
|
||||
|
||||
main.remove_child(self)
|
||||
App.main.remove_child(self)
|
||||
|
||||
R.effect(func(_arg):
|
||||
if show_menu.value:
|
||||
main.add_child(self)
|
||||
App.main.add_child(self)
|
||||
move_into_view()
|
||||
animation_player.play_backwards("hide_menu")
|
||||
open_sound.play()
|
||||
|
@ -30,7 +27,12 @@ func _ready():
|
|||
|
||||
animation_player.animation_finished.connect(func(_animation):
|
||||
if show_menu.value == false:
|
||||
main.remove_child(self)
|
||||
App.main.remove_child(self)
|
||||
)
|
||||
|
||||
EventSystem.on_action_down.connect(func(action):
|
||||
if action.name == "menu_button":
|
||||
toggle_open()
|
||||
)
|
||||
|
||||
EventSystem.on_notify.connect(func(event: EventNotify):
|
||||
|
@ -44,8 +46,11 @@ func _ready():
|
|||
notify_place.add_child(notification_node)
|
||||
)
|
||||
|
||||
func toggle_open():
|
||||
show_menu.value = !show_menu.value
|
||||
|
||||
func move_into_view():
|
||||
var camera_transform = main.camera.global_transform
|
||||
var camera_transform = App.camera.global_transform
|
||||
camera_transform.origin -= camera_transform.basis.z * 0.5
|
||||
|
||||
global_transform = camera_transform
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=23 format=3 uid="uid://c3kdssrmv84kv"]
|
||||
[gd_scene load_steps=22 format=3 uid="uid://c3kdssrmv84kv"]
|
||||
|
||||
[ext_resource type="Script" path="res://content/ui/menu/menu.gd" id="1_ng4u3"]
|
||||
[ext_resource type="Script" path="res://content/functions/movable.gd" id="2_8coxu"]
|
||||
|
@ -7,7 +7,6 @@
|
|||
[ext_resource type="PackedScene" uid="uid://crrb0l3ekuotj" path="res://content/ui/menu/edit/edit_menu.tscn" id="4_r2raj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="5_w4i01"]
|
||||
[ext_resource type="Script" path="res://content/ui/components/tabs/tabs_content.gd" id="6_7rntr"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://cbqhhnknyium2" path="res://assets/immersive_home_panels/immersive_home_panels.obj" id="7_f4u4o"]
|
||||
[ext_resource type="PackedScene" uid="uid://ddpxthb414unp" path="res://content/ui/menu/view/view_menu.tscn" id="8_71pkg"]
|
||||
[ext_resource type="PackedScene" uid="uid://c01gkeldvjwtr" path="res://content/ui/menu/room/room_menu.tscn" id="10_u4i1x"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6r4higceibif" path="res://content/ui/menu/settings/settings_menu.tscn" id="11_7wm6b"]
|
||||
|
@ -26,7 +25,7 @@ shader_parameter/edge_color = Color(0, 0, 0, 1)
|
|||
shader_parameter/size = Vector2(0.42, 0.32)
|
||||
shader_parameter/border_size = 0.001
|
||||
shader_parameter/border_fade_in = 0.005
|
||||
shader_parameter/border_fade_out = 0.0
|
||||
shader_parameter/border_fade_out = 0.001
|
||||
shader_parameter/corner_radius = 0.02
|
||||
shader_parameter/roughness = 0.3
|
||||
shader_parameter/grain_amount = 0.02
|
||||
|
@ -272,8 +271,10 @@ tabs = NodePath("../Tabs")
|
|||
visible = false
|
||||
|
||||
[node name="EditMenu" parent="AnimationContainer/TabsContent" instance=ExtResource("4_r2raj")]
|
||||
visible = false
|
||||
|
||||
[node name="RoomMenu" parent="AnimationContainer/TabsContent" instance=ExtResource("10_u4i1x")]
|
||||
visible = false
|
||||
|
||||
[node name="AutomateMenu" type="Node3D" parent="AnimationContainer/TabsContent"]
|
||||
visible = false
|
||||
|
@ -289,11 +290,6 @@ gizmo_extents = 0.02
|
|||
transform = Transform3D(0.5, 0, 0, 0, 0.433012, 0.25, 0, -0.25, 0.433012, 0.2, -0.38, 0.11)
|
||||
gizmo_extents = 0.02
|
||||
|
||||
[node name="ImmersiveHomePanels" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-10, 0, 0.01, 0, 0.01, 0, -0.01, 0, -4.37114e-10, 0.32, 0, -0.0500001)
|
||||
visible = false
|
||||
mesh = ExtResource("7_f4u4o")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_s30cd")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
extends Node3D
|
||||
|
||||
const window_scene = preload("./window.tscn")
|
||||
const window_scene = preload ("./window.tscn")
|
||||
|
||||
@onready var background = $Background
|
||||
|
||||
|
@ -8,7 +8,7 @@ func _ready():
|
|||
background.visible = false
|
||||
|
||||
HomeApi.on_connect.connect(func():
|
||||
# var rooms = House.body.get_rooms(0)
|
||||
# var rooms = App.house.get_rooms(0)
|
||||
|
||||
# for room in rooms:
|
||||
# var mesh = room.wall_mesh
|
||||
|
|
|
@ -45,20 +45,20 @@ func _ready():
|
|||
|
||||
door_button.on_button_up.connect(func():
|
||||
if doors_map.selected_door.value == null:
|
||||
var id=House.body.doors.add()
|
||||
var id=App.house.doors.add()
|
||||
editing_door.value=true
|
||||
doors_map.selected_door.value=id
|
||||
elif editing_door.value == false:
|
||||
editing_door.value=true
|
||||
House.body.doors.edit(doors_map.selected_door.value)
|
||||
App.house.doors.edit(doors_map.selected_door.value)
|
||||
else:
|
||||
House.body.doors.save()
|
||||
App.house.doors.save()
|
||||
editing_door.value=false
|
||||
)
|
||||
|
||||
delete_button.on_button_up.connect(func():
|
||||
if doors_map.selected_door.value != null:
|
||||
House.body.doors.delete(doors_map.selected_door.value)
|
||||
App.house.doors.delete(doors_map.selected_door.value)
|
||||
doors_map.selected_door.value=null
|
||||
)
|
||||
|
|
@ -19,13 +19,13 @@ func _ready():
|
|||
|
||||
edit_button.on_button_down.connect(func():
|
||||
if active:
|
||||
House.body.save_reference()
|
||||
App.house.save_reference()
|
||||
else:
|
||||
House.body.edit_reference()
|
||||
active = !active
|
||||
App.house.edit_reference()
|
||||
active=!active
|
||||
)
|
||||
|
||||
fix_button.on_button_down.connect(func():
|
||||
House.body.fix_reference()
|
||||
active = true
|
||||
App.house.fix_reference()
|
||||
active=true
|
||||
)
|
||||
|
|
|
@ -46,8 +46,8 @@ func _ready():
|
|||
EventSystem.notify("Name already taken", EventNotify.Type.WARNING)
|
||||
return
|
||||
|
||||
House.body.create_room(room_name, 0)
|
||||
House.body.edit_room(room_name)
|
||||
App.house.create_room(room_name)
|
||||
App.house.edit_room(room_name)
|
||||
selected_room.value=room_name
|
||||
editing_room.value=true
|
||||
rooms_map.selectable.value=false
|
||||
|
@ -56,17 +56,17 @@ func _ready():
|
|||
rooms_map.selectable.value=!editing_room.value
|
||||
|
||||
if editing_room.value == false:
|
||||
if !House.body.is_valid_room(selected_room.value):
|
||||
if !App.house.is_valid_room(selected_room.value):
|
||||
EventSystem.notify("Room was deleted as it had less than 3 corners.", EventNotify.Type.WARNING)
|
||||
House.body.delete_room(selected_room.value)
|
||||
App.house.delete_room(selected_room.value)
|
||||
selected_room.value=null
|
||||
return
|
||||
|
||||
if selected_room.value != null&&selected_room.value != input.text:
|
||||
House.body.rename_room(selected_room.value, input.text)
|
||||
App.house.rename_room(selected_room.value, input.text)
|
||||
selected_room.value=input.text
|
||||
|
||||
House.body.edit_room(null)
|
||||
App.house.edit_room(null)
|
||||
else:
|
||||
House.body.edit_room(selected_room.value)
|
||||
App.house.edit_room(selected_room.value)
|
||||
)
|
||||
|
|
|
@ -40,7 +40,6 @@ func _ready():
|
|||
cursor_options.on_select.connect(func(option):
|
||||
settings_store.cursor_style=option
|
||||
settings_store.cursor_style=option
|
||||
print("cursor_style", option)
|
||||
Store.settings.save_local()
|
||||
)
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user