@archvisioninc/canvas 2.8.5 → 2.8.6
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.
|
@@ -52,7 +52,6 @@ export const initSceneObjects = () => {
|
|
|
52
52
|
checkForRootNode();
|
|
53
53
|
};
|
|
54
54
|
const initHighlightManagers = () => {
|
|
55
|
-
if (props.integration?.meshHighlighting === false) return;
|
|
56
55
|
highlightManager = newHighlightManager('selectHighlightManager');
|
|
57
56
|
hoverHighlightManager = newHighlightManager('hoverHighlightManager');
|
|
58
57
|
};
|
|
@@ -91,6 +91,7 @@ const removeSelectedMesh = selectedMesh => {
|
|
|
91
91
|
attachToSelectMeshesNode();
|
|
92
92
|
};
|
|
93
93
|
const addHoverMesh = pickedMesh => {
|
|
94
|
+
if (props.integration?.meshHighlighting === false) return;
|
|
94
95
|
const isSelected = selectedMeshes.includes(pickedMesh);
|
|
95
96
|
removeHoverMesh();
|
|
96
97
|
if (isSelected) {
|
|
@@ -105,6 +106,7 @@ const addHoverMesh = pickedMesh => {
|
|
|
105
106
|
hoverHighlightManager.addMesh(hoverMesh, hoverColor());
|
|
106
107
|
};
|
|
107
108
|
const removeHoverMesh = () => {
|
|
109
|
+
if (props.integration?.meshHighlighting === false) return;
|
|
108
110
|
hoverHighlightManager.removeAllMeshes();
|
|
109
111
|
if (tempMesh) {
|
|
110
112
|
highlightManager.addMesh(tempMesh, highlightColor());
|
|
@@ -120,13 +122,16 @@ export const resetSelectedMeshes = () => {
|
|
|
120
122
|
const existingMaterial = scene.metadata?.materials?.find?.(mat => mat.materialId === firstMaterial.id);
|
|
121
123
|
newMetaDataEntry('selectedMaterials', [existingMaterial]);
|
|
122
124
|
}
|
|
123
|
-
|
|
125
|
+
if (props.integration?.meshHighlighting !== false) {
|
|
126
|
+
highlightManager.removeAllMeshes();
|
|
127
|
+
}
|
|
124
128
|
selectedMeshes = [];
|
|
125
129
|
selectedMaterials = [];
|
|
126
130
|
newMetaDataEntry('selectedMeshes', []);
|
|
127
131
|
props.setSerializedData?.(serializeScene());
|
|
128
132
|
};
|
|
129
133
|
export const refreshHighlight = () => {
|
|
134
|
+
if (props.integration?.meshHighlighting === false) return;
|
|
130
135
|
highlightManager.removeAllMeshes();
|
|
131
136
|
selectedMeshes.forEach(mesh => highlightManager.addMesh(mesh, highlightColor()));
|
|
132
137
|
};
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ export const fetchDownloadURL = async args => {
|
|
|
14
14
|
if (!_.isEmpty(rpcGuid)) {
|
|
15
15
|
const servicesURL = `https://api.archvision.services/rpc/v1/integration/${rpcGuid}/download/${format}`;
|
|
16
16
|
// eslint-disable-next-line
|
|
17
|
-
const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
17
|
+
const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FyY2h2aXNpb24uY29tIiwic3ViIjozOTUxNTcsInRva2VuX3R5cGUiOiJiZWFyZXIiLCJzY29wZSI6ImJhc2ljIiwiYXVkIjoiNDVFUnF3SEV5SWRqbXhkaUU4MUxMbDlFYTN2SzZZQ3dLNWE2R2xEMyIsImlhdCI6MTcwOTY1MDM5OSwiZXhwIjoxNzE0ODM0Mzk5fQ.aCtOw3h-BTTiIEcvb0FeA_XhRpEmzQTfyerRUu4JGuU';
|
|
18
18
|
const options = {
|
|
19
19
|
method: 'GET',
|
|
20
20
|
headers: {
|
|
@@ -97,8 +97,6 @@ export const initSceneObjects = () => {
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
const initHighlightManagers = () => {
|
|
100
|
-
if (props.integration?.meshHighlighting === false) return;
|
|
101
|
-
|
|
102
100
|
highlightManager = newHighlightManager('selectHighlightManager');
|
|
103
101
|
hoverHighlightManager = newHighlightManager('hoverHighlightManager');
|
|
104
102
|
};
|
|
@@ -134,6 +134,8 @@ const removeSelectedMesh = selectedMesh => {
|
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
const addHoverMesh = pickedMesh => {
|
|
137
|
+
if (props.integration?.meshHighlighting === false) return;
|
|
138
|
+
|
|
137
139
|
const isSelected = selectedMeshes.includes(pickedMesh);
|
|
138
140
|
|
|
139
141
|
removeHoverMesh();
|
|
@@ -153,6 +155,8 @@ const addHoverMesh = pickedMesh => {
|
|
|
153
155
|
};
|
|
154
156
|
|
|
155
157
|
const removeHoverMesh = () => {
|
|
158
|
+
if (props.integration?.meshHighlighting === false) return;
|
|
159
|
+
|
|
156
160
|
hoverHighlightManager.removeAllMeshes();
|
|
157
161
|
|
|
158
162
|
if (tempMesh) {
|
|
@@ -174,7 +178,10 @@ export const resetSelectedMeshes = () => {
|
|
|
174
178
|
newMetaDataEntry('selectedMaterials', [ existingMaterial ]);
|
|
175
179
|
}
|
|
176
180
|
|
|
177
|
-
|
|
181
|
+
if (props.integration?.meshHighlighting !== false) {
|
|
182
|
+
highlightManager.removeAllMeshes();
|
|
183
|
+
}
|
|
184
|
+
|
|
178
185
|
selectedMeshes = [];
|
|
179
186
|
selectedMaterials = [];
|
|
180
187
|
newMetaDataEntry('selectedMeshes', []);
|
|
@@ -182,6 +189,8 @@ export const resetSelectedMeshes = () => {
|
|
|
182
189
|
};
|
|
183
190
|
|
|
184
191
|
export const refreshHighlight = () => {
|
|
192
|
+
if (props.integration?.meshHighlighting === false) return;
|
|
193
|
+
|
|
185
194
|
highlightManager.removeAllMeshes();
|
|
186
195
|
selectedMeshes.forEach(mesh => highlightManager.addMesh(mesh, highlightColor()));
|
|
187
196
|
};
|