@archvisioninc/canvas 2.6.2 → 2.6.3

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.
@@ -182,12 +182,11 @@ export const updateMaterial = inboundData => {
182
182
 
183
183
  // Reset supported texture channels, useful when manually importing a new material.
184
184
  if (clearTextureChannels) {
185
- material.albedoTexture = null;
186
- material.metallicTexture = null;
187
- material.microSurfaceTexture = null;
188
- material.emissiveTexture = null;
189
- material.bumpTexture = null;
190
- material.opacityTexture = null;
185
+ Object.keys(material).forEach(key => {
186
+ if (key.endsWith('Texture')) {
187
+ material[key] = null;
188
+ }
189
+ });
191
190
  }
192
191
 
193
192
  // Back-face culling
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archvisioninc/canvas",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "private": false,
5
5
  "main": "dist/Canvas.js",
6
6
  "module": "dist/Canvas.js",
@@ -220,12 +220,11 @@ export const updateMaterial = inboundData => {
220
220
 
221
221
  // Reset supported texture channels, useful when manually importing a new material.
222
222
  if (clearTextureChannels) {
223
- material.albedoTexture = null;
224
- material.metallicTexture = null;
225
- material.microSurfaceTexture = null;
226
- material.emissiveTexture = null;
227
- material.bumpTexture = null;
228
- material.opacityTexture = null;
223
+ Object.keys(material).forEach(key => {
224
+ if (key.endsWith('Texture')) {
225
+ material[key] = null;
226
+ }
227
+ });
229
228
  }
230
229
 
231
230
  // Back-face culling