mirror of
https://github.com/godotengine/godot
synced 2024-10-03 00:44:02 +00:00
[WebXR] Fix closure compiler mangling XRSession.enabledFeatures
This commit is contained in:
parent
6b281c0c07
commit
9b42333e98
|
@ -320,7 +320,8 @@ const GodotWebXR = {
|
||||||
// next reference space.
|
// next reference space.
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
const reference_space_c_str = GodotRuntime.allocString(reference_space_type);
|
const reference_space_c_str = GodotRuntime.allocString(reference_space_type);
|
||||||
const enabled_features_c_str = GodotRuntime.allocString(Array.from(session.enabledFeatures).join(','));
|
const enabled_features = 'enabledFeatures' in session ? Array.from(session.enabledFeatures) : [];
|
||||||
|
const enabled_features_c_str = GodotRuntime.allocString(enabled_features.join(','));
|
||||||
onstarted(reference_space_c_str, enabled_features_c_str);
|
onstarted(reference_space_c_str, enabled_features_c_str);
|
||||||
GodotRuntime.free(reference_space_c_str);
|
GodotRuntime.free(reference_space_c_str);
|
||||||
GodotRuntime.free(enabled_features_c_str);
|
GodotRuntime.free(enabled_features_c_str);
|
||||||
|
|
|
@ -77,6 +77,11 @@ XRSession.prototype.frameRate;
|
||||||
*/
|
*/
|
||||||
XRSession.prototype.supportedFrameRates;
|
XRSession.prototype.supportedFrameRates;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Array<string>}
|
||||||
|
*/
|
||||||
|
XRSession.prototype.enabledFeatures;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {?function (Event)}
|
* @type {?function (Event)}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue