@configura/babylon-view-react 2.0.0-alpha.9 → 2.1.0-alpha.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/.eslintrc.json +5 -0
- package/dist/OrbitalCameraControls.d.ts +2 -1
- package/dist/OrbitalCameraControls.js +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -2
- package/package.json +4 -4
package/.eslintrc.json
ADDED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CfgOrbitalCameraControlProps, OrbitalCameraConfigurationProps } from "@configura/babylon-view";
|
|
2
2
|
import { Observable } from "@configura/web-utilities";
|
|
3
|
+
import React from "react";
|
|
3
4
|
interface Props {
|
|
4
5
|
active?: Observable<boolean>;
|
|
5
6
|
cameraControl: Observable<CfgOrbitalCameraControlProps>;
|
|
6
7
|
orbitalCameraConfiguration?: OrbitalCameraConfigurationProps;
|
|
7
8
|
}
|
|
8
|
-
export declare
|
|
9
|
+
export declare const OrbitalCameraControls: React.FC<Props>;
|
|
9
10
|
export {};
|
|
10
11
|
//# sourceMappingURL=OrbitalCameraControls.d.ts.map
|
|
@@ -29,7 +29,7 @@ function Slider(props) {
|
|
|
29
29
|
React.createElement("input", { className: "cfgSlider", type: "range", name: sliderType, min: min, max: max, step: "any", value: value, onChange: onChange }),
|
|
30
30
|
React.createElement("div", { className: "cfgOrbitalCameraControlsIcon" }, iconRight)));
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export const OrbitalCameraControls = (props) => {
|
|
33
33
|
const { cameraControl, active: activeObservable, orbitalCameraConfiguration } = props;
|
|
34
34
|
const [minDistance, setMinDistance] = useState(0.1);
|
|
35
35
|
const [maxDistance, setMaxDistance] = useState(10);
|
|
@@ -116,4 +116,4 @@ export function OrbitalCameraControls(props) {
|
|
|
116
116
|
parseFloat(event.currentTarget.value),
|
|
117
117
|
});
|
|
118
118
|
} })))));
|
|
119
|
-
}
|
|
119
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseViewEventListener, CfgOrbitalCameraControlProps, LoadingOrApplicationAreas, SingleProductDefaultCameraViewConfiguration, SingleProductDefaultCameraViewEventListener } from "@configura/babylon-view";
|
|
2
2
|
import { CfgProduct } from "@configura/web-api";
|
|
3
3
|
import { Observable } from "@configura/web-utilities";
|
|
4
|
+
import React from "react";
|
|
4
5
|
export interface BabylonViewProps {
|
|
5
6
|
className?: string;
|
|
6
7
|
applicationAreas: LoadingOrApplicationAreas;
|
|
@@ -20,7 +21,7 @@ export interface BabylonViewProps {
|
|
|
20
21
|
declare type WithCallback = {
|
|
21
22
|
callback: () => void;
|
|
22
23
|
};
|
|
23
|
-
export declare
|
|
24
|
+
export declare const BabylonView: React.FC<BabylonViewProps>;
|
|
24
25
|
export { SingleProductDefaultCameraViewConfiguration } from "@configura/babylon-view";
|
|
25
26
|
export * from "./OrbitalCameraControls.js";
|
|
26
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function useEvent(view, event, callback) {
|
|
|
15
15
|
};
|
|
16
16
|
}, [view, callback, event]);
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export const BabylonView = (props) => {
|
|
19
19
|
const { className, applicationAreas, configuration, errorCallback, height, showInspector, loadingCallback, product, width, cameraControl: cameraControlObservable, orbitalCameraConfigurationCallback, viewPhaseCallback, renderEnvironmentCallback, resetCamera, } = props;
|
|
20
20
|
const [view, setView] = useState(null);
|
|
21
21
|
const canvasRef = useCallback((element) => {
|
|
@@ -82,5 +82,5 @@ export function BabylonView(props) {
|
|
|
82
82
|
};
|
|
83
83
|
}, [cameraControlObservable, view]);
|
|
84
84
|
return React.createElement("canvas", { ref: canvasRef, className: className });
|
|
85
|
-
}
|
|
85
|
+
};
|
|
86
86
|
export * from "./OrbitalCameraControls.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/babylon-view-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0-alpha.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@configura/babylon-view": "2.
|
|
24
|
-
"@configura/web-api": "2.
|
|
23
|
+
"@configura/babylon-view": "2.1.0-alpha.0",
|
|
24
|
+
"@configura/web-api": "2.1.0-alpha.0",
|
|
25
25
|
"react": "17.x || ^16.12.0",
|
|
26
26
|
"react-dom": "17.x || ^16.12.0"
|
|
27
27
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "883ad6e31a55f05124dd0a6b2047c36ef6e6cea1"
|
|
46
46
|
}
|