@archvisioninc/canvas 2.6.0 → 2.6.1
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.
|
@@ -205,30 +205,30 @@ export const updateMaterial = inboundData => {
|
|
|
205
205
|
// Diffuse
|
|
206
206
|
if (albedoColor) material.albedoColor = newColor(albedoColor);
|
|
207
207
|
if (environmentIntensity !== undefined) material.environmentIntensity = environmentIntensity;
|
|
208
|
-
if (!_.isEmpty(albedoTexture
|
|
209
|
-
material.albedoTexture = newTexture(albedoTexture
|
|
208
|
+
if (!_.isEmpty(albedoTexture?.src || albedoTexture?.url)) {
|
|
209
|
+
material.albedoTexture = newTexture(albedoTexture?.src || albedoTexture?.url);
|
|
210
210
|
material.albedoTexture.name = albedoTexture.name;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
// Metallic
|
|
214
214
|
if (metallic !== undefined) material.metallic = metallic;
|
|
215
|
-
if (!_.isEmpty(metallicTexture
|
|
216
|
-
material.metallicTexture = newTexture(metallicTexture
|
|
215
|
+
if (!_.isEmpty(metallicTexture?.src || metallicTexture?.url)) {
|
|
216
|
+
material.metallicTexture = newTexture(metallicTexture?.src || metallicTexture?.url);
|
|
217
217
|
material.metallicTexture.name = metallicTexture.name;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
// Roughness
|
|
221
221
|
if (roughness !== undefined) material.roughness = roughness;
|
|
222
|
-
if (!_.isEmpty(microSurfaceTexture
|
|
223
|
-
material.microSurfaceTexture = newTexture(microSurfaceTexture
|
|
222
|
+
if (!_.isEmpty(microSurfaceTexture?.src || microSurfaceTexture?.url)) {
|
|
223
|
+
material.microSurfaceTexture = newTexture(microSurfaceTexture?.src || microSurfaceTexture?.url);
|
|
224
224
|
material.microSurfaceTexture.name = microSurfaceTexture.name;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
// Emissive
|
|
228
228
|
if (emissiveColor) material.emissiveColor = newColor(emissiveColor);
|
|
229
229
|
if (emissiveIntensity !== undefined) material.emissiveIntensity = emissiveIntensity;
|
|
230
|
-
if (!_.isEmpty(emissiveTexture
|
|
231
|
-
material.emissiveTexture = newTexture(emissiveTexture
|
|
230
|
+
if (!_.isEmpty(emissiveTexture?.src || emissiveTexture?.url)) {
|
|
231
|
+
material.emissiveTexture = newTexture(emissiveTexture?.src || emissiveTexture?.url);
|
|
232
232
|
material.emissiveTexture.name = emissiveTexture.name;
|
|
233
233
|
}
|
|
234
234
|
|
|
@@ -236,8 +236,8 @@ export const updateMaterial = inboundData => {
|
|
|
236
236
|
if (bumpIntensity !== undefined && !_.isEmpty(material.bumpTexture?.url)) {
|
|
237
237
|
material.bumpTexture.level = bumpIntensity;
|
|
238
238
|
}
|
|
239
|
-
if (!_.isEmpty(bumpTexture
|
|
240
|
-
material.bumpTexture = newTexture(bumpTexture
|
|
239
|
+
if (!_.isEmpty(bumpTexture?.src || bumpTexture?.url)) {
|
|
240
|
+
material.bumpTexture = newTexture(bumpTexture?.src || bumpTexture?.url);
|
|
241
241
|
material.bumpTexture.name = bumpTexture.name;
|
|
242
242
|
}
|
|
243
243
|
|
|
@@ -268,8 +268,8 @@ export const updateMaterial = inboundData => {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
if (alpha !== undefined) material.alpha = alpha ?? 1;
|
|
271
|
-
if (!_.isEmpty(opacityTexture
|
|
272
|
-
material.opacityTexture = newTexture(opacityTexture
|
|
271
|
+
if (!_.isEmpty(opacityTexture?.src || opacityTexture?.url)) {
|
|
272
|
+
material.opacityTexture = newTexture(opacityTexture?.src || opacityTexture?.url);
|
|
273
273
|
material.opacityTexture.name = opacityTexture.name;
|
|
274
274
|
}
|
|
275
275
|
if (transparencyType) {
|
package/package.json
CHANGED
|
@@ -238,30 +238,30 @@ export const updateMaterial = inboundData => {
|
|
|
238
238
|
// Diffuse
|
|
239
239
|
if (albedoColor) material.albedoColor = newColor(albedoColor);
|
|
240
240
|
if (environmentIntensity !== undefined) material.environmentIntensity = environmentIntensity;
|
|
241
|
-
if (!_.isEmpty(albedoTexture
|
|
242
|
-
material.albedoTexture = newTexture(albedoTexture
|
|
241
|
+
if (!_.isEmpty(albedoTexture?.src || albedoTexture?.url)) {
|
|
242
|
+
material.albedoTexture = newTexture(albedoTexture?.src || albedoTexture?.url);
|
|
243
243
|
material.albedoTexture.name = albedoTexture.name;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
// Metallic
|
|
247
247
|
if (metallic !== undefined) material.metallic = metallic;
|
|
248
|
-
if (!_.isEmpty(metallicTexture
|
|
249
|
-
material.metallicTexture = newTexture(metallicTexture
|
|
248
|
+
if (!_.isEmpty(metallicTexture?.src || metallicTexture?.url)) {
|
|
249
|
+
material.metallicTexture = newTexture(metallicTexture?.src || metallicTexture?.url);
|
|
250
250
|
material.metallicTexture.name = metallicTexture.name;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
// Roughness
|
|
254
254
|
if (roughness !== undefined) material.roughness = roughness;
|
|
255
|
-
if (!_.isEmpty(microSurfaceTexture
|
|
256
|
-
material.microSurfaceTexture = newTexture(microSurfaceTexture
|
|
255
|
+
if (!_.isEmpty(microSurfaceTexture?.src || microSurfaceTexture?.url)) {
|
|
256
|
+
material.microSurfaceTexture = newTexture(microSurfaceTexture?.src || microSurfaceTexture?.url);
|
|
257
257
|
material.microSurfaceTexture.name = microSurfaceTexture.name;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
// Emissive
|
|
261
261
|
if (emissiveColor) material.emissiveColor = newColor(emissiveColor);
|
|
262
262
|
if (emissiveIntensity !== undefined) material.emissiveIntensity = emissiveIntensity;
|
|
263
|
-
if (!_.isEmpty(emissiveTexture
|
|
264
|
-
material.emissiveTexture = newTexture(emissiveTexture
|
|
263
|
+
if (!_.isEmpty(emissiveTexture?.src || emissiveTexture?.url)) {
|
|
264
|
+
material.emissiveTexture = newTexture(emissiveTexture?.src || emissiveTexture?.url);
|
|
265
265
|
material.emissiveTexture.name = emissiveTexture.name;
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -270,8 +270,8 @@ export const updateMaterial = inboundData => {
|
|
|
270
270
|
material.bumpTexture.level = bumpIntensity;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
if (!_.isEmpty(bumpTexture
|
|
274
|
-
material.bumpTexture = newTexture(bumpTexture
|
|
273
|
+
if (!_.isEmpty(bumpTexture?.src || bumpTexture?.url)) {
|
|
274
|
+
material.bumpTexture = newTexture(bumpTexture?.src || bumpTexture?.url);
|
|
275
275
|
material.bumpTexture.name = bumpTexture.name;
|
|
276
276
|
}
|
|
277
277
|
|
|
@@ -307,8 +307,8 @@ export const updateMaterial = inboundData => {
|
|
|
307
307
|
|
|
308
308
|
if (alpha !== undefined) material.alpha = alpha ?? 1;
|
|
309
309
|
|
|
310
|
-
if (!_.isEmpty(opacityTexture
|
|
311
|
-
material.opacityTexture = newTexture(opacityTexture
|
|
310
|
+
if (!_.isEmpty(opacityTexture?.src || opacityTexture?.url)) {
|
|
311
|
+
material.opacityTexture = newTexture(opacityTexture?.src || opacityTexture?.url);
|
|
312
312
|
material.opacityTexture.name = opacityTexture.name;
|
|
313
313
|
}
|
|
314
314
|
|