@reactvision/react-viro 2.41.6 → 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/react_viro/react_viro-release.aar +0 -0
- package/components/AR/ViroARPlaneSelector.tsx +76 -37
- package/components/AR/ViroARScene.tsx +7 -4
- package/components/AR/ViroARSceneNavigator.tsx +1 -2
- package/components/Utilities/ViroVersion.ts +1 -1
- package/components/Viro3DSceneNavigator.tsx +1 -1
- package/components/ViroCamera.tsx +1 -0
- package/components/ViroOrbitCamera.tsx +1 -0
- package/components/ViroScene.tsx +7 -3
- package/components/ViroSceneContext.tsx +4 -3
- package/components/ViroSceneNavigator.tsx +1 -1
- package/dist/components/AR/ViroARCamera.d.ts +1 -1
- package/dist/components/AR/ViroARCamera.js +17 -7
- package/dist/components/AR/ViroARImageMarker.d.ts +2 -2
- package/dist/components/AR/ViroARImageMarker.js +17 -7
- package/dist/components/AR/ViroARObjectMarker.d.ts +2 -2
- package/dist/components/AR/ViroARObjectMarker.js +17 -7
- package/dist/components/AR/ViroARPlane.d.ts +2 -2
- package/dist/components/AR/ViroARPlane.js +17 -7
- package/dist/components/AR/ViroARPlaneSelector.d.ts +3 -3
- package/dist/components/AR/ViroARPlaneSelector.js +63 -25
- package/dist/components/AR/ViroARScene.d.ts +2 -2
- package/dist/components/AR/ViroARScene.js +17 -7
- package/dist/components/AR/ViroARSceneNavigator.d.ts +2 -2
- package/dist/components/AR/ViroARSceneNavigator.js +17 -9
- package/dist/components/Types/ViroEvents.d.ts +6 -6
- package/dist/components/Types/ViroEvents.js +6 -6
- package/dist/components/Types/ViroUtils.d.ts +0 -1
- package/dist/components/Utilities/ViroProps.js +1 -2
- package/dist/components/Utilities/ViroUtils.js +3 -4
- package/dist/components/Utilities/ViroVersion.d.ts +1 -1
- package/dist/components/Utilities/ViroVersion.js +1 -1
- package/dist/components/Viro360Image.d.ts +1 -1
- package/dist/components/Viro360Image.js +17 -7
- package/dist/components/Viro360Video.d.ts +1 -1
- package/dist/components/Viro360Video.js +17 -7
- package/dist/components/Viro3DObject.d.ts +2 -2
- package/dist/components/Viro3DObject.js +17 -7
- package/dist/components/Viro3DSceneNavigator.d.ts +2 -2
- package/dist/components/Viro3DSceneNavigator.js +17 -7
- package/dist/components/ViroAmbientLight.d.ts +1 -1
- package/dist/components/ViroAmbientLight.js +17 -7
- package/dist/components/ViroAnimatedComponent.d.ts +1 -1
- package/dist/components/ViroAnimatedComponent.js +17 -7
- package/dist/components/ViroAnimatedImage.d.ts +2 -2
- package/dist/components/ViroAnimatedImage.js +17 -7
- package/dist/components/ViroBase.js +17 -7
- package/dist/components/ViroBox.d.ts +2 -2
- package/dist/components/ViroBox.js +17 -7
- package/dist/components/ViroButton.d.ts +1 -1
- package/dist/components/ViroButton.js +18 -8
- package/dist/components/ViroCamera.d.ts +3 -1
- package/dist/components/ViroCamera.js +17 -7
- package/dist/components/ViroConstants.js +3 -3
- package/dist/components/ViroController.d.ts +1 -1
- package/dist/components/ViroController.js +17 -7
- package/dist/components/ViroDirectionalLight.d.ts +1 -1
- package/dist/components/ViroDirectionalLight.js +17 -7
- package/dist/components/ViroFlexView.d.ts +2 -2
- package/dist/components/ViroFlexView.js +17 -7
- package/dist/components/ViroGeometry.d.ts +2 -2
- package/dist/components/ViroGeometry.js +17 -7
- package/dist/components/ViroImage.d.ts +2 -2
- package/dist/components/ViroImage.js +17 -7
- package/dist/components/ViroLightingEnvironment.d.ts +1 -1
- package/dist/components/ViroLightingEnvironment.js +17 -7
- package/dist/components/ViroMaterialVideo.d.ts +1 -1
- package/dist/components/ViroMaterialVideo.js +17 -7
- package/dist/components/ViroNode.d.ts +2 -2
- package/dist/components/ViroNode.js +17 -7
- package/dist/components/ViroOmniLight.d.ts +1 -1
- package/dist/components/ViroOmniLight.js +17 -7
- package/dist/components/ViroOrbitCamera.d.ts +3 -1
- package/dist/components/ViroOrbitCamera.js +17 -7
- package/dist/components/ViroParticleEmitter.d.ts +1 -1
- package/dist/components/ViroParticleEmitter.js +17 -7
- package/dist/components/ViroPolygon.d.ts +2 -2
- package/dist/components/ViroPolygon.js +17 -7
- package/dist/components/ViroPolyline.d.ts +2 -2
- package/dist/components/ViroPolyline.js +17 -7
- package/dist/components/ViroPortal.d.ts +2 -2
- package/dist/components/ViroPortal.js +17 -7
- package/dist/components/ViroPortalScene.d.ts +2 -2
- package/dist/components/ViroPortalScene.js +17 -7
- package/dist/components/ViroQuad.d.ts +2 -2
- package/dist/components/ViroQuad.js +17 -7
- package/dist/components/ViroScene.d.ts +10 -2
- package/dist/components/ViroScene.js +17 -7
- package/dist/components/ViroSceneContext.d.ts +4 -3
- package/dist/components/ViroSceneContext.js +17 -7
- package/dist/components/ViroSceneNavigator.d.ts +2 -2
- package/dist/components/ViroSceneNavigator.js +17 -7
- package/dist/components/ViroSkyBox.d.ts +1 -1
- package/dist/components/ViroSkyBox.js +17 -7
- package/dist/components/ViroSound.d.ts +1 -1
- package/dist/components/ViroSound.js +17 -7
- package/dist/components/ViroSoundField.d.ts +1 -1
- package/dist/components/ViroSoundField.js +17 -7
- package/dist/components/ViroSpatialSound.d.ts +1 -1
- package/dist/components/ViroSpatialSound.js +17 -7
- package/dist/components/ViroSphere.d.ts +2 -2
- package/dist/components/ViroSphere.js +17 -7
- package/dist/components/ViroSpinner.d.ts +2 -2
- package/dist/components/ViroSpinner.js +17 -7
- package/dist/components/ViroSpotLight.d.ts +1 -1
- package/dist/components/ViroSpotLight.js +17 -7
- package/dist/components/ViroSurface.d.ts +2 -2
- package/dist/components/ViroSurface.js +17 -7
- package/dist/components/ViroText.d.ts +2 -2
- package/dist/components/ViroText.js +17 -7
- package/dist/components/ViroVRSceneNavigator.d.ts +2 -2
- package/dist/components/ViroVRSceneNavigator.js +17 -7
- package/dist/components/ViroVideo.d.ts +10 -2
- package/dist/components/ViroVideo.js +17 -7
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -3
- package/dist/plugins/withViroAndroid.js +15 -11
- package/dist/plugins/withViroIos.js +1 -1
- package/index.ts +0 -2
- package/package.json +23 -14
- package/components/Telemetry/ViroTelemetry.ts +0 -93
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
47
|
exports.ViroSpotLight = void 0;
|
|
38
48
|
const React = __importStar(require("react"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { ViroUVCoordinate } from "./Types/ViroUtils";
|
|
3
3
|
import { ViroBase } from "./ViroBase";
|
|
4
4
|
type Props = {
|
|
@@ -8,6 +8,6 @@ type Props = {
|
|
|
8
8
|
* Used to render a ViroSurface
|
|
9
9
|
*/
|
|
10
10
|
export declare class ViroSurface extends ViroBase<Props> {
|
|
11
|
-
render(): JSX.Element;
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
47
|
exports.ViroSurface = void 0;
|
|
38
48
|
const React = __importStar(require("react"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { ColorValue } from "react-native";
|
|
3
3
|
import { ViroTextStyle } from "./Styles/ViroTextStyle";
|
|
4
4
|
import { ViroBase } from "./ViroBase";
|
|
@@ -20,6 +20,6 @@ type Props = {
|
|
|
20
20
|
* Used to render a ViroText
|
|
21
21
|
*/
|
|
22
22
|
export declare class ViroText extends ViroBase<Props> {
|
|
23
|
-
render(): JSX.Element;
|
|
23
|
+
render(): React.JSX.Element;
|
|
24
24
|
}
|
|
25
25
|
export {};
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
47
|
exports.ViroText = void 0;
|
|
38
48
|
const React = __importStar(require("react"));
|
|
@@ -139,7 +139,7 @@ export declare class ViroVRSceneNavigator extends React.Component<Props, State>
|
|
|
139
139
|
_recenterTracking(): void;
|
|
140
140
|
_project(point: Viro3DPoint): Promise<any>;
|
|
141
141
|
_unproject(point: Viro3DPoint): Promise<any>;
|
|
142
|
-
_renderSceneStackItems(): JSX.Element[];
|
|
142
|
+
_renderSceneStackItems(): React.JSX.Element[];
|
|
143
143
|
sceneNavigator: {
|
|
144
144
|
push: (param1?: ViroScene | string, param2?: ViroScene) => void;
|
|
145
145
|
pop: () => void;
|
|
@@ -151,6 +151,6 @@ export declare class ViroVRSceneNavigator extends React.Component<Props, State>
|
|
|
151
151
|
recenterTracking: () => void;
|
|
152
152
|
viroAppProps: any;
|
|
153
153
|
};
|
|
154
|
-
render(): JSX.Element;
|
|
154
|
+
render(): React.JSX.Element;
|
|
155
155
|
}
|
|
156
156
|
export {};
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
47
|
exports.ViroVRSceneNavigator = void 0;
|
|
38
48
|
const React = __importStar(require("react"));
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Viro Media, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from "react";
|
|
2
10
|
import { NativeSyntheticEvent } from "react-native";
|
|
3
11
|
import { ViroVideoBufferEndEvent, ViroVideoBufferStartEvent, ViroVideoErrorEvent, ViroVideoUpdateTimeEvent } from "./Types/ViroEvents";
|
|
4
12
|
import { ViroSource } from "./Types/ViroUtils";
|
|
@@ -43,7 +51,7 @@ export declare class ViroVideo extends ViroBase<Props> {
|
|
|
43
51
|
_onBufferEnd: (event: NativeSyntheticEvent<ViroVideoBufferEndEvent>) => void;
|
|
44
52
|
_onFinish: () => void;
|
|
45
53
|
_onUpdateTime: (event: NativeSyntheticEvent<ViroVideoUpdateTimeEvent>) => void;
|
|
46
|
-
render(): JSX.Element;
|
|
54
|
+
render(): React.JSX.Element;
|
|
47
55
|
seekToTime: (timeInSeconds: number) => void;
|
|
48
56
|
}
|
|
49
57
|
export {};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
import { ViroTelemetry } from "./components/Telemetry/ViroTelemetry";
|
|
7
6
|
import { ViroAnimations } from "./components/Animation/ViroAnimations";
|
|
8
7
|
import { Viro3DObject } from "./components/Viro3DObject";
|
|
9
8
|
import { Viro360Image } from "./components/Viro360Image";
|
|
@@ -59,4 +58,4 @@ import { ViroHoverEvent, ViroClickEvent, ViroClickStateEvent, ViroTouchEvent, Vi
|
|
|
59
58
|
import { ViroSurface } from "./components/ViroSurface";
|
|
60
59
|
import { ViroSceneNavigator } from "./components/ViroSceneNavigator";
|
|
61
60
|
import { VIRO_VERSION } from "./components/Utilities/ViroVersion";
|
|
62
|
-
export { ViroARImageMarker, ViroARObjectMarker, ViroARTrackingTargets, ViroARPlane, ViroARPlaneSelector, ViroARScene, ViroARSceneNavigator, ViroBox, ViroButton, ViroCamera, ViroController, ViroDirectionalLight, ViroFlexView, ViroGeometry, ViroLightingEnvironment, ViroImage, ViroMaterials, ViroARCamera, ViroMaterialVideo, ViroNode, ViroOmniLight, ViroOrbitCamera, ViroParticleEmitter, ViroPolygon, ViroPolyline, ViroPortal, ViroPortalScene, ViroQuad, ViroScene, ViroSurface, ViroSceneNavigator, ViroSkyBox, ViroAnimations, Viro3DObject, Viro360Image, Viro360Video, ViroAnimatedImage, ViroAmbientLight, ViroAnimatedComponent, ViroSound, ViroSoundField, ViroSpatialSound, ViroSphere, ViroSpinner, ViroSpotLight, ViroText, ViroVideo, ViroVRSceneNavigator, Viro3DSceneNavigator, ViroARTrackingReasonConstants, ViroRecordingErrorConstants, ViroTrackingStateConstants, polarToCartesian, polarToCartesianActual, isARSupportedOnDevice, ViroARSupportResponse, ViroHoverEvent, ViroClickEvent, ViroClickStateEvent, ViroClickStateTypes, ViroTouchEvent, ViroScrollEvent, ViroSwipeEvent, ViroFuseEvent, ViroPinchEvent, ViroPinchStateTypes, ViroRotateEvent, ViroRotateStateTypes, ViroDragEvent, ViroPlatformEvent, ViroCollisionEvent, ViroPlatformInfo, ViroCameraTransformEvent, ViroPlatformUpdateEvent, ViroCameraTransform, ViroExitViroEvent, ViroErrorEvent, ViroAnimationStartEvent, ViroAnimationFinishEvent, ViroLoadStartEvent, ViroLoadEndEvent, ViroLoadErrorEvent, ViroVideoBufferStartEvent, ViroVideoBufferEndEvent, ViroVideoUpdateTimeEvent, ViroVideoErrorEvent, ViroVideoFinishEvent, ViroAnimatedComponentStartEvent, ViroAnimatedComponentFinishEvent, ViroARAnchorRemovedEvent, ViroARAnchorUpdatedEvent, ViroARAnchorFoundEvent, ViroAnchor, ViroAnchorFoundMap, ViroAnchorUpdatedMap, ViroPlaneUpdatedMap, ViroPlaneUpdatedEvent, ViroARPlaneSizes, ViroCameraARHitTestEvent, ViroCameraARHitTest, ViroARHitTestResult, ViroARPointCloudUpdateEvent, ViroARPointCloud, ViroTrackingUpdatedEvent, ViroTrackingState, ViroTrackingReason, ViroAmbientLightUpdateEvent, ViroAmbientLightInfo, ViroWorldOrigin, ViroNativeTransformUpdateEvent, ViroControllerStatusEvent, ViroControllerStatus, ViroPortalEnterEvent, ViroPortalExitEvent, ViroSoundFinishEvent, ViroTextStyle, ViroStyle,
|
|
61
|
+
export { ViroARImageMarker, ViroARObjectMarker, ViroARTrackingTargets, ViroARPlane, ViroARPlaneSelector, ViroARScene, ViroARSceneNavigator, ViroBox, ViroButton, ViroCamera, ViroController, ViroDirectionalLight, ViroFlexView, ViroGeometry, ViroLightingEnvironment, ViroImage, ViroMaterials, ViroARCamera, ViroMaterialVideo, ViroNode, ViroOmniLight, ViroOrbitCamera, ViroParticleEmitter, ViroPolygon, ViroPolyline, ViroPortal, ViroPortalScene, ViroQuad, ViroScene, ViroSurface, ViroSceneNavigator, ViroSkyBox, ViroAnimations, Viro3DObject, Viro360Image, Viro360Video, ViroAnimatedImage, ViroAmbientLight, ViroAnimatedComponent, ViroSound, ViroSoundField, ViroSpatialSound, ViroSphere, ViroSpinner, ViroSpotLight, ViroText, ViroVideo, ViroVRSceneNavigator, Viro3DSceneNavigator, ViroARTrackingReasonConstants, ViroRecordingErrorConstants, ViroTrackingStateConstants, polarToCartesian, polarToCartesianActual, isARSupportedOnDevice, ViroARSupportResponse, ViroHoverEvent, ViroClickEvent, ViroClickStateEvent, ViroClickStateTypes, ViroTouchEvent, ViroScrollEvent, ViroSwipeEvent, ViroFuseEvent, ViroPinchEvent, ViroPinchStateTypes, ViroRotateEvent, ViroRotateStateTypes, ViroDragEvent, ViroPlatformEvent, ViroCollisionEvent, ViroPlatformInfo, ViroCameraTransformEvent, ViroPlatformUpdateEvent, ViroCameraTransform, ViroExitViroEvent, ViroErrorEvent, ViroAnimationStartEvent, ViroAnimationFinishEvent, ViroLoadStartEvent, ViroLoadEndEvent, ViroLoadErrorEvent, ViroVideoBufferStartEvent, ViroVideoBufferEndEvent, ViroVideoUpdateTimeEvent, ViroVideoErrorEvent, ViroVideoFinishEvent, ViroAnimatedComponentStartEvent, ViroAnimatedComponentFinishEvent, ViroARAnchorRemovedEvent, ViroARAnchorUpdatedEvent, ViroARAnchorFoundEvent, ViroAnchor, ViroAnchorFoundMap, ViroAnchorUpdatedMap, ViroPlaneUpdatedMap, ViroPlaneUpdatedEvent, ViroARPlaneSizes, ViroCameraARHitTestEvent, ViroCameraARHitTest, ViroARHitTestResult, ViroARPointCloudUpdateEvent, ViroARPointCloud, ViroTrackingUpdatedEvent, ViroTrackingState, ViroTrackingReason, ViroAmbientLightUpdateEvent, ViroAmbientLightInfo, ViroWorldOrigin, ViroNativeTransformUpdateEvent, ViroControllerStatusEvent, ViroControllerStatus, ViroPortalEnterEvent, ViroPortalExitEvent, ViroSoundFinishEvent, ViroTextStyle, ViroStyle, VIRO_VERSION, };
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ViroARTrackingReasonConstants = exports.Viro3DSceneNavigator = exports.ViroVRSceneNavigator = exports.ViroVideo = exports.ViroText = exports.ViroSpotLight = exports.ViroSpinner = exports.ViroSphere = exports.ViroSpatialSound = exports.ViroSoundField = exports.ViroSound = exports.ViroAnimatedComponent = exports.ViroAmbientLight = exports.ViroAnimatedImage = exports.Viro360Video = exports.Viro360Image = exports.Viro3DObject = exports.ViroAnimations = exports.ViroSkyBox = exports.ViroSceneNavigator = exports.ViroSurface = exports.ViroScene = exports.ViroQuad = exports.ViroPortalScene = exports.ViroPortal = exports.ViroPolyline = exports.ViroPolygon = exports.ViroParticleEmitter = exports.ViroOrbitCamera = exports.ViroOmniLight = exports.ViroNode = exports.ViroMaterialVideo = exports.ViroARCamera = exports.ViroMaterials = exports.ViroImage = exports.ViroLightingEnvironment = exports.ViroGeometry = exports.ViroFlexView = exports.ViroDirectionalLight = exports.ViroController = exports.ViroCamera = exports.ViroButton = exports.ViroBox = exports.ViroARSceneNavigator = exports.ViroARScene = exports.ViroARPlaneSelector = exports.ViroARPlane = exports.ViroARTrackingTargets = exports.ViroARObjectMarker = exports.ViroARImageMarker = void 0;
|
|
4
|
-
exports.VIRO_VERSION = exports.
|
|
4
|
+
exports.VIRO_VERSION = exports.ViroRotateStateTypes = exports.ViroPinchStateTypes = exports.ViroClickStateTypes = exports.isARSupportedOnDevice = exports.polarToCartesianActual = exports.polarToCartesian = exports.ViroTrackingStateConstants = exports.ViroRecordingErrorConstants = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* Copyright (c) 2016-present, Viro Media, Inc.
|
|
7
7
|
* All rights reserved.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
const ViroTelemetry_1 = require("./components/Telemetry/ViroTelemetry");
|
|
11
|
-
Object.defineProperty(exports, "ViroTelemetry", { enumerable: true, get: function () { return ViroTelemetry_1.ViroTelemetry; } });
|
|
12
10
|
const ViroAnimations_1 = require("./components/Animation/ViroAnimations");
|
|
13
11
|
Object.defineProperty(exports, "ViroAnimations", { enumerable: true, get: function () { return ViroAnimations_1.ViroAnimations; } });
|
|
14
12
|
const Viro3DObject_1 = require("./components/Viro3DObject");
|
|
@@ -56,7 +56,7 @@ const withBranchAndroid = (config) => {
|
|
|
56
56
|
else {
|
|
57
57
|
target =
|
|
58
58
|
target +
|
|
59
|
-
` add(ReactViroPackage(ReactViroPackage.ViroPlatform.${viroConfig}))\n`;
|
|
59
|
+
` packages.add(ReactViroPackage(ReactViroPackage.ViroPlatform.${viroConfig}))\n`;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
if (isJava) {
|
|
@@ -93,16 +93,20 @@ const withBranchAndroid = (config) => {
|
|
|
93
93
|
* }
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
/*
|
|
97
|
+
data = data.replace(
|
|
98
|
+
`override fun getPackages(): List<ReactPackage> {
|
|
99
|
+
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
100
|
+
// packages.add(new MyReactNativePackage());
|
|
101
|
+
return PackageList(this).packages
|
|
102
|
+
}`,
|
|
103
|
+
`override fun getPackages(): List<ReactPackage> =
|
|
104
|
+
PackageList(this).packages.apply {
|
|
105
|
+
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
106
|
+
// add(MyReactNativePackage())
|
|
107
|
+
}`
|
|
108
|
+
);*/
|
|
109
|
+
data = (0, insertLinesHelper_1.insertLinesHelper)(target, "// packages.add(new MyReactNativePackage());", data);
|
|
106
110
|
}
|
|
107
111
|
else if (data.includes("// add(MyReactNativePackage())")) {
|
|
108
112
|
// console.log("[VIRO]: \n" + target);
|
|
@@ -15,7 +15,7 @@ const withViroPods = (config) => {
|
|
|
15
15
|
const root = newConfig.modRequest.platformProjectRoot;
|
|
16
16
|
fs_1.default.readFile(`${root}/Podfile`, "utf-8", (err, data) => {
|
|
17
17
|
data = (0, insertLinesHelper_1.insertLinesHelper)(` pod 'ViroReact', :path => '../node_modules/@reactvision/react-viro/ios'\n` +
|
|
18
|
-
` pod 'ViroKit', :path => '../node_modules/@reactvision/react-viro/ios/dist/ViroRenderer/'`, "post_install do |installer|", data, -1);
|
|
18
|
+
` pod 'ViroKit', :path => '../node_modules/@reactvision/react-viro/ios/dist/ViroRenderer/'\n`, "post_install do |installer|", data, -1);
|
|
19
19
|
fs_1.default.writeFile(`${root}/Podfile`, data, "utf-8", function (err) {
|
|
20
20
|
if (err)
|
|
21
21
|
console.log("Error writing Podfile");
|
package/index.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
import { ViroTelemetry } from "./components/Telemetry/ViroTelemetry";
|
|
7
6
|
import { ViroAnimations } from "./components/Animation/ViroAnimations";
|
|
8
7
|
import { Viro3DObject } from "./components/Viro3DObject";
|
|
9
8
|
import { Viro360Image } from "./components/Viro360Image";
|
|
@@ -249,6 +248,5 @@ export {
|
|
|
249
248
|
ViroSoundFinishEvent,
|
|
250
249
|
ViroTextStyle,
|
|
251
250
|
ViroStyle,
|
|
252
|
-
ViroTelemetry,
|
|
253
251
|
VIRO_VERSION,
|
|
254
252
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"main": "dist/index.js",
|
|
4
4
|
"module": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.43.0",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"after:release": "./prepare_release.sh"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"expo": "
|
|
30
|
-
"react-native": "
|
|
29
|
+
"expo": "~52.0.43",
|
|
30
|
+
"react-native": "0.76.9"
|
|
31
31
|
},
|
|
32
32
|
"peerDependenciesMeta": {
|
|
33
33
|
"expo": {
|
|
@@ -51,24 +51,33 @@
|
|
|
51
51
|
"LICENSE"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@expo/config-plugins": "^
|
|
55
|
-
"react": "
|
|
54
|
+
"@expo/config-plugins": "^9.0.14",
|
|
55
|
+
"react": "18.3.1",
|
|
56
|
+
"react-native-gradle-plugin": "^0.71.19"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"@babel/core": "^7.
|
|
59
|
-
"@babel/preset-env": "^7.
|
|
60
|
-
"@babel/preset-typescript": "^7.
|
|
59
|
+
"@babel/core": "^7.25.2",
|
|
60
|
+
"@babel/preset-env": "^7.25.3",
|
|
61
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
61
62
|
"@jest/globals": "^29.7.0",
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
63
|
+
"@react-native-community/cli": "^15.0.1",
|
|
64
|
+
"@react-native-community/cli-platform-android": "^15.0.1",
|
|
65
|
+
"@react-native-community/cli-platform-ios": "^15.0.1",
|
|
66
|
+
"@react-native/babel-preset": "^0.77.0",
|
|
67
|
+
"@react-native/eslint-config": "^0.77.0",
|
|
68
|
+
"@react-native/metro-config": "^0.77.0",
|
|
69
|
+
"@react-native/typescript-config": "^0.77.0",
|
|
70
|
+
"@types/babel__core": "^7.20.5",
|
|
71
|
+
"@types/node": "^22.13.1",
|
|
72
|
+
"@types/react": "^18.3.18",
|
|
73
|
+
"@types/react-native": "^0.73.0",
|
|
65
74
|
"babel-jest": "^29.7.0",
|
|
66
|
-
"expo": "
|
|
75
|
+
"expo": ">=52.0.0",
|
|
67
76
|
"jest": "^29.7.0",
|
|
68
|
-
"react-native": "0.
|
|
77
|
+
"react-native": "0.76.9",
|
|
69
78
|
"release-it": "^17.1.1",
|
|
70
79
|
"ts-node": "^10.9.2",
|
|
71
|
-
"typescript": "^
|
|
80
|
+
"typescript": "^5.3.0"
|
|
72
81
|
},
|
|
73
82
|
"bugs": {
|
|
74
83
|
"url": "https://github.com/ReactVision/viro/issues"
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { VIRO_VERSION } from "../Utilities/ViroVersion";
|
|
2
|
-
import { Platform } from "react-native";
|
|
3
|
-
|
|
4
|
-
export class ViroTelemetry {
|
|
5
|
-
private static _isDisabled = false;
|
|
6
|
-
private static _isDebugging = false;
|
|
7
|
-
private static _telemetryUrl = "https://telemetry.reactvision.org";
|
|
8
|
-
private static _timeout = 8000;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Allow a user to start debugging the telemetry to see what is sent.
|
|
12
|
-
*/
|
|
13
|
-
public static setDebugging() {
|
|
14
|
-
this._isDebugging = true;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Allow a user to opt out of telemetry.
|
|
19
|
-
*/
|
|
20
|
-
public static optOutTelemetry() {
|
|
21
|
-
this._isDisabled = true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public static recordTelemetry(eventName: string, payload: any = {}) {
|
|
25
|
-
// Skip recording telemetry if the feature is disabled
|
|
26
|
-
if (this._isDisabled) return;
|
|
27
|
-
// Do not send the telemetry data if debugging. Users may use this feature
|
|
28
|
-
// to preview what data would be sent.
|
|
29
|
-
if (this._isDebugging) {
|
|
30
|
-
console.log(
|
|
31
|
-
`[telemetry] ` + JSON.stringify({ eventName, payload }, null, 2)
|
|
32
|
-
);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const controller = new AbortController();
|
|
36
|
-
const timeoutId = setTimeout(() => controller.abort(), this._timeout);
|
|
37
|
-
|
|
38
|
-
payload = { ...payload, ...this.getAnonymousMeta() };
|
|
39
|
-
|
|
40
|
-
fetch(`${this._telemetryUrl}/api/v1/record`, {
|
|
41
|
-
method: "PUT",
|
|
42
|
-
body: JSON.stringify({ eventName, payload }),
|
|
43
|
-
headers: { "content-type": "application/json" },
|
|
44
|
-
signal: controller.signal,
|
|
45
|
-
})
|
|
46
|
-
.catch((e) => console.error(e))
|
|
47
|
-
.finally(() => clearTimeout(timeoutId));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
private static getAnonymousMeta() {
|
|
51
|
-
try {
|
|
52
|
-
const traits = {
|
|
53
|
-
// expo
|
|
54
|
-
isExpo:
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
Boolean(window?.expo) || false,
|
|
57
|
-
sdkVersion:
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
window?.expo?.modules?.ExponentConstants?.sdkVersion || undefined,
|
|
60
|
-
androidPackage:
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
window?.expo?.modules?.ExponentConstants?.android?.package ||
|
|
63
|
-
undefined,
|
|
64
|
-
iosBundleIdentifier:
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
window?.expo?.modules?.ExponentConstants?.ios?.bundleIdentifier ||
|
|
67
|
-
undefined,
|
|
68
|
-
expoDebugMode:
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
window?.expo?.modules?.ExponentConstants?.debugMode || undefined,
|
|
71
|
-
isDevice:
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
window?.expo?.modules?.ExponentConstants?.isDevice || undefined,
|
|
74
|
-
// library version
|
|
75
|
-
viroVersion: VIRO_VERSION,
|
|
76
|
-
platform: Platform.OS,
|
|
77
|
-
deviceOsVersion: Platform.Version,
|
|
78
|
-
reactNativeVersion:
|
|
79
|
-
Platform.constants.reactNativeVersion.major +
|
|
80
|
-
"." +
|
|
81
|
-
Platform.constants.reactNativeVersion.minor +
|
|
82
|
-
"." +
|
|
83
|
-
Platform.constants.reactNativeVersion.patch,
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
return traits;
|
|
87
|
-
} catch (e) {
|
|
88
|
-
console.error(e);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return {};
|
|
92
|
-
}
|
|
93
|
-
}
|