doc: Sync classref with current source

This commit is contained in:
Rémi Verschelde 2021-01-06 15:23:58 +01:00
parent 5e1ef41472
commit a3b76e26f3
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 80 additions and 76 deletions

View File

@ -1058,6 +1058,8 @@
<member name="rendering/environment/default_environment" type="String" setter="" getter="" default="&quot;&quot;"> <member name="rendering/environment/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
[Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here. [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here.
</member> </member>
<member name="rendering/forward_renderer/threaded_render_minimum_instances" type="int" setter="" getter="" default="500">
</member>
<member name="rendering/gpu_lightmapper/performance/max_rays_per_pass" type="int" setter="" getter="" default="32"> <member name="rendering/gpu_lightmapper/performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
</member> </member>
<member name="rendering/gpu_lightmapper/performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64"> <member name="rendering/gpu_lightmapper/performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
@ -1287,6 +1289,8 @@
</member> </member>
<member name="rendering/sdfgi/probe_ray_count" type="int" setter="" getter="" default="2"> <member name="rendering/sdfgi/probe_ray_count" type="int" setter="" getter="" default="2">
</member> </member>
<member name="rendering/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000">
</member>
<member name="rendering/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10"> <member name="rendering/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10">
</member> </member>
<member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1"> <member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="WebXRInterface" inherits="XRInterface" version="3.2"> <class name="WebXRInterface" inherits="XRInterface" version="4.0">
<brief_description> <brief_description>
AR/VR interface using WebXR. AR/VR interface using WebXR.
</brief_description> </brief_description>
@ -66,7 +66,7 @@
func _webxr_session_started(): func _webxr_session_started():
# This tells Godot to start rendering to the headset. # This tells Godot to start rendering to the headset.
get_viewport().arvr = true get_viewport().xr = true
# This will be the reference space type you ultimately got, out of the # This will be the reference space type you ultimately got, out of the
# types that you requested above. This is useful if you want the game to # types that you requested above. This is useful if you want the game to
# work a little differently in 'bounded-floor' versus 'local-floor'. # work a little differently in 'bounded-floor' versus 'local-floor'.
@ -75,7 +75,7 @@
func _webxr_session_ended(): func _webxr_session_ended():
# If the user exits immersive mode, then we tell Godot to render to the web # If the user exits immersive mode, then we tell Godot to render to the web
# page again. # page again.
get_viewport().arvr = false get_viewport().xr = false
func _webxr_session_failed(message): func _webxr_session_failed(message):
OS.alert("Failed to initialize: " + message) OS.alert("Failed to initialize: " + message)
@ -90,18 +90,7 @@
<link title="How to make a VR game for WebXR with Godot">https://www.snopekgames.com/blog/2020/how-make-vr-game-webxr-godot</link> <link title="How to make a VR game for WebXR with Godot">https://www.snopekgames.com/blog/2020/how-make-vr-game-webxr-godot</link>
</tutorials> </tutorials>
<methods> <methods>
<method name="is_session_supported"> <method name="get_controller" qualifiers="const">
<return type="void">
</return>
<argument index="0" name="session_mode" type="String">
</argument>
<description>
Checks if the given [code]session_mode[/code] is supported by the user's browser.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRSessionMode]WebXR's XRSessionMode[/url], including: [code]"immersive-vr"[/code], [code]"immersive-ar"[/code], and [code]"inline"[/code].
This method returns nothing, instead it emits the [signal session_supported] signal with the result.
</description>
</method>
<method name="get_controller">
<return type="XRPositionalTracker"> <return type="XRPositionalTracker">
</return> </return>
<argument index="0" name="controller_id" type="int"> <argument index="0" name="controller_id" type="int">
@ -118,18 +107,23 @@
- [signal squeezestart] - [signal squeezestart]
</description> </description>
</method> </method>
<method name="is_session_supported">
<return type="void">
</return>
<argument index="0" name="session_mode" type="String">
</argument>
<description>
Checks if the given [code]session_mode[/code] is supported by the user's browser.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRSessionMode]WebXR's XRSessionMode[/url], including: [code]"immersive-vr"[/code], [code]"immersive-ar"[/code], and [code]"inline"[/code].
This method returns nothing, instead it emits the [signal session_supported] signal with the result.
</description>
</method>
</methods> </methods>
<members> <members>
<member name="session_mode" type="String" setter="set_session_mode" getter="get_session_mode"> <member name="bounds_geometry" type="PackedVector3Array" setter="" getter="get_bounds_geometry">
The session mode used by [method XRInterface.initialize] when setting up the WebXR session. The vertices of a polygon which defines the boundaries of the user's play area.
This doesn't have any effect on the interface when already initialized. This will only be available if [member reference_space_type] is [code]"bounded-floor"[/code] and only on certain browsers and devices that support it.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRSessionMode]WebXR's XRSessionMode[/url], including: [code]"immersive-vr"[/code], [code]"immersive-ar"[/code], and [code]"inline"[/code]. The [signal reference_space_reset] signal may indicate when this changes.
</member>
<member name="required_features" type="String" setter="set_required_features" getter="get_required_features">
A comma-seperated list of required features used by [method XRInterface.initialize] when setting up the WebXR session.
If a user's browser or device doesn't support one of the given features, initialization will fail and [signal session_failed] will be emitted.
This doesn't have any effect on the interface when already initialized.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType]WebXR's XRReferenceSpaceType[/url]. If you want to use a particular reference space type, it must be listed in either [member required_features] or [member optional_features].
</member> </member>
<member name="optional_features" type="String" setter="set_optional_features" getter="get_optional_features"> <member name="optional_features" type="String" setter="set_optional_features" getter="get_optional_features">
A comma-seperated list of optional features used by [method XRInterface.initialize] when setting up the WebXR session. A comma-seperated list of optional features used by [method XRInterface.initialize] when setting up the WebXR session.
@ -137,62 +131,38 @@
This doesn't have any effect on the interface when already initialized. This doesn't have any effect on the interface when already initialized.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType]WebXR's XRReferenceSpaceType[/url]. If you want to use a particular reference space type, it must be listed in either [member required_features] or [member optional_features]. Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType]WebXR's XRReferenceSpaceType[/url]. If you want to use a particular reference space type, it must be listed in either [member required_features] or [member optional_features].
</member> </member>
<member name="reference_space_type" type="String" setter="" getter="get_reference_space_type">
The reference space type (from the list of requested types set in the [member requested_reference_space_types] property), that was ultimately used by [method XRInterface.initialize] when setting up the WebXR session.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType]WebXR's XRReferenceSpaceType[/url]. If you want to use a particular reference space type, it must be listed in either [member required_features] or [member optional_features].
</member>
<member name="requested_reference_space_types" type="String" setter="set_requested_reference_space_types" getter="get_requested_reference_space_types"> <member name="requested_reference_space_types" type="String" setter="set_requested_reference_space_types" getter="get_requested_reference_space_types">
A comma-seperated list of reference space types used by [method XRInterface.initialize] when setting up the WebXR session. A comma-seperated list of reference space types used by [method XRInterface.initialize] when setting up the WebXR session.
The reference space types are requested in order, and the first on supported by the users device or browser will be used. The [member reference_space_type] property contains the reference space type that was ultimately used. The reference space types are requested in order, and the first on supported by the users device or browser will be used. The [member reference_space_type] property contains the reference space type that was ultimately used.
This doesn't have any effect on the interface when already initialized. This doesn't have any effect on the interface when already initialized.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType]WebXR's XRReferenceSpaceType[/url]. If you want to use a particular reference space type, it must be listed in either [member required_features] or [member optional_features]. Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType]WebXR's XRReferenceSpaceType[/url]. If you want to use a particular reference space type, it must be listed in either [member required_features] or [member optional_features].
</member> </member>
<member name="reference_space_type" type="String" setter="" getter="get_reference_space_type"> <member name="required_features" type="String" setter="set_required_features" getter="get_required_features">
The reference space type (from the list of requested types set in the [member requested_reference_space_types] property), that was ultimately used by [method XRInterface.initialize] when setting up the WebXR session. A comma-seperated list of required features used by [method XRInterface.initialize] when setting up the WebXR session.
If a user's browser or device doesn't support one of the given features, initialization will fail and [signal session_failed] will be emitted.
This doesn't have any effect on the interface when already initialized.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType]WebXR's XRReferenceSpaceType[/url]. If you want to use a particular reference space type, it must be listed in either [member required_features] or [member optional_features]. Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType]WebXR's XRReferenceSpaceType[/url]. If you want to use a particular reference space type, it must be listed in either [member required_features] or [member optional_features].
</member> </member>
<member name="session_mode" type="String" setter="set_session_mode" getter="get_session_mode">
The session mode used by [method XRInterface.initialize] when setting up the WebXR session.
This doesn't have any effect on the interface when already initialized.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRSessionMode]WebXR's XRSessionMode[/url], including: [code]"immersive-vr"[/code], [code]"immersive-ar"[/code], and [code]"inline"[/code].
</member>
<member name="visibility_state" type="String" setter="" getter="get_visibility_state"> <member name="visibility_state" type="String" setter="" getter="get_visibility_state">
Indicates if the WebXR session's imagery is visible to the user. Indicates if the WebXR session's imagery is visible to the user.
Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRVisibilityState]WebXR's XRVisibilityState[/url], including [code]"hidden"[/code], [code]"visible"[/code], and [code]"visible-blurred"[/code]. Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRVisibilityState]WebXR's XRVisibilityState[/url], including [code]"hidden"[/code], [code]"visible"[/code], and [code]"visible-blurred"[/code].
</member> </member>
<member name="bounds_geometry" type="PackedVector3Array" setter="" getter="get_bounds_geometry">
The vertices of a polygon which defines the boundaries of the user's play area.
This will only be available if [member reference_space_type] is [code]"bounded-floor"[/code] and only on certain browsers and devices that support it.
The [signal reference_space_reset] signal may indicate when this changes.
</member>
</members> </members>
<signals> <signals>
<signal name="session_supported"> <signal name="reference_space_reset">
<argument index="0" name="session_mode" type="String">
</argument>
<argument index="1" name="supported" type="bool">
</argument>
<description> <description>
Emitted by [method is_session_supported] to indicate if the given [code]session_mode[/code] is supported or not. Emitted to indicate that the reference space has been reset or reconfigured.
</description> When (or whether) this is emitted depends on the user's browser or device, but may include when the user has changed the dimensions of their play space (which you may be able to access via [member bounds_geometry]) or pressed/held a button to recenter their position.
</signal> See [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace/reset_event]WebXR's XRReferenceSpace reset event[/url] for more information.
<signal name="session_started">
<description>
Emitted by [method XRInterface.initialize] if the session is successfully started.
At this point, it's safe to do [code]get_viewport().arvr = true[/code] to instruct Godot to start rendering to the AR/VR device.
</description>
</signal>
<signal name="session_failed">
<argument index="0" name="message" type="String">
</argument>
<description>
Emitted by [method XRInterface.initialize] if the session fails to start.
[code]message[/code] may optionally contain an error message from WebXR, or an empty string if no message is available.
</description>
</signal>
<signal name="session_ended">
<description>
Emitted when the user ends the WebXR session (which can be done using UI from the browser or device).
At this point, you should do [code]get_viewport().arvr = false[/code] to instruct Godot to resume rendering to the screen.
</description>
</signal>
<signal name="selectstart">
<argument index="0" name="controller_id" type="int">
</argument>
<description>
Emitted when one of the "controllers" has started its "primary action".
Use [method get_controller] to get more information about the controller.
</description> </description>
</signal> </signal>
<signal name="select"> <signal name="select">
@ -211,14 +181,43 @@
Use [method get_controller] to get more information about the controller. Use [method get_controller] to get more information about the controller.
</description> </description>
</signal> </signal>
<signal name="squeezestart"> <signal name="selectstart">
<argument index="0" name="controller_id" type="int"> <argument index="0" name="controller_id" type="int">
</argument> </argument>
<description> <description>
Emitted when one of the "controllers" has started its "primary squeeze action". Emitted when one of the "controllers" has started its "primary action".
Use [method get_controller] to get more information about the controller. Use [method get_controller] to get more information about the controller.
</description> </description>
</signal> </signal>
<signal name="session_ended">
<description>
Emitted when the user ends the WebXR session (which can be done using UI from the browser or device).
At this point, you should do [code]get_viewport().xr = false[/code] to instruct Godot to resume rendering to the screen.
</description>
</signal>
<signal name="session_failed">
<argument index="0" name="message" type="String">
</argument>
<description>
Emitted by [method XRInterface.initialize] if the session fails to start.
[code]message[/code] may optionally contain an error message from WebXR, or an empty string if no message is available.
</description>
</signal>
<signal name="session_started">
<description>
Emitted by [method XRInterface.initialize] if the session is successfully started.
At this point, it's safe to do [code]get_viewport().xr = true[/code] to instruct Godot to start rendering to the AR/VR device.
</description>
</signal>
<signal name="session_supported">
<argument index="0" name="session_mode" type="String">
</argument>
<argument index="1" name="supported" type="bool">
</argument>
<description>
Emitted by [method is_session_supported] to indicate if the given [code]session_mode[/code] is supported or not.
</description>
</signal>
<signal name="squeeze"> <signal name="squeeze">
<argument index="0" name="controller_id" type="int"> <argument index="0" name="controller_id" type="int">
</argument> </argument>
@ -235,18 +234,19 @@
Use [method get_controller] to get more information about the controller. Use [method get_controller] to get more information about the controller.
</description> </description>
</signal> </signal>
<signal name="squeezestart">
<argument index="0" name="controller_id" type="int">
</argument>
<description>
Emitted when one of the "controllers" has started its "primary squeeze action".
Use [method get_controller] to get more information about the controller.
</description>
</signal>
<signal name="visibility_state_changed"> <signal name="visibility_state_changed">
<description> <description>
Emitted when [member visibility_state] has changed. Emitted when [member visibility_state] has changed.
</description> </description>
</signal> </signal>
<signal name="reference_space_reset">
<description>
Emitted to indicate that the reference space has been reset or reconfigured.
When (or whether) this is emitted depends on the user's browser or device, but may include when the user has changed the dimensions of their play space (which you may be able to access via [member bounds_geometry]) or pressed/held a button to recenter their position.
See [url=https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace/reset_event]WebXR's XRReferenceSpace reset event[/url] for more information.
</description>
</signal>
</signals> </signals>
<constants> <constants>
</constants> </constants>

