@plurid/plurid-react 0.0.0-15 → 0.0.0-18
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/distribution/components/links/Link/components/Preview/index.d.ts +1 -1
- package/distribution/components/links/Link/index.d.ts +7 -2
- package/distribution/components/links/RouterLink/index.d.ts +1 -0
- package/distribution/components/planes/ExternalPlane/index.d.ts +1 -1
- package/distribution/components/planes/IframePlane/index.d.ts +1 -1
- package/distribution/components/structural/Plane/components/PlaneBridge/index.d.ts +1 -1
- package/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/index.d.ts +1 -1
- package/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/index.d.ts +1 -1
- package/distribution/components/structural/Plane/components/PlaneControls/index.d.ts +1 -1
- package/distribution/components/structural/Plane/components/PlaneDebugger/index.d.ts +1 -1
- package/distribution/components/structural/Plane/index.d.ts +3 -1
- package/distribution/components/structural/Root/index.d.ts +1 -1
- package/distribution/components/structural/Roots/index.d.ts +4 -11
- package/distribution/components/structural/Roots/styled.d.ts +0 -7
- package/distribution/components/structural/Space/components/SpaceDebugger/index.d.ts +1 -1
- package/distribution/components/structural/Space/index.d.ts +1 -1
- package/distribution/components/utilities/ApplicationConfigurator/index.d.ts +3 -1
- package/distribution/components/utilities/ErrorBoundary/index.d.ts +2 -1
- package/distribution/components/utilities/NotFound/index.d.ts +1 -1
- package/distribution/components/utilities/Origin/index.d.ts +15 -0
- package/distribution/components/utilities/Origin/styled.d.ts +7 -0
- package/distribution/components/utilities/PlaneConfigurator/index.d.ts +3 -1
- package/distribution/components/utilities/Portal/index.d.ts +2 -0
- package/distribution/components/utilities/Toolbar/General/components/Drawer/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Global/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Shortcuts/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Space/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Technical/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Toolbar/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Transform/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Viewcube/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/MenuUniverses/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/ToolbarScale/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/TransformArrow/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/TransformArrow/styled.d.ts +6 -1
- package/distribution/components/utilities/Toolbar/General/index.d.ts +1 -1
- package/distribution/components/utilities/UniverseExplorer/index.d.ts +1 -1
- package/distribution/components/utilities/Viewcube/components/ViewcubeFace/index.d.ts +1 -1
- package/distribution/components/utilities/Viewcube/components/ViewcubeModel/index.d.ts +1 -1
- package/distribution/components/utilities/Viewcube/index.d.ts +1 -1
- package/distribution/components/virtuals/List/index.d.ts +1 -1
- package/distribution/containers/Application/View/PlanesView/index.d.ts +1 -3
- package/distribution/containers/Application/View/index.d.ts +1 -1
- package/distribution/data/interfaces/index.d.ts +2 -1
- package/distribution/distribution/components/links/Link/components/Preview/index.d.ts +16 -0
- package/distribution/distribution/components/links/Link/components/Preview/styled.d.ts +7 -0
- package/distribution/distribution/components/links/Link/index.d.ts +24 -0
- package/distribution/distribution/components/links/Link/styled.d.ts +7 -0
- package/distribution/distribution/components/links/RouterLink/index.d.ts +17 -0
- package/distribution/distribution/components/links/RouterLink/styled.d.ts +2 -0
- package/distribution/distribution/components/planes/ExternalPlane/index.d.ts +14 -0
- package/distribution/distribution/components/planes/ExternalPlane/styled.d.ts +5 -0
- package/distribution/distribution/components/planes/IframePlane/index.d.ts +14 -0
- package/distribution/distribution/components/planes/IframePlane/styled.d.ts +5 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneBridge/index.d.ts +16 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneBridge/styled.d.ts +7 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneContent/index.d.ts +6 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneContent/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/index.d.ts +19 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/index.d.ts +18 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/styled.d.ts +2 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/index.d.ts +19 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/styled.d.ts +10 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneDebugger/index.d.ts +13 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneDebugger/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Plane/index.d.ts +25 -0
- package/distribution/distribution/components/structural/Plane/styled.d.ts +10 -0
- package/distribution/distribution/components/structural/Root/index.d.ts +14 -0
- package/distribution/distribution/components/structural/Root/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Roots/index.d.ts +18 -0
- package/distribution/distribution/components/structural/Roots/styled.d.ts +3 -0
- package/distribution/distribution/components/structural/Space/components/SpaceDebugger/index.d.ts +13 -0
- package/distribution/distribution/components/structural/Space/components/SpaceDebugger/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Space/index.d.ts +14 -0
- package/distribution/distribution/components/structural/Space/styled.d.ts +8 -0
- package/distribution/distribution/components/utilities/ApplicationConfigurator/index.d.ts +19 -0
- package/distribution/distribution/components/utilities/ApplicationConfigurator/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/ErrorBoundary/index.d.ts +18 -0
- package/distribution/distribution/components/utilities/NotFound/index.d.ts +13 -0
- package/distribution/distribution/components/utilities/NotFound/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Origin/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/Origin/styled.d.ts +7 -0
- package/distribution/distribution/components/utilities/PlaneConfigurator/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/PlaneConfigurator/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Portal/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/Toolbar/Button/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/Toolbar/Button/styled.d.ts +13 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/Drawer/index.d.ts +18 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/Drawer/styled.d.ts +3 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Global/index.d.ts +21 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Shortcuts/index.d.ts +14 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Space/index.d.ts +20 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Technical/index.d.ts +17 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Toolbar/index.d.ts +22 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Transform/index.d.ts +19 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Viewcube/index.d.ts +20 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/data.d.ts +9 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/index.d.ts +21 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/styled.d.ts +3 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuUniverses/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuUniverses/styled.d.ts +4 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/index.d.ts +23 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarScale/index.d.ts +21 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarScale/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/index.d.ts +23 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/TransformArrow/index.d.ts +14 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/TransformArrow/styled.d.ts +6 -0
- package/distribution/distribution/components/utilities/Toolbar/General/data.d.ts +6 -0
- package/distribution/distribution/components/utilities/Toolbar/General/index.d.ts +21 -0
- package/distribution/distribution/components/utilities/Toolbar/General/styled.d.ts +29 -0
- package/distribution/distribution/components/utilities/UniverseExplorer/index.d.ts +16 -0
- package/distribution/distribution/components/utilities/UniverseExplorer/styled.d.ts +2 -0
- package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeFace/index.d.ts +26 -0
- package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeFace/styled.d.ts +16 -0
- package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeModel/index.d.ts +17 -0
- package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeModel/styled.d.ts +3 -0
- package/distribution/distribution/components/utilities/Viewcube/index.d.ts +22 -0
- package/distribution/distribution/components/utilities/Viewcube/styled.d.ts +19 -0
- package/distribution/distribution/components/virtuals/List/components/ListItem/index.d.ts +9 -0
- package/distribution/distribution/components/virtuals/List/index.d.ts +15 -0
- package/distribution/distribution/components/virtuals/List/styled.d.ts +1 -0
- package/distribution/distribution/containers/Application/View/ErrorView/index.d.ts +6 -0
- package/distribution/distribution/containers/Application/View/ErrorView/styled.d.ts +1 -0
- package/distribution/distribution/containers/Application/View/PlanesView/index.d.ts +10 -0
- package/distribution/distribution/containers/Application/View/index-old.d.ts +1 -0
- package/distribution/distribution/containers/Application/View/index.d.ts +43 -0
- package/distribution/distribution/containers/Application/View/logic.d.ts +4 -0
- package/distribution/distribution/containers/Application/View/styled.d.ts +3 -0
- package/distribution/distribution/containers/Application/index.d.ts +18 -0
- package/distribution/distribution/containers/Provider/context.d.ts +4 -0
- package/distribution/distribution/containers/Provider/index.d.ts +12 -0
- package/distribution/distribution/containers/RouterBrowser/index.d.ts +5 -0
- package/distribution/distribution/containers/RouterStatic/index.d.ts +18 -0
- package/distribution/distribution/data/constants/index.d.ts +3 -0
- package/distribution/distribution/data/interfaces/index.d.ts +19 -0
- package/distribution/distribution/index.d.ts +87 -0
- package/distribution/distribution/services/context/index.d.ts +5 -0
- package/distribution/distribution/services/hooks/event/index.d.ts +4 -0
- package/distribution/distribution/services/hooks/index.d.ts +2 -0
- package/distribution/distribution/services/hooks/router/index.d.ts +1 -0
- package/distribution/distribution/services/logic/computing/index.d.ts +10 -0
- package/distribution/distribution/services/logic/router/index.d.ts +51 -0
- package/distribution/distribution/services/logic/router/styled.d.ts +5 -0
- package/distribution/distribution/services/logic/server/index.d.ts +3 -0
- package/distribution/distribution/services/logic/shortcuts/index.d.ts +10 -0
- package/distribution/distribution/services/logic/transform/index.d.ts +2 -0
- package/distribution/distribution/services/state/actions/index.d.ts +9 -0
- package/distribution/distribution/services/state/context/index.d.ts +3 -0
- package/distribution/distribution/services/state/global/index.d.ts +6 -0
- package/distribution/distribution/services/state/modules/configuration/actions/index.d.ts +28 -0
- package/distribution/distribution/services/state/modules/configuration/index.d.ts +7 -0
- package/distribution/distribution/services/state/modules/configuration/initial/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/configuration/reducer/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/configuration/resolvers/index.d.ts +27 -0
- package/distribution/distribution/services/state/modules/configuration/selectors/index.d.ts +11 -0
- package/distribution/distribution/services/state/modules/configuration/types/index.d.ts +136 -0
- package/distribution/distribution/services/state/modules/general/actions/index.d.ts +2 -0
- package/distribution/distribution/services/state/modules/general/index.d.ts +7 -0
- package/distribution/distribution/services/state/modules/general/initial/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/general/reducer/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/general/resolvers/index.d.ts +1 -0
- package/distribution/distribution/services/state/modules/general/selectors/index.d.ts +2 -0
- package/distribution/distribution/services/state/modules/general/types/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/index.d.ts +15 -0
- package/distribution/distribution/services/state/modules/shortcuts/actions/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/shortcuts/index.d.ts +7 -0
- package/distribution/distribution/services/state/modules/shortcuts/initial/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/shortcuts/reducer/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/shortcuts/resolvers/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/shortcuts/selectors/index.d.ts +11 -0
- package/distribution/distribution/services/state/modules/shortcuts/types/index.d.ts +13 -0
- package/distribution/distribution/services/state/modules/space/actions/index.d.ts +48 -0
- package/distribution/distribution/services/state/modules/space/index.d.ts +7 -0
- package/distribution/distribution/services/state/modules/space/initial/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/space/reducer/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/space/resolvers/index.d.ts +47 -0
- package/distribution/distribution/services/state/modules/space/selectors/index.d.ts +147 -0
- package/distribution/distribution/services/state/modules/space/types/index.d.ts +257 -0
- package/distribution/distribution/services/state/modules/themes/actions/index.d.ts +4 -0
- package/distribution/distribution/services/state/modules/themes/index.d.ts +7 -0
- package/distribution/distribution/services/state/modules/themes/initial/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/themes/reducer/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/themes/resolvers/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/themes/selectors/index.d.ts +19 -0
- package/distribution/distribution/services/state/modules/themes/types/index.d.ts +17 -0
- package/distribution/distribution/services/state/modules/ui/actions/index.d.ts +2 -0
- package/distribution/distribution/services/state/modules/ui/index.d.ts +7 -0
- package/distribution/distribution/services/state/modules/ui/initial/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/ui/reducer/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/ui/resolvers/index.d.ts +2 -0
- package/distribution/distribution/services/state/modules/ui/selectors/index.d.ts +11 -0
- package/distribution/distribution/services/state/modules/ui/types/index.d.ts +10 -0
- package/distribution/distribution/services/state/selectors/index.d.ts +197 -0
- package/distribution/distribution/services/state/store/development/index.d.ts +5 -0
- package/distribution/distribution/services/state/store/index.d.ts +19 -0
- package/distribution/distribution/services/state/store/production/index.d.ts +5 -0
- package/distribution/distribution/services/state/store/reducers/index.d.ts +9 -0
- package/distribution/distribution/services/state/types/space.d.ts +3 -0
- package/distribution/distribution/services/styled/index.d.ts +2 -0
- package/distribution/distribution/services/utilities/environment/index.d.ts +7 -0
- package/distribution/distribution/services/utilities/imports/index.d.ts +49 -0
- package/distribution/distribution/services/utilities/react/index.d.ts +3 -0
- package/distribution/index.d.ts +22 -15
- package/distribution/index.es.js +7026 -0
- package/distribution/index.es.js.map +1 -0
- package/distribution/index.js +576 -395
- package/distribution/index.js.map +1 -1
- package/distribution/index.min.js +79 -76
- package/distribution/index.min.js.map +1 -0
- package/distribution/services/logic/router/index.d.ts +5 -5
- package/distribution/services/logic/server/index.d.ts +2 -3
- package/distribution/services/logic/shortcuts/index.d.ts +1 -1
- package/distribution/services/logic/transform/index.d.ts +2 -0
- package/distribution/services/state/modules/space/actions/index.d.ts +2 -0
- package/distribution/services/state/modules/space/resolvers/index.d.ts +2 -0
- package/distribution/services/state/modules/space/selectors/index.d.ts +8 -0
- package/distribution/services/state/modules/space/types/index.d.ts +16 -1
- package/distribution/services/state/selectors/index.d.ts +8 -0
- package/distribution/services/state/store/reducers/index.d.ts +1 -1
- package/distribution/services/styled/index.d.ts +1 -1
- package/package.json +47 -47
package/distribution/index.js
CHANGED
|
@@ -743,8 +743,12 @@ var shortcuts = Object.freeze({
|
|
|
743
743
|
Types: index$f
|
|
744
744
|
});
|
|
745
745
|
|
|
746
|
+
const SET_SPACE_FIELD = "SET_SPACE_FIELD";
|
|
747
|
+
|
|
746
748
|
const SET_SPACE_LOADING = "SET_SPACE_LOADING";
|
|
747
749
|
|
|
750
|
+
const SET_TRANSFORM = "SET_TRANSFORM";
|
|
751
|
+
|
|
748
752
|
const SET_ANIMATED_TRANSFORM = "SET_ANIMATED_TRANSFORM";
|
|
749
753
|
|
|
750
754
|
const SET_TRANSFORM_TIME = "SET_TRANSFORM_TIME";
|
|
@@ -833,7 +837,9 @@ const SPACE_SET_CULLED_VIEW = "SPACE_SET_CULLED_VIEW";
|
|
|
833
837
|
|
|
834
838
|
var index$b = Object.freeze({
|
|
835
839
|
__proto__: null,
|
|
840
|
+
SET_SPACE_FIELD: SET_SPACE_FIELD,
|
|
836
841
|
SET_SPACE_LOADING: SET_SPACE_LOADING,
|
|
842
|
+
SET_TRANSFORM: SET_TRANSFORM,
|
|
837
843
|
SET_ANIMATED_TRANSFORM: SET_ANIMATED_TRANSFORM,
|
|
838
844
|
SET_TRANSFORM_TIME: SET_TRANSFORM_TIME,
|
|
839
845
|
SET_SPACE_LOCATION: SET_SPACE_LOCATION,
|
|
@@ -879,11 +885,21 @@ var index$b = Object.freeze({
|
|
|
879
885
|
SPACE_SET_CULLED_VIEW: SPACE_SET_CULLED_VIEW
|
|
880
886
|
});
|
|
881
887
|
|
|
888
|
+
const setSpaceField$1 = payload => ({
|
|
889
|
+
type: SET_SPACE_FIELD,
|
|
890
|
+
payload: payload
|
|
891
|
+
});
|
|
892
|
+
|
|
882
893
|
const setSpaceLoading$1 = payload => ({
|
|
883
894
|
type: SET_SPACE_LOADING,
|
|
884
895
|
payload: payload
|
|
885
896
|
});
|
|
886
897
|
|
|
898
|
+
const setTransform$1 = payload => ({
|
|
899
|
+
type: SET_TRANSFORM,
|
|
900
|
+
payload: payload
|
|
901
|
+
});
|
|
902
|
+
|
|
887
903
|
const setAnimatedTransform$1 = payload => ({
|
|
888
904
|
type: SET_ANIMATED_TRANSFORM,
|
|
889
905
|
payload: payload
|
|
@@ -1078,7 +1094,9 @@ const spaceSetCulledView$1 = payload => ({
|
|
|
1078
1094
|
|
|
1079
1095
|
var index$a = Object.freeze({
|
|
1080
1096
|
__proto__: null,
|
|
1097
|
+
setSpaceField: setSpaceField$1,
|
|
1081
1098
|
setSpaceLoading: setSpaceLoading$1,
|
|
1099
|
+
setTransform: setTransform$1,
|
|
1082
1100
|
setAnimatedTransform: setAnimatedTransform$1,
|
|
1083
1101
|
setTransformTime: setTransformTime$1,
|
|
1084
1102
|
setSpaceLocation: setSpaceLocation$1,
|
|
@@ -1126,6 +1144,7 @@ var index$a = Object.freeze({
|
|
|
1126
1144
|
|
|
1127
1145
|
const initialState$2 = {
|
|
1128
1146
|
loading: true,
|
|
1147
|
+
transform: "matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",
|
|
1129
1148
|
animatedTransform: false,
|
|
1130
1149
|
transformTime: 450,
|
|
1131
1150
|
scale: 1,
|
|
@@ -1160,303 +1179,393 @@ const initialState$2 = {
|
|
|
1160
1179
|
culledView: []
|
|
1161
1180
|
};
|
|
1162
1181
|
|
|
1182
|
+
const {quaternion: quaternion, matrix: matrix} = pluridEngine.interaction;
|
|
1183
|
+
|
|
1184
|
+
const {matrixArrayToCSSMatrix: matrixArrayToCSSMatrix$1, rotateMatrix: rotateMatrix$1, multiplyArrayOfMatrices: multiplyArrayOfMatrices$1, scaleMatrix: scaleMatrix$1, translateMatrix: translateMatrix$2} = matrix;
|
|
1185
|
+
|
|
1186
|
+
const {degToRad: degToRad$2} = quaternion;
|
|
1187
|
+
|
|
1188
|
+
const computeMatrix = spaceState => {
|
|
1189
|
+
const {translationX: translationX, translationY: translationY, translationZ: translationZ, rotationX: rotationX, rotationY: rotationY, scale: scale} = spaceState;
|
|
1190
|
+
const innerWidth = typeof window === "undefined" ? 720 : window.innerWidth / 2;
|
|
1191
|
+
const innerHeight = typeof window === "undefined" ? 400 : window.innerHeight / 2;
|
|
1192
|
+
const transformOriginX = translationX * -1 + innerWidth;
|
|
1193
|
+
const transformOriginY = translationY * -1 + innerHeight;
|
|
1194
|
+
const transformOriginZ = translationZ * -1;
|
|
1195
|
+
const rotationMatrix = rotateMatrix$1(degToRad$2(-rotationX), degToRad$2(-rotationY));
|
|
1196
|
+
const translationMatrix = translateMatrix$2(translationX, translationY, translationZ);
|
|
1197
|
+
const scalationMatrix = scaleMatrix$1(scale);
|
|
1198
|
+
const transformMatrix = multiplyArrayOfMatrices$1([ translationMatrix, multiplyArrayOfMatrices$1([ translateMatrix$2(transformOriginX, transformOriginY, transformOriginZ), rotationMatrix, translateMatrix$2(-transformOriginX, -transformOriginY, -transformOriginZ) ]), scalationMatrix ]);
|
|
1199
|
+
const transform = matrixArrayToCSSMatrix$1(transformMatrix);
|
|
1200
|
+
return transform;
|
|
1201
|
+
};
|
|
1202
|
+
|
|
1163
1203
|
const {toRadians: toRadians} = pluridFunctions.mathematics.geometry;
|
|
1164
1204
|
|
|
1165
|
-
const
|
|
1166
|
-
loading: action.payload
|
|
1167
|
-
});
|
|
1205
|
+
const getNewState = state => pluridFunctions.objects.clone(state, "any");
|
|
1168
1206
|
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1171
|
-
|
|
1207
|
+
const setSpaceField = (state, action) => {
|
|
1208
|
+
const {field: field, value: value} = action.payload;
|
|
1209
|
+
const newState = getNewState(state);
|
|
1210
|
+
newState[field] = value;
|
|
1211
|
+
return Object.assign({}, newState);
|
|
1212
|
+
};
|
|
1172
1213
|
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1175
|
-
})
|
|
1214
|
+
const setSpaceLoading = (state, action) => {
|
|
1215
|
+
const newState = getNewState(state);
|
|
1216
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1217
|
+
loading: action.payload
|
|
1218
|
+
});
|
|
1219
|
+
};
|
|
1176
1220
|
|
|
1177
|
-
const
|
|
1221
|
+
const setTransform = (state, action) => {
|
|
1222
|
+
const {translationX: translationX, translationY: translationY, translationZ: translationZ, rotationX: rotationX, rotationY: rotationY, scale: scale} = action.payload;
|
|
1223
|
+
const resolvedTranslationX = translationX !== null && translationX !== void 0 ? translationX : state.translationX;
|
|
1224
|
+
const resolvedTranslationY = translationY !== null && translationY !== void 0 ? translationY : state.translationY;
|
|
1225
|
+
const resolvedTranslationZ = translationZ !== null && translationZ !== void 0 ? translationZ : state.translationZ;
|
|
1226
|
+
const resolvedRotationX = rotationX !== null && rotationX !== void 0 ? rotationX : state.rotationX;
|
|
1227
|
+
const resolvedRotationY = rotationY !== null && rotationY !== void 0 ? rotationY : state.rotationY;
|
|
1228
|
+
const resolvedScale = scale !== null && scale !== void 0 ? scale : state.scale;
|
|
1229
|
+
const newState = getNewState(state);
|
|
1230
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1231
|
+
translationX: resolvedTranslationX,
|
|
1232
|
+
translationY: resolvedTranslationY,
|
|
1233
|
+
translationZ: resolvedTranslationZ,
|
|
1234
|
+
rotationX: resolvedRotationX,
|
|
1235
|
+
rotationY: resolvedRotationY,
|
|
1236
|
+
scale: resolvedScale
|
|
1237
|
+
});
|
|
1238
|
+
};
|
|
1178
1239
|
|
|
1179
|
-
const
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
translationX: translationX,
|
|
1184
|
-
translationZ: translationZ
|
|
1240
|
+
const setAnimatedTransform = (state, action) => {
|
|
1241
|
+
const newState = getNewState(state);
|
|
1242
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1243
|
+
animatedTransform: action.payload
|
|
1185
1244
|
});
|
|
1186
1245
|
};
|
|
1187
1246
|
|
|
1188
|
-
const
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
translationX: translationX,
|
|
1193
|
-
translationZ: translationZ
|
|
1247
|
+
const setTransformTime = (state, action) => {
|
|
1248
|
+
const newState = getNewState(state);
|
|
1249
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1250
|
+
transformTime: action.payload
|
|
1194
1251
|
});
|
|
1195
1252
|
};
|
|
1196
1253
|
|
|
1254
|
+
const setSpaceLocation = (state, action) => {
|
|
1255
|
+
const newState = getNewState(state);
|
|
1256
|
+
return Object.assign(Object.assign({}, newState), action.payload);
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
const viewCameraMoveForward = state => {
|
|
1260
|
+
const newState = getNewState(state);
|
|
1261
|
+
newState.translationZ = state.translationZ + pluridData.TRANSLATION_STEP * 6 * Math.cos(toRadians(-state.rotationY));
|
|
1262
|
+
newState.translationX = state.translationX + pluridData.TRANSLATION_STEP * 6 * Math.sin(toRadians(-state.rotationY));
|
|
1263
|
+
newState.transform = computeMatrix(newState);
|
|
1264
|
+
return Object.assign({}, newState);
|
|
1265
|
+
};
|
|
1266
|
+
|
|
1267
|
+
const viewCameraMoveBackward = state => {
|
|
1268
|
+
const newState = getNewState(state);
|
|
1269
|
+
newState.translationZ = state.translationZ - pluridData.TRANSLATION_STEP * 6 * Math.cos(toRadians(-state.rotationY));
|
|
1270
|
+
newState.translationX = state.translationX - pluridData.TRANSLATION_STEP * 6 * Math.sin(toRadians(-state.rotationY));
|
|
1271
|
+
newState.transform = computeMatrix(newState);
|
|
1272
|
+
return Object.assign({}, newState);
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1197
1275
|
const viewCameraMoveLeft = state => {
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
});
|
|
1276
|
+
const newState = getNewState(state);
|
|
1277
|
+
newState.translationX = state.translationX + pluridData.TRANSLATION_STEP * 3 * Math.cos(toRadians(state.rotationY));
|
|
1278
|
+
newState.translationZ = state.translationZ + pluridData.TRANSLATION_STEP * 3 * Math.sin(toRadians(state.rotationY));
|
|
1279
|
+
newState.transform = computeMatrix(newState);
|
|
1280
|
+
return Object.assign({}, newState);
|
|
1204
1281
|
};
|
|
1205
1282
|
|
|
1206
1283
|
const viewCameraMoveRight = state => {
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
});
|
|
1284
|
+
const newState = getNewState(state);
|
|
1285
|
+
newState.translationX = state.translationX - pluridData.TRANSLATION_STEP * 3 * Math.cos(toRadians(state.rotationY));
|
|
1286
|
+
newState.translationZ = state.translationZ - pluridData.TRANSLATION_STEP * 3 * Math.sin(toRadians(state.rotationY));
|
|
1287
|
+
newState.transform = computeMatrix(newState);
|
|
1288
|
+
return Object.assign({}, newState);
|
|
1213
1289
|
};
|
|
1214
1290
|
|
|
1215
1291
|
const viewCameraMoveUp = state => {
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
});
|
|
1292
|
+
const newState = getNewState(state);
|
|
1293
|
+
newState.translationY = state.translationY + pluridData.TRANSLATION_STEP * 3;
|
|
1294
|
+
newState.transform = computeMatrix(newState);
|
|
1295
|
+
return Object.assign({}, newState);
|
|
1220
1296
|
};
|
|
1221
1297
|
|
|
1222
1298
|
const viewCameraMoveDown = state => {
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
});
|
|
1299
|
+
const newState = getNewState(state);
|
|
1300
|
+
newState.translationY = state.translationY - pluridData.TRANSLATION_STEP * 3;
|
|
1301
|
+
newState.transform = computeMatrix(newState);
|
|
1302
|
+
return Object.assign({}, newState);
|
|
1227
1303
|
};
|
|
1228
1304
|
|
|
1229
1305
|
const viewCameraTurnUp = state => {
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
});
|
|
1306
|
+
const newState = getNewState(state);
|
|
1307
|
+
newState.rotationX = (state.rotationX + pluridData.ROTATION_STEP) % 360;
|
|
1308
|
+
newState.transform = computeMatrix(newState);
|
|
1309
|
+
return Object.assign({}, newState);
|
|
1234
1310
|
};
|
|
1235
1311
|
|
|
1236
1312
|
const viewCameraTurnDown = state => {
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
});
|
|
1313
|
+
const newState = getNewState(state);
|
|
1314
|
+
newState.rotationX = (state.rotationX - pluridData.ROTATION_STEP) % 360;
|
|
1315
|
+
newState.transform = computeMatrix(newState);
|
|
1316
|
+
return Object.assign({}, newState);
|
|
1241
1317
|
};
|
|
1242
1318
|
|
|
1243
1319
|
const viewCameraTurnLeft = state => {
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
});
|
|
1320
|
+
const newState = getNewState(state);
|
|
1321
|
+
newState.rotationY = (state.rotationY - pluridData.ROTATION_STEP) % 360;
|
|
1322
|
+
newState.transform = computeMatrix(newState);
|
|
1323
|
+
return Object.assign({}, newState);
|
|
1248
1324
|
};
|
|
1249
1325
|
|
|
1250
1326
|
const viewCameraTurnRight = state => {
|
|
1251
|
-
const
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
});
|
|
1327
|
+
const newState = getNewState(state);
|
|
1328
|
+
newState.rotationY = (state.rotationY + pluridData.ROTATION_STEP) % 360;
|
|
1329
|
+
newState.transform = computeMatrix(newState);
|
|
1330
|
+
return Object.assign({}, newState);
|
|
1255
1331
|
};
|
|
1256
1332
|
|
|
1257
1333
|
const rotateUp = state => {
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
});
|
|
1334
|
+
const newState = getNewState(state);
|
|
1335
|
+
newState.rotationX = (state.rotationX + pluridData.ROTATION_STEP) % 360;
|
|
1336
|
+
newState.transform = computeMatrix(newState);
|
|
1337
|
+
return Object.assign({}, newState);
|
|
1262
1338
|
};
|
|
1263
1339
|
|
|
1264
1340
|
const rotateDown = state => {
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
});
|
|
1341
|
+
const newState = getNewState(state);
|
|
1342
|
+
newState.rotationX = (state.rotationX - pluridData.ROTATION_STEP) % 360;
|
|
1343
|
+
newState.transform = computeMatrix(newState);
|
|
1344
|
+
return Object.assign({}, newState);
|
|
1269
1345
|
};
|
|
1270
1346
|
|
|
1271
|
-
const rotateX = (state, action) =>
|
|
1272
|
-
|
|
1273
|
-
|
|
1347
|
+
const rotateX = (state, action) => {
|
|
1348
|
+
const newState = getNewState(state);
|
|
1349
|
+
newState.rotationX = action.payload;
|
|
1350
|
+
newState.transform = computeMatrix(newState);
|
|
1351
|
+
return Object.assign({}, newState);
|
|
1352
|
+
};
|
|
1274
1353
|
|
|
1275
1354
|
const rotateXWith = (state, action) => {
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
});
|
|
1355
|
+
const newState = getNewState(state);
|
|
1356
|
+
newState.rotationX = state.rotationX + action.payload;
|
|
1357
|
+
newState.transform = computeMatrix(newState);
|
|
1358
|
+
return Object.assign({}, newState);
|
|
1280
1359
|
};
|
|
1281
1360
|
|
|
1282
1361
|
const rotateLeft = state => {
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
});
|
|
1362
|
+
const newState = getNewState(state);
|
|
1363
|
+
newState.rotationY = (state.rotationY + pluridData.ROTATION_STEP) % 360;
|
|
1364
|
+
newState.transform = computeMatrix(newState);
|
|
1365
|
+
return Object.assign({}, newState);
|
|
1287
1366
|
};
|
|
1288
1367
|
|
|
1289
1368
|
const rotateRight = state => {
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
});
|
|
1369
|
+
const newState = getNewState(state);
|
|
1370
|
+
newState.rotationY = (state.rotationY - pluridData.ROTATION_STEP) % 360;
|
|
1371
|
+
newState.transform = computeMatrix(newState);
|
|
1372
|
+
return Object.assign({}, newState);
|
|
1294
1373
|
};
|
|
1295
1374
|
|
|
1296
|
-
const rotateY = (state, action) =>
|
|
1297
|
-
|
|
1298
|
-
|
|
1375
|
+
const rotateY = (state, action) => {
|
|
1376
|
+
const newState = getNewState(state);
|
|
1377
|
+
newState.rotationY = action.payload;
|
|
1378
|
+
newState.transform = computeMatrix(newState);
|
|
1379
|
+
return Object.assign({}, newState);
|
|
1380
|
+
};
|
|
1299
1381
|
|
|
1300
1382
|
const rotateYWith = (state, action) => {
|
|
1301
|
-
const
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
});
|
|
1383
|
+
const newState = getNewState(state);
|
|
1384
|
+
newState.rotationY = state.rotationY + action.payload;
|
|
1385
|
+
newState.transform = computeMatrix(newState);
|
|
1386
|
+
return Object.assign({}, newState);
|
|
1305
1387
|
};
|
|
1306
1388
|
|
|
1307
1389
|
const translateUp = state => {
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
});
|
|
1390
|
+
const newState = getNewState(state);
|
|
1391
|
+
newState.translationY = state.translationY - pluridData.TRANSLATION_STEP;
|
|
1392
|
+
newState.transform = computeMatrix(newState);
|
|
1393
|
+
return Object.assign({}, newState);
|
|
1312
1394
|
};
|
|
1313
1395
|
|
|
1314
1396
|
const translateDown = state => {
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
});
|
|
1397
|
+
const newState = getNewState(state);
|
|
1398
|
+
newState.translationY = state.translationY + pluridData.TRANSLATION_STEP;
|
|
1399
|
+
newState.transform = computeMatrix(newState);
|
|
1400
|
+
return Object.assign({}, newState);
|
|
1319
1401
|
};
|
|
1320
1402
|
|
|
1321
1403
|
const translateLeft = state => {
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
});
|
|
1404
|
+
const newState = getNewState(state);
|
|
1405
|
+
newState.translationX = state.translationX - pluridData.TRANSLATION_STEP * Math.cos(toRadians(state.rotationY));
|
|
1406
|
+
newState.translationZ = state.translationZ - pluridData.TRANSLATION_STEP * Math.sin(toRadians(state.rotationY));
|
|
1407
|
+
newState.transform = computeMatrix(newState);
|
|
1408
|
+
return Object.assign({}, newState);
|
|
1328
1409
|
};
|
|
1329
1410
|
|
|
1330
1411
|
const translateRight = state => {
|
|
1331
|
-
const
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
});
|
|
1412
|
+
const newState = getNewState(state);
|
|
1413
|
+
newState.translationX = state.translationX + pluridData.TRANSLATION_STEP * Math.cos(toRadians(state.rotationY));
|
|
1414
|
+
newState.translationZ = state.translationZ + pluridData.TRANSLATION_STEP * Math.sin(toRadians(state.rotationY));
|
|
1415
|
+
newState.transform = computeMatrix(newState);
|
|
1416
|
+
return Object.assign({}, newState);
|
|
1337
1417
|
};
|
|
1338
1418
|
|
|
1339
1419
|
const translateIn = state => {
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
});
|
|
1420
|
+
const newState = getNewState(state);
|
|
1421
|
+
newState.translationZ = state.translationZ - pluridData.TRANSLATION_STEP * 3 * Math.cos(toRadians(-state.rotationY));
|
|
1422
|
+
newState.translationX = state.translationX - pluridData.TRANSLATION_STEP * 3 * Math.sin(toRadians(-state.rotationY));
|
|
1423
|
+
newState.transform = computeMatrix(newState);
|
|
1424
|
+
return Object.assign({}, newState);
|
|
1346
1425
|
};
|
|
1347
1426
|
|
|
1348
1427
|
const translateOut = state => {
|
|
1349
|
-
const
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
});
|
|
1428
|
+
const newState = getNewState(state);
|
|
1429
|
+
newState.translationZ = state.translationZ + pluridData.TRANSLATION_STEP * 3 * Math.cos(toRadians(-state.rotationY));
|
|
1430
|
+
newState.translationX = state.translationX + pluridData.TRANSLATION_STEP * 3 * Math.sin(toRadians(-state.rotationY));
|
|
1431
|
+
newState.transform = computeMatrix(newState);
|
|
1432
|
+
return Object.assign({}, newState);
|
|
1355
1433
|
};
|
|
1356
1434
|
|
|
1357
1435
|
const translateXWith = (state, action) => {
|
|
1358
|
-
const
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
});
|
|
1436
|
+
const newState = getNewState(state);
|
|
1437
|
+
newState.translationX = state.translationX + action.payload * Math.cos(toRadians(state.rotationY));
|
|
1438
|
+
newState.translationZ = state.translationZ + action.payload * Math.sin(toRadians(state.rotationY));
|
|
1439
|
+
newState.transform = computeMatrix(newState);
|
|
1440
|
+
return Object.assign({}, newState);
|
|
1364
1441
|
};
|
|
1365
1442
|
|
|
1366
1443
|
const translateYWith = (state, action) => {
|
|
1367
|
-
const
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
});
|
|
1444
|
+
const newState = getNewState(state);
|
|
1445
|
+
newState.translationY = state.translationY + action.payload;
|
|
1446
|
+
newState.transform = computeMatrix(newState);
|
|
1447
|
+
return Object.assign({}, newState);
|
|
1371
1448
|
};
|
|
1372
1449
|
|
|
1373
1450
|
const scaleUp = state => {
|
|
1374
1451
|
const computedScale = state.scale + pluridData.SCALE_STEP;
|
|
1375
1452
|
const scale = computedScale < pluridData.SCALE_UPPER_LIMIT ? computedScale : pluridData.SCALE_UPPER_LIMIT;
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1453
|
+
const newState = getNewState(state);
|
|
1454
|
+
newState.scale = scale;
|
|
1455
|
+
newState.transform = computeMatrix(newState);
|
|
1456
|
+
return Object.assign({}, newState);
|
|
1379
1457
|
};
|
|
1380
1458
|
|
|
1381
1459
|
const scaleDown = state => {
|
|
1382
1460
|
const computedScale = state.scale - pluridData.SCALE_STEP;
|
|
1383
1461
|
const scale = computedScale > pluridData.SCALE_LOWER_LIMIT ? computedScale : pluridData.SCALE_LOWER_LIMIT;
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1462
|
+
const newState = getNewState(state);
|
|
1463
|
+
newState.scale = scale;
|
|
1464
|
+
newState.transform = computeMatrix(newState);
|
|
1465
|
+
return Object.assign({}, newState);
|
|
1387
1466
|
};
|
|
1388
1467
|
|
|
1389
1468
|
const scaleUpWith = (state, action) => {
|
|
1390
1469
|
const computedScale = state.scale + Math.abs(action.payload);
|
|
1391
1470
|
const scale = computedScale < pluridData.SCALE_UPPER_LIMIT ? computedScale : pluridData.SCALE_UPPER_LIMIT;
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1471
|
+
const newState = getNewState(state);
|
|
1472
|
+
newState.scale = scale;
|
|
1473
|
+
newState.transform = computeMatrix(newState);
|
|
1474
|
+
return Object.assign({}, newState);
|
|
1395
1475
|
};
|
|
1396
1476
|
|
|
1397
1477
|
const scaleDownWith = (state, action) => {
|
|
1398
1478
|
const computedScale = state.scale - Math.abs(action.payload);
|
|
1399
1479
|
const scale = computedScale > pluridData.SCALE_LOWER_LIMIT ? computedScale : pluridData.SCALE_LOWER_LIMIT;
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1480
|
+
const newState = getNewState(state);
|
|
1481
|
+
newState.scale = scale;
|
|
1482
|
+
newState.transform = computeMatrix(newState);
|
|
1483
|
+
return Object.assign({}, newState);
|
|
1403
1484
|
};
|
|
1404
1485
|
|
|
1405
|
-
const setInitialTree = (state, action) =>
|
|
1406
|
-
|
|
1407
|
-
})
|
|
1486
|
+
const setInitialTree = (state, action) => {
|
|
1487
|
+
const newState = getNewState(state);
|
|
1488
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1489
|
+
initialTree: [ ...action.payload ]
|
|
1490
|
+
});
|
|
1491
|
+
};
|
|
1408
1492
|
|
|
1409
|
-
const setTree = (state, action) =>
|
|
1410
|
-
|
|
1411
|
-
})
|
|
1493
|
+
const setTree = (state, action) => {
|
|
1494
|
+
const newState = getNewState(state);
|
|
1495
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1496
|
+
tree: [ ...action.payload ]
|
|
1497
|
+
});
|
|
1498
|
+
};
|
|
1412
1499
|
|
|
1413
|
-
const setActiveUniverse = (state, action) =>
|
|
1414
|
-
|
|
1415
|
-
})
|
|
1500
|
+
const setActiveUniverse = (state, action) => {
|
|
1501
|
+
const newState = getNewState(state);
|
|
1502
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1503
|
+
activeUniverseID: action.payload
|
|
1504
|
+
});
|
|
1505
|
+
};
|
|
1416
1506
|
|
|
1417
|
-
const spaceResetTransform = state =>
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1507
|
+
const spaceResetTransform = state => {
|
|
1508
|
+
const newState = getNewState(state);
|
|
1509
|
+
newState.scale = 1;
|
|
1510
|
+
newState.rotationX = 0;
|
|
1511
|
+
newState.rotationY = 0;
|
|
1512
|
+
newState.translationX = 0;
|
|
1513
|
+
newState.translationY = 0;
|
|
1514
|
+
newState.translationZ = 0;
|
|
1515
|
+
newState.transform = computeMatrix(newState);
|
|
1516
|
+
return Object.assign({}, newState);
|
|
1517
|
+
};
|
|
1425
1518
|
|
|
1426
|
-
const setViewSize = (state, action) =>
|
|
1427
|
-
|
|
1428
|
-
})
|
|
1519
|
+
const setViewSize = (state, action) => {
|
|
1520
|
+
const newState = getNewState(state);
|
|
1521
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1522
|
+
viewSize: Object.assign({}, action.payload)
|
|
1523
|
+
});
|
|
1524
|
+
};
|
|
1429
1525
|
|
|
1430
|
-
const setSpaceSize = (state, action) =>
|
|
1431
|
-
|
|
1432
|
-
})
|
|
1526
|
+
const setSpaceSize = (state, action) => {
|
|
1527
|
+
const newState = getNewState(state);
|
|
1528
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1529
|
+
spaceSize: Object.assign({}, action.payload)
|
|
1530
|
+
});
|
|
1531
|
+
};
|
|
1433
1532
|
|
|
1434
1533
|
const updateSpaceTreePlane = (state, action) => {
|
|
1435
|
-
const
|
|
1436
|
-
|
|
1534
|
+
const newState = getNewState(state);
|
|
1535
|
+
const updatedTree = pluridEngine.general.tree.updateTreePlane(newState.tree, action.payload);
|
|
1536
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1437
1537
|
tree: updatedTree
|
|
1438
1538
|
});
|
|
1439
1539
|
};
|
|
1440
1540
|
|
|
1441
1541
|
const updateSpaceLinkCoordinates = (state, action) => {
|
|
1442
1542
|
const {planeID: planeID, linkCoordinates: linkCoordinates} = action.payload;
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1543
|
+
const newState = getNewState(state);
|
|
1544
|
+
const updatedTree = pluridEngine.general.tree.updateTreeByPlaneIDWithLinkCoordinates(newState.tree, planeID, linkCoordinates);
|
|
1545
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1445
1546
|
tree: updatedTree
|
|
1446
1547
|
});
|
|
1447
1548
|
};
|
|
1448
1549
|
|
|
1449
|
-
const spaceSetView = (state, action) =>
|
|
1450
|
-
|
|
1451
|
-
})
|
|
1550
|
+
const spaceSetView = (state, action) => {
|
|
1551
|
+
const newState = getNewState(state);
|
|
1552
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1553
|
+
view: action.payload
|
|
1554
|
+
});
|
|
1555
|
+
};
|
|
1452
1556
|
|
|
1453
|
-
const spaceSetCulledView = (state, action) =>
|
|
1454
|
-
|
|
1455
|
-
})
|
|
1557
|
+
const spaceSetCulledView = (state, action) => {
|
|
1558
|
+
const newState = getNewState(state);
|
|
1559
|
+
return Object.assign(Object.assign({}, newState), {
|
|
1560
|
+
culledView: action.payload
|
|
1561
|
+
});
|
|
1562
|
+
};
|
|
1456
1563
|
|
|
1457
1564
|
var index$9 = Object.freeze({
|
|
1458
1565
|
__proto__: null,
|
|
1566
|
+
setSpaceField: setSpaceField,
|
|
1459
1567
|
setSpaceLoading: setSpaceLoading,
|
|
1568
|
+
setTransform: setTransform,
|
|
1460
1569
|
setAnimatedTransform: setAnimatedTransform,
|
|
1461
1570
|
setTransformTime: setTransformTime,
|
|
1462
1571
|
setSpaceLocation: setSpaceLocation,
|
|
@@ -1507,9 +1616,15 @@ const reducer$2 = (state = initialState$2, action) => {
|
|
|
1507
1616
|
case SET_STATE:
|
|
1508
1617
|
return Object.assign(Object.assign({}, state), action.payload.space);
|
|
1509
1618
|
|
|
1619
|
+
case SET_SPACE_FIELD:
|
|
1620
|
+
return setSpaceField(state, action);
|
|
1621
|
+
|
|
1510
1622
|
case SET_SPACE_LOADING:
|
|
1511
1623
|
return setSpaceLoading(state, action);
|
|
1512
1624
|
|
|
1625
|
+
case SET_TRANSFORM:
|
|
1626
|
+
return setTransform(state, action);
|
|
1627
|
+
|
|
1513
1628
|
case SET_ANIMATED_TRANSFORM:
|
|
1514
1629
|
return setAnimatedTransform(state, action);
|
|
1515
1630
|
|
|
@@ -1646,6 +1761,8 @@ const reducer$2 = (state = initialState$2, action) => {
|
|
|
1646
1761
|
|
|
1647
1762
|
const getLoading = state => state.space.loading;
|
|
1648
1763
|
|
|
1764
|
+
const getTransformMatrix = state => state.space.transform;
|
|
1765
|
+
|
|
1649
1766
|
const getAnimatedTransform = state => state.space.animatedTransform;
|
|
1650
1767
|
|
|
1651
1768
|
const getTransformTime = state => state.space.transformTime;
|
|
@@ -1685,6 +1802,7 @@ const getCulledView = state => state.space.culledView;
|
|
|
1685
1802
|
|
|
1686
1803
|
var index$8 = {
|
|
1687
1804
|
getLoading: getLoading,
|
|
1805
|
+
getTransformMatrix: getTransformMatrix,
|
|
1688
1806
|
getAnimatedTransform: getAnimatedTransform,
|
|
1689
1807
|
getTransformTime: getTransformTime,
|
|
1690
1808
|
getRotationX: getRotationX,
|
|
@@ -2316,8 +2434,7 @@ const StyledPluridPlane = styled__default["default"].div`
|
|
|
2316
2434
|
height: auto;
|
|
2317
2435
|
width: 100%;
|
|
2318
2436
|
font-size: 0.9rem;
|
|
2319
|
-
font-family:
|
|
2320
|
-
'Open Sans', 'Helvetica Neue', 'Lucida Sans', sans-serif;
|
|
2437
|
+
font-family: ${({theme: theme}) => theme.fontFamilySansSerif};
|
|
2321
2438
|
transition: background-color 300ms linear;
|
|
2322
2439
|
|
|
2323
2440
|
display: grid;
|
|
@@ -2362,14 +2479,14 @@ const PluridPlaneBridge = properties => {
|
|
|
2362
2479
|
});
|
|
2363
2480
|
};
|
|
2364
2481
|
|
|
2365
|
-
const mapStateToProperties$
|
|
2482
|
+
const mapStateToProperties$i = state => ({
|
|
2366
2483
|
stateGeneralTheme: selectors.themes.getGeneralTheme(state),
|
|
2367
2484
|
stateConfiguration: selectors.configuration.getConfiguration(state)
|
|
2368
2485
|
});
|
|
2369
2486
|
|
|
2370
|
-
const mapDispatchToProperties$
|
|
2487
|
+
const mapDispatchToProperties$i = dispatch => ({});
|
|
2371
2488
|
|
|
2372
|
-
const ConnectedPluridPlaneBridge = reactRedux.connect(mapStateToProperties$
|
|
2489
|
+
const ConnectedPluridPlaneBridge = reactRedux.connect(mapStateToProperties$i, mapDispatchToProperties$i, null, {
|
|
2373
2490
|
context: StateContext
|
|
2374
2491
|
})(PluridPlaneBridge);
|
|
2375
2492
|
|
|
@@ -2420,9 +2537,9 @@ const PluridPlaneControls = properties => {
|
|
|
2420
2537
|
const {route: route, routeDivisions: routeDivisions} = treePlane;
|
|
2421
2538
|
const {protocol: protocol, host: host} = routeDivisions;
|
|
2422
2539
|
const gateway = "gateway";
|
|
2423
|
-
|
|
2424
|
-
const [path, setPath] = React.useState(
|
|
2425
|
-
|
|
2540
|
+
`${protocol}://${host.value}/${gateway}?plurid=` + encodeURIComponent(route);
|
|
2541
|
+
const [path, setPath] = React.useState(treePlane.route);
|
|
2542
|
+
React.useState(false);
|
|
2426
2543
|
const [showSearch, setShowSearch] = React.useState(false);
|
|
2427
2544
|
const onPathInput = event => {
|
|
2428
2545
|
setPath(event.target.value);
|
|
@@ -2450,29 +2567,27 @@ const PluridPlaneControls = properties => {
|
|
|
2450
2567
|
"data-plurid-entity": pluridData.PLURID_ENTITY_PLANE_CONTROLS
|
|
2451
2568
|
}, React__default["default"].createElement(StyledPluridPlaneControlsLeft, null), React__default["default"].createElement(StyledPluridPlaneControlsCenter, null, React__default["default"].createElement(PluridTextline, {
|
|
2452
2569
|
theme: interactionTheme,
|
|
2453
|
-
text:
|
|
2570
|
+
text: path,
|
|
2454
2571
|
atChange: onPathInput,
|
|
2455
2572
|
atKeyDown: handleOnKeyDown,
|
|
2456
2573
|
ariaLabel: "Plurid Pathbar"
|
|
2457
2574
|
})), React__default["default"].createElement(StyledPluridPlaneControlsRight, null));
|
|
2458
2575
|
};
|
|
2459
2576
|
|
|
2460
|
-
const mapStateToProps$
|
|
2577
|
+
const mapStateToProps$g = state => ({
|
|
2461
2578
|
configuration: selectors.configuration.getConfiguration(state),
|
|
2462
2579
|
generalTheme: selectors.themes.getGeneralTheme(state),
|
|
2463
2580
|
interactionTheme: selectors.themes.getInteractionTheme(state)
|
|
2464
2581
|
});
|
|
2465
2582
|
|
|
2466
|
-
const mapDispatchToProps$
|
|
2583
|
+
const mapDispatchToProps$g = dispatch => ({});
|
|
2467
2584
|
|
|
2468
|
-
const ConnectedPluridPlaneControls = reactRedux.connect(mapStateToProps$
|
|
2585
|
+
const ConnectedPluridPlaneControls = reactRedux.connect(mapStateToProps$g, mapDispatchToProps$g, null, {
|
|
2469
2586
|
context: StateContext
|
|
2470
2587
|
})(PluridPlaneControls);
|
|
2471
2588
|
|
|
2472
2589
|
const StyledPluridPlaneContent = styled__default["default"].div`
|
|
2473
2590
|
position: relative;
|
|
2474
|
-
font-family: initial !important;
|
|
2475
|
-
font-size: initial !important;
|
|
2476
2591
|
`;
|
|
2477
2592
|
|
|
2478
2593
|
const PluridPlaneContent = properties => {
|
|
@@ -2524,17 +2639,17 @@ const PluridPlane = properties => {
|
|
|
2524
2639
|
}, React__default["default"].createElement(PluridPlaneContent, Object.assign({}, planeContentProperties), children)) : React__default["default"].createElement(PluridPlaneContent, Object.assign({}, planeContentProperties), children)));
|
|
2525
2640
|
};
|
|
2526
2641
|
|
|
2527
|
-
const mapStateToProps$
|
|
2642
|
+
const mapStateToProps$f = state => ({
|
|
2528
2643
|
stateViewSize: selectors.space.getViewSize(state),
|
|
2529
2644
|
stateGeneralTheme: selectors.themes.getGeneralTheme(state),
|
|
2530
2645
|
stateConfiguration: selectors.configuration.getConfiguration(state)
|
|
2531
2646
|
});
|
|
2532
2647
|
|
|
2533
|
-
const mapDispatchToProps$
|
|
2648
|
+
const mapDispatchToProps$f = dispatch => ({
|
|
2534
2649
|
dispatchUpdateSpaceTreePlane: treePlane => dispatch(actions.space.updateSpaceTreePlane(treePlane))
|
|
2535
2650
|
});
|
|
2536
2651
|
|
|
2537
|
-
const ConnectedPluridPlane = reactRedux.connect(mapStateToProps$
|
|
2652
|
+
const ConnectedPluridPlane = reactRedux.connect(mapStateToProps$f, mapDispatchToProps$f, null, {
|
|
2538
2653
|
context: StateContext
|
|
2539
2654
|
})(PluridPlane);
|
|
2540
2655
|
|
|
@@ -2561,7 +2676,7 @@ const PluridRoot = properties => {
|
|
|
2561
2676
|
if (!context) {
|
|
2562
2677
|
return React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
2563
2678
|
}
|
|
2564
|
-
const {planesRegistrar: planesRegistrar, planeContext: PlaneContext, planeContextValue: planeContextValue, customPlane: customPlane} = context;
|
|
2679
|
+
const {planesRegistrar: planesRegistrar, planeContext: PlaneContext, planeContextValue: planeContextValue, customPlane: customPlane, matchedRoute: matchedRoute} = context;
|
|
2565
2680
|
const CustomPluridPlane = customPlane;
|
|
2566
2681
|
const [childrenPlanes, setChildrenPlanes] = React.useState([]);
|
|
2567
2682
|
const computeChildrenPlanes = plane => {
|
|
@@ -2588,9 +2703,9 @@ const PluridRoot = properties => {
|
|
|
2588
2703
|
query: activePlane.route.query
|
|
2589
2704
|
},
|
|
2590
2705
|
route: {
|
|
2591
|
-
value: "",
|
|
2592
|
-
parameters: {},
|
|
2593
|
-
query: {}
|
|
2706
|
+
value: (matchedRoute === null || matchedRoute === void 0 ? void 0 : matchedRoute.match.value) || "",
|
|
2707
|
+
parameters: (matchedRoute === null || matchedRoute === void 0 ? void 0 : matchedRoute.match.parameters) || {},
|
|
2708
|
+
query: (matchedRoute === null || matchedRoute === void 0 ? void 0 : matchedRoute.match.query) || {}
|
|
2594
2709
|
}
|
|
2595
2710
|
};
|
|
2596
2711
|
const properties = {
|
|
@@ -2643,9 +2758,9 @@ const PluridRoot = properties => {
|
|
|
2643
2758
|
query: pluridPlane.route.query
|
|
2644
2759
|
},
|
|
2645
2760
|
route: {
|
|
2646
|
-
value: "",
|
|
2647
|
-
parameters: {},
|
|
2648
|
-
query: {}
|
|
2761
|
+
value: (matchedRoute === null || matchedRoute === void 0 ? void 0 : matchedRoute.match.value) || "",
|
|
2762
|
+
parameters: (matchedRoute === null || matchedRoute === void 0 ? void 0 : matchedRoute.match.parameters) || {},
|
|
2763
|
+
query: (matchedRoute === null || matchedRoute === void 0 ? void 0 : matchedRoute.match.query) || {}
|
|
2649
2764
|
}
|
|
2650
2765
|
};
|
|
2651
2766
|
const planeProperties = {
|
|
@@ -2676,112 +2791,47 @@ const PluridRoot = properties => {
|
|
|
2676
2791
|
}, React__default["default"].createElement(Plane, Object.assign({}, planeProperties)))), childrenPlanes);
|
|
2677
2792
|
};
|
|
2678
2793
|
|
|
2679
|
-
const mapStateToProperties$
|
|
2794
|
+
const mapStateToProperties$h = state => ({});
|
|
2680
2795
|
|
|
2681
|
-
const mapDispatchToProperties$
|
|
2796
|
+
const mapDispatchToProperties$h = dispatch => ({});
|
|
2682
2797
|
|
|
2683
|
-
const ConnectedPluridRoot = reactRedux.connect(mapStateToProperties$
|
|
2798
|
+
const ConnectedPluridRoot = reactRedux.connect(mapStateToProperties$h, mapDispatchToProperties$h, null, {
|
|
2684
2799
|
context: StateContext
|
|
2685
2800
|
})(PluridRoot);
|
|
2686
2801
|
|
|
2687
2802
|
const StyledPluridRoots = styled__default["default"].div`
|
|
2688
2803
|
transform-style: preserve-3d;
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
const StyledTransformOrigin = styled__default["default"].div`
|
|
2692
|
-
background-color: ${({theme: theme}) => theme.backgroundColorTertiaryAlpha};
|
|
2693
|
-
height: ${({transformOriginSize: transformOriginSize}) => {
|
|
2694
|
-
switch (transformOriginSize) {
|
|
2695
|
-
case pluridData.SIZES.SMALL:
|
|
2696
|
-
return "5px";
|
|
2697
|
-
|
|
2698
|
-
case pluridData.SIZES.NORMAL:
|
|
2699
|
-
return "10px";
|
|
2700
|
-
|
|
2701
|
-
case pluridData.SIZES.LARGE:
|
|
2702
|
-
return "15px";
|
|
2703
|
-
|
|
2704
|
-
default:
|
|
2705
|
-
return "10px";
|
|
2706
|
-
}
|
|
2707
|
-
}};
|
|
2708
|
-
width: ${({transformOriginSize: transformOriginSize}) => {
|
|
2709
|
-
switch (transformOriginSize) {
|
|
2710
|
-
case pluridData.SIZES.SMALL:
|
|
2711
|
-
return "5px";
|
|
2712
|
-
|
|
2713
|
-
case pluridData.SIZES.NORMAL:
|
|
2714
|
-
return "10px";
|
|
2715
|
-
|
|
2716
|
-
case pluridData.SIZES.LARGE:
|
|
2717
|
-
return "15px";
|
|
2718
|
-
|
|
2719
|
-
default:
|
|
2720
|
-
return "10px";
|
|
2721
|
-
}
|
|
2722
|
-
}};
|
|
2723
|
-
|
|
2724
|
-
position: absolute;
|
|
2725
|
-
z-index: 999;
|
|
2726
|
-
border-radius: 100px;
|
|
2727
|
-
user-select: none;
|
|
2728
|
-
pointer-events: none;
|
|
2729
|
-
touch-action: none;
|
|
2804
|
+
transform-origin: 0 0 0;
|
|
2730
2805
|
`;
|
|
2731
2806
|
|
|
2732
2807
|
const PluridRoots = properties => {
|
|
2733
|
-
const {
|
|
2734
|
-
const {space: space} = stateConfiguration;
|
|
2735
|
-
const {transformOrigin: transformOrigin} = space;
|
|
2736
|
-
const {show: showTransformOrigin, size: transformOriginSize} = transformOrigin;
|
|
2737
|
-
const innerWidth = typeof window === "undefined" ? 720 : window.innerWidth / 2;
|
|
2738
|
-
const innerHeight = typeof window === "undefined" ? 400 : window.innerHeight / 2;
|
|
2739
|
-
const transformOriginX = spaceTranslationX * -1 + innerWidth;
|
|
2740
|
-
const transformOriginY = spaceTranslationY * -1 + innerHeight;
|
|
2741
|
-
const transformOriginZ = spaceTranslationZ * -1;
|
|
2742
|
-
const transformOriginSizeDifference = transformOriginSize === pluridData.SIZES.SMALL ? 2.5 : transformOriginSize === pluridData.SIZES.NORMAL ? 5 : 7.5;
|
|
2808
|
+
const {spaceTransformMatrix: spaceTransformMatrix, spaceAnimatedTransform: spaceAnimatedTransform, spaceTransformTime: spaceTransformTime, stateTree: stateTree} = properties;
|
|
2743
2809
|
return React__default["default"].createElement(StyledPluridRoots, {
|
|
2744
2810
|
suppressHydrationWarning: true,
|
|
2745
2811
|
style: {
|
|
2746
2812
|
width: "100%",
|
|
2747
2813
|
height: typeof window !== "undefined" ? window.innerHeight + "px" : "821px",
|
|
2748
|
-
transform:
|
|
2749
|
-
transition:
|
|
2750
|
-
transformOrigin: pluridEngine.cleanTemplate(`\n ${transformOriginX}px\n ${transformOriginY}px\n ${transformOriginZ}px\n `)
|
|
2814
|
+
transform: spaceTransformMatrix,
|
|
2815
|
+
transition: spaceAnimatedTransform ? `transform ${spaceTransformTime}ms ease-in-out` : "initial"
|
|
2751
2816
|
},
|
|
2752
2817
|
"data-plurid-entity": pluridData.PLURID_ENTITY_ROOTS
|
|
2753
|
-
},
|
|
2754
|
-
suppressHydrationWarning: true,
|
|
2755
|
-
theme: interactionTheme,
|
|
2756
|
-
transformOriginSize: transformOriginSize,
|
|
2757
|
-
style: {
|
|
2758
|
-
transform: pluridEngine.cleanTemplate(`\n rotateY(${-spaceRotationY}deg)\n translateX(${transformOriginX - transformOriginSizeDifference}px)\n translateY(${transformOriginY - transformOriginSizeDifference}px)\n translateZ(${transformOriginZ + 5}px)\n `),
|
|
2759
|
-
transformOrigin: pluridEngine.cleanTemplate(`\n ${transformOriginX - transformOriginSizeDifference}px\n ${transformOriginY - transformOriginSizeDifference}px\n ${transformOriginZ}px\n `)
|
|
2760
|
-
},
|
|
2761
|
-
"data-plurid-entity": pluridData.PLURID_ENTITY_TRANSFORM_ORIGIN
|
|
2762
|
-
}), stateTree.map((plane => React__default["default"].createElement(ConnectedPluridRoot, {
|
|
2818
|
+
}, stateTree.map((plane => React__default["default"].createElement(ConnectedPluridRoot, {
|
|
2763
2819
|
key: plane.planeID,
|
|
2764
2820
|
plane: plane
|
|
2765
2821
|
}))));
|
|
2766
2822
|
};
|
|
2767
2823
|
|
|
2768
|
-
const mapStateToProperties$
|
|
2824
|
+
const mapStateToProperties$g = state => ({
|
|
2769
2825
|
stateConfiguration: selectors.configuration.getConfiguration(state),
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
spaceScale: selectors.space.getScale(state),
|
|
2774
|
-
spaceRotationX: selectors.space.getRotationX(state),
|
|
2775
|
-
spaceRotationY: selectors.space.getRotationY(state),
|
|
2776
|
-
spaceTranslationX: selectors.space.getTranslationX(state),
|
|
2777
|
-
spaceTranslationY: selectors.space.getTranslationY(state),
|
|
2778
|
-
spaceTranslationZ: selectors.space.getTranslationZ(state),
|
|
2826
|
+
spaceTransformMatrix: selectors.space.getTransformMatrix(state),
|
|
2827
|
+
spaceAnimatedTransform: selectors.space.getAnimatedTransform(state),
|
|
2828
|
+
spaceTransformTime: selectors.space.getTransformTime(state),
|
|
2779
2829
|
stateTree: selectors.space.getTree(state)
|
|
2780
2830
|
});
|
|
2781
2831
|
|
|
2782
|
-
const mapDispatchToProperties$
|
|
2832
|
+
const mapDispatchToProperties$g = dispatch => ({});
|
|
2783
2833
|
|
|
2784
|
-
const ConnectedPluridRoots = reactRedux.connect(mapStateToProperties$
|
|
2834
|
+
const ConnectedPluridRoots = reactRedux.connect(mapStateToProperties$g, mapDispatchToProperties$g, null, {
|
|
2785
2835
|
context: StateContext
|
|
2786
2836
|
})(PluridRoots);
|
|
2787
2837
|
|
|
@@ -2845,17 +2895,76 @@ const PluridSpace = properties => {
|
|
|
2845
2895
|
}, React__default["default"].createElement(ConnectedPluridRoots, null));
|
|
2846
2896
|
};
|
|
2847
2897
|
|
|
2848
|
-
const mapStateToProperties$
|
|
2898
|
+
const mapStateToProperties$f = state => ({
|
|
2849
2899
|
stateConfiguration: selectors.configuration.getConfiguration(state),
|
|
2850
2900
|
stateGeneralTheme: selectors.themes.getGeneralTheme(state)
|
|
2851
2901
|
});
|
|
2852
2902
|
|
|
2853
|
-
const mapDispatchToProperties$
|
|
2903
|
+
const mapDispatchToProperties$f = dispatch => ({});
|
|
2854
2904
|
|
|
2855
|
-
const ConnectedPluridSpace = reactRedux.connect(mapStateToProperties$
|
|
2905
|
+
const ConnectedPluridSpace = reactRedux.connect(mapStateToProperties$f, mapDispatchToProperties$f, null, {
|
|
2856
2906
|
context: StateContext
|
|
2857
2907
|
})(PluridSpace);
|
|
2858
2908
|
|
|
2909
|
+
const resolveSize = ({size: size}) => {
|
|
2910
|
+
switch (size) {
|
|
2911
|
+
case pluridData.SIZES.SMALL:
|
|
2912
|
+
return "5px";
|
|
2913
|
+
|
|
2914
|
+
case pluridData.SIZES.NORMAL:
|
|
2915
|
+
return "10px";
|
|
2916
|
+
|
|
2917
|
+
case pluridData.SIZES.LARGE:
|
|
2918
|
+
return "15px";
|
|
2919
|
+
|
|
2920
|
+
default:
|
|
2921
|
+
return "10px";
|
|
2922
|
+
}
|
|
2923
|
+
};
|
|
2924
|
+
|
|
2925
|
+
const StyledOrigin = styled__default["default"].div`
|
|
2926
|
+
background-color: ${({theme: theme}) => theme.backgroundColorTertiaryAlpha};
|
|
2927
|
+
height: ${resolveSize};
|
|
2928
|
+
width: ${resolveSize};
|
|
2929
|
+
|
|
2930
|
+
position: absolute;
|
|
2931
|
+
top: 50%;
|
|
2932
|
+
left: 50%;
|
|
2933
|
+
transform: translateX(-50%) translateY(-50%);
|
|
2934
|
+
z-index: 99999;
|
|
2935
|
+
border-radius: 100px;
|
|
2936
|
+
user-select: none;
|
|
2937
|
+
pointer-events: none;
|
|
2938
|
+
touch-action: none;
|
|
2939
|
+
`;
|
|
2940
|
+
|
|
2941
|
+
const Origin = properties => {
|
|
2942
|
+
const {stateGeneralTheme: stateGeneralTheme, stateConfiguration: stateConfiguration} = properties;
|
|
2943
|
+
const {space: space} = stateConfiguration;
|
|
2944
|
+
const {transformOrigin: transformOrigin} = space;
|
|
2945
|
+
const {show: showTransformOrigin, size: transformOriginSize} = transformOrigin;
|
|
2946
|
+
if (!showTransformOrigin) {
|
|
2947
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
2948
|
+
}
|
|
2949
|
+
return React__default["default"].createElement(StyledOrigin, {
|
|
2950
|
+
theme: stateGeneralTheme,
|
|
2951
|
+
size: transformOriginSize,
|
|
2952
|
+
"data-plurid-entity": pluridData.PLURID_ENTITY_TRANSFORM_ORIGIN
|
|
2953
|
+
});
|
|
2954
|
+
};
|
|
2955
|
+
|
|
2956
|
+
const mapStateToProperties$e = state => ({
|
|
2957
|
+
stateGeneralTheme: selectors.themes.getGeneralTheme(state),
|
|
2958
|
+
stateInteractionTheme: selectors.themes.getInteractionTheme(state),
|
|
2959
|
+
stateConfiguration: selectors.configuration.getConfiguration(state)
|
|
2960
|
+
});
|
|
2961
|
+
|
|
2962
|
+
const mapDispatchToProperties$e = dispatch => ({});
|
|
2963
|
+
|
|
2964
|
+
const ConnectedOrigin = reactRedux.connect(mapStateToProperties$e, mapDispatchToProperties$e, null, {
|
|
2965
|
+
context: StateContext
|
|
2966
|
+
})(Origin);
|
|
2967
|
+
|
|
2859
2968
|
var MENUS;
|
|
2860
2969
|
|
|
2861
2970
|
(function(MENUS) {
|
|
@@ -3116,16 +3225,16 @@ const PluridMenuUniverses = properties => {
|
|
|
3116
3225
|
}, React__default["default"].createElement(StyledPluridMenuUniversesScroll, null));
|
|
3117
3226
|
};
|
|
3118
3227
|
|
|
3119
|
-
const mapStateToProps$
|
|
3228
|
+
const mapStateToProps$e = state => ({
|
|
3120
3229
|
interactionTheme: selectors.themes.getInteractionTheme(state),
|
|
3121
3230
|
activeUniverseID: selectors.space.getActiveUniverseID(state)
|
|
3122
3231
|
});
|
|
3123
3232
|
|
|
3124
|
-
const mapDispatchToProps$
|
|
3233
|
+
const mapDispatchToProps$e = dispatch => ({
|
|
3125
3234
|
dispatchSetActiveUniverse: documentID => dispatch(actions.space.setActiveUniverse(documentID))
|
|
3126
3235
|
});
|
|
3127
3236
|
|
|
3128
|
-
const ConnectedPluridMenuUniverses = reactRedux.connect(mapStateToProps$
|
|
3237
|
+
const ConnectedPluridMenuUniverses = reactRedux.connect(mapStateToProps$e, mapDispatchToProps$e, null, {
|
|
3129
3238
|
context: StateContext
|
|
3130
3239
|
})(PluridMenuUniverses);
|
|
3131
3240
|
|
|
@@ -3199,14 +3308,14 @@ const PluridDrawer = properties => {
|
|
|
3199
3308
|
}, heading)), toggled && React__default["default"].createElement(StyledPluridDrawerItems, null, items));
|
|
3200
3309
|
};
|
|
3201
3310
|
|
|
3202
|
-
const mapStateToProps$
|
|
3311
|
+
const mapStateToProps$d = state => ({
|
|
3203
3312
|
interactionTheme: selectors.themes.getInteractionTheme(state),
|
|
3204
3313
|
configuration: selectors.configuration.getConfiguration(state)
|
|
3205
3314
|
});
|
|
3206
3315
|
|
|
3207
|
-
const mapDispatchToProps$
|
|
3316
|
+
const mapDispatchToProps$d = dispatch => ({});
|
|
3208
3317
|
|
|
3209
|
-
const ConnectedPluridDrawer = reactRedux.connect(mapStateToProps$
|
|
3318
|
+
const ConnectedPluridDrawer = reactRedux.connect(mapStateToProps$d, mapDispatchToProps$d, null, {
|
|
3210
3319
|
context: StateContext
|
|
3211
3320
|
})(PluridDrawer);
|
|
3212
3321
|
|
|
@@ -3338,13 +3447,13 @@ const PluridMenuMoreGlobal = properties => {
|
|
|
3338
3447
|
})));
|
|
3339
3448
|
};
|
|
3340
3449
|
|
|
3341
|
-
const mapStateToProps$
|
|
3450
|
+
const mapStateToProps$c = state => ({
|
|
3342
3451
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
3343
3452
|
interactionTheme: selectors.themes.getInteractionTheme(state),
|
|
3344
3453
|
configuration: selectors.configuration.getConfiguration(state)
|
|
3345
3454
|
});
|
|
3346
3455
|
|
|
3347
|
-
const mapDispatchToProps$
|
|
3456
|
+
const mapDispatchToProps$c = dispatch => ({
|
|
3348
3457
|
dispatchSetConfigurationThemeGeneralAction: theme => dispatch(actions.configuration.setConfigurationThemeGeneralAction(theme)),
|
|
3349
3458
|
dispatchSetConfigurationThemeInteractionAction: theme => dispatch(actions.configuration.setConfigurationThemeInteractionAction(theme)),
|
|
3350
3459
|
dispatchSetConfigurationLanguage: language => dispatch(actions.configuration.setConfigurationLanguageAction(language)),
|
|
@@ -3352,7 +3461,7 @@ const mapDispatchToProps$d = dispatch => ({
|
|
|
3352
3461
|
dispatchSetInteractionTheme: theme => dispatch(actions.themes.setInteractionTheme(theme))
|
|
3353
3462
|
});
|
|
3354
3463
|
|
|
3355
|
-
const ConnectedPluridMenuMoreGlobal = reactRedux.connect(mapStateToProps$
|
|
3464
|
+
const ConnectedPluridMenuMoreGlobal = reactRedux.connect(mapStateToProps$c, mapDispatchToProps$c, null, {
|
|
3356
3465
|
context: StateContext
|
|
3357
3466
|
})(PluridMenuMoreGlobal);
|
|
3358
3467
|
|
|
@@ -3413,19 +3522,19 @@ const PluridMenuMoreTransform = properties => {
|
|
|
3413
3522
|
})));
|
|
3414
3523
|
};
|
|
3415
3524
|
|
|
3416
|
-
const mapStateToProps$
|
|
3525
|
+
const mapStateToProps$b = state => ({
|
|
3417
3526
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
3418
3527
|
interactionTheme: selectors.themes.getInteractionTheme(state),
|
|
3419
3528
|
configuration: selectors.configuration.getConfiguration(state)
|
|
3420
3529
|
});
|
|
3421
3530
|
|
|
3422
|
-
const mapDispatchToProps$
|
|
3531
|
+
const mapDispatchToProps$b = dispatch => ({
|
|
3423
3532
|
dispatchToggleConfigurationSpaceTransformMultimode: multimode => dispatch(actions.configuration.toggleConfigurationSpaceTransformMultimode(multimode)),
|
|
3424
3533
|
dispatchSetConfigurationSpaceTransformTouch: touch => dispatch(actions.configuration.setConfigurationSpaceTransformTouch(touch)),
|
|
3425
3534
|
dispatchSetConfigurationSpaceTransformLocks: lock => dispatch(actions.configuration.setConfigurationSpaceTransformLocks(lock))
|
|
3426
3535
|
});
|
|
3427
3536
|
|
|
3428
|
-
const ConnectedPluridMenuMoreTransform = reactRedux.connect(mapStateToProps$
|
|
3537
|
+
const ConnectedPluridMenuMoreTransform = reactRedux.connect(mapStateToProps$b, mapDispatchToProps$b, null, {
|
|
3429
3538
|
context: StateContext
|
|
3430
3539
|
})(PluridMenuMoreTransform);
|
|
3431
3540
|
|
|
@@ -3487,12 +3596,12 @@ const PluridMenuMoreSpace = properties => {
|
|
|
3487
3596
|
})));
|
|
3488
3597
|
};
|
|
3489
3598
|
|
|
3490
|
-
const mapStateToProps$
|
|
3599
|
+
const mapStateToProps$a = state => ({
|
|
3491
3600
|
interactionTheme: selectors.themes.getInteractionTheme(state),
|
|
3492
3601
|
configuration: selectors.configuration.getConfiguration(state)
|
|
3493
3602
|
});
|
|
3494
3603
|
|
|
3495
|
-
const mapDispatchToProps$
|
|
3604
|
+
const mapDispatchToProps$a = dispatch => ({
|
|
3496
3605
|
dispatchSetConfigurationPlaneOpacity: value => dispatch(actions.configuration.setConfigurationPlaneOpacity(value)),
|
|
3497
3606
|
dispatchToggleConfigurationSpaceTransparentUI: () => dispatch(actions.configuration.toggleConfigurationSpaceTransparentUI()),
|
|
3498
3607
|
dispatchToggleConfigurationSpaceShowTransformOrigin: () => dispatch(actions.configuration.toggleConfigurationSpaceShowTransformOrigin()),
|
|
@@ -3500,7 +3609,7 @@ const mapDispatchToProps$b = dispatch => ({
|
|
|
3500
3609
|
dispatchSetConfigurationSpaceLayoutType: layoutType => dispatch(actions.configuration.setConfigurationSpaceLayoutType(layoutType))
|
|
3501
3610
|
});
|
|
3502
3611
|
|
|
3503
|
-
const ConnectedPluridMenuMoreSpace = reactRedux.connect(mapStateToProps$
|
|
3612
|
+
const ConnectedPluridMenuMoreSpace = reactRedux.connect(mapStateToProps$a, mapDispatchToProps$a, null, {
|
|
3504
3613
|
context: StateContext
|
|
3505
3614
|
})(PluridMenuMoreSpace);
|
|
3506
3615
|
|
|
@@ -3547,21 +3656,21 @@ const PluridMenuMoreToolbar = properties => {
|
|
|
3547
3656
|
})));
|
|
3548
3657
|
};
|
|
3549
3658
|
|
|
3550
|
-
const mapStateToProps$
|
|
3659
|
+
const mapStateToProps$9 = state => ({
|
|
3551
3660
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
3552
3661
|
interactionTheme: selectors.themes.getInteractionTheme(state),
|
|
3553
3662
|
configuration: selectors.configuration.getConfiguration(state),
|
|
3554
3663
|
viewSize: selectors.space.getViewSize(state)
|
|
3555
3664
|
});
|
|
3556
3665
|
|
|
3557
|
-
const mapDispatchToProps$
|
|
3666
|
+
const mapDispatchToProps$9 = dispatch => ({
|
|
3558
3667
|
dispatchToggleConfigurationToolbarConceal: () => dispatch(actions.configuration.toggleConfigurationToolbarConceal()),
|
|
3559
3668
|
dispatchToggleConfigurationToolbarTransformIcons: () => dispatch(actions.configuration.toggleConfigurationToolbarTransformIcons()),
|
|
3560
3669
|
dispatchToggleConfigurationToolbarTransformButtons: () => dispatch(actions.configuration.toggleConfigurationToolbarTransformButtons()),
|
|
3561
3670
|
dispatchToggleConfigurationToolbarOpaque: () => dispatch(actions.configuration.toggleConfigurationToolbarOpaque())
|
|
3562
3671
|
});
|
|
3563
3672
|
|
|
3564
|
-
const ConnectedPluridMenuMoreToolbar = reactRedux.connect(mapStateToProps$
|
|
3673
|
+
const ConnectedPluridMenuMoreToolbar = reactRedux.connect(mapStateToProps$9, mapDispatchToProps$9, null, {
|
|
3565
3674
|
context: StateContext
|
|
3566
3675
|
})(PluridMenuMoreToolbar);
|
|
3567
3676
|
|
|
@@ -3602,20 +3711,20 @@ const PluridMenuMoreViewcube = properties => {
|
|
|
3602
3711
|
}))));
|
|
3603
3712
|
};
|
|
3604
3713
|
|
|
3605
|
-
const mapStateToProps$
|
|
3714
|
+
const mapStateToProps$8 = state => ({
|
|
3606
3715
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
3607
3716
|
interactionTheme: selectors.themes.getInteractionTheme(state),
|
|
3608
3717
|
configuration: selectors.configuration.getConfiguration(state)
|
|
3609
3718
|
});
|
|
3610
3719
|
|
|
3611
|
-
const mapDispatchToProps$
|
|
3720
|
+
const mapDispatchToProps$8 = dispatch => ({
|
|
3612
3721
|
dispatchToggleConfigurationViewcubeHide: toggle => dispatch(actions.configuration.toggleConfigurationViewcubeHide(toggle)),
|
|
3613
3722
|
dispatchToggleConfigurationViewcubeButtons: toggle => dispatch(actions.configuration.toggleConfigurationViewcubeButtons(toggle)),
|
|
3614
3723
|
dispatchToggleConfigurationViewcubeOpaque: toggle => dispatch(actions.configuration.toggleConfigurationViewcubeOpaque(toggle)),
|
|
3615
3724
|
dispatchToggleConfigurationViewcubeConceal: () => dispatch(actions.configuration.toggleConfigurationViewcubeConceal())
|
|
3616
3725
|
});
|
|
3617
3726
|
|
|
3618
|
-
const ConnectedPluridMenuMoreViewcube = reactRedux.connect(mapStateToProps$
|
|
3727
|
+
const ConnectedPluridMenuMoreViewcube = reactRedux.connect(mapStateToProps$8, mapDispatchToProps$8, null, {
|
|
3619
3728
|
context: StateContext
|
|
3620
3729
|
})(PluridMenuMoreViewcube);
|
|
3621
3730
|
|
|
@@ -3643,17 +3752,17 @@ const PluridMenuMoreTechnical = properties => {
|
|
|
3643
3752
|
})));
|
|
3644
3753
|
};
|
|
3645
3754
|
|
|
3646
|
-
const mapStateToProps$
|
|
3755
|
+
const mapStateToProps$7 = state => ({
|
|
3647
3756
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
3648
3757
|
stateConfiguration: selectors.configuration.getConfiguration(state),
|
|
3649
3758
|
stateInteractionTheme: selectors.themes.getInteractionTheme(state)
|
|
3650
3759
|
});
|
|
3651
3760
|
|
|
3652
|
-
const mapDispatchToProps$
|
|
3761
|
+
const mapDispatchToProps$7 = dispatch => ({
|
|
3653
3762
|
dispatchSetConfigurationSpaceCullingDistance: value => dispatch(actions.configuration.setConfigurationSpaceCullingDistance(value))
|
|
3654
3763
|
});
|
|
3655
3764
|
|
|
3656
|
-
const ConnectedPluridMenuMoreTechnical = reactRedux.connect(mapStateToProps$
|
|
3765
|
+
const ConnectedPluridMenuMoreTechnical = reactRedux.connect(mapStateToProps$7, mapDispatchToProps$7, null, {
|
|
3657
3766
|
context: StateContext
|
|
3658
3767
|
})(PluridMenuMoreTechnical);
|
|
3659
3768
|
|
|
@@ -3678,14 +3787,14 @@ const PluridMenuMoreShortcuts = properties => {
|
|
|
3678
3787
|
})));
|
|
3679
3788
|
};
|
|
3680
3789
|
|
|
3681
|
-
const mapStateToProps$
|
|
3790
|
+
const mapStateToProps$6 = state => ({
|
|
3682
3791
|
interactionTheme: selectors.themes.getInteractionTheme(state),
|
|
3683
3792
|
configuration: selectors.configuration.getConfiguration(state)
|
|
3684
3793
|
});
|
|
3685
3794
|
|
|
3686
|
-
const mapDispatchToProps$
|
|
3795
|
+
const mapDispatchToProps$6 = dispatch => ({});
|
|
3687
3796
|
|
|
3688
|
-
const ConnectedPluridMenuMoreShortcuts = reactRedux.connect(mapStateToProps$
|
|
3797
|
+
const ConnectedPluridMenuMoreShortcuts = reactRedux.connect(mapStateToProps$6, mapDispatchToProps$6, null, {
|
|
3689
3798
|
context: StateContext
|
|
3690
3799
|
})(PluridMenuMoreShortcuts);
|
|
3691
3800
|
|
|
@@ -3788,19 +3897,19 @@ const PluridMoreMenu = properties => {
|
|
|
3788
3897
|
}))));
|
|
3789
3898
|
};
|
|
3790
3899
|
|
|
3791
|
-
const mapStateToProperties$
|
|
3900
|
+
const mapStateToProperties$d = state => ({
|
|
3792
3901
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
3793
3902
|
stateInteractionTheme: selectors.themes.getInteractionTheme(state),
|
|
3794
3903
|
stateConfiguration: selectors.configuration.getConfiguration(state),
|
|
3795
3904
|
stateToolbarMenuScrollPosition: selectors.ui.getToolbarScrollPosition(state)
|
|
3796
3905
|
});
|
|
3797
3906
|
|
|
3798
|
-
const mapDispatchToProperties$
|
|
3907
|
+
const mapDispatchToProperties$d = dispatch => ({
|
|
3799
3908
|
dispatchToggleConfigurationToolbarToggleDrawer: drawer => dispatch(actions.configuration.toggleConfigurationToolbarToggleDrawer(drawer)),
|
|
3800
3909
|
dispatchSetUIToolbarScrollPosition: value => dispatch(actions.ui.setUIToolbarScrollPosition(value))
|
|
3801
3910
|
});
|
|
3802
3911
|
|
|
3803
|
-
const ConnectedPluridMoreMenu = reactRedux.connect(mapStateToProperties$
|
|
3912
|
+
const ConnectedPluridMoreMenu = reactRedux.connect(mapStateToProperties$d, mapDispatchToProperties$d, null, {
|
|
3804
3913
|
context: StateContext
|
|
3805
3914
|
})(PluridMoreMenu);
|
|
3806
3915
|
|
|
@@ -3825,55 +3934,75 @@ const StyledPluridTransformArrow = styled__default["default"].div`
|
|
|
3825
3934
|
display: grid;
|
|
3826
3935
|
place-content: center;
|
|
3827
3936
|
padding: 2px;
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3937
|
+
|
|
3938
|
+
background-color: ${({pressed: pressed, theme: theme}) => {
|
|
3939
|
+
if (pressed) {
|
|
3940
|
+
return theme.backgroundColorTertiary;
|
|
3831
3941
|
}
|
|
3832
3942
|
return "initial";
|
|
3833
3943
|
}};
|
|
3834
3944
|
|
|
3835
3945
|
:hover {
|
|
3836
|
-
background-color: ${
|
|
3946
|
+
background-color: ${({theme: theme}) => theme.backgroundColorTertiary};
|
|
3837
3947
|
}
|
|
3838
3948
|
`;
|
|
3839
3949
|
|
|
3950
|
+
const arrowSigns = {
|
|
3951
|
+
left: "◀",
|
|
3952
|
+
right: "▶",
|
|
3953
|
+
up: "▲",
|
|
3954
|
+
down: "▼"
|
|
3955
|
+
};
|
|
3956
|
+
|
|
3840
3957
|
const PluridTransformArrow = properties => {
|
|
3841
3958
|
const {direction: direction, transform: transform, interactionTheme: interactionTheme} = properties;
|
|
3842
|
-
|
|
3959
|
+
const arrowSign = arrowSigns[direction];
|
|
3960
|
+
const pressingInterval = React.useRef(null);
|
|
3843
3961
|
const arrowElement = React.useRef(null);
|
|
3844
|
-
const [arrowSign, setArrowSign] = React.useState("");
|
|
3845
3962
|
const [pressed, setPressed] = React.useState(false);
|
|
3846
|
-
|
|
3847
|
-
switch (
|
|
3848
|
-
case "
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3963
|
+
const handleTouch = event => {
|
|
3964
|
+
switch (event.type) {
|
|
3965
|
+
case "tap":
|
|
3966
|
+
transform();
|
|
3967
|
+
if (pressingInterval.current) {
|
|
3968
|
+
setPressed(false);
|
|
3969
|
+
clearInterval(pressingInterval.current);
|
|
3970
|
+
}
|
|
3854
3971
|
break;
|
|
3855
3972
|
|
|
3856
|
-
case "
|
|
3857
|
-
|
|
3973
|
+
case "press":
|
|
3974
|
+
setPressed(true);
|
|
3975
|
+
pressingInterval.current = setInterval((() => {
|
|
3976
|
+
transform();
|
|
3977
|
+
}), 30);
|
|
3858
3978
|
break;
|
|
3859
3979
|
|
|
3860
|
-
case "
|
|
3861
|
-
|
|
3980
|
+
case "pressup":
|
|
3981
|
+
setPressed(false);
|
|
3982
|
+
if (pressingInterval.current) {
|
|
3983
|
+
clearInterval(pressingInterval.current);
|
|
3984
|
+
}
|
|
3862
3985
|
break;
|
|
3863
3986
|
}
|
|
3864
|
-
}
|
|
3987
|
+
};
|
|
3988
|
+
const handleMouseLeave = () => {
|
|
3989
|
+
if (pressingInterval.current) {
|
|
3990
|
+
setPressed(false);
|
|
3991
|
+
clearInterval(pressingInterval.current);
|
|
3992
|
+
}
|
|
3993
|
+
};
|
|
3865
3994
|
React.useEffect((() => {
|
|
3866
3995
|
if (typeof window === "undefined") {
|
|
3867
3996
|
return;
|
|
3868
3997
|
}
|
|
3869
3998
|
let touch;
|
|
3870
|
-
const
|
|
3999
|
+
const loadTouch = () => __awaiter(void 0, void 0, void 0, (function*() {
|
|
3871
4000
|
const HammerImport = yield loadHammer();
|
|
3872
4001
|
const Hammer = HammerImport.default;
|
|
3873
4002
|
touch = new Hammer(arrowElement.current);
|
|
3874
4003
|
touch.on("tap press pressup", handleTouch);
|
|
3875
4004
|
}));
|
|
3876
|
-
|
|
4005
|
+
loadTouch();
|
|
3877
4006
|
return () => {
|
|
3878
4007
|
if (touch) {
|
|
3879
4008
|
touch.off("tap press pressup", handleTouch);
|
|
@@ -3883,17 +4012,18 @@ const PluridTransformArrow = properties => {
|
|
|
3883
4012
|
return React__default["default"].createElement(StyledPluridTransformArrow, {
|
|
3884
4013
|
ref: arrowElement,
|
|
3885
4014
|
theme: interactionTheme,
|
|
3886
|
-
pressed: pressed
|
|
4015
|
+
pressed: pressed,
|
|
4016
|
+
onMouseLeave: () => handleMouseLeave()
|
|
3887
4017
|
}, arrowSign);
|
|
3888
4018
|
};
|
|
3889
4019
|
|
|
3890
|
-
const mapStateToProps$
|
|
4020
|
+
const mapStateToProps$5 = state => ({
|
|
3891
4021
|
interactionTheme: selectors.themes.getInteractionTheme(state)
|
|
3892
4022
|
});
|
|
3893
4023
|
|
|
3894
|
-
const mapDispatchToProps$
|
|
4024
|
+
const mapDispatchToProps$5 = dispatch => ({});
|
|
3895
4025
|
|
|
3896
|
-
const ConnectedPluridTransformArrow = reactRedux.connect(mapStateToProps$
|
|
4026
|
+
const ConnectedPluridTransformArrow = reactRedux.connect(mapStateToProps$5, mapDispatchToProps$5, null, {
|
|
3897
4027
|
context: StateContext
|
|
3898
4028
|
})(PluridTransformArrow);
|
|
3899
4029
|
|
|
@@ -3923,19 +4053,19 @@ const PluridToolbarRotate = properties => {
|
|
|
3923
4053
|
})));
|
|
3924
4054
|
};
|
|
3925
4055
|
|
|
3926
|
-
const mapStateToProps$
|
|
4056
|
+
const mapStateToProps$4 = state => ({
|
|
3927
4057
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
3928
4058
|
interactionTheme: selectors.themes.getInteractionTheme(state)
|
|
3929
4059
|
});
|
|
3930
4060
|
|
|
3931
|
-
const mapDispatchToProps$
|
|
4061
|
+
const mapDispatchToProps$4 = dispatch => ({
|
|
3932
4062
|
rotateUp: () => dispatch(actions.space.rotateUp()),
|
|
3933
4063
|
rotateDown: () => dispatch(actions.space.rotateDown()),
|
|
3934
4064
|
rotateLeft: () => dispatch(actions.space.rotateLeft()),
|
|
3935
4065
|
rotateRight: () => dispatch(actions.space.rotateRight())
|
|
3936
4066
|
});
|
|
3937
4067
|
|
|
3938
|
-
const ConnectedPluridToolbarRotate = reactRedux.connect(mapStateToProps$
|
|
4068
|
+
const ConnectedPluridToolbarRotate = reactRedux.connect(mapStateToProps$4, mapDispatchToProps$4, null, {
|
|
3939
4069
|
context: StateContext
|
|
3940
4070
|
})(PluridToolbarRotate);
|
|
3941
4071
|
|
|
@@ -3971,17 +4101,17 @@ const PluridToolbarScale = properties => {
|
|
|
3971
4101
|
}));
|
|
3972
4102
|
};
|
|
3973
4103
|
|
|
3974
|
-
const mapStateToProps$
|
|
4104
|
+
const mapStateToProps$3 = state => ({
|
|
3975
4105
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
3976
4106
|
interactionTheme: selectors.themes.getInteractionTheme(state)
|
|
3977
4107
|
});
|
|
3978
4108
|
|
|
3979
|
-
const mapDispatchToProps$
|
|
4109
|
+
const mapDispatchToProps$3 = dispatch => ({
|
|
3980
4110
|
scaleUp: () => dispatch(actions.space.scaleUp()),
|
|
3981
4111
|
scaleDown: () => dispatch(actions.space.scaleDown())
|
|
3982
4112
|
});
|
|
3983
4113
|
|
|
3984
|
-
const ConnectedPluridToolbarScale = reactRedux.connect(mapStateToProps$
|
|
4114
|
+
const ConnectedPluridToolbarScale = reactRedux.connect(mapStateToProps$3, mapDispatchToProps$3, null, {
|
|
3985
4115
|
context: StateContext
|
|
3986
4116
|
})(PluridToolbarScale);
|
|
3987
4117
|
|
|
@@ -4023,19 +4153,19 @@ const PluridToolbarTranslate = properties => {
|
|
|
4023
4153
|
})));
|
|
4024
4154
|
};
|
|
4025
4155
|
|
|
4026
|
-
const
|
|
4156
|
+
const mapStateToProperties$c = state => ({
|
|
4027
4157
|
stateLanguage: selectors.configuration.getConfiguration(state).global.language,
|
|
4028
4158
|
interactionTheme: selectors.themes.getInteractionTheme(state)
|
|
4029
4159
|
});
|
|
4030
4160
|
|
|
4031
|
-
const
|
|
4161
|
+
const mapDispatchToProperties$c = dispatch => ({
|
|
4032
4162
|
translateUp: () => dispatch(actions.space.translateUp()),
|
|
4033
4163
|
translateDown: () => dispatch(actions.space.translateDown()),
|
|
4034
4164
|
translateLeft: () => dispatch(actions.space.translateLeft()),
|
|
4035
4165
|
translateRight: () => dispatch(actions.space.translateRight())
|
|
4036
4166
|
});
|
|
4037
4167
|
|
|
4038
|
-
const ConnectedPluridToolbarTranslate = reactRedux.connect(
|
|
4168
|
+
const ConnectedPluridToolbarTranslate = reactRedux.connect(mapStateToProperties$c, mapDispatchToProperties$c, null, {
|
|
4039
4169
|
context: StateContext
|
|
4040
4170
|
})(PluridToolbarTranslate);
|
|
4041
4171
|
|
|
@@ -4046,6 +4176,7 @@ const PluridToolbar = properties => {
|
|
|
4046
4176
|
const {firstPerson: firstPerson, transformMode: transformMode, fadeInTime: fadeInTime} = space;
|
|
4047
4177
|
const {toolbar: toolbar} = elements;
|
|
4048
4178
|
const {conceal: conceal, opaque: opaque, transformIcons: transformIcons, transformButtons: transformButtons} = toolbar;
|
|
4179
|
+
const showToolbar = toolbar.show;
|
|
4049
4180
|
const menuTimeout = React.useRef(null);
|
|
4050
4181
|
const [mouseIn, setMouseIn] = React.useState(false);
|
|
4051
4182
|
const [showMenu, setShowMenu] = React.useState(MENUS.NONE);
|
|
@@ -4098,6 +4229,9 @@ const PluridToolbar = properties => {
|
|
|
4098
4229
|
}
|
|
4099
4230
|
};
|
|
4100
4231
|
}), [ mouseIn ]);
|
|
4232
|
+
if (!showToolbar) {
|
|
4233
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
4234
|
+
}
|
|
4101
4235
|
return React__default["default"].createElement(StyledToolbar, {
|
|
4102
4236
|
onMouseEnter: () => setMouseIn(true),
|
|
4103
4237
|
onMouseLeave: () => setMouseIn(false),
|
|
@@ -4662,6 +4796,10 @@ const StyledPluridViewcubeModelCube = styled__default["default"].div`
|
|
|
4662
4796
|
height: 50px;
|
|
4663
4797
|
`;
|
|
4664
4798
|
|
|
4799
|
+
const {matrixArrayToCSSMatrix: matrixArrayToCSSMatrix, rotateMatrix: rotateMatrix, multiplyArrayOfMatrices: multiplyArrayOfMatrices, scaleMatrix: scaleMatrix, translateMatrix: translateMatrix$1} = pluridEngine.interaction.matrix;
|
|
4800
|
+
|
|
4801
|
+
const {degToRad: degToRad$1} = pluridEngine.interaction.quaternion;
|
|
4802
|
+
|
|
4665
4803
|
const PluridViewcubeModel = properties => {
|
|
4666
4804
|
const {mouseOver: mouseOver, stateLanguage: stateLanguage, spaceRotationX: spaceRotationX, spaceRotationY: spaceRotationY, stateAnimatedTransform: stateAnimatedTransform, stateTransformTime: stateTransformTime} = properties;
|
|
4667
4805
|
const [hoveredZone, setHoveredZone] = React.useState("");
|
|
@@ -4669,15 +4807,35 @@ const PluridViewcubeModel = properties => {
|
|
|
4669
4807
|
const handleMouseLeave = () => {
|
|
4670
4808
|
setHoveredZone("");
|
|
4671
4809
|
};
|
|
4810
|
+
const computeTransform = () => {
|
|
4811
|
+
const offsets = {
|
|
4812
|
+
x: 32,
|
|
4813
|
+
y: 23,
|
|
4814
|
+
z: 0
|
|
4815
|
+
};
|
|
4816
|
+
const transformOrigins = {
|
|
4817
|
+
x: 0,
|
|
4818
|
+
y: 0,
|
|
4819
|
+
z: 0
|
|
4820
|
+
};
|
|
4821
|
+
const scale = 1;
|
|
4822
|
+
const rotationMatrix = rotateMatrix(degToRad$1(-spaceRotationX), degToRad$1(-spaceRotationY));
|
|
4823
|
+
const translationMatrix = translateMatrix$1(offsets.x, offsets.y, offsets.z);
|
|
4824
|
+
const scalationMatrix = scaleMatrix(scale);
|
|
4825
|
+
const transformMatrix = multiplyArrayOfMatrices([ translationMatrix, multiplyArrayOfMatrices([ translateMatrix$1(transformOrigins.x, transformOrigins.y, transformOrigins.z), rotationMatrix, translateMatrix$1(-transformOrigins.x, -transformOrigins.y, -transformOrigins.z) ]), scalationMatrix ]);
|
|
4826
|
+
const transform = matrixArrayToCSSMatrix(transformMatrix);
|
|
4827
|
+
return transform;
|
|
4828
|
+
};
|
|
4672
4829
|
React.useEffect((() => {
|
|
4673
4830
|
if (!hoveredZone) {
|
|
4674
4831
|
setActiveZone("");
|
|
4675
4832
|
}
|
|
4676
4833
|
}), [ spaceRotationX, spaceRotationY ]);
|
|
4834
|
+
const transform = computeTransform();
|
|
4677
4835
|
return React__default["default"].createElement(StyledPluridViewcubeModel, null, React__default["default"].createElement(StyledPluridViewcubeModelContainer, null, React__default["default"].createElement(StyledPluridViewcubeModelCube, {
|
|
4678
4836
|
suppressHydrationWarning: true,
|
|
4679
4837
|
style: {
|
|
4680
|
-
transform:
|
|
4838
|
+
transform: transform,
|
|
4681
4839
|
transition: mouseOver || stateAnimatedTransform ? `transform ${stateTransformTime}ms ease-in-out` : ""
|
|
4682
4840
|
},
|
|
4683
4841
|
onMouseLeave: () => handleMouseLeave()
|
|
@@ -4752,6 +4910,7 @@ const PluridViewcube = properties => {
|
|
|
4752
4910
|
const {viewcube: viewcube} = elements;
|
|
4753
4911
|
const {buttons: buttons, conceal: conceal} = viewcube;
|
|
4754
4912
|
const {fadeInTime: fadeInTime} = space;
|
|
4913
|
+
const showViewcube = viewcube.show;
|
|
4755
4914
|
const [mouseOver, setMouseOver] = React.useState(false);
|
|
4756
4915
|
const [isMounted, setIsMounted] = React.useState(false);
|
|
4757
4916
|
const animatedRotate = (type, value) => {
|
|
@@ -4782,6 +4941,9 @@ const PluridViewcube = properties => {
|
|
|
4782
4941
|
React.useEffect((() => {
|
|
4783
4942
|
setIsMounted(true);
|
|
4784
4943
|
}), []);
|
|
4944
|
+
if (!showViewcube) {
|
|
4945
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
4946
|
+
}
|
|
4785
4947
|
return React__default["default"].createElement(StyledPluridViewcube, {
|
|
4786
4948
|
onMouseEnter: () => setMouseOver(true),
|
|
4787
4949
|
onMouseLeave: () => setMouseOver(false),
|
|
@@ -4846,18 +5008,9 @@ const ConnectedPluridViewcube = reactRedux.connect(mapStateToProperties$8, mapDi
|
|
|
4846
5008
|
context: StateContext
|
|
4847
5009
|
})(PluridViewcube);
|
|
4848
5010
|
|
|
4849
|
-
const PluridPlanesView = properties =>
|
|
4850
|
-
const {stateConfiguration: stateConfiguration} = properties;
|
|
4851
|
-
const {elements: elements} = stateConfiguration;
|
|
4852
|
-
const {toolbar: toolbar, viewcube: viewcube} = elements;
|
|
4853
|
-
const showToolbar = toolbar.show;
|
|
4854
|
-
const showViewcube = viewcube.show;
|
|
4855
|
-
return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(ConnectedPluridSpace, null), showToolbar && React__default["default"].createElement(ConnectedPluridToolbar, null), showViewcube && React__default["default"].createElement(ConnectedPluridViewcube, null));
|
|
4856
|
-
};
|
|
5011
|
+
const PluridPlanesView = properties => React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(ConnectedPluridSpace, null), React__default["default"].createElement(ConnectedOrigin, null), React__default["default"].createElement(ConnectedPluridToolbar, null), React__default["default"].createElement(ConnectedPluridViewcube, null));
|
|
4857
5012
|
|
|
4858
|
-
const mapStateToProps$2 = state => ({
|
|
4859
|
-
stateConfiguration: selectors.configuration.getConfiguration(state)
|
|
4860
|
-
});
|
|
5013
|
+
const mapStateToProps$2 = state => ({});
|
|
4861
5014
|
|
|
4862
5015
|
const mapDispatchToProps$2 = dispatch => ({});
|
|
4863
5016
|
|
|
@@ -4875,7 +5028,7 @@ const handleView = view => {
|
|
|
4875
5028
|
const {getRegisteredPlanes: getRegisteredPlanes} = pluridEngine.planes;
|
|
4876
5029
|
|
|
4877
5030
|
const PluridView = properties => {
|
|
4878
|
-
const {planesRegistrar: planesRegistrar, customPlane: customPlane, planeContext: planeContext, planeContextValue: planeContextValue, pubsub: pubsub, planeNotFound: planeNotFound, planeRenderError: planeRenderError, stateConfiguration: stateConfiguration, stateTransform: stateTransform, stateSpaceView: stateSpaceView, dispatch: dispatch, dispatchSetConfiguration: dispatchSetConfiguration, dispatchSetGeneralTheme: dispatchSetGeneralTheme, dispatchSetInteractionTheme: dispatchSetInteractionTheme, dispatchSetSpaceLocation: dispatchSetSpaceLocation, dispatchSetAnimatedTransform: dispatchSetAnimatedTransform, dispatchSetTransformTime: dispatchSetTransformTime, dispatchSetTree: dispatchSetTree, dispatchRotateXWith: dispatchRotateXWith, dispatchRotateX: dispatchRotateX, dispatchRotateYWith: dispatchRotateYWith, dispatchRotateY: dispatchRotateY, dispatchTranslateXWith: dispatchTranslateXWith, dispatchTranslateYWith: dispatchTranslateYWith, dispatchScaleUpWith: dispatchScaleUpWith, dispatchScaleDownWith: dispatchScaleDownWith, dispatchSpaceSetViewSize: dispatchSpaceSetViewSize, dispatchSpaceSetView: dispatchSpaceSetView} = properties;
|
|
5031
|
+
const {planesRegistrar: planesRegistrar, customPlane: customPlane, planeContext: planeContext, planeContextValue: planeContextValue, pubsub: pubsub, planeNotFound: planeNotFound, planeRenderError: planeRenderError, matchedRoute: matchedRoute, stateConfiguration: stateConfiguration, stateTransform: stateTransform, stateSpaceView: stateSpaceView, dispatch: dispatch, dispatchSetConfiguration: dispatchSetConfiguration, dispatchSetGeneralTheme: dispatchSetGeneralTheme, dispatchSetInteractionTheme: dispatchSetInteractionTheme, dispatchSetSpaceLocation: dispatchSetSpaceLocation, dispatchSetAnimatedTransform: dispatchSetAnimatedTransform, dispatchSetTransformTime: dispatchSetTransformTime, dispatchSetTree: dispatchSetTree, dispatchRotateXWith: dispatchRotateXWith, dispatchRotateX: dispatchRotateX, dispatchRotateYWith: dispatchRotateYWith, dispatchRotateY: dispatchRotateY, dispatchTranslateXWith: dispatchTranslateXWith, dispatchTranslateYWith: dispatchTranslateYWith, dispatchScaleUpWith: dispatchScaleUpWith, dispatchScaleDownWith: dispatchScaleDownWith, dispatchSpaceSetViewSize: dispatchSpaceSetViewSize, dispatchSpaceSetView: dispatchSpaceSetView} = properties;
|
|
4879
5032
|
const viewElement = React.useRef(null);
|
|
4880
5033
|
const [pluridPubSub, setPluridPubSub] = React.useState(pubsub ? [ pubsub ] : []);
|
|
4881
5034
|
const shortcutsCallback = React.useCallback((event => {
|
|
@@ -5286,9 +5439,6 @@ const PluridView = properties => {
|
|
|
5286
5439
|
handlePubSubPublish(pubsub);
|
|
5287
5440
|
}
|
|
5288
5441
|
}), [ pluridPubSub.length, stateConfiguration, stateTransform ]);
|
|
5289
|
-
React.useEffect((() => {
|
|
5290
|
-
treeUpdateCallback();
|
|
5291
|
-
}), [ stateSpaceView ]);
|
|
5292
5442
|
const pluridContext = {
|
|
5293
5443
|
planesRegistrar: planesRegistrar,
|
|
5294
5444
|
planeContext: planeContext,
|
|
@@ -5296,6 +5446,7 @@ const PluridView = properties => {
|
|
|
5296
5446
|
customPlane: customPlane,
|
|
5297
5447
|
planeNotFound: planeNotFound,
|
|
5298
5448
|
planeRenderError: planeRenderError,
|
|
5449
|
+
matchedRoute: matchedRoute,
|
|
5299
5450
|
registerPubSub: registerPubSub
|
|
5300
5451
|
};
|
|
5301
5452
|
const viewContainer = handleView(stateSpaceView);
|
|
@@ -5824,7 +5975,8 @@ const computePluridRoute = (matchedRoute, planesRegistrar, isoMatcher, directPla
|
|
|
5824
5975
|
view: view,
|
|
5825
5976
|
planesRegistrar: planesRegistrar,
|
|
5826
5977
|
configuration: defaultConfiguration,
|
|
5827
|
-
pubsub: pubsub
|
|
5978
|
+
pubsub: pubsub,
|
|
5979
|
+
matchedRoute: matchedRoute
|
|
5828
5980
|
});
|
|
5829
5981
|
const PluridRoute = () => React__default["default"].createElement(React__default["default"].Fragment, null, PluridRouteExterior && React__default["default"].createElement(PluridRouteExterior, {
|
|
5830
5982
|
plurid: pluridRouteProperty,
|
|
@@ -5903,10 +6055,12 @@ const renderDirectPlane = (routePlane, planesRegistrar) => {
|
|
|
5903
6055
|
}
|
|
5904
6056
|
}
|
|
5905
6057
|
}
|
|
6058
|
+
const {defaultConfiguration: defaultConfiguration} = routePlane === null || routePlane === void 0 ? void 0 : routePlane.data;
|
|
5906
6059
|
const DirectPlane = () => {
|
|
5907
6060
|
const PluridRoute = () => React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(PluridApplication, {
|
|
5908
6061
|
view: [ routePlane.match.value ],
|
|
5909
|
-
planesRegistrar: planesRegistrar
|
|
6062
|
+
planesRegistrar: planesRegistrar,
|
|
6063
|
+
configuration: defaultConfiguration
|
|
5910
6064
|
}));
|
|
5911
6065
|
return PluridRoute;
|
|
5912
6066
|
};
|
|
@@ -6143,13 +6297,21 @@ const {resolveRoute: resolveRoute, computePlaneAddress: computePlaneAddress} = p
|
|
|
6143
6297
|
|
|
6144
6298
|
const {getPlanesRegistrar: getPlanesRegistrar, getPluridPlaneIDByData: getPluridPlaneIDByData$1} = pluridEngine.planes;
|
|
6145
6299
|
|
|
6300
|
+
const {degToRad: degToRad, radToDeg: radToDeg} = pluridEngine.interaction.quaternion;
|
|
6301
|
+
|
|
6302
|
+
const {multiplyMatrices: multiplyMatrices, translateMatrix: translateMatrix, rotateYMatrix: rotateYMatrix} = pluridEngine.interaction.transform.general;
|
|
6303
|
+
|
|
6304
|
+
const {getTransformRotate: getTransformRotate, getTransformTranslate: getTransformTranslate, getTransformScale: getTransformScale} = pluridEngine.interaction.transform.matrix3d;
|
|
6305
|
+
|
|
6146
6306
|
const PluridLink = properties => {
|
|
6147
|
-
const {children: children, route: planeRoute, devisible: _devisible, suffix: _suffix, atClick: atClick, style: style, className: className, stateTree: stateTree, stateGeneralTheme: stateGeneralTheme, stateConfiguration: stateConfiguration, stateViewSize: stateViewSize, dispatchSetTree: dispatchSetTree, dispatchUpdateSpaceLinkCoordinates: dispatchUpdateSpaceLinkCoordinates} = properties;
|
|
6307
|
+
const {children: children, route: planeRoute, devisible: _devisible, suffix: _suffix, atClick: atClick, style: style, className: className, stateTree: stateTree, stateGeneralTheme: stateGeneralTheme, stateConfiguration: stateConfiguration, stateViewSize: stateViewSize, dispatchSetTree: dispatchSetTree, dispatchSetAnimatedTransform: dispatchSetAnimatedTransform, dispatchSetTransform: dispatchSetTransform, dispatchSetSpaceField: dispatchSetSpaceField, dispatchUpdateSpaceLinkCoordinates: dispatchUpdateSpaceLinkCoordinates} = properties;
|
|
6148
6308
|
const planeControls = stateConfiguration.elements.plane.controls.show;
|
|
6149
6309
|
const previewAppearTime = pluridData.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_IN;
|
|
6150
6310
|
const previewDisappearTime = pluridData.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_OUT;
|
|
6151
6311
|
const planeRouteResolved = computePlaneAddress(planeRoute);
|
|
6152
6312
|
const absolutePlaneRoute = resolveRoute(planeRouteResolved, stateConfiguration.network.protocol, stateConfiguration.network.host);
|
|
6313
|
+
const suffix = _suffix !== null && _suffix !== void 0 ? _suffix : pluridData.PLURID_DEFAULT_CONFIGURATION_LINK_SUFFIX;
|
|
6314
|
+
const devisible = _devisible !== null && _devisible !== void 0 ? _devisible : false;
|
|
6153
6315
|
const context = React.useContext(Context);
|
|
6154
6316
|
if (!context) {
|
|
6155
6317
|
return React__default["default"].createElement(React__default["default"].Fragment, null, children);
|
|
@@ -6169,8 +6331,6 @@ const PluridLink = properties => {
|
|
|
6169
6331
|
const [pluridPlaneID, setPluridPlaneID] = React.useState("");
|
|
6170
6332
|
const [parentPlaneID, setParentPlaneID] = React.useState("");
|
|
6171
6333
|
const [linkCoordinates, setLinkCoordinates] = React.useState(defaultLinkCoordinates);
|
|
6172
|
-
const [suffix, setSuffix] = React.useState(_suffix !== null && _suffix !== void 0 ? _suffix : pluridData.PLURID_DEFAULT_CONFIGURATION_LINK_SUFFIX);
|
|
6173
|
-
const [devisible, setDevisible] = React.useState(_devisible !== null && _devisible !== void 0 ? _devisible : false);
|
|
6174
6334
|
const getPluridLinkCoordinates = () => {
|
|
6175
6335
|
const link = linkElement.current;
|
|
6176
6336
|
if (!link) {
|
|
@@ -6220,38 +6380,69 @@ const PluridLink = properties => {
|
|
|
6220
6380
|
y: y
|
|
6221
6381
|
};
|
|
6222
6382
|
};
|
|
6223
|
-
const
|
|
6224
|
-
const linkCoordinates = getPluridLinkCoordinates();
|
|
6225
|
-
const payload = {
|
|
6226
|
-
planeID: pluridPlaneID,
|
|
6227
|
-
linkCoordinates: linkCoordinates
|
|
6228
|
-
};
|
|
6229
|
-
dispatchUpdateSpaceLinkCoordinates(payload);
|
|
6230
|
-
};
|
|
6231
|
-
const updateTreeWithLink = () => {
|
|
6383
|
+
const updateTreeWithLink = event => {
|
|
6232
6384
|
if (!parentPlaneID || !absolutePlaneRoute) {
|
|
6233
6385
|
return;
|
|
6234
6386
|
}
|
|
6235
6387
|
const {route: route} = absolutePlaneRoute;
|
|
6236
6388
|
const linkCoordinates = getPluridLinkCoordinates();
|
|
6237
|
-
const {pluridPlaneID: pluridPlaneID, updatedTree: updatedTree} = pluridEngine.space.tree.logic.updateTreeWithNewPlane(route, parentPlaneID, linkCoordinates, stateTree, planesRegistry.getAll(), stateConfiguration);
|
|
6389
|
+
const {pluridPlaneID: pluridPlaneID, updatedTree: updatedTree, updatedTreePlane: updatedTreePlane} = pluridEngine.space.tree.logic.updateTreeWithNewPlane(route, parentPlaneID, linkCoordinates, stateTree, planesRegistry.getAll(), stateConfiguration);
|
|
6238
6390
|
if (pluridPlaneID) {
|
|
6391
|
+
navigateToPluridPlane(event, updatedTreePlane);
|
|
6239
6392
|
dispatchSetTree(updatedTree);
|
|
6240
6393
|
setShowLink(true);
|
|
6241
6394
|
setPluridPlaneID(pluridPlaneID);
|
|
6242
6395
|
}
|
|
6243
6396
|
};
|
|
6244
|
-
const toggleLinkFromTree =
|
|
6245
|
-
const updatedTree = pluridEngine.space.tree.logic.togglePlaneFromTree(stateTree, pluridPlaneID);
|
|
6397
|
+
const toggleLinkFromTree = event => {
|
|
6398
|
+
const {updatedTree: updatedTree, updatedPlane: updatedPlane} = pluridEngine.space.tree.logic.togglePlaneFromTree(stateTree, pluridPlaneID);
|
|
6399
|
+
navigateToPluridPlane(event, updatedPlane);
|
|
6246
6400
|
dispatchSetTree(updatedTree);
|
|
6247
6401
|
setShowLink((show => !show));
|
|
6248
6402
|
setShowPreview(false);
|
|
6249
6403
|
};
|
|
6250
|
-
const
|
|
6404
|
+
const navigateToPluridPlane = (event, updatedPlane) => {
|
|
6405
|
+
if (!updatedPlane) {
|
|
6406
|
+
return;
|
|
6407
|
+
}
|
|
6408
|
+
if (showLink) {
|
|
6409
|
+
return;
|
|
6410
|
+
}
|
|
6411
|
+
if (event.ctrlKey || event.metaKey) {
|
|
6412
|
+
return;
|
|
6413
|
+
}
|
|
6414
|
+
const {location: location} = updatedPlane;
|
|
6415
|
+
const {translateX: translateX, translateY: translateY, translateZ: translateZ, rotateY: rotateY} = location;
|
|
6416
|
+
const zSign1 = rotateY < 100 ? 1 : -1;
|
|
6417
|
+
const zSign2 = rotateY < 100 ? -1 : 1;
|
|
6418
|
+
const xOffset = rotateY < 100 ? 200 : 0;
|
|
6419
|
+
const newMatrix = multiplyMatrices(multiplyMatrices(multiplyMatrices(translateMatrix(-translateX, -translateY, zSign1 * translateZ), rotateYMatrix(degToRad(rotateY))), translateMatrix(translateX, translateY, zSign2 * translateZ)), translateMatrix(-(translateX + xOffset), -translateY, zSign1 * translateZ));
|
|
6420
|
+
const matrix3d = `matrix3d(${newMatrix.flat().join(",")})`;
|
|
6421
|
+
const rotate = getTransformRotate(matrix3d);
|
|
6422
|
+
const translate = getTransformTranslate(matrix3d);
|
|
6423
|
+
const scale = getTransformScale(matrix3d);
|
|
6424
|
+
dispatchSetAnimatedTransform(true);
|
|
6425
|
+
dispatchSetSpaceField({
|
|
6426
|
+
field: "transform",
|
|
6427
|
+
value: matrix3d
|
|
6428
|
+
});
|
|
6429
|
+
dispatchSetTransform({
|
|
6430
|
+
translationX: translate.translateX,
|
|
6431
|
+
translationY: translate.translateY,
|
|
6432
|
+
translationZ: translate.translateZ,
|
|
6433
|
+
rotationX: radToDeg(rotate.rotateX),
|
|
6434
|
+
rotationY: radToDeg(rotate.rotateY) * -1,
|
|
6435
|
+
scale: scale.scale
|
|
6436
|
+
});
|
|
6437
|
+
setTimeout((() => {
|
|
6438
|
+
dispatchSetAnimatedTransform(false);
|
|
6439
|
+
}), 500);
|
|
6440
|
+
};
|
|
6441
|
+
const handleShowPluridPlane = event => {
|
|
6251
6442
|
if (!showLink && !pluridPlaneID) {
|
|
6252
|
-
updateTreeWithLink();
|
|
6443
|
+
updateTreeWithLink(event);
|
|
6253
6444
|
} else {
|
|
6254
|
-
toggleLinkFromTree();
|
|
6445
|
+
toggleLinkFromTree(event);
|
|
6255
6446
|
}
|
|
6256
6447
|
};
|
|
6257
6448
|
const handleClick = React.useCallback((event => {
|
|
@@ -6259,21 +6450,8 @@ const PluridLink = properties => {
|
|
|
6259
6450
|
if (atClick !== undefined) {
|
|
6260
6451
|
atClick(event);
|
|
6261
6452
|
}
|
|
6262
|
-
handleShowPluridPlane();
|
|
6453
|
+
handleShowPluridPlane(event);
|
|
6263
6454
|
}), [ linkElement.current, stateTree ]);
|
|
6264
|
-
React.useEffect((() => {
|
|
6265
|
-
if (_suffix !== undefined) {
|
|
6266
|
-
setSuffix(_suffix);
|
|
6267
|
-
}
|
|
6268
|
-
if (_devisible !== undefined) {
|
|
6269
|
-
setDevisible(_devisible);
|
|
6270
|
-
}
|
|
6271
|
-
}), [ _suffix, _devisible ]);
|
|
6272
|
-
React.useEffect((() => {
|
|
6273
|
-
if (showLink) {
|
|
6274
|
-
updateLinkCoordinates();
|
|
6275
|
-
}
|
|
6276
|
-
}), [ stateViewSize ]);
|
|
6277
6455
|
React.useEffect((() => {
|
|
6278
6456
|
const parentPlaneID = getPluridPlaneIDByData$1(linkElement.current);
|
|
6279
6457
|
setParentPlaneID(parentPlaneID);
|
|
@@ -6334,6 +6512,9 @@ const mapStateToProperties$5 = state => ({
|
|
|
6334
6512
|
|
|
6335
6513
|
const mapDispatchToProperties$5 = dispatch => ({
|
|
6336
6514
|
dispatchSetTree: tree => dispatch(actions.space.setTree(tree)),
|
|
6515
|
+
dispatchSetAnimatedTransform: payload => dispatch(actions.space.setAnimatedTransform(payload)),
|
|
6516
|
+
dispatchSetTransform: payload => dispatch(actions.space.setTransform(payload)),
|
|
6517
|
+
dispatchSetSpaceField: payload => dispatch(actions.space.setSpaceField(payload)),
|
|
6337
6518
|
dispatchUpdateSpaceLinkCoordinates: payload => dispatch(actions.space.updateSpaceLinkCoordinates(payload))
|
|
6338
6519
|
});
|
|
6339
6520
|
|