18 lines
108 KiB
JavaScript
18 lines
108 KiB
JavaScript
/*!
|
|
* LMV v7.99.1
|
|
*
|
|
* Copyright 2024 Autodesk, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This computer source code and related instructions and comments are the
|
|
* unpublished confidential and proprietary information of Autodesk, Inc.
|
|
* and are protected under Federal copyright and state trade secret law.
|
|
* They may not be disclosed to, copied or used by any third party without
|
|
* the prior written consent of Autodesk, Inc.
|
|
*
|
|
* Autodesk Viewer SDK Usage Limitations:
|
|
*
|
|
* The Autodesk Viewer SDK JavaScript must be delivered from an
|
|
* Autodesk-hosted URL.
|
|
*/(()=>{var e={9809:e=>{e.exports="\n#include <common>\n#ifndef RECIPROCAL_PI\n#define RECIPROCAL_PI 0.318309886\n#endif\n#define ONE 0.00390625\nuniform float opacity;\nuniform vec3 surface_albedo;\nuniform float surface_roughness;\nuniform float surface_anisotropy;\nuniform float surface_rotation;\nuniform sampler2D importantSamplingRandomMap;\nuniform sampler2D importantSamplingSolidAngleMap;\n#if defined( PRISMOPAQUE )\nuniform vec3 opaque_albedo;\nuniform float opaque_f0;\nuniform vec3 opaque_luminance_modifier;\nuniform float opaque_luminance;\n#elif defined( PRISMMETAL )\nuniform vec3 metal_f0;\n#elif defined( PRISMLAYERED )\nuniform float layered_f0;\nuniform vec3 layered_diffuse;\nuniform float layered_fraction;\nuniform vec3 layered_bottom_f0;\nuniform float layered_roughness;\nuniform float layered_anisotropy;\nuniform float layered_rotation;\n#elif defined( PRISMTRANSPARENT )\nuniform float transparent_ior;\nuniform vec3 transparent_color;\nuniform float transparent_distance;\n#elif defined( PRISMGLAZING )\nuniform vec3 glazing_f0;\nuniform vec3 glazing_transmission_color;\nuniform float glazing_transmission_roughness;\n#elif defined( PRISMWOOD )\nuniform bool wood_fiber_cosine_enable;\nuniform int wood_fiber_cosine_bands;\nuniform vec4 wood_fiber_cosine_weights;\nuniform vec4 wood_fiber_cosine_frequencies;\nuniform bool wood_fiber_perlin_enable;\nuniform int wood_fiber_perlin_bands;\nuniform vec4 wood_fiber_perlin_weights;\nuniform vec4 wood_fiber_perlin_frequencies;\nuniform float wood_fiber_perlin_scale_z;\nuniform bool wood_growth_perlin_enable;\nuniform int wood_growth_perlin_bands;\nuniform vec4 wood_growth_perlin_weights;\nuniform vec4 wood_growth_perlin_frequencies;\nuniform float wood_latewood_ratio;\nuniform float wood_earlywood_sharpness;\nuniform float wood_latewood_sharpness;\nuniform float wood_ring_thickness;\nuniform bool wood_earlycolor_perlin_enable;\nuniform int wood_earlycolor_perlin_bands;\nuniform vec4 wood_earlycolor_perlin_weights;\nuniform vec4 wood_earlycolor_perlin_frequencies;\nuniform vec3 wood_early_color;\nuniform bool wood_use_manual_late_color;\nuniform vec3 wood_manual_late_color;\nuniform bool wood_latecolor_perlin_enable;\nuniform int wood_latecolor_perlin_bands;\nuniform vec4 wood_latecolor_perlin_weights;\nuniform vec4 wood_latecolor_perlin_frequencies;\nuniform float wood_late_color_power;\nuniform bool wood_diffuse_perlin_enable;\nuniform int wood_diffuse_perlin_bands;\nuniform vec4 wood_diffuse_perlin_weights;\nuniform vec4 wood_diffuse_perlin_frequencies;\nuniform float wood_diffuse_perlin_scale_z;\nuniform bool wood_use_pores;\nuniform int wood_pore_type;\nuniform float wood_pore_radius;\nuniform float wood_pore_cell_dim;\nuniform float wood_pore_color_power;\nuniform float wood_pore_depth;\nuniform bool wood_use_rays;\nuniform float wood_ray_color_power;\nuniform float wood_ray_seg_length_z;\nuniform float wood_ray_num_slices;\nuniform float wood_ray_ellipse_z2x;\nuniform float wood_ray_ellipse_radius_x;\nuniform bool wood_use_latewood_bump;\nuniform float wood_latewood_bump_depth;\nuniform bool wood_use_groove_roughness;\nuniform float wood_groove_roughness;\nuniform float wood_diffuse_lobe_weight;\nuniform sampler2D permutationMap;\nuniform sampler2D gradientMap;\nuniform sampler2D perm2DMap;\nuniform sampler2D permGradMap;\nuniform vec4 wood_ring_fraction;\nuniform vec2 wood_fall_rise;\n#endif\n#ifdef USE_TILING\nuniform mat4 tilingOverallTransform;\nuniform sampler2D TilingMap;\nuniform mat3 TilingMap_texMatrix;\nuniform vec4 uv2tile;\nuniform vec4 tile2uv;\nuniform vec2 tileAlignOffset;\nuniform mat4 tilingUVTransform;\n#ifdef USE_TILING_NORMAL\nuniform sampler2D TilingNormalMap;\nuniform mat3 TilingNormalMap_texMatrix;\n#endif\n#ifdef USE_TILING_RANDOM\nuniform sampler2D TilingRandomMap;\nuniform mat3 TilingRandomMap_texMatrix;\nuniform vec2 tilingRandomAxisS;\nuniform vec2 tilingRandomAxisT;\nuniform vec2 tilingRandomAlignmentOffset;\n#endif\n#endif\nuniform float envExponentMin;\nuniform float envExponentMax;\nuniform float envExponentCount;\n#include <env_sample>\n#if TONEMAP_OUTPUT > 0\nuniform float exposureBias;\n#include <tonemap>\n#endif\n#if MAX_SPOT_LIGHTS > 0 || NUM_CUTPLANES > 0\nin vec3 vWorldPosition;\n#endif\n#include <id_decl_frag>\n#include <theming_decl_frag>\n#include <shadowmap_decl_frag>\n#include <logdepthbuf_decl_frag>\n#ifdef USE_FOG\nuniform vec3 fogColor;\nuniform float fogNear;\nuniform float fogFar;\n#endif\n#if defined( USE_SURFACE_ALBEDO_MAP ) || defined( USE_SURFACE_ROUGHNESS_MAP ) || defined( USE_SURFACE_CUTOUT_MAP ) || defined( USE_SURFACE_ANISOTROPY_MAP ) || defined( USE_SURFACE_ROTATION_MAP ) || defined( USE_OPAQUE_ALBEDO_MAP ) || defined( USE_OPAQUE_F0_MAP ) || defined( USE_OPAQUE_LUMINANCE_MODIFIER_MAP ) || defined( USE_LAYERED_BOTTOM_F0_MAP ) || defined( USE_LAYERED_F0_MAP ) || defined( USE_LAYERED_DIFFUSE_MAP ) || defined( USE_LAYERED_FRACTION_MAP ) || defined( USE_LAYERED_ROUGHNESS_MAP ) || defined( USE_LAYERED_ANISOTROPY_MAP ) || defined( USE_LAYERED_ROTATION_MAP ) || defined( USE_METAL_F0_MAP ) || defined( USE_SURFACE_NORMAL_MAP ) || defined( USE_LAYERED_NORMAL_MAP )\n #define USE_MAP\n#endif\n#if defined(USE_MAP) || defined(USE_TILING)\nin vec2 vUv;\n#endif\n#if defined(PRISMWOOD) && !defined(NO_UVW)\nin vec3 vUvw;\n#endif\n#if defined( USE_SURFACE_ALBEDO_MAP )\n uniform sampler2D surface_albedo_map;\n uniform mat3 surface_albedo_map_texMatrix;\n uniform bool surface_albedo_map_invert;\n#endif\n#if defined( USE_SURFACE_ROUGHNESS_MAP )\n uniform sampler2D surface_roughness_map;\n uniform mat3 surface_roughness_map_texMatrix;\n uniform bool surface_roughness_map_invert;\n#endif\n#if defined( USE_SURFACE_CUTOUT_MAP )\n uniform sampler2D surface_cutout_map;\n uniform mat3 surface_cutout_map_texMatrix;\n uniform bool surface_cutout_map_invert;\n#endif\n#if defined( USE_SURFACE_ANISOTROPY_MAP )\n uniform sampler2D surface_anisotropy_map;\n uniform mat3 surface_anisotropy_map_texMatrix;\n uniform bool surface_anisotropy_map_invert;\n#endif\n#if defined( USE_SURFACE_ROTATION_MAP )\n uniform sampler2D surface_rotation_map;\n uniform mat3 surface_rotation_map_texMatrix;\n uniform bool surface_rotation_map_invert;\n#endif\n#if defined( USE_OPAQUE_ALBEDO_MAP )\n uniform sampler2D opaque_albedo_map;\n uniform mat3 opaque_albedo_map_texMatrix;\n uniform bool opaque_albedo_map_invert;\n#endif\n#if defined( USE_OPAQUE_F0_MAP )\n uniform sampler2D opaque_f0_map;\n uniform mat3 opaque_f0_map_texMatrix;\n uniform bool opaque_f0_map_invert;\n#endif\n#if defined( USE_OPAQUE_LUMINANCE_MODIFIER_MAP )\n uniform sampler2D opaque_luminance_modifier_map;\n uniform mat3 opaque_luminance_modifier_map_texMatrix;\n uniform bool opaque_luminance_modifier_map_invert;\n#endif\n#if defined( USE_LAYERED_BOTTOM_F0_MAP )\n uniform sampler2D layered_bottom_f0_map;\n uniform mat3 layered_bottom_f0_map_texMatrix;\n uniform bool layered_bottom_f0_map_invert;\n#endif\n#if defined( USE_LAYERED_F0_MAP )\n uniform sampler2D layered_f0_map;\n uniform mat3 layered_f0_map_texMatrix;\n uniform bool layered_f0_map_invert;\n#endif\n#if defined( USE_LAYERED_DIFFUSE_MAP )\n uniform sampler2D layered_diffuse_map;\n uniform mat3 layered_diffuse_map_texMatrix;\n uniform bool layered_diffuse_map_invert;\n#endif\n#if defined( USE_LAYERED_FRACTION_MAP )\n uniform sampler2D layered_fraction_map;\n uniform mat3 layered_fraction_map_texMatrix;\n uniform bool layered_fraction_map_invert;\n#endif\n#if defined( USE_LAYERED_ROUGHNESS_MAP )\n uniform sampler2D layered_roughness_map;\n uniform mat3 layered_roughness_map_texMatrix;\n uniform bool layered_roughness_map_invert;\n#endif\n#if defined( USE_LAYERED_ANISOTROPY_MAP )\n uniform sampler2D layered_anisotropy_map;\n uniform mat3 layered_anisotropy_map_texMatrix;\n uniform bool layered_anisotropy_map_invert;\n#endif\n#if defined( USE_LAYERED_ROTATION_MAP )\n uniform sampler2D layered_rotation_map;\n uniform mat3 layered_rotation_map_texMatrix;\n uniform bool layered_rotation_map_invert;\n#endif\n#if defined( USE_METAL_F0_MAP )\n uniform sampler2D metal_f0_map;\n uniform mat3 metal_f0_map_texMatrix;\n uniform bool metal_f0_map_invert;\n#endif\n#if defined( USE_GLAZING_F0_MAP )\n uniform sampler2D glazing_f0_map;\n uniform mat3 glazing_f0_map_texMatrix;\n uniform bool glazing_f0_map_invert;\n#endif\n#if defined( USE_GLAZING_TRANSMISSION_ROUGHNESS_MAP )\n uniform sampler2D glazing_transmission_roughness_map;\n uniform mat3 glazing_transmission_roughness_map_texMatrix;\n uniform bool glazing_transmission_roughness_map_invert;\n#endif\n#if defined( USE_GLAZING_TRANSMISSION_COLOR_MAP )\n uniform sampler2D glazing_transmission_color_map;\n uniform mat3 glazing_transmission_color_map_texMatrix;\n uniform bool glazing_transmission_color_map_invert;\n#endif\n#if defined( USE_WOOD_CURLY_DISTORTION_MAP )\n uniform sampler2D wood_curly_distortion_map;\n uniform mat3 wood_curly_distortion_map_texMatrix;\n uniform bool wood_curly_distortion_map_invert;\n#endif\n#if defined( USE_WOOD_CURLY_DISTORTION_MAP )\nuniform bool wood_curly_distortion_enable;\nuniform float wood_curly_distortion_scale;\n#endif\n#if defined( USE_SURFACE_NORMAL_MAP )\n uniform sampler2D surface_normal_map;\n uniform mat3 surface_normal_map_texMatrix;\n uniform vec2 surface_normal_map_bumpScale;\n uniform int surface_normal_map_bumpmapType;\n#endif\n#if defined( USE_LAYERED_NORMAL_MAP )\n uniform sampler2D layered_normal_map;\n uniform mat3 layered_normal_map_texMatrix;\n uniform vec2 layered_normal_map_bumpScale;\n uniform int layered_normal_map_bumpmapType;\n#endif\nfloat SRGBToLinearComponent(float color) {\n float result = color;\n if (result<=0.04045)\n result *= 0.07739938;\n else\n result = pow(abs((result+0.055)*0.947867298), 2.4);\n return result;\n}\nvec3 SRGBToLinear(vec3 color) {\n vec3 result = color;\n result.x = SRGBToLinearComponent(result.x);\n result.y = SRGBToLinearComponent(result.y);\n result.z = SRGBToLinearComponent(result.z);\n return result;\n}\n#if defined( USE_ENVMAP )\nuniform float envMapExposure;\nuniform samplerCube envMap;\n#endif\n#include <normal_map>\n#if !defined(USE_MAP) && (MAX_DIR_LIGHTS > 0 || MAX_POINT_LIGHTS > 0 || MAX_SPOT_LIGHTS > 0) || defined ( PRISMWOODBUMP )\nin vec3 vTangent;\nin vec3 vBitangent;\n#if defined( PRISMWOODBUMP )\nin vec3 vtNormal;\nin mat3 mNormalMatrix;\n#endif\n#endif\n#if defined( USE_ENVMAP )\nvec3 sampleReflection(vec3 N, vec3 V, float mipIndex) {\n vec3 dir = (2.0 * dot(V, N)) * N - V;\n dir = adjustLookupVector(mat3(viewMatrixInverse) * dir);\n#ifdef ENV_GAMMA\n vec4 envTexColor = textureLod( envMap, dir, mipIndex );\n return GammaDecode(envTexColor, envMapExposure);\n#elif defined(ENV_RGBM)\n vec4 envTexColor = textureLod( envMap, dir, mipIndex );\n return RGBMDecode(envTexColor, envMapExposure);\n#else\n vec4 envTexColor = texture( envMap, dir );\n vec3 cubeColor = envTexColor.xyz;\n#ifdef GAMMA_INPUT\n cubeColor *= cubeColor;\n#endif\n return cubeColor;\n#endif\n}\n#endif\n#include <hatch_pattern>\n#if defined( USE_ENVMAP ) && defined( USE_IRRADIANCEMAP )\nuniform samplerCube irradianceMap;\nvec3 sampleNormal(vec3 normal) {\n vec3 worldNormal = mat3(viewMatrixInverse) * normal;\n vec3 irradiance = sampleIrradianceMap(worldNormal, irradianceMap, envMapExposure);\n irradiance = applyEnvShadow(irradiance, worldNormal);\n return irradiance;\n}\n#endif\n#if MAX_DIR_LIGHTS > 0\nuniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\nuniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n#endif\n#if MAX_POINT_LIGHTS > 0\nuniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\nuniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\nuniform float pointLightDistance[ MAX_POINT_LIGHTS ];\n#endif\n#if MAX_SPOT_LIGHTS > 0\nuniform vec3 spotLightColor[ MAX_SPOT_LIGHTS ];\nuniform vec3 spotLightPosition[ MAX_SPOT_LIGHTS ];\nuniform vec3 spotLightDirection[ MAX_SPOT_LIGHTS ];\nuniform float spotLightAngleCos[ MAX_SPOT_LIGHTS ];\nuniform float spotLightExponent[ MAX_SPOT_LIGHTS ];\nuniform float spotLightDistance[ MAX_SPOT_LIGHTS ];\n#endif\nfloat sqr(float x) {return x*x;}\nfloat aSqrd(float maxAlphaSqr, float cosTheta)\n{\n if (abs(cosTheta) < 1e-10)\n {\n return 1e10;\n }\n float tan2 = 1.0/sqr(cosTheta) - 1.0;\n return maxAlphaSqr * tan2;\n}\nvec3 Fresnel_Schlick(vec3 f0, float cosAngle)\n{\n float x = 1.0 - cosAngle;\n float x2 = x * x;\n float x5 = x * x2 * x2;\n return f0 + (1.0 - f0) * x5;\n}\nvec3 Fresnel_Rough(vec3 f0, float cosAngle, float alpha)\n{\n float x = 1.0 - cosAngle;\n float x2 = x * x;\n float x5 = x * x2 * x2;\n vec3 maxReflectance = mix(vec3(1.0), f0, vec3(min(0.7, alpha)) / 0.7);\n return f0 + (maxReflectance - f0) * x5;\n}\nfloat IORToReflectance(float ior)\n{\n return sqr((1.0 - ior)/(1.0 + ior));\n}\nvec2 RoughnessToAlpha(float roughness, float anisotropy)\n{\n vec2 alpha = roughness * vec2(1.0, 1.0 - anisotropy);\n alpha = alpha * alpha;\n alpha = clamp(alpha, 0.001, 1.0);\n return alpha;\n}\nfloat AlphaToPhong(float alpha)\n{\n return max(0.0, 2.56/alpha - 7.0);\n}\nfloat ExponentToReflMipIndex(float exponent)\n{\n float targetLog = log2(exponent);\n float minLog = log2(envExponentMin);\n float maxLog = log2(envExponentMax);\n float deltaLog = clamp(targetLog - minLog, 0.0, maxLog - minLog);\n float level = clamp((1.0-(deltaLog + 0.5) / envExponentCount), 0.0, 1.0) * 6.0;\n return level;\n}\n#include <prism_wood>\n#if defined( ENABLEIMPORTANTSAMPLING ) && (defined( USE_SURFACE_ROTATION_MAP ) || defined( USE_SURFACE_ANISOTROPY_MAP ) || defined( USE_LAYERED_ROTATION_MAP ) || defined( USE_LAYERED_ANISOTROPY_MAP ))\n#define IMPORTANTSAMPLING\n#endif\n#include <importance_sampling>\n#if MAX_DIR_LIGHTS > 0 || MAX_POINT_LIGHTS > 0 || MAX_SPOT_LIGHTS > 0\nvec3 DiffuseLobe(vec3 diffuseColor)\n{\n return diffuseColor * RECIPROCAL_PI;\n}\nvec3 Rotate(vec3 vec, float angle)\n{\n float s = sin(angle);\n float c = cos(angle);\n return vec3(vec.x * c - vec.y * s, vec.x * s + vec.y * c, vec.z);\n}\nfloat NDF_GGX(float alphaU, float alphaV, vec3 normal)\n{\n float nx2 = sqr(normal.x);\n float ny2 = sqr(normal.y);\n float nz2 = sqr(normal.z);\n float scale = 1.0/(alphaU * alphaV * PI);\n return scale/sqr(nx2/sqr(alphaU) + ny2/sqr(alphaV) + nz2);\n}\nfloat G1_GGX(float aSqrd)\n{\n return 2.0 / (1.0 + sqrt(1.0 + aSqrd));\n}\nvec3 MicrofacetLobe(\n vec3 Hlocal, float NdotL, float NdotH, float NdotV, float VdotH,\n float roughness, float anisotropy, float rotation, vec3 reflectance)\n{\n vec2 alpha = RoughnessToAlpha(roughness, anisotropy);\n Hlocal = Rotate(Hlocal, rotation);\n vec3 F = Fresnel_Schlick(reflectance, VdotH);\n float D = NDF_GGX(alpha.x, alpha.y, Hlocal);\n float alpha2 = max(sqr(alpha.x), sqr(alpha.y));\n float alpha2NL = aSqrd(alpha2, NdotL);\n float alpha2NV = aSqrd(alpha2, NdotV);\n float G = G1_GGX(alpha2NL) * G1_GGX(alpha2NV);\n return max(F * D * G / (4.0 * NdotL * NdotV), vec3(0.0));\n}\n#if defined( PRISMOPAQUE )\nvec3 BRDF_Opaque(vec3 Hlocal, float NdotL, float NdotH, float NdotV, float VdotH,\n vec3 surfaceAlbedo, float surfaceRoughness, float surfaceAnisotropy, float surfaceRotation,\n float opaqueF0, vec3 opaqueAlbedo)\n{\n vec3 diffuse = DiffuseLobe(opaqueAlbedo);\n vec3 specular = surfaceAlbedo * MicrofacetLobe(\n Hlocal, NdotL, NdotH, NdotV, VdotH,\n surfaceRoughness, surfaceAnisotropy, surfaceRotation, vec3(opaqueF0));\n return (specular+diffuse)*NdotL;\n}\n#elif defined( PRISMMETAL )\nvec3 BRDF_Metal(vec3 Hlocal, float NdotL, float NdotH, float NdotV, float VdotH,\n vec3 surfaceAlbedo, float surfaceRoughness, float surfaceAnisotropy, float surfaceRotation,\n vec3 metalF0)\n{\n vec3 specular = surfaceAlbedo * MicrofacetLobe(\n Hlocal, NdotL, NdotH, NdotV, VdotH,\n surfaceRoughness, surfaceAnisotropy, surfaceRotation, metalF0);\n return specular*NdotL;\n}\n#elif defined( PRISMLAYERED )\nvec3 BRDF_Layered(vec3 Hlocal, float NdotL, float NdotH, float NdotV, float VdotH,\n vec3 Hlocal2, float N2dotL, float N2dotH, float N2dotV,\n vec3 surfaceAlbedo, float surfaceRoughness, float surfaceAnisotropy, float surfaceRotation,\n float layeredF0, vec3 layeredDiffuse, float layeredRoughness, float layeredAnisotropy,\n float layeredRotation, vec3 bottom_f0, float layeredFraction)\n{\n vec3 Fl = Fresnel_Schlick(vec3(layeredF0), NdotL);\n vec3 Fv = Fresnel_Schlick(vec3(layeredF0), NdotV);\n vec3 amount = (1.0 - Fl) * (1.0 - Fv);\n vec3 topSpecular = surfaceAlbedo * MicrofacetLobe(\n Hlocal, NdotL, NdotH, NdotV, VdotH,\n surfaceRoughness, surfaceAnisotropy, surfaceRotation,\n vec3(layeredF0));\n vec3 topDiffuse = DiffuseLobe(layeredDiffuse);\n vec3 botSpecular = MicrofacetLobe(\n Hlocal2, N2dotL, N2dotH, N2dotV, VdotH,\n layeredRoughness, layeredAnisotropy, layeredRotation,\n bottom_f0);\n return topSpecular*NdotL + amount * mix(topDiffuse*NdotL, botSpecular*N2dotL, layeredFraction);\n}\n#elif defined( PRISMTRANSPARENT )\nvec3 BRDF_Transparent(vec3 Hlocal, float NdotL, float NdotH, float NdotV, float VdotH,\n vec3 surfaceAlbedo, float surfaceRoughness, float surfaceAnisotropy, float surfaceRotation)\n{\n vec3 reflectance = vec3(IORToReflectance(transparent_ior));\n vec3 specular = surfaceAlbedo * MicrofacetLobe(\n Hlocal, NdotL, NdotH, NdotV, VdotH,\n surfaceRoughness, surfaceAnisotropy, surfaceRotation, reflectance);\n return specular*NdotL;\n}\n#elif defined( PRISMGLAZING )\nvec3 BRDF_Glazing(vec3 Hlocal, float NdotL, float NdotH, float NdotV, float VdotH,\n vec3 surfaceAlbedo, float surfaceRoughness, float surfaceAnisotropy, float surfaceRotation,\n vec3 glazingF0, vec3 glazingTransmissionColor, float glazingIlluminance)\n{\n vec3 diffuse = DiffuseLobe(glazingTransmissionColor - vec3(glazingIlluminance, glazingIlluminance, glazingIlluminance));\n vec3 specular = surfaceAlbedo * MicrofacetLobe(\n Hlocal, NdotL, NdotH, NdotV, VdotH,\n surfaceRoughness, surfaceAnisotropy, surfaceRotation, glazingF0);\n return (specular+diffuse)*NdotL;\n}\n#elif defined( PRISMWOOD )\nvec3 BRDF_Wood(vec3 Hlocal, float NdotL, float NdotH, float NdotV, float VdotH,\n vec3 surfaceAlbedo, float surfaceRoughness, vec3 woodDiffuse)\n{\n vec3 diffuse = DiffuseLobe(woodDiffuse);\n vec3 specular = surfaceAlbedo * MicrofacetLobe(\n Hlocal, NdotL, NdotH, NdotV, VdotH,\n surfaceRoughness, 0.0, 0.0, vec3(0.04));\n return (specular+diffuse)*NdotL;\n}\n#endif\n#endif\n#if defined( USE_ENVMAP )\n#if defined( PRISMOPAQUE )\nvec3 Environment_Opaque(vec3 N, vec3 V, float NdotV, vec3 surfaceAlbedo, float surfaceRoughness,\n float opaqueF0, vec3 opaqueAlbedo, float surfaceAnisotropy, float surfaceRotation, vec3 Tu, vec3 Tv)\n{\n float alpha = RoughnessToAlpha(surfaceRoughness, 0.0).x;\n vec3 F = Fresnel_Rough(vec3(opaqueF0), NdotV, alpha);\n#if defined( IMPORTANTSAMPLING )\n vec3 specular = surfaceAlbedo * ImportanceSamplingSpecular(surfaceRotation, vec3(opaqueF0), surfaceRoughness, surfaceAnisotropy, V, N, Tu, Tv);\n#else\n float exponent = AlphaToPhong(alpha);\n float reflMipIndex = ExponentToReflMipIndex(exponent);\n vec3 envSpecular = sampleReflection(N, V, reflMipIndex);\n vec3 specular = F* surfaceAlbedo * envSpecular;\n#endif\n#if defined( USE_IRRADIANCEMAP )\n vec3 envIrradiance = sampleNormal(N);\n#else\n vec3 envIrradiance = vec3(1.0);\n#endif\n vec3 diffuse = (1.0 - F) * opaqueAlbedo * envIrradiance;\n return diffuse + specular;\n}\n#elif defined( PRISMMETAL )\nvec3 Environment_Metal(vec3 N, vec3 V, float NdotV, vec3 surfaceAlbedo, float surfaceRoughness, vec3 metalF0, float surfaceAnisotropy, float surfaceRotation, vec3 Tu, vec3 Tv)\n{\n#if defined( IMPORTANTSAMPLING )\n vec3 specular = surfaceAlbedo * ImportanceSamplingSpecular(surfaceRotation, metalF0, surfaceRoughness, surfaceAnisotropy, V, N, Tu, Tv);\n#else\n float alpha = RoughnessToAlpha(surfaceRoughness, 0.0).x;\n float exponent = AlphaToPhong(alpha);\n float reflMipIndex = ExponentToReflMipIndex(exponent);\n vec3 F = Fresnel_Rough(metalF0, NdotV, alpha);\n vec3 envSpecular = sampleReflection(N, V, reflMipIndex);\n vec3 specular = F * surfaceAlbedo * envSpecular;\n#endif\n return specular;\n}\n#elif defined( PRISMLAYERED )\nvec3 Environment_Layered(vec3 N, vec3 V, float NdotV, vec3 N2, float N2dotV, vec3 surfaceAlbedo, float surfaceRoughness,\n float layeredF0, float surfaceAnisotropy, float surfaceRotation, vec3 Tu, vec3 Tv, vec3 layeredDiffuse, float layeredRoughness,\n float layeredAnisotropy, float layeredRotation, vec3 bottom_f0, float layeredFraction)\n{\n vec3 F = Fresnel_Schlick(vec3(layeredF0), NdotV);\n float alpha = RoughnessToAlpha(surfaceRoughness, 0.0).x;\n#if defined( IMPORTANTSAMPLING )\n vec3 topSpecular = surfaceAlbedo * ImportanceSamplingSpecular(surfaceRotation, vec3(layeredF0), surfaceRoughness, surfaceAnisotropy, V, N, Tu, Tv);\n#else\n float exponent = AlphaToPhong(alpha);\n float reflMipIndex = ExponentToReflMipIndex(exponent);\n vec3 envSpecular = sampleReflection(N, V, reflMipIndex);\n vec3 topSpecular = F * surfaceAlbedo * envSpecular;\n#endif\n vec3 amount = (1.0 - F);\n#if defined( USE_IRRADIANCEMAP )\n vec3 envIrradiance = sampleNormal(N);\n#else\n vec3 envIrradiance = vec3(1.0);\n#endif\n vec3 topDiffuse = layeredDiffuse * envIrradiance;\n#if defined( IMPORTANTSAMPLING )\n vec3 botSpecular = ImportanceSamplingSpecular(layeredRotation, bottom_f0, layeredRoughness, layeredAnisotropy, V, N2, Tu, Tv);\n#else\n alpha = RoughnessToAlpha(layeredRoughness, 0.0).x;\n exponent = AlphaToPhong(alpha);\n reflMipIndex = ExponentToReflMipIndex(exponent);\n envSpecular = sampleReflection(N2, V, reflMipIndex);\n F = Fresnel_Rough(bottom_f0, N2dotV, alpha);\n vec3 botSpecular = F * envSpecular;\n#endif\n return topSpecular + amount * mix(topDiffuse, botSpecular, layeredFraction);\n}\n#elif defined( PRISMTRANSPARENT )\nvec3 Environment_Transparent(vec3 N, vec3 V, float NdotV, vec3 surfaceAlbedo, float surfaceRoughness, float surfaceAnisotropy, float surfaceRotation, vec3 Tu, vec3 Tv)\n{\n vec3 reflectance = vec3(IORToReflectance(transparent_ior));\n float alpha = RoughnessToAlpha(surfaceRoughness, 0.0).x;\n vec3 F = Fresnel_Rough(reflectance, NdotV, alpha);\n#if defined( IMPORTANTSAMPLING )\n vec3 specular = surfaceAlbedo * ImportanceSamplingSpecular(surfaceRotation, reflectance, surfaceRoughness, surfaceAnisotropy, V, N, Tu, Tv);\n#else\n float exponent = AlphaToPhong(alpha);\n float reflMipIndex = ExponentToReflMipIndex(exponent);\n vec3 envSpecular = sampleReflection(N, V, reflMipIndex);\n vec3 specular = F * surfaceAlbedo * envSpecular;\n#endif\n#if defined( USE_IRRADIANCEMAP )\n vec3 envIrradiance = sampleNormal(N);\n#else\n vec3 envIrradiance = vec3(1.0);\n#endif\n vec3 color = F * surfaceRoughness * transparent_color * envIrradiance;\n return specular + color;\n}\n#elif defined( PRISMGLAZING )\nvec3 Environment_Glazing(vec3 N, vec3 V, float NdotV, vec3 surfaceAlbedo, float surfaceRoughness, float surfaceAnisotropy, float surfaceRotation, vec3 Tu, vec3 Tv,\n vec3 glazing_f0, vec3 transmissionF, float transmissionAlpha, vec3 glazingAdjustedColor, float glazingIlluminace)\n{\n float surfaceAlpha = RoughnessToAlpha(surfaceRoughness, 0.0).x;\n vec3 surfaceF = Fresnel_Rough(glazing_f0, NdotV, surfaceAlpha);\n#if defined( IMPORTANTSAMPLING )\n vec3 specular = surfaceAlbedo * ImportanceSamplingSpecular(surfaceRotation, glazing_f0, surfaceRoughness, surfaceAnisotropy, V, N, Tu, Tv);\n#else\n float exponent = AlphaToPhong(surfaceAlpha);\n float reflMipIndex = ExponentToReflMipIndex(exponent);\n vec3 envSpecular = sampleReflection(N, V, reflMipIndex);\n vec3 specular = surfaceF * surfaceAlbedo * envSpecular;\n#endif\n#if defined( USE_IRRADIANCEMAP )\n vec3 envIrradiance = sampleNormal(N);\n#else\n vec3 envIrradiance = vec3(1.0);\n#endif\n vec3 color = 0.5 * (1.0 - transmissionF) * (glazingAdjustedColor - vec3(glazingIlluminace, glazingIlluminace, glazingIlluminace)) * envIrradiance; \n return specular + color;\n}\n#elif defined( PRISMWOOD )\nvec3 Environment_Wood(vec3 N, vec3 V, float NdotV, vec3 surfaceAlbedo, float surfaceRoughness, vec3 woodDiffuse, float surfaceAnisotropy, float surfaceRotation, vec3 Tu, vec3 Tv)\n{\n float alpha = RoughnessToAlpha(surfaceRoughness, 0.0).x;\n vec3 F = Fresnel_Rough(vec3(0.04), NdotV, alpha);\n#if defined( IMPORTANTSAMPLING )\n vec3 specular = surfaceAlbedo * ImportanceSamplingSpecular(surfaceRotation, vec3(0.04), surfaceRoughness, surfaceAnisotropy, V, N, Tu, Tv);\n#else\n float exponent = AlphaToPhong(alpha);\n float reflMipIndex = ExponentToReflMipIndex(exponent);\n vec3 envSpecular = sampleReflection(N, V, reflMipIndex);\n vec3 specular = F * surfaceAlbedo * envSpecular;\n#endif\n#if defined( USE_IRRADIANCEMAP )\n vec3 envIrradiance = sampleNormal(N);\n#else\n vec3 envIrradiance = vec3(1.0);\n#endif\n vec3 diffuse = (1.0 - F) * woodDiffuse * envIrradiance;\n return diffuse + specular;\n}\n#endif\n#endif\n#if defined( PRISMTRANSPARENT )\n#include <prism_transparency>\n#elif defined( PRISMGLAZING )\n#include <prism_glazing>\n#endif\n#ifdef USE_TILING\nvec3 tilingTransform(vec2 uv, mat4 transform)\n{\n\treturn (transform * vec4(uv, 0.0, 1.0)).xyz;\n}\nvec4 tilingMapTest(sampler2D tilingSampler, mat3 transf, vec3 uv, vec4 uv2tile, vec4 tile2uv)\n{\n\tvec2 tileCoord = vec2(dot(uv2tile.xz, uv.xy), dot(uv2tile.yw, uv.xy));\n\tvec2 ijBase = floor(tileCoord);\n vec2 fracC = fract(tileCoord);\n\tvec2 st = vec2(dot(tile2uv.xz, fracC), dot(tile2uv.yw, fracC));\n\tvec4 tileInfo = vec4(0.0, 0.0, 2.0, 2.0);\n\tvec2 iOffset = float(TILE_RANGE_X_MIN) * tile2uv.xy;\n\tvec2 jBaseOffset = float(TILE_RANGE_Y_MIN) * tile2uv.zw;\n\tfor( int i = TILE_RANGE_X_MIN; i <= TILE_RANGE_X_MAX; i++)\n\t{\n\t\tvec2 jOffset = jBaseOffset;\n\t\tfor( int j = TILE_RANGE_Y_MIN; j <= TILE_RANGE_Y_MAX; j++)\n\t\t{\n\t\t\tvec2 sampleUV = st + iOffset + jOffset;\n\t\t\tjOffset += tile2uv.zw;\n\t\t\tsampleUV = (transf * vec3(sampleUV, 1.0)).xy;\n\t\t\tvec4 tex = texture(tilingSampler, sampleUV);\n\t\t\tfloat d = max( min(tex.r, tex.g), min( max(tex.r, tex.g), tex.b));\n if (d < tileInfo.z) {\n\t\t\t\ttileInfo.xy = vec2(float(i),float(j));\n\t\t\t\ttileInfo.w = tileInfo.z;\n\t\t\t\ttileInfo.z = d;\n\t\t\t} else {\n\t\t\t\ttileInfo.w = min(tileInfo.w, d);\n\t\t\t}\n\t\t}\n\t\tiOffset += tile2uv.xy;\n\t}\n\ttileInfo.zw = tileInfo.zw - 0.5;\n\tfloat w = clamp(tileInfo.z/max(fwidth(tileInfo.z), 0.000001) + 0.5, 0.0, 1.0);\n\tif ( w == 1.0 )\n\t\tdiscard;\n \tif (abs(tileInfo.w)<=abs(tileInfo.z))\n\t\tw = 0.0;\n\ttileInfo.w = 1.0 - w;\n\ttileInfo.xy -= ijBase;\n\treturn tileInfo;\n}\nvec2 tilingSubMaterialRelocate(vec3 uv, vec4 tileInfo, vec4 tile2uv)\n{\n\tvec2 offset = vec2(dot(tile2uv.xz, tileInfo.xy), dot(tile2uv.yw, tileInfo.xy));\n\treturn (uv.xy + offset);\n}\n#ifdef USE_TILING_RANDOM\nvec2 tilingRandom(vec2 uv, vec4 tileInfo, sampler2D randomSampler, mat3 transf, vec2 tileTextureAxisS, vec2 tileTextureAxisT, vec2 tile2TextureOffset)\n{\n vec2 xti = (vec3(tileInfo.xy, 1.0) * transf).xy;\n vec4 random = texture(randomSampler, xti);\n vec2 randomOffset = vec2(tileTextureAxisS.x*random.z + tileTextureAxisT.x*random.w,\n tileTextureAxisS.y*random.z + tileTextureAxisT.y*random.w) + tile2TextureOffset;\n return uv + randomOffset;\n}\n#endif\nvoid tilingNormalOffset(\n sampler2D bumpTexture,\n vec2 uv,\n mat3 transform,\n inout vec3 T,\n inout vec3 B,\n inout vec3 N\n) {\n vec2 st = (vec3(uv, 1.0) * transform).xy;\n vec3 distort = (2.0 * texture(bumpTexture, st).xyz - 1.0) - vec3(0.0,0.0,1.0);\n mat3 mat = mat3(\n T.x, B.x, N.x,\n T.y, B.y, N.y,\n T.z, B.z, N.z\n );\n N = normalize(N + (mat*distort));\n}\n#endif\nin vec3 vNormal;\nin vec3 vViewPosition;\n#include <cutplanes>\nvoid main() {\n#if NUM_CUTPLANES > 0\n checkCutPlanes(vWorldPosition);\n#endif\n vec3 N = normalize(vNormal);\n vec3 Tu = vec3(0.0);\n vec3 Tv = vec3(0.0);\n#if defined(USE_MAP) || defined(USE_TILING)\n vec2 uv = vUv;\n#endif\n#ifdef USE_TILING\n vec3 v_tilingOverallTransf = tilingTransform( vUv, tilingOverallTransform );\n vec4 v_TilingMap = tilingMapTest( TilingMap, TilingMap_texMatrix, v_tilingOverallTransf, uv2tile, tile2uv );\n uv = tilingSubMaterialRelocate( v_tilingOverallTransf, v_TilingMap, tile2uv ) + tileAlignOffset;\n#ifdef USE_TILING_NORMAL\n vec2 uvNorm = uv;\n#endif\n#ifdef USE_TILING_RANDOM\n uv = tilingRandom( uv, v_TilingMap, TilingRandomMap, TilingRandomMap_texMatrix, tilingRandomAxisS, tilingRandomAxisT, tilingRandomAlignmentOffset );\n#endif\n uv = tilingTransform( uv, tilingUVTransform ).xy;\n#endif\n#if defined( USE_SURFACE_NORMAL_MAP ) || defined( USE_LAYERED_NORMAL_MAP ) || MAX_DIR_LIGHTS > 0 || MAX_POINT_LIGHTS > 0 || MAX_SPOT_LIGHTS > 0 || defined( PRISMWOODBUMP ) || defined( IMPORTANTSAMPLING )\n#if !defined(USE_MAP) || defined( PRISMWOODBUMP )\n Tu = normalize(vTangent);\n Tv = normalize(vBitangent);\n#else\n vec3 q0 = dFdx( -vViewPosition );\n vec3 q1 = dFdy( -vViewPosition );\n vec2 st0 = dFdx( uv );\n vec2 st1 = dFdy( uv );\n Tu = normalize( q0 * st1.t - q1 * st0.t );\n Tv = normalize( -q0 * st1.s + q1 * st0.s );\n#endif\n#endif\n vec3 V;\n if (projectionMatrix[3][3] == 0.0) {\n V = normalize( vViewPosition );\n } else {\n V = vec3(0.0, 0.0, 1.0);\n }\n N = faceforward(N, -V, N);\n#if defined(PRISMLAYERED)\n vec3 N2 = N;\n#endif\n#ifndef FLAT_SHADED\n vec3 normal = normalize( vNormal );\n#ifdef DOUBLE_SIDED\n normal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) );\n#endif\n#else\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#endif\n vec3 geomNormal = normal;\n#if defined( USE_SURFACE_NORMAL_MAP )\n if (surface_normal_map_bumpmapType == 0)\n heightMapTransform(surface_normal_map, uv, surface_normal_map_texMatrix, surface_normal_map_bumpScale, Tu, Tv, N);\n else\n normalMapTransform(surface_normal_map, uv, surface_normal_map_texMatrix, surface_normal_map_bumpScale, Tu, Tv, N);\n#endif\n#if defined( USE_LAYERED_NORMAL_MAP )\n if (layered_normal_map_bumpmapType == 0)\n heightMapTransform(layered_normal_map, uv, layered_normal_map_texMatrix, layered_normal_map_bumpScale, Tu, Tv, N2);\n else\n normalMapTransform(layered_normal_map, uv, layered_normal_map_texMatrix, layered_normal_map_bumpScale, Tu, Tv, N2);\n#endif\n#ifdef USE_TILING_NORMAL\n tilingNormalOffset(TilingNormalMap, uvNorm, TilingNormalMap_texMatrix, Tu, Tv, N);\n#endif\n#if defined( PRISMWOOD )\n#ifdef NO_UVW\n vec3 p = vec3(0.0);\n#elif defined( USE_WOOD_CURLY_DISTORTION_MAP )\n vec3 p = DistortCurly(vUvw);\n#else\n vec3 p = vUvw;\n#endif\n#if !defined( NO_UVW ) && defined( PRISMWOODBUMP )\n getFinalWoodContext(\n N, V, Tu, Tv, p,\n normal, vtNormal, vNormalMatrix\n );\n#endif\n#endif\n float NdotV = clamp(dot(N, V), EPSILON, 1.0);\n#if defined(PRISMLAYERED)\n float N2dotV = clamp(dot(N2, V), EPSILON, 1.0);\n#endif\n vec3 surfaceAlbedo;\n #if defined( USE_SURFACE_ALBEDO_MAP )\n vec2 uv_surface_albedo_map = (surface_albedo_map_texMatrix * vec3(uv, 1.0)).xy;\n SURFACE_ALBEDO_CLAMP_TEST;\n surfaceAlbedo = texture(surface_albedo_map, uv_surface_albedo_map).xyz;\n surfaceAlbedo = SRGBToLinear(surfaceAlbedo);\n if(surface_albedo_map_invert) surfaceAlbedo = vec3(1.0) - surfaceAlbedo;\n #else\n surfaceAlbedo = surface_albedo;\n #endif\n float surfaceRoughness;\n #if defined( USE_SURFACE_ROUGHNESS_MAP )\n vec2 uv_surface_roughness_map = (surface_roughness_map_texMatrix * vec3(uv, 1.0)).xy;\n SURFACE_ROUGHNESS_CLAMP_TEST;\n vec3 surfaceRoughness_v3 = texture(surface_roughness_map, uv_surface_roughness_map).xyz;\n if(surface_roughness_map_invert) surfaceRoughness_v3 = vec3(1.0) - surfaceRoughness_v3;\n surfaceRoughness = average(surfaceRoughness_v3);\n #else\n surfaceRoughness = surface_roughness;\n #endif\n float surfaceAnisotropy;\n #if defined( USE_SURFACE_ANISOTROPY_MAP )\n vec2 uv_surface_anisotropy_map = (surface_anisotropy_map_texMatrix * vec3(uv, 1.0)).xy;\n SURFACE_ANISOTROPY_CLAMP_TEST;\n vec3 surfaceAnisotropy_v3 = texture(surface_anisotropy_map, uv_surface_anisotropy_map).xyz;\n if(surface_anisotropy_map_invert) surfaceAnisotropy_v3 = vec3(1.0) - surfaceAnisotropy_v3;\n surfaceAnisotropy = average(surfaceAnisotropy_v3);\n #else\n surfaceAnisotropy = surface_anisotropy;\n #endif\n float surfaceRotation;\n #if defined( USE_SURFACE_ROTATION_MAP )\n vec2 uv_surface_rotation_map = (surface_rotation_map_texMatrix * vec3(uv, 1.0)).xy;\n SURFACE_ROTATION_CLAMP_TEST;\n vec3 surfaceRotation_v3 = texture(surface_rotation_map, uv_surface_rotation_map).xyz;\n if(surface_rotation_map_invert) surfaceRotation_v3 = vec3(1.0) - surfaceRotation_v3;\n surfaceRotation = average(surfaceRotation_v3);\n #else\n surfaceRotation = surface_rotation;\n #endif\n #if defined(PRISMOPAQUE)\n float opaqueF0;\n #if defined( USE_OPAQUE_F0_MAP )\n vec2 uv_opaque_f0_map = (opaque_f0_map_texMatrix * vec3(uv, 1.0)).xy;\n OPAQUE_F0_CLAMP_TEST;\n vec3 opaqueF0_v3 = texture(opaque_f0_map, uv_opaque_f0_map).xyz;\n if(opaque_f0_map_invert) opaqueF0_v3 = vec3(1.0) - opaqueF0_v3;\n opaqueF0 = average(opaqueF0_v3);\n #else\n opaqueF0 = opaque_f0;\n #endif\n vec3 opaqueAlbedo;\n #if defined( USE_OPAQUE_ALBEDO_MAP )\n vec2 uv_opaque_albedo_map = (opaque_albedo_map_texMatrix * vec3(uv, 1.0)).xy;\n OPAQUE_ALBEDO_CLAMP_TEST;\n opaqueAlbedo = texture(opaque_albedo_map, uv_opaque_albedo_map).xyz;\n opaqueAlbedo = SRGBToLinear(opaqueAlbedo);\n if(opaque_albedo_map_invert) opaqueAlbedo = vec3(1.0) - opaqueAlbedo;\n #else\n opaqueAlbedo = opaque_albedo;\n #endif\n #elif defined(PRISMMETAL)\n vec3 metalF0;\n #if defined( USE_METAL_F0_MAP )\n vec2 uv_metal_f0_map = (metal_f0_map_texMatrix * vec3(uv, 1.0)).xy;\n METAL_F0_CLAMP_TEST;\n metalF0 = texture(metal_f0_map, uv_metal_f0_map).xyz;\n metalF0 = SRGBToLinear(metalF0);\n if(metal_f0_map_invert) metalF0 = vec3(1.0) - metalF0;\n #else\n metalF0 = metal_f0;\n #endif\n #elif defined(PRISMLAYERED)\n float layeredF0;\n #if defined( USE_LAYERED_F0_MAP )\n vec2 uv_layered_f0_map = (layered_f0_map_texMatrix * vec3(uv, 1.0)).xy;\n LAYERED_F0_CLAMP_TEST;\n vec3 layeredF0_v3 = texture(layered_f0_map, uv_layered_f0_map).xyz;\n if(layered_f0_map_invert) layeredF0_v3 = vec3(1.0) - layeredF0_v3;\n layeredF0 = average(layeredF0_v3);\n #else\n layeredF0 = layered_f0;\n #endif\n vec3 layeredDiffuse;\n #if defined( USE_LAYERED_DIFFUSE_MAP )\n vec2 uv_layered_diffuse_map = (layered_diffuse_map_texMatrix * vec3(uv, 1.0)).xy;\n LAYERED_DIFFUSE_CLAMP_TEST;\n layeredDiffuse = texture(layered_diffuse_map, uv_layered_diffuse_map).xyz;\n layeredDiffuse = SRGBToLinear(layeredDiffuse);\n if(layered_diffuse_map_invert) layeredDiffuse = vec3(1.0) - layeredDiffuse;\n #else\n layeredDiffuse = layered_diffuse;\n #endif\n float layeredRoughness;\n #if defined( USE_LAYERED_ROUGHNESS_MAP )\n vec2 uv_layered_roughness_map = (layered_roughness_map_texMatrix * vec3(uv, 1.0)).xy;\n LAYERED_ROUGHNESS_CLAMP_TEST;\n vec3 layeredRoughness_v3 = texture(layered_roughness_map, uv_layered_roughness_map).xyz;\n if(layered_roughness_map_invert) layeredRoughness_v3 = vec3(1.0) - layeredRoughness_v3;\n layeredRoughness = average(layeredRoughness_v3);\n #else\n layeredRoughness = layered_roughness;\n #endif\n float layeredAnisotropy;\n #if defined( USE_LAYERED_ANISOTROPY_MAP )\n vec2 uv_layered_anisotropy_map = (layered_anisotropy_map_texMatrix * vec3(uv, 1.0)).xy;\n LAYERED_ANISOTROPY_CLAMP_TEST;\n vec3 layeredAnisotropy_v3 = texture(layered_anisotropy_map, uv_layered_anisotropy_map).xyz;\n if(layered_anisotropy_map_invert) layeredAnisotropy_v3 = vec3(1.0) - layeredAnisotropy_v3;\n layeredAnisotropy = average(layeredAnisotropy_v3);\n #else\n layeredAnisotropy = layered_anisotropy;\n #endif\n float layeredRotation;\n #if defined( USE_LAYERED_ROTATION_MAP )\n vec2 uv_layered_rotation_map = (layered_rotation_map_texMatrix * vec3(uv, 1.0)).xy;\n LAYERED_ROTATION_CLAMP_TEST;\n vec3 layeredRotation_v3 = texture(layered_rotation_map, uv_layered_rotation_map).xyz;\n if(layered_rotation_map_invert) layeredRotation_v3 = vec3(1.0) - layeredRotation_v3;\n layeredRotation = average(layeredRotation_v3);\n #else\n layeredRotation = layered_rotation;\n #endif\n vec3 bottom_f0;\n #if defined( USE_LAYERED_BOTTOM_F0_MAP )\n vec2 uv_layered_bottom_f0_map = (layered_bottom_f0_map_texMatrix * vec3(uv, 1.0)).xy;\n LAYERED_BOTTOM_F0_CLAMP_TEST;\n bottom_f0 = texture(layered_bottom_f0_map, uv_layered_bottom_f0_map).xyz;\n bottom_f0 = SRGBToLinear(bottom_f0);\n if(layered_bottom_f0_map_invert) bottom_f0 = vec3(1.0) - bottom_f0;\n #else\n bottom_f0 = layered_bottom_f0;\n #endif\n float layeredFraction;\n #if defined( USE_LAYERED_FRACTION_MAP )\n vec2 uv_layered_fraction_map = (layered_fraction_map_texMatrix * vec3(uv, 1.0)).xy;\n LAYERED_FRACTION_CLAMP_TEST;\n vec3 layeredFraction_v3 = texture(layered_fraction_map, uv_layered_fraction_map).xyz;\n if(layered_fraction_map_invert) layeredFraction_v3 = vec3(1.0) - layeredFraction_v3;\n layeredFraction = average(layeredFraction_v3);\n #else\n layeredFraction = layered_fraction;\n #endif\n #elif defined( PRISMGLAZING )\n vec3 glazingTransmissionColor;\n #if defined( USE_GLAZING_TRANSMISSION_COLOR_MAP )\n vec2 uv_glazing_transmission_color_map = (glazing_transmission_color_map_texMatrix * vec3(uv, 1.0)).xy;\n GLAZING_TRANSMISSION_COLOR_CLAMP_TEST;\n glazingTransmissionColor = texture(glazing_transmission_color_map, uv_glazing_transmission_color_map).xyz;\n glazingTransmissionColor = SRGBToLinear(glazingTransmissionColor);\n if(glazing_transmission_color_map_invert) glazingTransmissionColor = vec3(1.0) - glazingTransmissionColor;\n #else\n glazingTransmissionColor = glazing_transmission_color;\n #endif\n vec3 glazingF0;\n #if defined( USE_GLAZING_F0_MAP )\n vec2 uv_glazing_f0_map = (glazing_f0_map_texMatrix * vec3(uv, 1.0)).xy;\n GLAZING_F0_CLAMP_TEST;\n glazingF0 = texture(glazing_f0_map, uv_glazing_f0_map).xyz;\n glazingF0 = SRGBToLinear(glazingF0);\n if(glazing_f0_map_invert) glazingF0 = vec3(1.0) - glazingF0;\n #else\n glazingF0 = glazing_f0;\n #endif\n float glazingTransmissionRoughness;\n #if defined( USE_GLAZING_TRANSMISSION_ROUGHNESS_MAP )\n vec2 uv_glazing_transmission_roughness_map = (glazing_transmission_roughness_map_texMatrix * vec3(uv, 1.0)).xy;\n GLAZING_TRANSMISSION_ROUGHNESS_CLAMP_TEST;\n vec3 glazingTransmissionRoughness_v3 = texture(glazing_transmission_roughness_map, uv_glazing_transmission_roughness_map).xyz;\n if(glazing_transmission_roughness_map_invert) glazingTransmissionRoughness_v3 = vec3(1.0) - glazingTransmissionRoughness_v3;\n glazingTransmissionRoughness = average(glazingTransmissionRoughness_v3);\n #else\n glazingTransmissionRoughness = glazing_transmission_roughness;\n #endif\n vec3 glazingAdjustedColor = TransmitAdjust(glazingTransmissionColor, glazingF0);\n float glazingIlluminace = ColorToIlluminance(glazingAdjustedColor);\n float transmissionAlpha = RoughnessToAlpha(glazingTransmissionRoughness, 0.0).x;\n vec3 transmissionF = Fresnel_Rough(glazingF0, NdotV, transmissionAlpha);\n#elif defined(PRISMWOOD)\n vec3 woodDiffuse = NoiseWood(p, surfaceRoughness);\n#endif\n vec3 outRadianceLight = vec3(0.0);\n#if MAX_DIR_LIGHTS > 0 || MAX_POINT_LIGHTS > 0 || MAX_SPOT_LIGHTS > 0\n vec3 lightDirection[ MAX_DIR_LIGHTS + MAX_POINT_LIGHTS + MAX_SPOT_LIGHTS ];\n vec3 lightColor[ MAX_DIR_LIGHTS + MAX_POINT_LIGHTS + MAX_SPOT_LIGHTS ];\n#if MAX_DIR_LIGHTS > 0\n for( int i = 0; i < MAX_DIR_LIGHTS; i ++ ) {\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\n lightDirection[i] = normalize( lDirection.xyz );\n lightColor[i] = SRGBToLinear(directionalLightColor[ i ]);\n }\n#endif\n#if MAX_POINT_LIGHTS > 0\n for( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\n vec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\n vec3 lVector = lPosition.xyz + vViewPosition.xyz;\n lightDirection[MAX_DIR_LIGHTS + i] = normalize( lVector );\n float lDistance = 1.0;\n if ( pointLightDistance[ i ] > 0.0 )\n lDistance = 1.0 - min( ( length( lVector ) / pointLightDistance[ i ] ), 1.0 );\n lightColor[MAX_DIR_LIGHTS + i] = SRGBToLinear(pointLightColor[ i ]) * lDistance;\n }\n#endif\n#if MAX_SPOT_LIGHTS > 0\n for( int i = 0; i < MAX_SPOT_LIGHTS; i ++ ) {\n vec4 lPosition = viewMatrix * vec4( spotLightPosition[ i ], 1.0 );\n vec3 lVector = lPosition.xyz + vViewPosition.xyz;\n lightDirection[MAX_DIR_LIGHTS + MAX_POINT_LIGHTS + i] = normalize( lVector );\n float lDistance = 1.0;\n if ( spotLightDistance[ i ] > 0.0 )\n lDistance = 1.0 - min( ( length( lVector ) / spotLightDistance[ i ] ), 1.0 );\n float spotEffect = dot( spotLightDirection[ i ], normalize( spotLightPosition[ i ] - vWorldPosition ) );\n if ( spotEffect > spotLightAngleCos[ i ] ) {\n spotEffect = max( pow( spotEffect, spotLightExponent[ i ] ), 0.0 );\n } else {\n spotEffect = 0.0;\n }\n lightColor[MAX_DIR_LIGHTS + MAX_POINT_LIGHTS + i] = SRGBToLinear(spotLightColor[ i ]) * lDistance * spotEffect;\n }\n#endif\n for( int i = 0; i < MAX_DIR_LIGHTS + MAX_POINT_LIGHTS + MAX_SPOT_LIGHTS; i ++ ) {\n vec3 L = lightDirection[i];\n float NdotL = max(EPSILON, dot(N, L));\n vec3 H = normalize(L + V);\n float NdotH = dot(N, H);\n float VdotH = dot(V, H);\n float Hu = dot(H, Tu);\n float Hv = dot(H, Tv);\n vec3 Hlocal = vec3(Hu, Hv, NdotH);\n#if defined(PRISMLAYERED)\n float N2dotL = dot(N2, L);\n float N2dotH = dot(N2, H);\n vec3 Hlocal2 = vec3(Hu, Hv, N2dotH);\n#endif\n vec3 brdf = lightColor[i] *\n#if defined(PRISMOPAQUE)\n BRDF_Opaque(Hlocal, NdotL, NdotH, NdotV, VdotH,\n surfaceAlbedo, surfaceRoughness, surfaceAnisotropy, surfaceRotation,\n opaqueF0, opaqueAlbedo);\n#elif defined(PRISMMETAL)\n BRDF_Metal(Hlocal, NdotL, NdotH, NdotV, VdotH,\n surfaceAlbedo, surfaceRoughness, surfaceAnisotropy, surfaceRotation,\n metalF0);\n#elif defined(PRISMLAYERED)\n BRDF_Layered(Hlocal, NdotL, NdotH, NdotV, VdotH, Hlocal2, N2dotL, N2dotH, N2dotV,\n surfaceAlbedo, surfaceRoughness, surfaceAnisotropy, surfaceRotation,\n layeredF0, layeredDiffuse, layeredRoughness, layeredAnisotropy,\n layeredRotation, bottom_f0, layeredFraction);\n#elif defined(PRISMTRANSPARENT)\n BRDF_Transparent(Hlocal, NdotL, NdotH, NdotV, VdotH, surfaceAlbedo, surfaceRoughness, surfaceAnisotropy, surfaceRotation);\n#elif defined(PRISMGLAZING)\n BRDF_Glazing(Hlocal, NdotL, NdotH, NdotV, VdotH, surfaceAlbedo, surfaceRoughness, surfaceAnisotropy, surfaceRotation,\n glazingF0, glazingTransmissionColor, glazingIlluminace);\n#elif defined(PRISMWOOD)\n BRDF_Wood(Hlocal, NdotL, NdotH, NdotV, VdotH, surfaceAlbedo, surfaceRoughness, woodDiffuse);\n#endif\n outRadianceLight += max(vec3(0.0), brdf);\n }\n#endif\n vec3 outRadianceEnv = vec3(0.0);\n#if defined( USE_ENVMAP )\n outRadianceEnv =\n#if defined(PRISMOPAQUE)\n Environment_Opaque(N, V, clamp(NdotV, 0.0, 1.0), surfaceAlbedo, surfaceRoughness,\n opaqueF0, opaqueAlbedo, surfaceAnisotropy, surfaceRotation, Tu, Tv);\n#elif defined(PRISMMETAL)\n Environment_Metal(N, V, clamp(NdotV, 0.0, 1.0), surfaceAlbedo, surfaceRoughness, metalF0, surfaceAnisotropy, surfaceRotation, Tu, Tv);\n#elif defined(PRISMLAYERED)\n Environment_Layered(N, V, clamp(NdotV, 0.0, 1.0), N2, clamp(N2dotV, 0.0, 1.0), surfaceAlbedo, surfaceRoughness,\n layeredF0, surfaceAnisotropy, surfaceRotation, Tu, Tv, layeredDiffuse, layeredRoughness, layeredAnisotropy,\n layeredRotation, bottom_f0, layeredFraction);\n#elif defined(PRISMTRANSPARENT)\n Environment_Transparent(N, V, clamp(NdotV, 0.0, 1.0), surfaceAlbedo, surfaceRoughness, surfaceAnisotropy, surfaceRotation, Tu, Tv);\n#elif defined(PRISMGLAZING)\n Environment_Glazing(N, V, clamp(NdotV, 0.0, 1.0), surfaceAlbedo, surfaceRoughness, surfaceAnisotropy, surfaceRotation, Tu, Tv,\n glazingF0, transmissionF, transmissionAlpha, glazingAdjustedColor, glazingIlluminace);\n#elif defined(PRISMWOOD)\n Environment_Wood(N, V, clamp(NdotV, 0.0, 1.0), surfaceAlbedo, surfaceRoughness, woodDiffuse, surfaceAnisotropy, surfaceRotation, Tu, Tv);\n#endif\n#endif\n#if defined(PRISMOPAQUE)\n vec3 luminanceModifier;\n #if defined( USE_OPAQUE_LUMINANCE_MODIFIER_MAP )\n vec2 uv_opaque_luminance_modifier_map = (opaque_luminance_modifier_map_texMatrix * vec3(uv, 1.0)).xy;\n OPAQUE_LUMINANCE_MODIFIER_CLAMP_TEST;\n luminanceModifier = texture(opaque_luminance_modifier_map, uv_opaque_luminance_modifier_map).xyz;\n luminanceModifier = SRGBToLinear(luminanceModifier);\n if(opaque_luminance_modifier_map_invert) luminanceModifier = vec3(1.0) - luminanceModifier;\n #else\n luminanceModifier = opaque_luminance_modifier;\n #endif\n outRadianceEnv += luminanceModifier * opaque_luminance;\n#endif\n float surface_cutout = 1.0;\n #if defined( USE_SURFACE_CUTOUT_MAP )\n vec2 uv_surface_cutout_map = (surface_cutout_map_texMatrix * vec3(uv, 1.0)).xy;\n SURFACE_CUTOUT_CLAMP_TEST;\n vec3 surface_cutout_v3 = texture(surface_cutout_map, uv_surface_cutout_map).xyz;\n if(surface_cutout_map_invert) surface_cutout_v3 = vec3(1.0) - surface_cutout_v3;\n surface_cutout = average(surface_cutout_v3);\n #else\n surface_cutout = surface_cutout;\n #endif\n#if defined( USE_SURFACE_CUTOUT_MAP )\n if(surface_cutout < 0.01) discard;\n#endif\n outFragColor = vec4( outRadianceLight + outRadianceEnv, opacity*surface_cutout );\n#if TONEMAP_OUTPUT == 1\n outFragColor.xyz = toneMapCanonOGS_WithGamma_WithColorPerserving(exposureBias * outFragColor.xyz);\n#elif TONEMAP_OUTPUT == 2\n outFragColor.xyz = toneMapCanonFilmic_WithGamma(exposureBias * outFragColor.xyz);\n#endif\n#ifdef USE_FOG\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n outFragColor = mix( outFragColor, vec4( fogColor, outFragColor.w ), fogFactor );\n#endif\n#if defined(PRISMTRANSPARENT)\n applyPrismTransparency(outFragColor, transparent_color, transparent_ior);\n outFragColor.a *= surface_cutout;\n#ifdef USE_TILING\n outFragColor.a *= v_TilingMap.a;\n#endif\n#elif defined( PRISMGLAZING )\n applyPrismGlazingOpacity(outFragColor, transmissionF, transmissionAlpha, NdotV, glazingIlluminace);\n#ifdef USE_TILING\n outFragColor.a *= v_TilingMap.a;\n#endif\n#endif\n#include <theming_frag>\n#include <final_frag>\n#include <logdepthbuf_frag>\n}\n"},4086:e=>{e.exports="out vec3 vViewPosition;\nout vec3 vNormal;\n#if defined(PRISMWOOD) && !defined(NO_UVW)\nout vec3 vUvw;\n#if defined(PRISMWOODBUMP)\nout vec3 vtNormal;\nout mat3 mNormalMatrix;\n#endif\n#endif\n#if MAX_SPOT_LIGHTS > 0 || NUM_CUTPLANES > 0\nout vec3 vWorldPosition;\n#endif\n#if defined( USE_SURFACE_ALBEDO_MAP ) || defined( USE_SURFACE_ROUGHNESS_MAP ) || defined( USE_SURFACE_CUTOUT_MAP ) || defined( USE_SURFACE_ANISOTROPY_MAP ) || defined( USE_SURFACE_ROTATION_MAP ) || defined( USE_OPAQUE_ALBEDO_MAP ) || defined( USE_OPAQUE_F0_MAP ) || defined( USE_OPAQUE_LUMINANCE_MODIFIER_MAP ) || defined( USE_LAYERED_BOTTOM_F0_MAP ) || defined( USE_LAYERED_F0_MAP ) || defined( USE_LAYERED_DIFFUSE_MAP ) || defined( USE_LAYERED_FRACTION_MAP ) || defined( USE_LAYERED_ROUGHNESS_MAP ) || defined( USE_LAYERED_ANISOTROPY_MAP ) || defined( USE_LAYERED_ROTATION_MAP ) || defined( USE_METAL_F0_MAP ) || defined( USE_SURFACE_NORMAL_MAP ) || defined( USE_LAYERED_NORMAL_MAP )\n #define USE_MAP\n#endif\n#if defined(USE_MAP) || defined(USE_TILING)\nout vec2 vUv;\n#endif\n#ifdef MRT_NORMALS\nout float depth;\n#endif\n#include <pack_normals>\n#include <instancing_decl_vert>\n#include <id_decl_vert>\n#include <shadowmap_decl_vert>\n#include <logdepthbuf_decl_vert>\n#if !defined(USE_MAP) && (MAX_DIR_LIGHTS > 0 || MAX_POINT_LIGHTS > 0 || MAX_SPOT_LIGHTS > 0) || defined( PRISMWOODBUMP )\nout vec3 vTangent;\nout vec3 vBitangent;\nvoid ComputeTangents(vec3 normal, out vec3 u, out vec3 v)\n{\n float scale = normal.z < 0.0 ? -1.0 : 1.0;\n vec3 temp = scale * normal;\n float e = temp.z;\n float h = 1.0/(1.0 + e);\n float hvx = h * temp.y;\n float hvxy = hvx * -temp.x;\n u = vec3(e + hvx * temp.y, hvxy, -temp.x);\n v = vec3(hvxy, e + h * temp.x * temp.x, -temp.y);\n u *= scale;\n v *= scale;\n}\n#endif\nvoid main() {\n#if defined(USE_MAP) || defined(USE_TILING)\n vUv = uv;\n#endif\n#ifdef UNPACK_NORMALS\n vec3 objectNormal = decodeNormal(normal);\n#else\n vec3 objectNormal = normal;\n#endif\n#ifdef FLIP_SIDED\n objectNormal = -objectNormal;\n#endif\n objectNormal = getInstanceNormal(objectNormal);\n vec3 instPos = getInstancePos(position);\n#if defined(PRISMWOOD) && !defined(NO_UVW)\n#if defined(PRISMWOODBUMP)\n vUvw = instPos;\n vtNormal = normalize(objectNormal);\n mNormalMatrix = normalMatrix;\n#else\n vUvw = uvw;\n#endif\n#endif\n vec3 transformedNormal = normalMatrix * objectNormal;\n vNormal = normalize( transformedNormal );\n vec4 mvPosition = modelViewMatrix * vec4( instPos, 1.0 );\n gl_Position = projectionMatrix * mvPosition;\n#include <logdepthbuf_vert>\n vViewPosition = -mvPosition.xyz;\n#if MAX_SPOT_LIGHTS > 0 || NUM_CUTPLANES > 0\n vec4 worldPosition = modelMatrix * vec4( instPos, 1.0 );\n vWorldPosition = worldPosition.xyz;\n#endif\n#if !defined(USE_MAP) && (MAX_DIR_LIGHTS > 0 || MAX_POINT_LIGHTS > 0 || MAX_SPOT_LIGHTS > 0) || defined ( PRISMWOODBUMP )\n vec3 Tu, Tv;\n#if defined(PRISMWOODBUMP)\n ComputeTangents(vtNormal, Tu, Tv);\n#else\n ComputeTangents(vNormal, Tu, Tv);\n#endif\n vTangent = Tu;\n vBitangent = Tv;\n#endif\n#ifdef MRT_NORMALS\n depth = mvPosition.z;\n#endif\n#include <id_vert>\n#include <shadowmap_vert>\n}\n"}},n={};function o(a){var r=n[a];if(void 0!==r)return r.exports;var t=n[a]={exports:{}};return e[a](t,t.exports,o),t.exports}o.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return o.d(n,{a:n}),n},o.d=(e,n)=>{for(var a in n)o.o(n,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";o.r(a);var e={};o.r(e),o.d(e,{PrismShader:()=>c,clonePrismMaterial:()=>m,createPrismMaterial:()=>p});var n={};o.r(n),o.d(n,{GetPrismMapChunk:()=>E,PrismMaps:()=>y,PrismMaterial:()=>T});var r={};o.r(r),o.d(r,{convertPrismMaterial:()=>ae,convertPrismTexture:()=>ye,disposePrismWoodTextures:()=>ne,materialTilingPattern:()=>ie,swapPrismWoodTextures:()=>ee});var t=o(4086),i=o.n(t),l=o(9809),s=o.n(l);const _=Autodesk.Viewing.Private,d=_.ShaderChunks,{GetPrismMapUniforms:f}=_.PrismUtil;function u(e){var n=e+"_texMatrix",o=e+"_bumpScale",a=e+"_bumpmapType",r={};return r[e]={type:"t",value:null},r[n]={type:"m3",value:new THREE.Matrix3},r[o]={type:"v2",value:new THREE.Vector2(1,1)},r[a]={type:"i",value:0},r}let c={uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.lights,THREE.UniformsLib.fog,d.CutPlanesUniforms,d.IdUniforms,d.ThemingUniform,d.ShadowMapUniforms,f("surface_albedo_map"),f("surface_roughness_map"),f("surface_cutout_map"),f("surface_anisotropy_map"),f("surface_rotation_map"),f("opaque_albedo_map"),f("opaque_f0_map"),f("opaque_luminance_modifier_map"),f("layered_bottom_f0_map"),f("layered_f0_map"),f("layered_diffuse_map"),f("layered_fraction_map"),f("layered_roughness_map"),f("layered_anisotropy_map"),f("layered_rotation_map"),f("metal_f0_map"),f("wood_curly_distortion_map"),f("glazing_f0_map"),f("glazing_transmission_color_map"),f("glazing_transmission_roughness_map"),u("surface_normal_map"),u("layered_normal_map"),f("TilingMap"),f("TilingNormalMap"),f("TilingRandomMap"),{surface_albedo:{type:"c",value:new THREE.Color(1118481)},surface_roughness:{type:"f",value:1},surface_anisotropy:{type:"f",value:1},surface_rotation:{type:"f",value:1},opaque_albedo:{type:"c",value:new THREE.Color(1118481)},opaque_f0:{type:"f",value:1},opaque_luminance_modifier:{type:"c",value:new THREE.Color(1118481)},opaque_luminance:{type:"f",value:1},metal_f0:{type:"c",value:new THREE.Color(1118481)},layered_f0:{type:"f",value:1},layered_diffuse:{type:"c",value:new THREE.Color(0)},layered_fraction:{type:"f",value:1},layered_bottom_f0:{type:"c",value:new THREE.Color(1118481)},layered_roughness:{type:"f",value:1},layered_anisotropy:{type:"f",value:1},layered_rotation:{type:"f",value:1},transparent_ior:{type:"f",value:2},transparent_color:{type:"c",value:new THREE.Color(1118481)},transparent_distance:{type:"f",value:1},glazing_f0:{type:"c",value:new THREE.Color(16777215)},glazing_transmission_roughness:{type:"f",value:0},glazing_transmission_color:{type:"c",value:new THREE.Color(16777215)},wood_fiber_cosine_enable:{type:"i",value:1},wood_fiber_cosine_bands:{type:"i",value:2},wood_fiber_cosine_weights:{type:"v4",value:new THREE.Vector4(2.5,.5,1,1)},wood_fiber_cosine_frequencies:{type:"v4",value:new THREE.Vector4(15,4,1,1)},wood_fiber_perlin_enable:{type:"i",value:1},wood_fiber_perlin_bands:{type:"i",value:3},wood_fiber_perlin_weights:{type:"v4",value:new THREE.Vector4(3,1,.2,1)},wood_fiber_perlin_frequencies:{type:"v4",value:new THREE.Vector4(40,20,3.5,1)},wood_fiber_perlin_scale_z:{type:"f",value:.3},wood_growth_perlin_enable:{type:"i",value:1},wood_growth_perlin_bands:{type:"i",value:3},wood_growth_perlin_weights:{type:"v4",value:new THREE.Vector4(1,2,1,1)},wood_growth_perlin_frequencies:{type:"v4",value:new THREE.Vector4(1,5,13,1)},wood_latewood_ratio:{type:"f",value:.238},wood_earlywood_sharpness:{type:"f",value:.395},wood_latewood_sharpness:{type:"f",value:.109},wood_ring_thickness:{type:"f",value:.75},wood_earlycolor_perlin_enable:{type:"i",value:1},wood_earlycolor_perlin_bands:{type:"i",value:2},wood_earlycolor_perlin_weights:{type:"v4",value:new THREE.Vector4(.3,.5,.15,1)},wood_earlycolor_perlin_frequencies:{type:"v4",value:new THREE.Vector4(8,3,.35,1)},wood_early_color:{type:"c",value:new THREE.Color(.286,.157,.076)},wood_use_manual_late_color:{type:"i",value:0},wood_manual_late_color:{type:"c",value:new THREE.Color(.62,.35,.127)},wood_latecolor_perlin_enable:{type:"i",value:1},wood_latecolor_perlin_bands:{type:"i",value:1},wood_latecolor_perlin_weights:{type:"v4",value:new THREE.Vector4(.75,.55,1,1)},wood_latecolor_perlin_frequencies:{type:"v4",value:new THREE.Vector4(4.5,.05,1,1)},wood_late_color_power:{type:"f",value:1.25},wood_diffuse_perlin_enable:{type:"i",value:1},wood_diffuse_perlin_bands:{type:"i",value:3},wood_diffuse_perlin_weights:{type:"v4",value:new THREE.Vector4(.15,.2,.05,1)},wood_diffuse_perlin_frequencies:{type:"v4",value:new THREE.Vector4(.05,.1,3,1)},wood_diffuse_perlin_scale_z:{type:"f",value:.2},wood_use_pores:{type:"i",value:1},wood_pore_type:{type:"i",value:0},wood_pore_radius:{type:"f",value:.04},wood_pore_cell_dim:{type:"f",value:.15},wood_pore_color_power:{type:"f",value:1.45},wood_pore_depth:{type:"f",value:.02},wood_use_rays:{type:"i",value:1},wood_ray_color_power:{type:"f",value:1.1},wood_ray_seg_length_z:{type:"f",value:5},wood_ray_num_slices:{type:"f",value:160},wood_ray_ellipse_z2x:{type:"f",value:10},wood_ray_ellipse_radius_x:{type:"f",value:.2},wood_use_latewood_bump:{type:"i",value:1},wood_latewood_bump_depth:{type:"f",value:.01},wood_use_groove_roughness:{type:"i",value:1},wood_groove_roughness:{type:"f",value:.85},wood_diffuse_lobe_weight:{type:"f",value:.9},wood_curly_distortion_enable:{type:"i",value:0},wood_curly_distortion_scale:{type:"f",value:.25},wood_ring_fraction:{type:"v4",value:new THREE.Vector4(0,0,0,0)},wood_fall_rise:{type:"v2",value:new THREE.Vector2(0,0)},permutationMap:{type:"t",value:null},gradientMap:{type:"t",value:null},perm2DMap:{type:"t",value:null},permGradMap:{type:"t",value:null},importantSamplingRandomMap:{type:"t",value:null},importantSamplingSolidAngleMap:{type:"t",value:null},irradianceMap:{type:"t",value:null},envMap:{type:"t",value:null},exposureBias:{type:"f",value:1},envMapExposure:{type:"f",value:1},envRotationSin:{type:"f",value:0},envRotationCos:{type:"f",value:1},envExponentMin:{type:"f",value:1},envExponentMax:{type:"f",value:512},envExponentCount:{type:"f",value:10},tilingOverallTransform:{type:"m4",value:new THREE.Matrix4},uv2tile:{type:"v4",value:new THREE.Vector4(1,0,0,1)},tile2uv:{type:"v4",value:new THREE.Vector4(1,0,0,1)},tileAlignOffset:{type:"v2",value:new THREE.Vector2(0,0)},tilingUVTransform:{type:"m4",value:new THREE.Matrix4},tilingRandomAxisS:{type:"v2",value:new THREE.Vector2(0,0)},tilingRandomAxisT:{type:"v2",value:new THREE.Vector2(0,0)},tilingRandomAlignmentOffset:{type:"v2",value:new THREE.Vector2(0,0)}}]),vertexShader:i(),fragmentShader:s()};THREE.ShaderLib.prism=c;let p=function(){return console.warn("createPrismMaterial has been deprecated. Use new PrismMaterial instead"),new T},m=function(e){return console.warn("clonePrismMaterial has been deprecated. Use new PrismMaterial.clone instead"),e.clone()};function v(e,n,o){e[o].value=n[o],null!=n[o]&&(e[o+"_texMatrix"].value=n[o].matrix,e[o+"_invert"].value=n[o].invert)}function g(e,n,o){e[o].value=n[o],null!=n[o]&&(e[o+"_texMatrix"].value=n[o].matrix,e[o+"_bumpScale"].value=n[o].bumpScale,e[o+"_bumpmapType"].value=n[o].bumpmapType)}let E=function(e,n,o){var a="uv_"+e+"_map",r="";return n&&o?r="if ("+a+".x < 0.0 || "+a+".x > 1.0 || "+a+".y < 0.0 || "+a+".y > 1.0) { discard; }":n?r="if ("+a+".x < 0.0 || "+a+".x > 1.0) { discard; }":o&&(r="if ("+a+".y < 0.0 || "+a+".y > 1.0) { discard; }"),"#define "+e.toUpperCase()+"_CLAMP_TEST "+r},y=["opaque_luminance_modifier","surface_albedo","surface_roughness","surface_anisotropy","surface_rotation","opaque_f0","opaque_albedo","metal_f0","layered_f0","layered_diffuse","layered_roughness","layered_anisotropy","layered_rotation","layered_bottom_f0","layered_fraction","surface_cutout","glazing_transmission_color","glazing_f0","glazing_transmission_roughness","wood_curly_distortion"];var h=function(e){for(var n="\n",o=0;o<y.length;o++){var a=e[y[o]];a&&(n+=E(y[o],a.S,a.T)+"\n")}return n};class T extends THREE.ShaderMaterial{constructor(){super({...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},...{vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,uniforms:THREE.UniformsUtils.clone(c.uniforms)}}),this.type="PrismMaterial",this.defaultAttributeValues.uvw=[0,0,0],this.enable3DWoodBump=!1,this.enableImportantSampling=!1,this.mapList={},this.lights=!0}clone(){const e=new T;return e.copy(this),e}copy(e){switch(this.name=e.name,this.side=e.side,this.opacity=e.opacity,this.transparent=e.transparent,this.blending=e.blending,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.alphaTest=e.alphaTest,this.visible=e.visible,this.mapList=e.mapList,this.prismType=e.prismType,this.surface_albedo=e.surface_albedo,void 0!==e.surface_albedo_map&&(this.surface_albedo_map=e.surface_albedo_map),this.surface_roughness=e.surface_roughness,void 0!==e.surface_roughness_map&&(this.surface_roughness_map=e.surface_roughness_map),this.surface_anisotropy=e.surface_anisotropy,void 0!==e.surface_anisotropy_map&&(this.surface_anisotropy_map=e.surface_anisotropy_map),this.surface_rotation=e.surface_rotation,void 0!==e.surface_rotation_map&&(this.surface_rotation_map=e.surface_rotation_map),void 0!==e.surface_cutout_map&&(this.surface_cutout_map=e.surface_cutout_map),void 0!==e.surface_normal_map&&(this.surface_normal_map=e.surface_normal_map),this.uniforms.importantSamplingRandomMap.value=e.uniforms.importantSamplingRandomMap.value,this.uniforms.importantSamplingSolidAngleMap.value=e.uniforms.importantSamplingSolidAngleMap.value,this.prismType){case"PrismOpaque":this.opaque_albedo=(new THREE.Color).copy(e.opaque_albedo),this.opaque_luminance_modifier=(new THREE.Color).copy(e.opaque_luminance_modifier),this.opaque_f0=e.opaque_f0,this.opaque_luminance=e.opaque_luminance,void 0!==e.opaque_albedo_map&&(this.opaque_albedo_map=e.opaque_albedo_map),void 0!==e.opaque_luminance_modifier_map&&(this.opaque_luminance_modifier_map=e.opaque_luminance_modifier_map),void 0!==e.opaque_f0_map&&(this.opaque_f0_map=e.opaque_f0_map);break;case"PrismMetal":this.metal_f0=(new THREE.Color).copy(e.metal_f0),void 0!==e.metal_f0_map&&(this.metal_f0_map=e.metal_f0_map);break;case"PrismLayered":this.layered_f0=e.layered_f0,this.layered_diffuse=(new THREE.Color).copy(e.layered_diffuse),this.layered_fraction=e.layered_fraction,this.layered_bottom_f0=(new THREE.Color).copy(e.layered_bottom_f0),this.layered_roughness=e.layered_roughness,this.layered_anisotropy=e.layered_anisotropy,this.layered_rotation=e.layered_rotation,void 0!==e.layered_bottom_f0_map&&(this.layered_bottom_f0_map=e.layered_bottom_f0_map),void 0!==e.layered_f0_map&&(this.layered_f0_map=e.layered_f0_map),void 0!==e.layered_diffuse_map&&(this.layered_diffuse_map=e.layered_diffuse_map),void 0!==e.layered_fraction_map&&(this.layered_fraction_map=e.layered_fraction_map),void 0!==e.layered_rotationlayered_roughness_map&&(this.layered_rotationlayered_roughness_map=e.layered_rotationlayered_roughness_map),void 0!==e.layered_anisotropy_map&&(this.layered_anisotropy_map=e.layered_anisotropy_map),void 0!==e.layered_rotation_map&&(this.layered_rotation_map=e.layered_rotation_map),void 0!==e.layered_normal_map&&(this.layered_normal_map=e.layered_normal_map);break;case"PrismTransparent":this.transparent_color=(new THREE.Color).copy(e.transparent_color),this.transparent_distance=e.transparent_distance,this.transparent_ior=e.transparent_ior,this.transparent=e.transparent,this.twoPassTransparency=e.twoPassTransparency;break;case"PrismGlazing":this.glazing_f0=(new THREE.Color).copy(e.glazing_f0),this.glazing_transmission_color=(new THREE.Color).copy(e.glazing_transmission_color),this.glazing_transmission_roughness=e.glazing_transmission_roughness,void 0!==e.glazing_f0_map&&(this.glazing_f0_map=e.glazing_f0_map),void 0!==e.glazing_transmission_color_map&&(this.glazing_transmission_color_map=e.glazing_transmission_color_map),void 0!==e.glazing_transmission_roughness_map&&(this.glazing_transmission_roughness_map=e.glazing_transmission_roughness_map);break;case"PrismWood":this.wood_fiber_cosine_enable=e.wood_fiber_cosine_enable,this.wood_fiber_cosine_bands=e.wood_fiber_cosine_bands,this.wood_fiber_cosine_weights=(new THREE.Vector4).copy(e.wood_fiber_cosine_weights),this.wood_fiber_cosine_frequencies=(new THREE.Vector4).copy(e.wood_fiber_cosine_frequencies),this.wood_fiber_perlin_enable=e.wood_fiber_perlin_enable,this.wood_fiber_perlin_bands=e.wood_fiber_perlin_bands,this.wood_fiber_perlin_weights=(new THREE.Vector4).copy(e.wood_fiber_perlin_weights),this.wood_fiber_perlin_frequencies=(new THREE.Vector4).copy(e.wood_fiber_perlin_frequencies),this.wood_fiber_perlin_scale_z=e.wood_fiber_perlin_scale_z,this.wood_growth_perlin_enable=e.wood_growth_perlin_enable,this.wood_growth_perlin_bands=e.wood_growth_perlin_bands,this.wood_growth_perlin_weights=(new THREE.Vector4).copy(e.wood_growth_perlin_weights),this.wood_growth_perlin_frequencies=(new THREE.Vector4).copy(e.wood_growth_perlin_frequencies),this.wood_latewood_ratio=e.wood_latewood_ratio,this.wood_earlywood_sharpness=e.wood_earlywood_sharpness,this.wood_latewood_sharpness=e.wood_latewood_sharpness,this.wood_ring_thickness=e.wood_ring_thickness,this.wood_earlycolor_perlin_enable=e.wood_earlycolor_perlin_enable,this.wood_earlycolor_perlin_bands=e.wood_earlycolor_perlin_bands,this.wood_earlycolor_perlin_weights=(new THREE.Vector4).copy(e.wood_earlycolor_perlin_weights),this.wood_earlycolor_perlin_frequencies=(new THREE.Vector4).copy(e.wood_earlycolor_perlin_frequencies),this.wood_early_color=(new THREE.Color).copy(e.wood_early_color),this.wood_use_manual_late_color=e.wood_use_manual_late_color,this.wood_manual_late_color=(new THREE.Color).copy(e.wood_manual_late_color),this.wood_latecolor_perlin_enable=e.wood_latecolor_perlin_enable,this.wood_latecolor_perlin_bands=e.wood_latecolor_perlin_bands,this.wood_latecolor_perlin_weights=(new THREE.Vector4).copy(e.wood_latecolor_perlin_weights),this.wood_latecolor_perlin_frequencies=(new THREE.Vector4).copy(e.wood_latecolor_perlin_frequencies),this.wood_late_color_power=e.wood_late_color_power,this.wood_diffuse_perlin_enable=e.wood_diffuse_perlin_enable,this.wood_diffuse_perlin_bands=e.wood_diffuse_perlin_bands,this.wood_diffuse_perlin_weights=(new THREE.Vector4).copy(e.wood_diffuse_perlin_weights),this.wood_diffuse_perlin_frequencies=(new THREE.Vector4).copy(e.wood_diffuse_perlin_frequencies),this.wood_diffuse_perlin_scale_z=e.wood_diffuse_perlin_scale_z,this.wood_use_pores=e.wood_use_pores,this.wood_pore_type=e.wood_pore_type,this.wood_pore_radius=e.wood_pore_radius,this.wood_pore_cell_dim=e.wood_pore_cell_dim,this.wood_pore_color_power=e.wood_pore_color_power,this.wood_pore_depth=e.wood_pore_depth,this.wood_use_rays=e.wood_use_rays,this.wood_ray_color_power=e.wood_ray_color_power,this.wood_ray_seg_length_z=e.wood_ray_seg_length_z,this.wood_ray_num_slices=e.wood_ray_num_slices,this.wood_ray_ellipse_z2x=e.wood_ray_ellipse_z2x,this.wood_ray_ellipse_radius_x=e.wood_ray_ellipse_radius_x,this.wood_use_latewood_bump=e.wood_use_latewood_bump,this.wood_latewood_bump_depth=e.wood_latewood_bump_depth,this.wood_use_groove_roughness=e.wood_use_groove_roughness,this.wood_groove_roughness=e.wood_groove_roughness,this.wood_diffuse_lobe_weight=e.wood_diffuse_lobe_weight,this.uniforms.permutationMap.value=e.uniforms.permutationMap.value,this.uniforms.gradientMap.value=e.uniforms.gradientMap.value,this.uniforms.perm2DMap.value=e.uniforms.perm2DMap.value,this.uniforms.permGradMap.value=e.uniforms.permGradMap.value,void 0!==e.wood_curly_distortion_map&&(this.wood_curly_distortion_map=e.wood_curly_distortion_map,this.wood_curly_distortion_enable=e.wood_curly_distortion_enable,this.wood_curly_distortion_scale=e.wood_curly_distortion_scale),this.wood_ring_fraction=e.wood_ring_fraction,this.wood_fall_rise=e.wood_fall_rise;break;default:console.warn("Unknown prism type: "+e.prismType)}this.envExponentMin=e.envExponentMin,this.envExponentMax=e.envExponentMax,this.envExponentCount=e.envExponentCount,this.envMap=e.envMap,e.useTiling&&(this.useTiling=e.useTiling,this.tilingOverallTransform=(new THREE.Matrix4).copy(e.tilingOverallTransform),this.TilingMap=e.TilingMap,this.TilingMap_texMatrix=(new THREE.Matrix3).copy(e.TilingMap_texMatrix),this.hasRoundCorner=e.hasRoundCorner,this.hasRoundCorner&&(this.TilingNormalMap=e.TilingNormalMap,this.TilingNormalMap_texMatrix=(new THREE.Matrix3).copy(e.TilingNormalMap_texMatrix)),this.useRandomOffset=e.useRandomOffset,this.useRandomOffset&&(this.TilingRandomMap=e.TilingRandomMap,this.TilingRandomMap_texMatrix=(new THREE.Matrix3).copy(e.TilingRandomMap_texMatrix),this.tilingRandomAxisS=(new THREE.Vector2).copy(e.tilingRandomAxisS),this.tilingRandomAxisT=(new THREE.Vector2).copy(e.tilingRandomAxisT),this.tilingRandomAlignmentOffset=(new THREE.Vector2).copy(e.tilingRandomAlignmentOffset)),this.uv2tile=e.uv2tile,this.tile2uv=e.tile2uv,this.tilingRepeatRange=[e.tilingRepeatRange[0],e.tilingRepeatRange[1],e.tilingRepeatRange[2],e.tilingRepeatRange[3]],this.tileAlignOffset=(new THREE.Vector2).copy(e.tileAlignOffset),this.tilingUVTransform=(new THREE.Matrix4).copy(e.tilingUVTransform)),this.defines=e.defines}refreshUniforms(e){const n=this;switch(e.exposureBias.value=n.exposureBias,e.opacity.value=n.opacity,e.surface_albedo.value=n.surface_albedo,e.surface_roughness.value=n.surface_roughness,e.surface_anisotropy.value=n.surface_anisotropy,e.surface_rotation.value=n.surface_rotation,v(e,n,"surface_albedo_map"),v(e,n,"surface_roughness_map"),v(e,n,"surface_cutout_map"),v(e,n,"surface_anisotropy_map"),v(e,n,"surface_rotation_map"),g(e,n,"surface_normal_map"),n.prismType){case"PrismOpaque":e.opaque_albedo.value=n.opaque_albedo,e.opaque_luminance_modifier.value=n.opaque_luminance_modifier,e.opaque_f0.value=n.opaque_f0,e.opaque_luminance.value=n.opaque_luminance,v(e,n,"opaque_albedo_map"),v(e,n,"opaque_luminance_modifier_map"),v(e,n,"opaque_f0_map");break;case"PrismMetal":e.metal_f0.value=n.metal_f0,v(e,n,"metal_f0_map");break;case"PrismLayered":e.layered_f0.value=n.layered_f0,e.layered_diffuse.value=n.layered_diffuse,e.layered_fraction.value=n.layered_fraction,e.layered_bottom_f0.value=n.layered_bottom_f0,e.layered_roughness.value=n.layered_roughness,e.layered_anisotropy.value=n.layered_anisotropy,e.layered_rotation.value=n.layered_rotation,v(e,n,"layered_bottom_f0_map"),v(e,n,"layered_f0_map"),v(e,n,"layered_diffuse_map"),v(e,n,"layered_fraction_map"),v(e,n,"layered_roughness_map"),v(e,n,"layered_anisotropy_map"),v(e,n,"layered_rotation_map"),g(e,n,"layered_normal_map");break;case"PrismTransparent":e.transparent_color.value=n.transparent_color,e.transparent_distance.value=n.transparent_distance,e.transparent_ior.value=n.transparent_ior;break;case"PrismGlazing":e.glazing_f0.value=n.glazing_f0,e.glazing_transmission_color.value=n.glazing_transmission_color,e.glazing_transmission_roughness.value=n.glazing_transmission_roughness,v(e,n,"glazing_f0_map"),v(e,n,"glazing_transmission_color_map"),v(e,n,"glazing_transmission_roughness_map");break;case"PrismWood":e.wood_fiber_cosine_enable.value=n.wood_fiber_cosine_enable,e.wood_fiber_cosine_bands.value=n.wood_fiber_cosine_bands,e.wood_fiber_cosine_weights.value=n.wood_fiber_cosine_weights,e.wood_fiber_cosine_frequencies.value=n.wood_fiber_cosine_frequencies,e.wood_fiber_perlin_enable.value=n.wood_fiber_perlin_enable,e.wood_fiber_perlin_bands.value=n.wood_fiber_perlin_bands,e.wood_fiber_perlin_weights.value=n.wood_fiber_perlin_weights,e.wood_fiber_perlin_frequencies.value=n.wood_fiber_perlin_frequencies,e.wood_fiber_perlin_scale_z.value=n.wood_fiber_perlin_scale_z,e.wood_growth_perlin_enable.value=n.wood_growth_perlin_enable,e.wood_growth_perlin_bands.value=n.wood_growth_perlin_bands,e.wood_growth_perlin_weights.value=n.wood_growth_perlin_weights,e.wood_growth_perlin_frequencies.value=n.wood_growth_perlin_frequencies,e.wood_latewood_ratio.value=n.wood_latewood_ratio,e.wood_earlywood_sharpness.value=n.wood_earlywood_sharpness,e.wood_latewood_sharpness.value=n.wood_latewood_sharpness,e.wood_ring_thickness.value=n.wood_ring_thickness,e.wood_earlycolor_perlin_enable.value=n.wood_earlycolor_perlin_enable,e.wood_earlycolor_perlin_bands.value=n.wood_earlycolor_perlin_bands,e.wood_earlycolor_perlin_weights.value=n.wood_earlycolor_perlin_weights,e.wood_earlycolor_perlin_frequencies.value=n.wood_earlycolor_perlin_frequencies,e.wood_early_color.value=n.wood_early_color,e.wood_use_manual_late_color.value=n.wood_use_manual_late_color,e.wood_manual_late_color.value=n.wood_manual_late_color,e.wood_latecolor_perlin_enable.value=n.wood_latecolor_perlin_enable,e.wood_latecolor_perlin_bands.value=n.wood_latecolor_perlin_bands,e.wood_latecolor_perlin_weights.value=n.wood_latecolor_perlin_weights,e.wood_latecolor_perlin_frequencies.value=n.wood_latecolor_perlin_frequencies,e.wood_late_color_power.value=n.wood_late_color_power,e.wood_diffuse_perlin_enable.value=n.wood_diffuse_perlin_enable,e.wood_diffuse_perlin_bands.value=n.wood_diffuse_perlin_bands,e.wood_diffuse_perlin_weights.value=n.wood_diffuse_perlin_weights,e.wood_diffuse_perlin_frequencies.value=n.wood_diffuse_perlin_frequencies,e.wood_diffuse_perlin_scale_z.value=n.wood_diffuse_perlin_scale_z,e.wood_use_pores.value=n.wood_use_pores,e.wood_pore_type.value=n.wood_pore_type,e.wood_pore_radius.value=n.wood_pore_radius,e.wood_pore_cell_dim.value=n.wood_pore_cell_dim,e.wood_pore_color_power.value=n.wood_pore_color_power,e.wood_pore_depth.value=n.wood_pore_depth,e.wood_use_rays.value=n.wood_use_rays,e.wood_ray_color_power.value=n.wood_ray_color_power,e.wood_ray_seg_length_z.value=n.wood_ray_seg_length_z,e.wood_ray_num_slices.value=n.wood_ray_num_slices,e.wood_ray_ellipse_z2x.value=n.wood_ray_ellipse_z2x,e.wood_ray_ellipse_radius_x.value=n.wood_ray_ellipse_radius_x,e.wood_use_latewood_bump.value=n.wood_use_latewood_bump,e.wood_latewood_bump_depth.value=n.wood_latewood_bump_depth,e.wood_use_groove_roughness.value=n.wood_use_groove_roughness,e.wood_groove_roughness.value=n.wood_groove_roughness,e.wood_diffuse_lobe_weight.value=n.wood_diffuse_lobe_weight,v(e,n,"wood_curly_distortion_map"),null!=e.wood_curly_distortion_map.value&&(e.wood_curly_distortion_map.value.minFilter=THREE.NearestFilter,e.wood_curly_distortion_map.value.magFilter=THREE.NearestFilter,e.wood_curly_distortion_enable.value=n.wood_curly_distortion_enable,e.wood_curly_distortion_scale.value=n.wood_curly_distortion_scale);var o=1-n.wood_latewood_ratio,a=n.wood_earlywood_sharpness*o,r=n.wood_latewood_sharpness*n.wood_latewood_ratio,t=o+r;e.wood_ring_fraction.value=new THREE.Vector4(o,a,r,t),e.wood_fall_rise.value=new THREE.Vector2(o-a,n.wood_latewood_ratio-r);break;default:console.warn("Unknown prism type: "+n.prismType)}n.useTiling&&(e.tilingOverallTransform.value=n.tilingOverallTransform,e.TilingMap.value=n.TilingMap,e.TilingMap_texMatrix.value=n.TilingMap_texMatrix,n.hasRoundCorner&&(e.TilingNormalMap.value=n.TilingNormalMap,e.TilingNormalMap_texMatrix.value=n.TilingNormalMap_texMatrix),n.useRandomOffset&&(e.TilingRandomMap.value=n.TilingRandomMap,e.TilingRandomMap_texMatrix.value=n.TilingRandomMap_texMatrix,e.tilingRandomAxisS.value=n.tilingRandomAxisS,e.tilingRandomAxisT.value=n.tilingRandomAxisT,e.tilingRandomAlignmentOffset.value=n.tilingRandomAlignmentOffset),e.uv2tile.value=n.uv2tile,e.tile2uv.value=n.tile2uv,e.tileAlignOffset.value=n.tileAlignOffset,e.tilingUVTransform.value=n.tilingUVTransform),e.envExponentMin.value=n.envExponentMin,e.envExponentMax.value=n.envExponentMax,e.envExponentCount.value=n.envExponentCount,function(e,n){e.envMap&&(e.envMap.value=n.envMap),e.irradianceMap&&(e.irradianceMap.value=n.irradianceMap),e.envMapExposure&&(e.envMapExposure.value=n.envMapExposure),e.envRotationSin&&e.envRotationCos&&(e.envRotationSin.value=n.envRotationSin,e.envRotationCos.value=n.envRotationCos)}(e,n)}onBeforeCompile(e,n){super.onBeforeCompile(e,n),function(e,n){if(n.textureMaps)for(var o=0;o<y.length;o++){var a=y[o],r=n.textureMaps[a+"_map"];if(r){var t=r.textureObj.properties.booleans;e[a]={S:!t.texture_URepeat.values[0],T:!t.texture_VRepeat.values[0]}}}}(e,this),Autodesk.Viewing.Private.patchShader(e,{fragmentHeader:h(e),vertexHeader:"\n #ifdef PRISMWOOD\n attribute vec3 uvw;\n #endif"})}}T.prototype.isPrismMaterial=!0;const R=-1e240;function w(){this.distance=R,this.dot=1}function M(e,n){return e.x*n.y-e.y*n.x}function x(e,n,o){let a=e.length();return 0===a?n?new THREE.Vector2(0,o?0:1):new THREE.Vector2(0,-(o?0:1)):n?new THREE.Vector2(-e.y/a,e.x/a):new THREE.Vector2(e.y/a,-e.x/a)}w.prototype={constructor:w,set:function(e,n){return this.distance=e,this.dot=n,this},copy:function(e){this.distance=e.distance,this.dot=e.dot},lessThan:function(e){return Math.abs(this.distance)<Math.abs(e.distance)||Math.abs(this.distance)===Math.abs(e.distance)&&this.dot<e.dot},greaterThan:function(e){return Math.abs(this.distance)>Math.abs(e.distance)||Math.abs(this.distance)===Math.abs(e.distance)&&this.dot>e.dot},lessThanOrEquals:function(e){return Math.abs(this.distance)<Math.abs(e.distance)||Math.abs(this.distance)==Math.abs(e.distance)&&this.dot<=e.dot},greaterThanOrEquals:function(e){return Math.abs(this.distance)>Math.abs(e.distance)||Math.abs(this.distance)==Math.abs(e.distance)&&this.dot>=e.dot}};const A=0,S=1,b=2,N=3,P=4,I=5,H=6,L=7;function O(e,n,o){this.p=[],this.p[0]=e.clone(),this.p[1]=n.clone(),this.color=o}function U(e,n){return(n.x-e.x)*(e.y+n.y)}function D(){this.edges=[]}function V(e,n,o){return e.dot(n)<=0||Math.abs(M(e,n))>o}function z(e,n){return F(e,n,A)}function F(e,n,o){let a=e&o;if(a==S||a==b||a==P)return[e=a^L,n];if(e==A||e==L){return[e=[H,I,N][n%3],n=Math.floor(n/3)]}let r=e<<1+(1&n);return[e=(r|r>>3)&L,n>>=1]}function C(){this.minDistance=new w,this.nearEdge=null,this.nearParam=0}function G(e,n,o){return Math.max(Math.min(e,n),Math.min(Math.max(e,n),o))}function q(e,n){let o=n.point(0),a=n.point(1),r=e,t=e.clone().sub(o),i=a.clone().sub(o),l=t.dot(i)/i.dot(i);return l<0?t.length():l>1?r.clone().sub(a).length():Math.abs(x(i,!1,!1).dot(t))}function B(){this.contours=[],this.windings=[],this.inverseYAxis=!1}O.prototype={constructor:O,set:function(e){return this.color=e,this},clone:function(){return new this.constructor(this.p[0],this.p[1],this.color)},point:function(e){return this.p[0].clone().lerp(this.p[1],e)},direction:function(){return this.p[1].clone().sub(this.p[0])},signedDistance:function(e){let n=e.clone().sub(this.p[0]),o=this.direction(),a=n.dot(o)/o.dot(o),r=this.p[a>.5?1:0].clone().sub(e),t=r.length();if(a>0&&a<1){let e=x(o,!1,!1).dot(n);if(Math.abs(e)<t){let n=new w;return n.set(e,0),[n,a]}}let i=2*(M(n,o)>0?1:0)-1,l=new w;return l.set(i*t,Math.abs(o.normalize().dot(r.normalize(r)))),[l,a]},distanceToPseudoDistance:function(e,n,o){let a,r,t;if(o<0){r=this.direction().normalize();let o=n.clone().sub(this.p[0]);t=o.dot(r),t<0&&(a=M(o,r),Math.abs(a)<=Math.abs(e.distance)&&(e.distance=a,e.dot=0))}else if(o>1){r=this.direction().normalize();let o=n.clone().sub(this.p[1]);t=o.dot(r),t>0&&(a=M(o,r),Math.abs(a)<=Math.abs(e.distance)&&(e.distance=a,e.dot=0))}},moveStartPoint:function(e){this.p[0].copy(e)},moveEndPoint:function(e){this.p[1].copy(e)},splitInThirds:function(e,n,o){let a=this.point(1/3),r=this.point(2/3);new O(this.p[0],a,this.color),new O(a,r,this.color),new O(r,this.p[1],this.color)}},D.prototype={constructor:D,addEdge:function(e){this.edges.push(e)},winding:function(){if(0===this.edges.length)return 0;let e,n,o,a,r=0;if(1==this.edges.length)e=new THREE.Vector2,n=new THREE.Vector2,o=new THREE.Vector2,e.copy(this.edges[0].point(0)),n.copy(this.edges[0].point(1/3)),o.copy(this.edges[0].point(2/3)),r+=U(e,n),r+=U(n,o),r+=U(o,e);else if(2==this.edges.length)e=new THREE.Vector2,n=new THREE.Vector2,o=new THREE.Vector2,a=new THREE.Vector2,e.copy(this.edges[0].point(0)),n.copy(this.edges[0].point(.5)),o.copy(this.edges[1].point(0)),a.copy(this.edges[1].point(.5)),r+=U(e,n),r+=U(n,o),r+=U(o,a),r+=U(a,e);else{let e=new THREE.Vector2,n=new THREE.Vector2;e=this.edges[this.edges.length-1].point(0);for(let o=0;o<this.edges.length;o++)n=this.edges[o].point(0),r+=U(e,n),e=n}return(t=r)>0?1:t<0?-1:0;var t}},C.prototype={constructor:C,clear:function(){this.nearEdge=null,this.nearParam=0},copy:function(e){this.minDistance.copy(e.minDistance),this.nearEdge=e.nearEdge,this.nearParam=e.nearParam}},B.prototype={constructor:B,addContour:function(e){this.contours.push(e)},addBlankContour:function(){let e=new D;return this.contours.push(e),e},initialize:function(){for(let e=0;e<this.contours.length;++e){let n=this.contours[e];this.windings.push(n.winding())}},edgeColoringSimple:function(e,n){let o=Math.sin(e);for(let e=0;e<this.contours.length;++e){let a=this.contours[e],r=[];if(a.edges.length>0){let e=a.edges[a.edges.length-1].direction(1);for(let n=0;n<a.edges.length;++n){let t=a.edges[n];V(e.normalize(),t.direction(0).normalize(),o)&&r.push(n),e=t.direction(1)}}if(0===r.length)for(let e=0;e<a.edges.length;++e)a.edges[e].color=L;else if(1==r.length){let e=[L,L],o=z(e[0],n);e[0]=o[0],n=o[1],e[2]=e[0],o=z(e[0],n),e[0]=o[0],n=o[1];let t=r[0];if(a.edges.length>=3){let n=a.edges.length;for(let o=0;o<n;++o)a.edges[(t+o)%n].color=e[Math.floor(2.875*o/(n-1)+.0625)]}else if(a.edges.length>=1){let n=[];a.edges[0].splitInThirds(n[0+3*t],n[1+3*t],n[2+3*t]),a.edges.length>=2?(a.edges[1].splitInThirds(n[3-3*t],n[4-3*t],n[5-3*t]),n[0].color=n[1].color=e[0],n[2].color=n[3].color=e[1],n[4].color=n[5].color=e[2]):(n[0].color=e[0],n[1].color=e[1],n[2].color=e[2]),a.edges.clear();for(let e=0;e<n.length;++e)a.edges.push(n[e])}}else{let e=r.length,o=0,t=r[0],i=a.edges.length,l=L,s=z(l,n);l=s[0],n=s[1];let _=l;for(let d=0;d<i;++d){let f=(t+d)%i;o+1<e&&r[o+1]==f&&(++o,s=F(l,n,(o===e-1?1:0)*_),l=s[0],n=s[1]),a.edges[f].color=l}}}},calculateMSDFValue:function(e){let n=this.contours.length,o=[],a=new C,r=new C,t=new C,i=Math.abs(R),l=-R,s=R,_=0,d=new C,f=new C,u=new C;for(let n=0;n<this.contours.length;++n){o[n]={r:R,g:R,b:R,med:R};let c=this.contours[n];d.clear(),f.clear(),u.clear();for(let n=0;n<c.edges.length;++n){let o=c.edges[n],a=o.signedDistance(e),r=a[0],t=a[1];(o.color&S)>0&&r.lessThan(d.minDistance)&&(d.minDistance.copy(r),d.nearEdge=o,d.nearParam=t),(o.color&b)>0&&r.lessThan(f.minDistance)&&(f.minDistance.copy(r),f.nearEdge=o,f.nearParam=t),(o.color&P)>0&&r.lessThan(u.minDistance)&&(u.minDistance.copy(r),u.nearEdge=o,u.nearParam=t)}d.minDistance.lessThan(a.minDistance)&&a.copy(d),f.minDistance.lessThan(r.minDistance)&&r.copy(f),u.minDistance.lessThan(t.minDistance)&&t.copy(u);let p=Math.abs(G(d.minDistance.distance,f.minDistance.distance,u.minDistance.distance));p<i&&(i=p,_=-this.windings[n]),d.nearEdge&&d.nearEdge.distanceToPseudoDistance(d.minDistance,e,d.nearParam),f.nearEdge&&f.nearEdge.distanceToPseudoDistance(f.minDistance,e,f.nearParam),u.nearEdge&&u.nearEdge.distanceToPseudoDistance(u.minDistance,e,u.nearParam),p=G(d.minDistance.distance,f.minDistance.distance,u.minDistance.distance),o[n].r=d.minDistance.distance,o[n].g=f.minDistance.distance,o[n].b=u.minDistance.distance,o[n].med=p,this.windings[n]>0&&p>=0&&Math.abs(p)<Math.abs(s)&&(s=p),this.windings[n]<0&&p<=0&&Math.abs(p)<Math.abs(l)&&(l=p)}a.nearEdge&&a.nearEdge.distanceToPseudoDistance(a.minDistance,e,a.nearParam),r.nearEdge&&r.nearEdge.distanceToPseudoDistance(r.minDistance,e,r.nearParam),t.nearEdge&&t.nearEdge.distanceToPseudoDistance(t.minDistance,e,t.nearParam);let c={r:R,g:R,b:R,med:R};if(s>=0&&Math.abs(s)<=Math.abs(l)){c.med=R,_=1;for(let e=0;e<n;++e)this.windings[e]>0&&o[e].med>c.med&&Math.abs(o[e].med)<Math.abs(l)&&(c=o[e])}else if(l<=0&&Math.abs(l)<=Math.abs(s)){c.med=-R,_=-1;for(let e=0;e<n;++e)this.windings[e]<0&&o[e].med<c.med&&Math.abs(o[e].med)<Math.abs(s)&&(c=o[e])}for(let e=0;e<n;++e)this.windings[e]!=_&&Math.abs(o[e].med)<Math.abs(c.med)&&(c=o[e]);return G(a.minDistance.distance,r.minDistance.distance,t.minDistance.distance)==c.med&&(c.r=a.minDistance.distance,c.g=r.minDistance.distance,c.b=t.minDistance.distance),new THREE.Vector3(c.r,c.g,c.b)},minSameColoredEdgeDistance:function(){let e=[1e10,1e10,1e10];for(let n=0;n<this.contours.length;++n){let o=this.contours[n];for(let n=0;n<o.edges.length;++n){let a=o.edges[n];for(let r=0;r+1<n;++r){let n=o.edges[r];if(a.color==n.color){let o=Math.min(Math.min(q(a.point(0),n),q(a.point(1),n)),Math.min(q(n.point(0),a),q(n.point(1),a))),r=a.color-I;e[r]=Math.min(e[r],o)}}}}return Math.min(Math.min(e[0],e[1]),e[2])}};const{parseMaterialGeneric:W,parseMaterialColor:Y,parseMaterialScalar:X,SRGBToLinear:k}=Autodesk.Viewing.Private.MaterialConverterCommon;var j,Q,Z={MilliMeter:1e3,mm:1e3,8206:1e3,DeciMeter:10,dm:10,8204:10,CentiMeter:100,cm:100,8205:100,Meter:1,m:1,8193:1,KiloMeter:.001,km:.001,8201:.001,Inch:39.37008,in:39.37008,8214:39.37008,Foot:3.28084,ft:3.28084,8215:3.28084,Mile:62137e-8,mi:62137e-8,8225:62137e-8,Yard:1.09361,yard:1.09361,8221:1.09361};function K(e,n,o,a){if(!e||!e.scalars)return a;var r=e.scalars[n];return r?function(e,n,o){var a=Z[o];a||(a=1,console.warn("Unsupported unit: "+o));var r=Z[n];return r||(r=1,console.warn("Unsupported unit: "+n)),e*a/r}(r.values[0],r.units,o):a}function J(e,n,o,a){if(!e||!e[n])return a;var r=e[n][o];return r&&r.connections?r.connections[0]:a}function $(e,n){var o=K(e,"texture_RealWorldOffsetX",n,0),a=K(e,"texture_RealWorldOffsetY",n,0),r=W(e,"scalars","texture_UOffset",0),t=W(e,"scalars","texture_VOffset",0),i=1,l=1;null!=W(e,"scalars","texture_RealWorldScale")?i=l=K(e,"texture_RealWorldScale",n,1):(i=K(e,"texture_RealWorldScaleX",n,1),l=K(e,"texture_RealWorldScaleY",n,1)),i=0===i?1:i,l=0===l?1:l;var s=W(e,"scalars","texture_UScale",1),_=W(e,"scalars","texture_VScale",1),d=W(e,"scalars","texture_WAngle",0);d*=Math.PI/180;var f=Math.cos(d),u=Math.sin(d),c=s/i,p=_/l;return{elements:[f*c,u*c,0,-u*p,f*p,0,-f*c*o+u*p*a+r,-u*c*o-f*p*a+t,1]}}function ee(e){var n=Q;return Q=e,n}function ne(e){e&&(e.permutation.dispose(),e.gradient.dispose(),e.perm2D.dispose(),e.permGrad.dispose())}function oe(e,n,o){e[o+"_enable"]=W(n,"booleans",o+"_enable",0);var a=function(e,n,o){var a={bands:0,weights:new THREE.Vector4(1,1,1,1),frequencies:new THREE.Vector4(1,1,1,1)};if(!e||!e[n])return a;var r=e[n][o];if(!(r&&r.values&&r.values instanceof Array))return a;var t=r.values;a.bands=t.length/2;for(var i=0;i<a.bands;++i)a.frequencies.setComponent(i,1/t[2*i]),a.weights.setComponent(i,t[2*i+1]);return a}(n,"scalars",o+"_prof");e[o+"_bands"]=a.bands,e[o+"_weights"]=a.weights,e[o+"_frequencies"]=a.frequencies}function ae(e,n,o,a){a=a||e.userassets;var r=e.materials,t=r[a];t&&("TilingPattern"===t.definition&&(t=r[t.properties.references.grout_material.connections[0]]));var i,l,s=t.properties;if(o){if(!o.isPrismMaterial)return null;o.needsUpdate=!0}else o=new T;o.proteinMat=e,o.proteinCategories=t.categories,o.packedNormals=!0,o.tag=t.tag,o.prismType=t.definition,void 0===o.prismType&&(o.prismType=""),void 0!==e.IsSingleSided&&!1===e.IsSingleSided&&(o.side=THREE.DoubleSide);var _=o.mapList;switch(o.transparent=!1,o.envExponentMin=1,o.envExponentMax=512,o.envExponentCount=10,o.surface_albedo=k(Y(s,"surface_albedo",new THREE.Color(1,0,0))),_.surface_albedo_map=J(s,"colors","surface_albedo",null),o.surface_anisotropy=W(s,"scalars","surface_anisotropy",0),_.surface_anisotropy_map=J(s,"scalars","surface_anisotropy",null),o.surface_rotation=W(s,"scalars","surface_rotation",0),_.surface_rotation_map=J(s,"scalars","surface_rotation",null),o.surface_roughness=W(s,"scalars","surface_roughness",0),_.surface_roughness_map=J(s,"scalars","surface_roughness",null),_.surface_cutout_map=J(s,"textures","surface_cutout",null),_.surface_normal_map=J(s,"textures","surface_normal",null),null!=_.surface_cutout_map&&(o.side=THREE.DoubleSide,o.transparent=!0),o.prismType){case"PrismOpaque":o.opaque_albedo=k(Y(s,"opaque_albedo",new THREE.Color(1,0,0))),_.opaque_albedo_map=J(s,"colors","opaque_albedo",null),o.opaque_luminance_modifier=k(Y(s,"opaque_luminance_modifier",new THREE.Color(0,0,0))),_.opaque_luminance_modifier_map=J(s,"colors","opaque_luminance_modifier",null),o.opaque_f0=W(s,"scalars","opaque_f0",0),_.opaque_f0_map=J(s,"scalars","opaque_f0",null),o.opaque_luminance=W(s,"scalars","opaque_luminance",0);break;case"PrismMetal":o.metal_f0=k(Y(s,"metal_f0",new THREE.Color(1,0,0))),_.metal_f0_map=J(s,"colors","metal_f0",null);break;case"PrismLayered":o.layered_bottom_f0=k(Y(s,"layered_bottom_f0",new THREE.Color(1,1,1))),_.layered_bottom_f0_map=J(s,"colors","layered_bottom_f0",null),o.layered_diffuse=k(Y(s,"layered_diffuse",new THREE.Color(1,0,0))),_.layered_diffuse_map=J(s,"colors","layered_diffuse",null),o.layered_anisotropy=W(s,"scalars","layered_anisotropy",0),_.layered_anisotropy_map=J(s,"scalars","layered_anisotropy",null),o.layered_f0=W(s,"scalars","layered_f0",0),_.layered_f0_map=J(s,"scalars","layered_f0",null),o.layered_fraction=W(s,"scalars","layered_fraction",0),_.layered_fraction_map=J(s,"scalars","layered_fraction",null),o.layered_rotation=W(s,"scalars","layered_rotation",0),_.layered_rotation_map=J(s,"scalars","layered_rotation",null),o.layered_roughness=W(s,"scalars","layered_roughness",0),_.layered_roughness_map=J(s,"scalars","layered_roughness",null),_.layered_normal_map=J(s,"textures","layered_normal",null);break;case"PrismTransparent":o.transparent_color=k(Y(s,"transparent_color",new THREE.Color(1,0,0))),o.transparent_distance=W(s,"scalars","transparent_distance",0),o.transparent_ior=W(s,"scalars","transparent_ior",0),o.transparent=!0;break;case"PrismGlazing":o.glazing_f0=k(Y(s,"glazing_f0",new THREE.Color(1,1,1))),_.glazing_f0_map=J(s,"colors","glazing_f0",null),o.glazing_transmission_color=k(Y(s,"glazing_transmission_color",new THREE.Color(1,1,1))),_.glazing_transmission_color_map=J(s,"colors","glazing_transmission_color",null),o.glazing_transmission_roughness=X(s,"glazing_transmission_roughness",0),_.glazing_transmission_roughness_map=J(s,"scalars","glazing_transmission_roughness",null),o.side=W(s,"booleans","glazing_backface_culling",!1)?THREE.FrontSide:THREE.DoubleSide,o.transparent=!0;break;case"PrismWood":oe(o,s,"wood_fiber_cosine"),oe(o,s,"wood_fiber_perlin"),o.wood_fiber_perlin_scale_z=W(s,"scalars","wood_fiber_perlin_scale_z",0),oe(o,s,"wood_growth_perlin"),o.wood_latewood_ratio=W(s,"scalars","wood_latewood_ratio",0),o.wood_earlywood_sharpness=W(s,"scalars","wood_earlywood_sharpness",0),o.wood_latewood_sharpness=W(s,"scalars","wood_latewood_sharpness",0),o.wood_ring_thickness=W(s,"scalars","wood_ring_thickness",0),oe(o,s,"wood_earlycolor_perlin"),o.wood_early_color=k(Y(s,"wood_early_color",new THREE.Color(1,0,0))),o.wood_use_manual_late_color=W(s,"booleans","wood_use_manual_late_color",0),o.wood_manual_late_color=k(Y(s,"wood_manual_late_color",new THREE.Color(1,0,0))),oe(o,s,"wood_latecolor_perlin"),o.wood_late_color_power=W(s,"scalars","wood_late_color_power",0),oe(o,s,"wood_diffuse_perlin"),o.wood_diffuse_perlin_scale_z=W(s,"scalars","wood_diffuse_perlin_scale_z",0),o.wood_use_pores=W(s,"booleans","wood_use_pores",0),o.wood_pore_type=W(s,"choicelists","wood_pore_type",0),o.wood_pore_radius=W(s,"scalars","wood_pore_radius",0),o.wood_pore_cell_dim=W(s,"scalars","wood_pore_cell_dim",0),o.wood_pore_color_power=W(s,"scalars","wood_pore_color_power",0),o.wood_pore_depth=W(s,"scalars","wood_pore_depth",0),o.wood_use_rays=W(s,"booleans","wood_use_rays",0),o.wood_ray_color_power=W(s,"scalars","wood_ray_color_power",0),o.wood_ray_seg_length_z=W(s,"scalars","wood_ray_seg_length_z",0),o.wood_ray_num_slices=W(s,"integers","wood_ray_num_slices",0),o.wood_ray_ellipse_z2x=W(s,"scalars","wood_ray_ellipse_z2x",0),o.wood_ray_ellipse_radius_x=W(s,"scalars","wood_ray_ellipse_radius_x",0),o.wood_use_latewood_bump=W(s,"booleans","wood_use_latewood_bump",0),o.wood_latewood_bump_depth=W(s,"scalars","wood_latewood_bump_depth",0),o.wood_use_groove_roughness=W(s,"booleans","wood_use_groove_roughness",0),o.wood_groove_roughness=W(s,"scalars","wood_groove_roughness",0),o.wood_diffuse_lobe_weight=W(s,"scalars","wood_diffuse_lobe_weight",0),o.wood_curly_distortion_enable=W(s,"booleans","wood_curly_distortion_enable",0),o.wood_curly_distortion_scale=W(s,"scalars","wood_curly_distortion_scale",0),_.wood_curly_distortion_map=J(s,"scalars","wood_curly_distortion_map",null),Q||function(){var e=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],n=new Uint8Array(e),o=new THREE.DataTexture(n,256,1,THREE.LuminanceFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.RepeatWrapping,THREE.RepeatWrapping,THREE.NearestFilter,THREE.NearestFilter,0);o.generateMipmaps=!1,o.flipY=!1,o.needsUpdate=!0;var a=new Uint8Array([225,39,122,231,29,173,15,159,75,88,233,19,179,79,72,94,54,73,151,161,171,113,221,144,127,83,168,19,88,122,62,225,109,128,246,247,172,101,61,139,211,168,64,210,224,82,87,97,119,250,201,44,242,239,154,99,126,13,44,70,246,170,100,52,135,28,187,22,207,119,199,1,235,187,55,131,190,124,222,249,236,53,225,231,71,30,173,185,153,47,79,133,225,10,140,62,17,99,100,29,137,95,142,244,76,5,83,124,38,216,253,195,44,210,148,185,188,39,78,195,132,30,60,73,92,223,133,80,230,56,118,207,79,15,251,211,111,21,79,23,240,146,150,207,3,61,103,27,148,6,31,127,235,58,173,244,116,81,34,120,192,213,188,226,97,23,16,161,106,80,242,148,35,37,91,117,51,216,97,193,126,222,39,38,133,217,215,23,237,57,205,42,222,165,126,133,33,8,227,154,27,18,56,11,192,120,80,92,236,38,210,207,128,31,135,39,123,5,49,127,107,200,34,14,153,239,134,19,248,162,58,201,159,198,243,158,72,5,138,184,222,200,34,141,233,40,195,238,191,122,171,32,66,254,229,197]),r=new THREE.DataTexture(a,256,1,THREE.LuminanceFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.RepeatWrapping,THREE.RepeatWrapping,THREE.NearestFilter,THREE.NearestFilter,0);r.generateMipmaps=!1,r.flipY=!1,r.needsUpdate=!0;for(var t,i,l,s,_,d,f,u,c=function(n){return e[n%256]},p=new Array(262144),m=0;m<256;++m)for(u=0;u<256;++u)t=c(u)+m,i=c(t),l=c(t+1),s=c(u+1)+m,_=c(s),d=c(s+1),p[f=4*(256*m+u)]=i,p[f+1]=l,p[f+2]=_,p[f+3]=d;var v=new Uint8Array(p),g=new THREE.DataTexture(v,256,256,THREE.RGBAFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.RepeatWrapping,THREE.RepeatWrapping,THREE.NearestFilter,THREE.NearestFilter,0);g.generateMipmaps=!1,g.flipY=!1,g.needsUpdate=!0;var E=[1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1,1,1,0,0,-1,1,-1,1,0,0,-1,-1],y=new Array(1024);for(u=0;u<256;++u){var h=e[u]%16;y[4*u]=127*E[3*h]+128,y[4*u+1]=127*E[3*h+1]+128,y[4*u+2]=127*E[3*h+2]+128,y[4*u+3]=0}var T=new Uint8Array(y),R=new THREE.DataTexture(T,256,1,THREE.RGBAFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.RepeatWrapping,THREE.RepeatWrapping,THREE.NearestFilter,THREE.NearestFilter,0);R.generateMipmaps=!1,R.flipY=!1,R.needsUpdate=!0,Q={permutation:o,gradient:r,perm2D:g,permGrad:R}}(),o.uniforms.permutationMap.value=Q.permutation,o.uniforms.gradientMap.value=Q.gradient,o.uniforms.perm2DMap.value=Q.perm2D,o.uniforms.permGradMap.value=Q.permGrad,o.uniformsNeedUpdate=!0;break;default:console.warn("Unknown prism type: "+o.prismType)}for(var d in o.enableImportantSampling&&(o.surface_anisotropy||o.surface_rotation||o.layered_anisotropy||o.layered_rotation)&&(j||function(){var e=new Uint8Array([0,128,64,191,32,160,96,223,16,143,80,207,48,175,112,239,8,135,72,199,40,167,103,231,25,151,88,215,56,183,120,250]),n=new THREE.DataTexture(e,32,1,THREE.LuminanceFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.RepeatWrapping,THREE.RepeatWrapping,THREE.NearestFilter,THREE.NearestFilter,0);n.generateMipmaps=!1,n.flipY=!1,n.needsUpdate=!0;for(var o,a,r=function(e,n){return Math.atan2(e*n,Math.sqrt(e*e+n*n+1))},t=new Uint8Array(16384),i=1/128,l=0;l<128;++l)for(var s=0;s<128;++s){o=l/128*2-1,a=s/128*2-1;var _=(o=Math.min(Math.max(-.9921875,o),.9921875))-i,d=o+i,f=(a=Math.min(Math.max(-.9921875,a),.9921875))-i,u=a+i,c=r(d,u)-r(_,u)-r(d,f)+r(_,f);t[128*l+s]=1e6*c}var p=new THREE.DataTexture(t,128,128,THREE.LuminanceFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.RepeatWrapping,THREE.RepeatWrapping,THREE.NearestFilter,THREE.NearestFilter,0);p.generateMipmaps=!1,p.flipY=!1,p.needsUpdate=!0,j={randomNum:n,solidAngle:p}}(),o.uniforms.importantSamplingRandomMap.value=j.randomNum,o.uniforms.importantSamplingSolidAngleMap.value=j.solidAngle),o.defines={},o.textureMaps={},_)if(_[d]){var f=r[_[d]];l=f.properties,f.matrix=he(f,!0,n);var u="BumpMap"==f.definition?"bumpmap_Bitmap":"unifiedbitmap_Bitmap",c=l.uris[u].values,p=c[0];p&&(i={mapName:d,uri:p,uriPointer:c,textureObj:f,isPrism:!0},o.textureMaps[i.mapName]=i,o.defines["USE_"+d.toUpperCase()]="")}return o.defines[o.prismType.toUpperCase()]="","PrismWood"==o.prismType&&o.enable3DWoodBump&&(o.defines.PRISMWOODBUMP=""),o.enableImportantSampling&&(o.defines.ENABLEIMPORTANTSAMPLING=""),o}function re(e){let n=Math.sin(e),o=Math.cos(e),a=new THREE.Matrix4;return a.set(o,-n,0,0,n,o,0,0,0,0,1,0,0,0,0,1),a}function te(e,n){if(0===n.randomOffsetMode)return;e.tilingRandomAxisS=new THREE.Vector2,e.tilingRandomAxisT=new THREE.Vector2,e.tilingRandomAlignmentOffset=new THREE.Vector2;let o=e.tilingRandomAxisS;o.set(1,0);let a=e.tilingRandomAxisT;a.set(0,1);let r=e.tilingRandomAlignmentOffset;r.set(0,0);let t=new THREE.Matrix4,i=new THREE.Matrix4,l=function(e){let n=["opaque_albedo_map","opaque_f0_map","layered_diffuse_map","layered_bottom_f0_map","surface_roughness_map","surface_normal_map","surface_albedo_map","surface_anisotropy_map","surface_cutout_map"];if(void 0!==e.textureMaps)for(let o=0;o<n.length;++o)if(void 0!==e.textureMaps[n[o]]&&void 0!==e.textureMaps[n[o]].textureObj&&void 0!==e.textureMaps[n[o]].textureObj.matrix){let a=e.textureMaps[n[o]].textureObj.matrix.elements,r=new THREE.Matrix4;return r.set(a[0],a[1],0,a[2],a[3],a[4],0,a[5],0,0,1,0,a[6],a[7],0,a[8]),r}return new THREE.Matrix4}(e);{let e=function(e,n){let o=new THREE.Matrix4;o.makeScale(n.x,n.y,1);let a=new THREE.Matrix4;return a.makeTranslation(-e.x,-e.y,0),o.multiply(a),o}(new THREE.Vector2(0,1),new THREE.Vector2(1,-1));e.multiply(l),l.copy(e)}t.multiplyMatrices(l,e.tilingUVTransform),i.copy(t).invert();let s=new THREE.Vector4(1,0,0,0).applyMatrix4(i);o.set(s.x,s.y),s=new THREE.Vector4(0,1,0,0).applyMatrix4(i),a.set(s.x,s.y);let _=new THREE.Vector2,d=new THREE.Box2,f=n.alignedVertices;for(let e=0;e<f.length;e++)s.set(f[e].x,f[e].y,0,1),s.applyMatrix4(t),_.set(s.x,s.y),d.expandByPoint(_);s.set(-d.min.x,-d.min.y,0,0),s.applyMatrix4(i),r.set(s.x,s.y);let u=d.getSize(new THREE.Vector3),c=1===n.randomOffsetMode?new THREE.Vector2(u.x,u.y):new THREE.Vector2(0,0);o.multiplyScalar(1-c.x),a.multiplyScalar(1-c.y)}function ie(e,n,o,a,r){var t=n.properties;let i,l,s={overallTransform:new THREE.Matrix4,insetSize:0,hasRoundCorner:!1,cornerRoundingAngle:0,cornerRoundingSize:0,offsetVectorA:new THREE.Vector2,offsetVectorB:new THREE.Vector2},_=new THREE.Vector2(K(t,"scale_factor_x",r,1),K(t,"scale_factor_y",r,1)),d=K(t,"overall_offset_vector_x",r,1),f=K(t,"overall_offset_vector_y",r,1),u=X(t,"overall_rotation_angle",0)*Math.PI/180;!function(e,n,o,a){e.scale(a);let r=new THREE.Vector3(Math.sin(o.x),Math.sin(o.y),Math.sin(o.z)),t=new THREE.Vector3(Math.cos(o.x),Math.cos(o.y),Math.cos(o.z)),i=r.y*r.x,l=r.y*t.x,s=new THREE.Matrix4;s.set(t.z*t.y,r.z*t.y,-r.y,0,t.z*i-r.z*t.x,r.z*i+t.z*t.x,t.y*r.x,0,t.z*l+r.z*r.x,r.z*l-t.z*r.x,t.y*t.x,0,0,0,0,1),s.multiply(e),e.makeTranslation(n.x,n.y,n.z),e.multiply(s)}(s.overallTransform,new THREE.Vector3(-d,-f,0),new THREE.Vector3(0,0,-u),new THREE.Vector3(1,1,1)),s.insetSize=K(t,"inset_size",r,1),s.cornerRoundingAngle=X(t,"overall_corner_rounding_angle",0)*Math.PI/180,s.cornerRoundingSize=K(t,"overall_corner_rounding_size",r,1),s.offsetVectorA.x=X(t,"offset_vector_a_x",0)*_.x,s.offsetVectorA.y=X(t,"offset_vector_a_y",0)*_.y,s.offsetVectorB.x=X(t,"offset_vector_b_x",0)*_.x,s.offsetVectorB.y=X(t,"offset_vector_b_y",0)*_.y,s.hasRoundCorner=s.cornerRoundingAngle>0&&s.cornerRoundingSize>0;let c=[];for(i=0,l=o.length;i<l;i++){let e=o[i].properties,n={material:a[i].material,randomOffsetMode:0,rotation:0,vertices:[]};c[i]=n,n.randomOffsetMode=W(e,"choicelists","random_offset_mode",0),n.rotation=X(e,"rotation_angle",0)*Math.PI/180;let r=e.scalars.vertices.values;for(let e=0;e<r.length;e+=2)n.vertices[e/2]=new THREE.Vector2(r[e],r[e+1]);for(let e=0;e<n.vertices.length;e++)n.vertices[e].multiply(_);n.material.useRandomOffset=0!=n.randomOffsetMode}!function(e,n){let o=new THREE.Box2;o.expandByPoint(new THREE.Vector2(0,0)),o.expandByPoint(e.offsetVectorA),o.expandByPoint(e.offsetVectorB);let a,r,t=new THREE.Vector2(e.offsetVectorA.x,e.offsetVectorA.y);for(t.add(e.offsetVectorB),o.expandByPoint(t),a=0,r=n.length;a<r;a++){let o=n[a];o.material.tilingRepeatRange=[],me(e,o,o.material.tilingRepeatRange),o.bbox=new THREE.Box2;for(let e=0;e<o.vertices.length;++e)o.bbox.expandByPoint(o.vertices[e]);Ee(e,o),e.hasRoundCorner&&de(e,o),o.material.useRandomOffset&&pe(o,a),o.alignedVertices=[];for(let e=0;e<o.vertices.length;++e){let n=new THREE.Vector2(o.vertices[e].x,o.vertices[e].y);n.sub(o.bbox.min),o.alignedVertices.push(n)}o.material.tileAlignOffset=new THREE.Vector2(-o.bbox.min.x,-o.bbox.min.y)}}(s,c);let p=ve([s.offsetVectorA.clone(),s.offsetVectorB.clone()]);for(i=0,l=c.length;i<l;i++){let e=c[i],n=e.material;n.tilingOverallTransform=s.overallTransform,n.hasRoundCorner=s.hasRoundCorner,n.tilingUVTransform=re(e.rotation),n.useRandomOffset&&te(n,e),n.tile2uv=new THREE.Vector4(s.offsetVectorA.x,s.offsetVectorA.y,s.offsetVectorB.x,s.offsetVectorB.y),n.uv2tile=new THREE.Vector4(p[0].x,p[0].y,p[1].x,p[1].y)}}function le(e,n,o){let a=new THREE.Vector2(o.x,o.y).sub(n),r=new THREE.Vector2(e.x,e.y).sub(n),t=a.dot(r);if(t<=0)return r.length();let i=a.dot(a);if(t>=i){return new THREE.Vector2(e).sub(o).length()}return Math.sqrt(Math.max(r.dot(r)-t*t/i,0))}function se(e,n){let o=1e11,a=o,r=-1;for(let t=0;t<e.vertices.length;t++){let i=t==e.vertices.length-1?0:t+1;a=le(n,e.vertices[t],e.vertices[i]),a<o&&(o=a,r=t)}return[o,r]}function _e(e,n,o){let a=e.length,r=a-1,t=!1;for(let i=0;i<a;++i)(e[i].y<o&&e[r].y>=o||e[r].y<o&&e[i].y>=o)&&e[i].x+(o-e[i].y)/(e[r].y-e[i].y)*(e[r].x-e[i].x)<n&&(t=!t),r=i;return t}function de(e,n){let o=n.bbox.getSize(new THREE.Vector3),a=2*e.cornerRoundingSize*.7071/3,r=ge(Math.ceil(o.x/a)+2,128,1024),t=ge(Math.ceil(o.y/a)+2,128,1024);r-=2,t-=2,o.x<o.y?t=Math.floor(r*o.y/o.x):r=Math.floor(t*o.x/o.y),r+=2,t+=2,function(e,n){e.normalToEdges=[];let o=e.vertices.length,a=Math.cos(n),r=Math.sin(n);for(let n=0;n<o;++n){let t=n,i=n==o-1?0:n+1,l=new THREE.Vector2(e.vertices[i].x,e.vertices[i].y);l.sub(e.vertices[t]),l.normalize();let s=new THREE.Vector3(l.y*r,-l.x*r,a);e.normalToEdges.push(s)}e.cornerRoundingAngle=n}(n,e.cornerRoundingAngle);let i=new Uint8Array(r*t*4),l=new THREE.Vector2(o.x/(r-2),o.y/(t-2)),s=new THREE.Vector2,_=new THREE.Vector3,d=new THREE.Vector3(0,0,1),f=0;for(let o=0;o<t;o++){s.y=(t-o-1.5)*l.y+n.bbox.min.y;for(let o=0;o<r;o++){s.x=(o-.5)*l.x+n.bbox.min.x;let a=se(n,s),r=a[0],t=a[1];r<e.cornerRoundingSize+e.insetSize?(_e(n.vertices,s.x,s.y)||(r=-r),_.copy(n.normalToEdges[t]),_.lerp(d,(r-e.insetSize)/e.cornerRoundingSize),_.normalize(),i[f++]=255*ge(.5*(_.x+1),0,1),i[f++]=255*ge(.5*(_.y+1),0,1),i[f++]=255*ge(.5*(_.z+1),0,1),i[f++]=255):(i[f++]=127,i[f++]=127,i[f++]=255,i[f++]=255)}}n.material.TilingNormalMap=new THREE.DataTexture(i,r,t,THREE.RGBAFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.ClampToEdgeWrapping,THREE.ClampToEdgeWrapping,THREE.LinearFilter,THREE.LinearFilter),n.material.TilingNormalMap.needsUpdate=!0;let u=new THREE.Vector2(-n.bbox.min.x,-n.bbox.min.y);n.material.TilingNormalMap_texMatrix=new THREE.Matrix3,n.material.TilingNormalMap_texMatrix.set(1/o.x*(r-2)/r,0,0,0,1/o.y*(t-2)/t,0,u.x/o.x*(r-2)/r+1/r,u.y/o.y*(t-2)/t+1/t,1),n.material.TilingNormalMap_texMatrix.transpose()}function fe(e,n){return e<<n|e>>>32-n}function ue(e,n){let o,a,r;return o=a=r=3735928567+n,a+=e.y,o+=e.x,function(e,n,o){let a=4294967296;return o=((o^=n)-fe(n,14)+a)%a,o=((o^=n=((n^=e=((e^=o)-fe(o,11)+a)%a)-fe(e,25)+a)%a)-fe(n,16)+a)%a,((o^=n=((n^=e=((e^=o)-fe(o,4)+a)%a)-fe(e,14)+a)%a)-fe(n,24)+a)%a}(o,a,r)}function ce(e,n){let o=ue(e,33);n.x=(65535&o)>>>8,n.y=o>>>16>>>8}function pe(e,n){let o=512,a=512,r=new Uint8Array(1048576),t=new THREE.Vector2,i=new THREE.Vector2(107021*n,n),l=new THREE.Vector2,s=new THREE.Vector2,_=0;for(let e=0;e<a;e++){t.y=Math.floor(-(e+1-256));for(let e=0;e<o;e++)t.x=Math.floor(e-256),l.copy(t),l.add(i),ce(l,s),r[_++]=0,r[_++]=0,r[_++]=s.x,r[_++]=s.y}e.material.TilingRandomMap=new THREE.DataTexture(r,o,a,THREE.RGBAFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.RepeatWrapping,THREE.RepeatWrapping,THREE.NearestFilter,THREE.NearestFilter),e.material.TilingRandomMap.needsUpdate=!0,e.material.TilingRandomMap_texMatrix=new THREE.Matrix3,e.material.TilingRandomMap_texMatrix.set(1/o,0,0,0,1/a,0,.5,.5,1),e.material.TilingRandomMap_texMatrix.transpose()}function me(e,n,o){let a=[];a[0]=new THREE.Vector2(e.offsetVectorA.x,e.offsetVectorB.x),a[1]=new THREE.Vector2(e.offsetVectorA.y,e.offsetVectorB.y);let r=ve(a),t=new THREE.Box2,i=new THREE.Vector2;for(let e=0;e<n.vertices.length;++e)i.x=n.vertices[e].dot(r[0]),i.y=n.vertices[e].dot(r[1]),t.expandByPoint(i);o[0]=Math.floor(t.min.x-1),o[2]=Math.ceil(t.max.x),o[1]=Math.floor(t.min.y-1),o[3]=Math.ceil(t.max.y)}function ve(e){let n=e[0].x*e[1].y-e[0].y*e[1].x,o=[];return o[0]=new THREE.Vector2(e[1].y/n,-e[0].y/n),o[1]=new THREE.Vector2(-e[1].x/n,e[0].x/n),o}function ge(e,n,o){return e>o?o:e<n?n:e}function Ee(e,n){let o=new B;!function(e,n){let o=e.addBlankContour(),a=new THREE.Vector2,r=new THREE.Vector2;for(let e=0;e<n.vertices.length;++e){let t=e,i=(e+1)%n.vertices.length;a=n.vertices[t],r=n.vertices[i],o.addEdge(new O(a,r,L))}e.initialize(),e.edgeColoringSimple(3,0)}(o,n);let a=n.bbox.getSize(new THREE.Vector3),r=.7071*o.minSameColoredEdgeDistance()*.5,t=ge(Math.ceil(a.x/r)+2,16,512),i=ge(Math.ceil(a.y/r)+2,16,512),l=new Uint8Array(t*i*4),s=new THREE.Vector2(a.x/(t-2),a.y/(i-2)),_=.5/(s.x+s.y),d=new THREE.Vector2,f=new THREE.Vector3,u=0;for(let a=0;a<i;a++){d.y=(i-a-1.5)*s.y+n.bbox.min.y;for(let a=0;a<t;a++)d.x=(a-.5)*s.x+n.bbox.min.x,f=o.calculateMSDFValue(d),f=f.add(new THREE.Vector3(e.insetSize,e.insetSize,e.insetSize)),l[u++]=255*ge(f.x*_+.5,0,1),l[u++]=255*ge(f.y*_+.5,0,1),l[u++]=255*ge(f.z*_+.5,0,1),l[u++]=0}n.material.TilingMap=new THREE.DataTexture(l,t,i,THREE.RGBAFormat,THREE.UnsignedByteType,THREE.UVMapping,THREE.ClampToEdgeWrapping,THREE.ClampToEdgeWrapping,THREE.LinearFilter,THREE.LinearFilter),n.material.TilingMap.needsUpdate=!0;let c=new THREE.Vector2(-n.bbox.min.x,-n.bbox.min.y);n.material.TilingMap_texMatrix=new THREE.Matrix3,n.material.TilingMap_texMatrix.set(1/a.x*(t-2)/t,0,0,0,1/a.y*(i-2)/i,0,c.x/a.x*(t-2)/t+1/t,c.y/a.y*(i-2)/i+1/i,1),n.material.TilingMap_texMatrix.transpose()}function ye(e,n,o){var a=e.properties;n.clampS=!W(a,"booleans","texture_URepeat",!1),n.clampT=!W(a,"booleans","texture_VRepeat",!1),n.wrapS=n.clampS?THREE.ClampToEdgeWrapping:THREE.RepeatWrapping,n.wrapT=n.clampT?THREE.ClampToEdgeWrapping:THREE.RepeatWrapping,n.matrix=e.matrix||(e.matrix=$(a,o)),"UnifiedBitmap"==e.definition&&(n.invert=W(a,"booleans","unifiedbitmap_Invert",!1)),"BumpMap"==e.definition&&(n.bumpmapType=W(a,"choicelists","bumpmap_Type",0),n.bumpScale=function(e,n,o){if(0===n){var a=K(e,"bumpmap_Depth",o,0),r=1,t=1;return null!=W(e,"scalars","texture_RealWorldScale")?r=t=K(e,"texture_RealWorldScale",o,1):(r=K(e,"texture_RealWorldScaleX",o,1),t=K(e,"texture_RealWorldScaleY",o,1)),r=0===r?1:1/r,t=0===t?1:1/t,new THREE.Vector2(r*a,t*a)}var i=W(e,"scalars","bumpmap_NormalScale",1);return new THREE.Vector2(i,i)}(a,n.bumpmapType,o))}function he(e,n,o){return e.matrix||(e.matrix=$(e.properties,o)),e.matrix}function Te(e,n){for(let o in e)n[o]=e[o]}const Re=Autodesk.Viewing;Te(r,AutodeskNamespace("Autodesk.Viewing.MaterialConverterPrism")),Te(e,Re.Private),Te(n,Re.Private);class we extends Re.Extension{constructor(e,n){super(e,n)}load(){return!0}unload(){return!0}activate(){return!0}deactivate(){return!1}}Re.theExtensionManager.registerExtension("Autodesk.Viewing.MaterialConverterPrism",we)})(),Autodesk.Extensions.MaterialConverterPrism=a})();
|
|
//# sourceMappingURL=MaterialConverterPrism.min.js.map
|