View File

@ -42,7 +42,7 @@ void WebXRInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_reference_space_type"), &WebXRInterface::get_reference_space_type); ClassDB::bind_method(D_METHOD("get_reference_space_type"), &WebXRInterface::get_reference_space_type);
ClassDB::bind_method(D_METHOD("set_requested_reference_space_types", "requested_reference_space_types"), &WebXRInterface::set_requested_reference_space_types); ClassDB::bind_method(D_METHOD("set_requested_reference_space_types", "requested_reference_space_types"), &WebXRInterface::set_requested_reference_space_types);
ClassDB::bind_method(D_METHOD("get_requested_reference_space_types"), &WebXRInterface::get_requested_reference_space_types); ClassDB::bind_method(D_METHOD("get_requested_reference_space_types"), &WebXRInterface::get_requested_reference_space_types);
ClassDB::bind_method(D_METHOD("get_controller"), &WebXRInterface::get_controller); ClassDB::bind_method(D_METHOD("get_controller", "controller_id"), &WebXRInterface::get_controller);
ClassDB::bind_method(D_METHOD("get_visibility_state"), &WebXRInterface::get_visibility_state); ClassDB::bind_method(D_METHOD("get_visibility_state"), &WebXRInterface::get_visibility_state);
ClassDB::bind_method(D_METHOD("get_bounds_geometry"), &WebXRInterface::get_bounds_geometry); ClassDB::bind_method(D_METHOD("get_bounds_geometry"), &WebXRInterface::get_bounds_geometry);