From fc9dcf498de6f2415cc0b5fc20b45cedc1055904 Mon Sep 17 00:00:00 2001 From: Will Eastcott Date: Sat, 2 Apr 2022 21:53:23 +0100 Subject: [PATCH] [FIX] Declare standard material maps as nullable (#4165) --- types-fixup.mjs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/types-fixup.mjs b/types-fixup.mjs index 73702d80455..50acc15e91a 100644 --- a/types-fixup.mjs +++ b/types-fixup.mjs @@ -309,7 +309,7 @@ const standardMaterialProps = [ ['ambient', 'Color'], ['ambientTint', 'boolean'], ['anisotropy', 'number'], - ['aoMap', 'Texture'], + ['aoMap', 'Texture|null'], ['aoMapChannel', 'string'], ['aoMapOffset', 'Vec2'], ['aoMapRotation', 'number'], @@ -320,7 +320,7 @@ const standardMaterialProps = [ ['bumpiness', 'number'], ['clearCoat', 'number'], ['clearCoatBumpiness', 'number'], - ['clearCoatGlossMap', 'Texture'], + ['clearCoatGlossMap', 'Texture|null'], ['clearCoatGlossMapChannel', 'string'], ['clearCoatGlossMapOffset', 'Vec2'], ['clearCoatGlossMapRotation', 'number'], @@ -329,13 +329,13 @@ const standardMaterialProps = [ ['clearCoatGlossVertexColor', 'boolean'], ['clearCoatGlossVertexColorChannel', 'string'], ['clearCoatGlossiness', 'number'], - ['clearCoatMap', 'Texture'], + ['clearCoatMap', 'Texture|null'], ['clearCoatMapChannel', 'string'], ['clearCoatMapOffset', 'Vec2'], ['clearCoatMapRotation', 'number'], ['clearCoatMapTiling', 'Vec2'], ['clearCoatMapUv', 'number'], - ['clearCoatNormalMap', 'Texture'], + ['clearCoatNormalMap', 'Texture|null'], ['clearCoatNormalMapOffset', 'Vec2'], ['clearCoatNormalMapRotation', 'number'], ['clearCoatNormalMapTiling', 'Vec2'], @@ -343,18 +343,18 @@ const standardMaterialProps = [ ['clearCoatVertexColor', 'boolean'], ['clearCoatVertexColorChannel', 'string'], ['conserveEnergy', 'boolean'], - ['cubeMap', 'Texture'], + ['cubeMap', 'Texture|null'], ['cubeMapProjection', 'number'], ['cubeMapProjectionBox', 'BoundingBox'], ['diffuse', 'Color'], - ['diffuseDetailMap', 'Texture'], + ['diffuseDetailMap', 'Texture|null'], ['diffuseDetailMapChannel', 'string'], ['diffuseDetailMapOffset', 'Vec2'], ['diffuseDetailMapRotation', 'number'], ['diffuseDetailMapTiling', 'Vec2'], ['diffuseDetailMapUv', 'number'], ['diffuseDetailMode', 'string'], - ['diffuseMap', 'Texture'], + ['diffuseMap', 'Texture|null'], ['diffuseMapChannel', 'string'], ['diffuseMapOffset', 'Vec2'], ['diffuseMapRotation', 'number'], @@ -365,7 +365,7 @@ const standardMaterialProps = [ ['diffuseVertexColorChannel', 'string'], ['emissive', 'Color'], ['emissiveIntensity', 'number'], - ['emissiveMap', 'Texture'], + ['emissiveMap', 'Texture|null'], ['emissiveMapChannel', 'string'], ['emissiveMapOffset', 'Vec2'], ['emissiveMapRotation', 'number'], @@ -376,7 +376,7 @@ const standardMaterialProps = [ ['emissiveVertexColorChannel', 'string'], ['enableGGXSpecular', 'boolean'], ['fresnelModel', 'number'], - ['glossMap', 'Texture'], + ['glossMap', 'Texture|null'], ['glossMapChannel', 'string'], ['glossMapOffset', 'Vec2'], ['glossMapRotation', 'number'], @@ -384,14 +384,14 @@ const standardMaterialProps = [ ['glossMapUv', 'number'], ['glossVertexColor', 'boolean'], ['glossVertexColorChannel', 'string'], - ['heightMap', 'Texture'], + ['heightMap', 'Texture|null'], ['heightMapChannel', 'string'], ['heightMapFactor', 'number'], ['heightMapOffset', 'Vec2'], ['heightMapRotation', 'number'], ['heightMapTiling', 'Vec2'], ['heightMapUv', 'number'], - ['lightMap', 'Texture'], + ['lightMap', 'Texture|null'], ['lightMapChannel', 'string'], ['lightMapOffset', 'Vec2'], ['lightMapRotation', 'number'], @@ -400,7 +400,7 @@ const standardMaterialProps = [ ['lightVertexColor', 'boolean'], ['lightVertexColorChannel', 'string'], ['metalness', 'number'], - ['metalnessMap', 'Texture'], + ['metalnessMap', 'Texture|null'], ['metalnessMapChannel', 'string'], ['metalnessMapOffset', 'Vec2'], ['metalnessMapRotation', 'number'], @@ -408,13 +408,13 @@ const standardMaterialProps = [ ['metalnessMapUv', 'number'], ['metalnessVertexColor', 'boolean'], ['metalnessVertexColorChannel', 'string'], - ['normalDetailMap', 'Texture'], + ['normalDetailMap', 'Texture|null'], ['normalDetailMapBumpiness', 'number'], ['normalDetailMapOffset', 'Vec2'], ['normalDetailMapRotation', 'number'], ['normalDetailMapTiling', 'Vec2'], ['normalDetailMapUv', 'number'], - ['normalMap', 'Texture'], + ['normalMap', 'Texture|null'], ['normalMapOffset', 'Vec2'], ['normalMapRotation', 'number'], ['normalMapTiling', 'Vec2'], @@ -425,7 +425,7 @@ const standardMaterialProps = [ ['onUpdateShader', 'UpdateShaderCallback'], ['opacity', 'number'], ['opacityFadesSpecular', 'boolean'], - ['opacityMap', 'Texture'], + ['opacityMap', 'Texture|null'], ['opacityMapChannel', 'string'], ['opacityMapOffset', 'Vec2'], ['opacityMapRotation', 'number'], @@ -441,7 +441,7 @@ const standardMaterialProps = [ ['shininess', 'number'], ['specular', 'Color'], ['specularAntialias', 'boolean'], - ['specularMap', 'Texture'], + ['specularMap', 'Texture|null'], ['specularMapChannel', 'string'], ['specularMapOffset', 'Vec2'], ['specularMapRotation', 'number'], @@ -450,7 +450,7 @@ const standardMaterialProps = [ ['specularTint', 'boolean'], ['specularVertexColor', 'boolean'], ['specularVertexColorChannel', 'string'], - ['sphereMap', 'Texture'], + ['sphereMap', 'Texture|null'], ['twoSidedLighting', 'boolean'], ['useFog', 'boolean'], ['useGammaTonemap', 'boolean'],