Signal1
Signal support.
WebXRInterface.swift:641class Signal1
Use the connect(flags:_:)
method to connect to the signal on the container object, and disconnect(_:)
to drop the connection.
You can also await the emitted
property for waiting for a single emission of the signal.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (35) members.
Types
class Signal2
Signal support.
class Signal3
Signal support.
class Signal4
Signal support.
class Signal5
Signal support.
class Signal6
Signal support.
class Signal7
Signal support.
class Signal8
Signal support.
enum TargetRayMode
Type members
Instance members
var displayRefreshRateChanged: SimpleSignal
Emitted after the display’s refresh rate has changed.
var optionalFeatures: String
A comma-seperated list of optional features used by
initialize
when setting up the WebXR session.var referenceSpaceReset: SimpleSignal
Emitted to indicate that the reference space has been reset or reconfigured.
var referenceSpaceType: String
The reference space type (from the list of requested types set in the
requestedReferenceSpaceTypes
property), that was ultimately used byinitialize
when setting up the WebXR session.var requestedReferenceSpaceTypes: String
A comma-seperated list of reference space types used by
initialize
when setting up the WebXR session.var requiredFeatures: String
A comma-seperated list of required features used by
initialize
when setting up the WebXR session.var select: Signal4
Emitted after one of the input sources has finished its “primary action”.
var selectend: Signal5
Emitted when one of the input sources has finished its “primary action”.
var selectstart: Signal3
Emitted when one of the input source has started its “primary action”.
var sessionEnded: SimpleSignal
Emitted when the user ends the WebXR session (which can be done using UI from the browser or device).
var sessionFailed: Signal2
Emitted by
initialize
if the session fails to start.var sessionMode: String
The session mode used by
initialize
when setting up the WebXR session.var sessionStarted: SimpleSignal
Emitted by
initialize
if the session is successfully started.var sessionSupported: Signal1
Emitted by
isSessionSupported(sessionMode:)
to indicate if the givensessionMode
is supported or not.var squeeze: Signal7
Emitted after one of the input sources has finished its “primary squeeze action”.
var squeezeend: Signal8
Emitted when one of the input sources has finished its “primary squeeze action”.
var squeezestart: Signal6
Emitted when one of the input sources has started its “primary squeeze action”.
var visibilityState: String
Indicates if the WebXR session’s imagery is visible to the user.
var visibilityStateChanged: SimpleSignal
Emitted when
visibilityState
has changed.func getAvailableDisplayRefreshRates(
) -> GArray Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the web browser and after the interface has been initialized.
func getDisplayRefreshRate(
) -> Double Returns the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It may not report an accurate value until after using
setDisplayRefreshRate(_:)
.func getInputSourceTargetRayMode(inputSourceId: Int32
) -> WebXRInterface.TargetRayMode Returns the target ray mode for the given
inputSourceId
.func getInputSourceTracker(inputSourceId: Int32
) -> XRPositionalTracker? Gets an
XRPositionalTracker
for the giveninputSourceId
.func isInputSourceActive(inputSourceId: Int32
) -> Bool Returns
true
if there is an active input source with the giveninputSourceId
.func isSessionSupported(sessionMode: String
) Checks if the given
sessionMode
is supported by the user’s browser.func setDisplayRefreshRate(Double
) Sets the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It won’t take effect right away until after [signal display_refresh_rate_changed] is emitted.
Citizens in SwiftGodot
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func connect(flags: Object.ConnectFlags, @escaping (_ sessionMode: String, _ supported: Bool) -> ()
) -> Object Connects the signal to the specified callback
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)