Skip to content

Commit

Permalink
doc: Sync classref with current source
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga committed Jan 5, 2021
1 parent 7fb212f commit d7102ac
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 74 deletions.
18 changes: 12 additions & 6 deletions doc/classes/AnimationNodeStateMachinePlayback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@
<link>https://docs.godotengine.org/en/3.2/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="get_current_node" qualifiers="const">
<return type="String">
<method name="get_current_length" qualifiers="const">
<return type="float">
</return>
<description>
Returns the currently playing animation state.
</description>
</method>
<method name="get_travel_path" qualifiers="const">
<return type="PoolStringArray">
<method name="get_current_node" qualifiers="const">
<return type="String">
</return>
<description>
Returns the current travel path as computed internally by the A* algorithm.
Returns the currently playing animation state.
</description>
</method>
<method name="get_current_play_position" qualifiers="const">
Expand All @@ -36,6 +35,13 @@
Returns the playback position within the current animation state.
</description>
</method>
<method name="get_travel_path" qualifiers="const">
<return type="PoolStringArray">
</return>
<description>
Returns the current travel path as computed internally by the A* algorithm.
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
Expand Down
2 changes: 2 additions & 0 deletions doc/classes/ProjectSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,8 @@
Choose between default mode where corner scalings are preserved matching the artwork, and scaling mode.
Not available in GLES3 when [member rendering/batching/options/use_batching] is off.
</member>
<member name="rendering/quality/2d/use_camera_snap" type="bool" setter="" getter="" default="false">
</member>
<member name="rendering/quality/2d/use_nvidia_rect_flicker_workaround" type="bool" setter="" getter="" default="false">
Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913]GitHub issue 9913[/url] for details.
If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option affects GLES2 and GLES3 rendering, but only on desktop platforms.
Expand Down
134 changes: 67 additions & 67 deletions modules/webxr/doc_classes/WebXRInterface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
</tutorials>
<methods>
<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>
<method name="get_controller">
<method name="get_controller" qualifiers="const">
<return type="ARVRPositionalTracker">
</return>
<argument index="0" name="controller_id" type="int">
Expand All @@ -118,73 +107,78 @@
- [signal squeezestart]
</description>
</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>
<members>
<member name="session_mode" type="String" setter="set_session_mode" getter="get_session_mode">
The session mode used by [method ARVRInterface.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="required_features" type="String" setter="set_required_features" getter="get_required_features">
A comma-seperated list of required features used by [method ARVRInterface.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 name="bounds_geometry" type="PoolVector3Array" 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>
<member name="optional_features" type="String" setter="set_optional_features" getter="get_optional_features">
A comma-seperated list of optional features used by [method ARVRInterface.initialize] when setting up the WebXR session.
If a user's browser or device doesn't support one of the given features, initialization will continue, but you won't be able to use the requested feature.
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 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 ARVRInterface.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">
A comma-seperated list of reference space types used by [method ARVRInterface.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.
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 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 ARVRInterface.initialize] when setting up the WebXR session.
<member name="required_features" type="String" setter="set_required_features" getter="get_required_features">
A comma-seperated list of required features used by [method ARVRInterface.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 name="session_mode" type="String" setter="set_session_mode" getter="get_session_mode">
The session mode used by [method ARVRInterface.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">
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].
</member>
<member name="bounds_geometry" type="PoolVector3Array" 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>
<signals>
<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="session_started">
<signal name="reference_space_reset">
<description>
Emitted by [method ARVRInterface.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.
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>
<signal name="session_failed">
<argument index="0" name="message" type="String">
<signal name="select">
<argument index="0" name="controller_id" type="int">
</argument>
<description>
Emitted by [method ARVRInterface.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.
Emitted after one of the "controllers" has finished its "primary action".
Use [method get_controller] to get more information about the controller.
</description>
</signal>
<signal name="session_ended">
<signal name="selectend">
<argument index="0" name="controller_id" type="int">
</argument>
<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.
Emitted when one of the "controllers" has finished its "primary action".
Use [method get_controller] to get more information about the controller.
</description>
</signal>
<signal name="selectstart">
Expand All @@ -195,28 +189,33 @@
Use [method get_controller] to get more information about the controller.
</description>
</signal>
<signal name="select">
<argument index="0" name="controller_id" type="int">
</argument>
<signal name="session_ended">
<description>
Emitted after one of the "controllers" has finished its "primary action".
Use [method get_controller] to get more information about the controller.
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="selectend">
<argument index="0" name="controller_id" type="int">
<signal name="session_failed">
<argument index="0" name="message" type="String">
</argument>
<description>
Emitted when one of the "controllers" has finished its "primary action".
Use [method get_controller] to get more information about the controller.
Emitted by [method ARVRInterface.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="squeezestart">
<argument index="0" name="controller_id" type="int">
<signal name="session_started">
<description>
Emitted by [method ARVRInterface.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_supported">
<argument index="0" name="session_mode" type="String">
</argument>
<argument index="1" name="supported" type="bool">
</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.
Emitted by [method is_session_supported] to indicate if the given [code]session_mode[/code] is supported or not.
</description>
</signal>
<signal name="squeeze">
Expand All @@ -235,16 +234,17 @@
Use [method get_controller] to get more information about the controller.
</description>
</signal>
<signal name="visibility_state_changed">
<signal name="squeezestart">
<argument index="0" name="controller_id" type="int">
</argument>
<description>
Emitted when [member visibility_state] has changed.
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="reference_space_reset">
<signal name="visibility_state_changed">
<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.
Emitted when [member visibility_state] has changed.
</description>
</signal>
</signals>
Expand Down
2 changes: 1 addition & 1 deletion modules/webxr/webxr_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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("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_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_bounds_geometry"), &WebXRInterface::get_bounds_geometry);

Expand Down

0 comments on commit d7102ac

Please sign in to comment.