diff options
Diffstat (limited to 'modules/webxr')
-rw-r--r-- | modules/webxr/SCsub | 2 | ||||
-rw-r--r-- | modules/webxr/doc_classes/WebXRInterface.xml | 4 | ||||
-rw-r--r-- | modules/webxr/register_types.cpp | 6 | ||||
-rw-r--r-- | modules/webxr/webxr_interface_js.cpp | 4 | ||||
-rw-r--r-- | modules/webxr/webxr_interface_js.h | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/modules/webxr/SCsub b/modules/webxr/SCsub index 0a96af0811..81caa4a279 100644 --- a/modules/webxr/SCsub +++ b/modules/webxr/SCsub @@ -3,7 +3,7 @@ Import("env") Import("env_modules") -if env["platform"] == "javascript": +if env["platform"] == "web": env.AddJSLibraries(["native/library_godot_webxr.js"]) env.AddJSExterns(["native/webxr.externs.js"]) diff --git a/modules/webxr/doc_classes/WebXRInterface.xml b/modules/webxr/doc_classes/WebXRInterface.xml index 01ad962b20..49ff454f07 100644 --- a/modules/webxr/doc_classes/WebXRInterface.xml +++ b/modules/webxr/doc_classes/WebXRInterface.xml @@ -5,9 +5,9 @@ </brief_description> <description> WebXR is an open standard that allows creating VR and AR applications that run in the web browser. - As such, this interface is only available when running in an HTML5 export. + As such, this interface is only available when running in Web exports. WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones). - Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that [WebXRInterface] is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes [WebXRInterface] quite a bit more complicated to initialize than other AR/VR interfaces. + Since WebXR is based on JavaScript, it makes extensive use of callbacks, which means that [WebXRInterface] is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes [WebXRInterface] quite a bit more complicated to initialize than other AR/VR interfaces. Here's the minimum code required to start an immersive VR session: [codeblock] extends Node3D diff --git a/modules/webxr/register_types.cpp b/modules/webxr/register_types.cpp index cd403a4996..f4959c482f 100644 --- a/modules/webxr/register_types.cpp +++ b/modules/webxr/register_types.cpp @@ -33,7 +33,7 @@ #include "webxr_interface.h" #include "webxr_interface_js.h" -#ifdef JAVASCRIPT_ENABLED +#ifdef WEB_ENABLED Ref<WebXRInterfaceJS> webxr; #endif @@ -44,7 +44,7 @@ void initialize_webxr_module(ModuleInitializationLevel p_level) { GDREGISTER_ABSTRACT_CLASS(WebXRInterface); -#ifdef JAVASCRIPT_ENABLED +#ifdef WEB_ENABLED webxr.instantiate(); XRServer::get_singleton()->add_interface(webxr); #endif @@ -55,7 +55,7 @@ void uninitialize_webxr_module(ModuleInitializationLevel p_level) { return; } -#ifdef JAVASCRIPT_ENABLED +#ifdef WEB_ENABLED if (webxr.is_valid()) { // uninitialise our interface if it is initialised if (webxr->is_initialized()) { diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index 07e6760555..7d97dbfa0b 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef JAVASCRIPT_ENABLED +#ifdef WEB_ENABLED #include "webxr_interface_js.h" @@ -518,4 +518,4 @@ WebXRInterfaceJS::~WebXRInterfaceJS() { }; }; -#endif // JAVASCRIPT_ENABLED +#endif // WEB_ENABLED diff --git a/modules/webxr/webxr_interface_js.h b/modules/webxr/webxr_interface_js.h index f1ffedba46..dbe89dad83 100644 --- a/modules/webxr/webxr_interface_js.h +++ b/modules/webxr/webxr_interface_js.h @@ -31,7 +31,7 @@ #ifndef WEBXR_INTERFACE_JS_H #define WEBXR_INTERFACE_JS_H -#ifdef JAVASCRIPT_ENABLED +#ifdef WEB_ENABLED #include "webxr_interface.h" @@ -98,6 +98,6 @@ public: ~WebXRInterfaceJS(); }; -#endif // JAVASCRIPT_ENABLED +#endif // WEB_ENABLED #endif // WEBXR_INTERFACE_JS_H |