app
JST Connector Studio: manufacturer 3D mate editor
Public Unreviewedby John Lauer
Interactive Babylon 9.5 studio for JST wire-to-board connectors: load a system (PH/XH/SH/GH/ZH), see the JST manufacturer housing+wire+ds2sf footprint mate in a looping animation next to the KiCad hou
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
import { i as t } from "./chunk-CrnJfeNw.js";
class a {
/**
* Creates a new instance of the OpenPBRMaterialLoadingAdapter.
* @param material - The OpenPBR material to adapt.
*/
constructor(e) {
this._diffuseTransmissionTint = t.White(), this._diffuseTransmissionTintTexture = null, this._material = e;
}
/**
* Gets the underlying material
*/
get material() {
return this._material;
}
/**
* Whether the material should be treated as unlit
*/
get isUnlit() {
return this._material.unlit;
}
/**
* Sets whether the material should be treated as unlit
*/
set isUnlit(e) {
this._material.unlit = e;
}
// ========================================
// CULLING PROPERTIES
// ========================================
/**
* Sets whether back face culling is enabled.
* @param value True to enable back face culling
*/
set backFaceCulling(e) {
this._material.backFaceCulling = e;
}
/**
* Gets whether back face culling is enabled.
* @returns True if back face culling is enabled
*/
get backFaceCulling() {
return this._material.backFaceCulling;
}
/**
* Sets whether two-sided lighting is enabled.
* @param value True to enable two-sided lighting
*/
set twoSidedLighting(e) {
this._material.twoSidedLighting = e;
}
/**
* Gets whether two-sided lighting is enabled.
* @returns True if two-sided lighting is enabled
*/
get twoSidedLighting() {
return this._material.twoSidedLighting;
}
// ========================================
// ALPHA PROPERTIES
// ========================================
/**
* Sets the alpha cutoff value for alpha testing.
* Note: OpenPBR doesn't have a direct equivalent, so this is a no-op.
* @param value The alpha cutoff threshold (ignored for OpenPBR)
*/
set alphaCutOff(e) {
}
/**
* Gets the alpha cutoff value.
* @returns Default value of 0.5 (OpenPBR doesn't support this directly)
*/
get alphaCutOff() {
return 0.5;
}
/**
* Sets whether to use alpha from the base color texture.
* Note: OpenPBR handles this differently through the baseColorTexture alpha channel.
* @param value True to use alpha from base color texture (handled automatically in OpenPBR)
*/
set useAlphaFromBaseColorTexture(e) {
this._material._useAlphaFromBaseColorTexture = e;
}
/**
* Gets whether alpha is used from the base color texture.
* @returns Always false for OpenPBR as it's handled automatically
*/
get useAlphaFromBaseColorTexture() {
return !1;
}
/**
* Gets whether the transparency is treated as alpha coverage.
*/
get transparencyAsAlphaCoverage() {
return !1;
}
/**
* Sets/Gets whether the transparency is treated as alpha coverage
*/
set transparencyAsAlphaCoverage(e) {
}
// ========================================
// BASE PARAMETERS
// ========================================
/**
* Sets the base color of the OpenPBR material.
* @param value The base color as a Color3
*/
set baseColor(e) {
this._material.baseColor = e;
}
/**
* Gets the base color of the OpenPBR material.
* @returns The base color as a Color3
*/
get baseColor() {
return this._material.baseColor;
}
/**
* Sets the base color texture of the OpenPBR material.
* @param value The base color texture or null
*/
set baseColorTexture(e) {
this._material.baseColorTexture = e;
}
/**
* Gets the base color texture of the OpenPBR material.
* @returns The base color texture or null
*/
get baseColorTexture() {
return this._material.baseColorTexture;
}
/**
* Sets the base diffuse roughness of the OpenPBR material.
* @param value The diffuse roughness value (0-1)
*/
set baseDiffuseRoughness(e) {
this._material.baseDiffuseRoughness = e;
}
/**
* Gets the base diffuse roughness of the OpenPBR material.
* @returns The diffuse roughness value (0-1)
*/
get baseDiffuseRoughness() {
return this._material.baseDiffuseRoughness;
}
/**
* Sets the base diffuse roughness texture of the OpenPBR material.
* @param value The diffuse roughness texture or null
*/
set baseDiffuseRoughnessTexture(e) {
this._material.baseDiffuseRoughnessTexture = e;
}
/**
* Gets the base diffuse roughness texture of the OpenPBR material.
* @returns The diffuse roughness texture or null
*/
get baseDiffuseRoughnessTexture() {
return this._material.baseDiffuseRoughnessTexture;
}
/**
* Sets the base metalness value of the OpenPBR material.
* @param value The metalness value (0-1)
*/
set baseMetalness(e) {
this._material.baseMetalness = e;
}
/**
* Gets the base metalness value of the OpenPBR material.
* @returns The metalness value (0-1)
*/
get baseMetalness() {
return this._material.baseMetalness;
}
/**
* Sets the base metalness texture of the OpenPBR material.
* @param value The metalness texture or null
*/
set baseMetalnessTexture(e) {
this._material.baseMetalnessTexture = e;
}
/**
* Gets the base metalness texture of the OpenPBR material.
* @returns The metalness texture or null
*/
get baseMetalnessTexture() {
return this._material.baseMetalnessTexture;
}
/**
* Sets whether to use roughness from the metallic texture's green channel.
* @param value True to use green channel for roughness
*/
set useRoughnessFromMetallicTextureGreen(e) {
this._material._useRoughnessFromMetallicTextureGreen = e;
}
/**
* Sets whether to use metalness from the metallic texture's blue channel.
* @param value True to use blue channel for metalness
*/
set useMetallicFromMetallicTextureBlue(e) {
this._material._useMetallicFromMetallicTextureBlue = e;
}
// ========================================
// SPECULAR PARAMETERS
// ========================================
/**
* Configures specular properties for OpenPBR material.
* @param _enableEdgeColor Whether to enable edge color support (ignored for OpenPBR)
*/
enableSpecularEdgeColor(e = !1) {
}
/**
* Sets the specular weight of the OpenPBR material.
* @param value The specular weight value (0-1)
*/
set specularWeight(e) {
this._material.specularWeight = e;
}
/**
* Gets the specular weight of the OpenPBR material.
* @returns The specular weight value (0-1)
*/
get specularWeight() {
return this._material.specularWeight;
}
/**
* Sets the specular weight texture of the OpenPBR material.
* If the same texture is used for specular color, optimizes by using alpha channel for weight.
* @param value The specular weight texture or null
*/
set specularWeightTexture(e) {
this._material.specularColorTexture === e ? (this._material.specularWeightTexture = null, this._material._useSpecularWeightFromSpecularColorTexture = !0, this._material._useSpecularWeightFromAlpha = !0) : this._material.specularWeightTexture = e;
}
/**
* Gets the specular weight texture of the OpenPBR material.
* @returns The specular weight texture or null
*/
get specularWeightTexture() {
return this._material.specularWeightTexture;
}
/**
* Sets the specular color of the OpenPBR material.
* @param value The specular color as a Color3
*/
set specularColor(e) {
this._material.specularColor = e;
}
/**
* Gets the specular color of the OpenPBR material.
* @returns The specular color as a Color3
*/
get specularColor() {
return this._material.specularColor;
}
/**
* Sets the specular color texture of the OpenPBR material.
* If the same texture is used for specular weight, optimizes by using alpha channel for weight.
* @param value The specular color texture or null
*/
set specularColorTexture(e) {
this._material.specularColorTexture = e, this._material.specularWeightTexture === this._material.specularColorTexture && (this._material.specularWeightTexture = null, this._material._useSpecularWeightFromSpecularColorTexture = !0, this._material._useSpecularWeightFromAlpha = !0);
}
/**
* Gets the specular color texture of the OpenPBR material.
* @returns The specular color texture or null
*/
get specularColorTexture() {
return this._material.specularColorTexture;
}
/**
* Sets the specular roughness of the OpenPBR material.
* @param value The roughness value (0-1)
*/
set specularRoughness(e) {
this._material.specularRoughness = e;
}
/**
* Gets the specular roughness of the OpenPBR material.
* @returns The roughness value (0-1)
*/
get specularRoughness() {
return this._material.specularRoughness;
}
/**
* Sets the specular roughness texture of the OpenPBR material.
* @param value The roughness texture or null
*/
set specularRoughnessTexture(e) {
this._material.specularRoughnessTexture = e;
}
/**
* Gets the specular roughness texture of the OpenPBR material.
* @returns The roughness texture or null
*/
get specularRoughnessTexture() {
return this._material.specularRoughnessTexture;
}
/**
* Sets the specular index of refraction (IOR) of the OpenPBR material.
* @param value The IOR value
*/
set specularIor(e) {
this._material.specularIor = e;
}
/**
* Gets the specular index of refraction (IOR) of the OpenPBR material.
* @returns The IOR value
*/
get specularIor() {
return this._material.specularIor;
}
// ========================================
// EMISSION PARAMETERS
// ========================================
/**
* Sets the emission color of the OpenPBR material.
* @param value The emission color as a Color3
*/
set emissionColor(e) {
this._material.emissionColor = e;
}
/**
* Gets the emission color of the OpenPBR material.
* @returns The emission color as a Color3
*/
get emissionColor() {
return this._material.emissionColor;
}
/**
* Sets the emission luminance of the OpenPBR material.
* @param value The emission luminance value
*/
set emissionLuminance(e) {
this._material.emissionLuminance = e;
}
/**
* Gets the emission luminance of the OpenPBR material.
* @returns The emission luminance value
*/
get emissionLuminance() {
return this._material.emissionLuminance;
}
/**
* Sets the emission color texture of the OpenPBR material.
* @param value The emission texture or null
*/
set emissionColorTexture(e) {
this._material.emissionColorTexture = e;
}
/**
* Gets the emission color texture of the OpenPBR material.
* @returns The emission texture or null
*/
get emissionColorTexture() {
return this._material.emissionColorTexture;
}
// ========================================
// AMBIENT OCCLUSION
// ========================================
/**
* Sets the ambient occlusion texture of the OpenPBR material.
* @param value The ambient occlusion texture or null
*/
set ambientOcclusionTexture(e) {
this._material.ambientOcclusionTexture = e;
}
/**
* Gets the ambient occlusion texture of the OpenPBR material.
* @returns The ambient occlusion texture or null
*/
get ambientOcclusionTexture() {
return this._material.ambientOcclusionTexture;
}
/**
* Sets the ambient occlusion texture strength by modifying the texture's level.
* @param value The strength value (typically 0-1)
*/
set ambientOcclusionTextureStrength(e) {
const s = this._material.ambientOcclusionTexture;
s && (s.level = e);
}
/**
* Gets the ambient occlusion texture strength from the texture's level property.
* @returns The strength value, defaults to 1.0 if no texture or level is set
*/
get ambientOcclusionTextureStrength() {
return this._material.ambientOcclusionTexture?.level ?? 1;
}
// ========================================
// COAT PARAMETERS
// ========================================
/**
* Configures coat parameters for OpenPBR material.
* OpenPBR coat is already built-in, so no configuration is needed.
*/
configureCoat() {
}
/**
* Sets the coat weight of the OpenPBR material.
* @param value The coat weight value (0-1)
*/
set coatWeight(e) {
this._material.coatWeight = e;
}
/**
* Gets the coat weight of the OpenPBR material.
* @returns The coat weight value (0-1)
*/
get coatWeight() {
return this._material.coatWeight;
}
/**
* Sets the coat weight texture of the OpenPBR material.
* @param value The coat weight texture or null
*/
set coatWeightTexture(e) {
this._material.coatWeightTexture = e;
}
/**
* Gets the coat weight texture of the OpenPBR material.
* @returns The coat weight texture or null
*/
get coatWeightTexture() {
return this._material.coatWeightTexture;
}
/**
* Sets the coat color of the OpenPBR material.
* @param value The coat color as a Color3
*/
set coatColor(e) {
this._material.coatColor = e;
}
/**
* Sets the coat color texture of the OpenPBR material.
* @param value The coat color texture or null
*/
set coatColorTexture(e) {
this._material.coatColorTexture = e;
}
/**
* Sets the coat roughness of the OpenPBR material.
* @param value The coat roughness value (0-1)
*/
set coatRoughness(e) {
this._material.coatRoughness = e;
}
/**
* Gets the coat roughness of the OpenPBR material.
* @returns The coat roughness value (0-1)
*/
get coatRoughness() {
return this._material.coatRoughness;
}
/**
* Sets the coat roughness texture of the OpenPBR material.
* @param value The coat roughness texture or null
*/
set coatRoughnessTexture(e) {
this._material.coatRoughnessTexture = e, e && (this._material._useCoatRoughnessFromGreenChannel = !0);
}
/**
* Gets the coat roughness texture of the OpenPBR material.
* @returns The coat roughness texture or null
*/
get coatRoughnessTexture() {
return this._material.coatRoughnessTexture;
}
/**
* Sets the coat index of refraction (IOR) of the OpenPBR material.
*/
set coatIor(e) {
this._material.coatIor = e;
}
/**
* Sets the coat darkening value of the OpenPBR material.
* @param value The coat darkening value
*/
set coatDarkening(e) {
this._material.coatDarkening = e;
}
/**
* Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)
*/
set coatDarkeningTexture(e) {
this._material.coatDarkeningTexture = e;
}
/**
* Sets the coat roughness anisotropy.
* TODO: Implementation pending OpenPBR coat anisotropy feature availability.
* @param value The coat anisotropy intensity value
*/
set coatRoughnessAnisotropy(e) {
this._material.coatRoughnessAnisotropy = e;
}
/**
* Gets the coat roughness anisotropy.
* TODO: Implementation pending OpenPBR coat anisotropy feature availability.
* @returns Currently returns 0 as coat anisotropy is not yet available
*/
get coatRoughnessAnisotropy() {
return this._material.coatRoughnessAnisotropy;
}
/**
* Sets the coat tangent angle for anisotropy.
* TODO: Implementation pending OpenPBR coat anisotropy feature availability.
* @param value The coat anisotropy rotation angle in radians
*/
set geometryCoatTangentAngle(e) {
this._material.geometryCoatTangentAngle = e;
}
/**
* Sets the coat tangent texture for anisotropy.
* TODO: Implementation pending OpenPBR coat anisotropy feature availability.
* @param value The coat anisotropy texture or null
*/
set geometryCoatTangentTexture(e) {
this._material.geometryCoatTangentTexture = e, e && (this._material._useCoatRoughnessAnisotropyFromTangentTexture = !0);
}
/**
* Gets the coat tangent texture for anisotropy.
* TODO: Implementation pending OpenPBR coat anisotropy feature availability.
* @returns Currently returns null as coat anisotropy is not yet available
*/
get geometryCoatTangentTexture() {
return this._material.geometryCoatTangentTexture;
}
// ========================================
// TRANSMISSION LAYER
// ========================================
/**
* Configures transmission for OpenPBR material.
*/
configureTransmission() {
this._material.geometryThinWalled = 1, this._material.transmissionDepth = 0;
}
/**
* Sets the transmission weight.
* @param value The transmission weight value (0-1)
*/
set transmissionWeight(e) {
this._material.transmissionWeight = e;
}
/**
* Sets the transmission weight texture.
* @param value The transmission weight texture or null
*/
set transmissionWeightTexture(e) {
this._material.transmissionWeightTexture = e;
}
/**
* Gets the transmission weight.
* @returns Currently returns 0 as transmission is not yet available
*/
get transmissionWeight() {
return this._material.transmissionWeight;
}
/**
* Sets the transmission scatter coefficient.
* @param value The scatter coefficient as a Vector3
*/
set transmissionScatter(e) {
this._material.transmissionScatter = e;
}
/**
* Gets the transmission scatter coefficient.
* @returns The scatter coefficient as a Vector3
*/
get transmissionScatter() {
return this._material.transmissionScatter;
}
/**
* Sets the transmission scatter texture.
* @param value The transmission scatter texture or null
*/
set transmissionScatterTexture(e) {
this._material.transmissionScatterTexture = e;
}
/**
* Gets the transmission scatter texture.
* @returns The transmission scatter texture or null
*/
get transmissionScatterTexture() {
return this._material.transmissionScatterTexture;
}
/**
* Sets the transmission scattering anisotropy.
* @param value The anisotropy intensity value (-1 to 1)
*/
set transmissionScatterAnisotropy(e) {
this._material.transmissionScatterAnisotropy = e;
}
/**
* Sets the transmission dispersion Abbe number.
* @param value The Abbe number value
*/
set transmissionDispersionAbbeNumber(e) {
this._material.transmissionDispersionAbbeNumber = e;
}
/**
* Sets the transmission dispersion scale.
* @param value The dispersion scale value
*/
set transmissionDispersionScale(e) {
this._material.transmissionDispersionScale = e;
}
/**
* Sets the attenuation distance.
* @param value The attenuation distance value
*/
set transmissionDepth(e) {
e !== Number.MAX_VALUE || this._material.transmissionDepth !== 0 ? this._material.transmissionDepth = e : this._material.transmissionDepth = 0;
}
/**
* Gets the attenuation distance.
*/
get transmissionDepth() {
return this._material.transmissionDepth;
}
/**
* Sets the attenuation color.
* @param value The attenuation color as a Color3
*/
set transmissionColor(e) {
e.equals(t.White()) || (this._material.transmissionColor = e);
}
/**
* Gets the attenuation color.
*/
get transmissionColor() {
return this._material.transmissionColor;
}
/**
* Gets the refraction background texture
* @returns The refraction background texture or null
*/
get refractionBackgroundTexture() {
return this._material.backgroundRefractionTexture;
}
/**
* Sets the refraction background texture
* @param value The refraction background texture or null
*/
set refractionBackgroundTexture(e) {
this._material.backgroundRefractionTexture = e;
}
// ========================================
// VOLUME PROPERTIES
// ========================================
configureVolume() {
this._material.geometryThinWalled = 0;
}
/**
* Sets whether the material is thin-walled (i.e. non-volumetric) or not.
*/
set geometryThinWalled(e) {
this._material.geometryThinWalled = e ? 1 : 0;
}
/**
* Gets whether the material is thin-walled (i.e. non-volumetric) or not.
*/
get geometryThinWalled() {
return !!this._material.geometryThinWalled;
}
/**
* Sets the thickness texture.
* @param value The thickness texture or null
*/
set volumeThicknessTexture(e) {
this._material.geometryThicknessTexture = e, this._material._useGeometryThicknessFromGreenChannel = !0;
}
/**
* Sets the thickness factor.
* @param value The thickness value
*/
set volumeThickness(e) {
this._material.geometryThickness = e;
}
// ========================================
// SUBSURFACE PROPERTIES (Subsurface Scattering)
// ========================================
/**
* Configures subsurface properties for PBR material
*/
configureSubsurface() {
this._material.geometryThinWalled = 1, this._material.subsurfaceScatterAnisotropy = 1;
}
/**
* Sets the subsurface weight
*/
set subsurfaceWeight(e) {
this._material.subsurfaceWeight = e;
}
get subsurfaceWeight() {
return this._material.subsurfaceWeight;
}
/**
* Sets the subsurface weight texture
*/
set subsurfaceWeightTexture(e) {
this._material.subsurfaceWeightTexture = e;
}
/**
* Sets the subsurface color.
* @param value The subsurface tint color as a Color3
*/
set subsurfaceColor(e) {
this._material.subsurfaceColor = e;
}
/**
* Sets the subsurface color texture.
* @param value The subsurface tint texture or null
*/
set subsurfaceColorTexture(e) {
this._material.subsurfaceColorTexture = e;
}
/**
* Sets the diffuse transmission tint of the material
*/
set diffuseTransmissionTint(e) {
this._diffuseTransmissionTint = e;
}
/**
* Gets the diffuse transmission tint of the material
*/
get diffuseTransmissionTint() {
return this._diffuseTransmissionTint;
}
/**
* Sets the diffuse transmission tint texture of the material
*/
set diffuseTransmissionTintTexture(e) {
this._diffuseTransmissionTintTexture = e;
}
/**
* Gets the subsurface radius for subsurface scattering.
* subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
*/
get subsurfaceRadius() {
return this._material.subsurfaceRadius;
}
/**
* Sets the subsurface radius for subsurface scattering.
* subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
* @param value The subsurface radius value
*/
set subsurfaceRadius(e) {
this._material.subsurfaceRadius = e;
}
/**
* Gets the subsurface radius scale for subsurface scattering.
* subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
*/
get subsurfaceRadiusScale() {
return this._material.subsurfaceRadiusScale;
}
/**
* Sets the subsurface radius scale for subsurface scattering.
* subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
* @param value The subsurface radius scale as a Color3
*/
set subsurfaceRadiusScale(e) {
this._material.subsurfaceRadiusScale = e;
}
/**
* Sets the subsurface scattering anisotropy.
* @param value The anisotropy intensity value
*/
set subsurfaceScatterAnisotropy(e) {
this._material.subsurfaceScatterAnisotropy = e;
}
/**
* Does this material have a translucent surface (i.e. either transmission or subsurface)?
* @returns True if the material is translucent, false otherwise
*/
isTranslucent() {
return this.transmissionWeight > 0 || this.subsurfaceWeight > 0;
}
// ========================================
// FUZZ LAYER (Sheen)
// ========================================
/**
* Configures fuzz for OpenPBR.
* Enables fuzz and sets up proper configuration.
*/
configureFuzz() {
}
/**
* Sets the fuzz weight.
* @param value The fuzz weight value
*/
set fuzzWeight(e) {
this._material.fuzzWeight = e;
}
/**
* Sets the fuzz weight texture.
* @param value The fuzz weight texture or null
*/
set fuzzWeightTexture(e) {
this._material.fuzzWeightTexture = e;
}
/**
* Sets the fuzz color.
* @param value The fuzz color as a Color3
*/
set fuzzColor(e) {
this._material.fuzzColor = e;
}
/**
* Sets the fuzz color texture.
* @param value The fuzz color texture or null
*/
set fuzzColorTexture(e) {
this._material.fuzzColorTexture = e;
}
/**
* Sets the fuzz roughness.
* @param value The fuzz roughness value (0-1)
*/
set fuzzRoughness(e) {
this._material.fuzzRoughness = e;
}
/**
* Sets the fuzz roughness texture.
* @param value The fuzz roughness texture or null
*/
set fuzzRoughnessTexture(e) {
this._material.fuzzRoughnessTexture = e, this._material._useFuzzRoughnessFromTextureAlpha = !0;
}
// ========================================
// ANISOTROPY
// ========================================
/**
* Sets the specular roughness anisotropy of the OpenPBR material.
* @param value The anisotropy intensity value
*/
set specularRoughnessAnisotropy(e) {
this._material.specularRoughnessAnisotropy = e;
}
/**
* Gets the specular roughness anisotropy of the OpenPBR material.
* @returns The anisotropy intensity value
*/
get specularRoughnessAnisotropy() {
return this._material.specularRoughnessAnisotropy;
}
/**
* Sets the anisotropy rotation angle.
* @param value The anisotropy rotation angle in radians
*/
set geometryTangentAngle(e) {
this._material.geometryTangentAngle = e;
}
/**
* Sets the geometry tangent texture for anisotropy.
* Automatically enables using anisotropy from the tangent texture.
* @param value The anisotropy texture or null
*/
set geometryTangentTexture(e) {
this._material.geometryTangentTexture = e, this._material._useSpecularRoughnessAnisotropyFromTangentTexture = !0;
}
/**
* Gets the geometry tangent texture for anisotropy.
* @returns The anisotropy texture or null
*/
get geometryTangentTexture() {
return this._material.geometryTangentTexture;
}
/**
* Configures glTF-style anisotropy for the OpenPBR material.
* @param useGltfStyle Whether to use glTF-style anisotropy
*/
configureGltfStyleAnisotropy(e = !0) {
this._material._useGltfStyleAnisotropy = e;
}
// ========================================
// THIN FILM IRIDESCENCE
// ========================================
/**
* Sets the thin film weight.
* @param value The thin film weight value
*/
set thinFilmWeight(e) {
this._material.thinFilmWeight = e;
}
/**
* Sets the thin film IOR.
* @param value The thin film IOR value
*/
set thinFilmIor(e) {
this._material.thinFilmIor = e;
}
/**
* Sets the thin film thickness minimum.
* @param value The minimum thickness value in nanometers
*/
set thinFilmThicknessMinimum(e) {
this._material.thinFilmThicknessMin = e / 1e3;
}
/**
* Sets the thin film thickness maximum.
* @param value The maximum thickness value in nanometers
*/
set thinFilmThicknessMaximum(e) {
this._material.thinFilmThickness = e / 1e3;
}
/**
* Sets the thin film weight texture.
* @param value The thin film weight texture or null
*/
set thinFilmWeightTexture(e) {
this._material.thinFilmWeightTexture = e;
}
/**
* Sets the thin film thickness texture.
* @param value The thin film thickness texture or null
*/
set thinFilmThicknessTexture(e) {
this._material.thinFilmThicknessTexture = e, this._material._useThinFilmThicknessFromTextureGreen = !0;
}
// ========================================
// UNLIT MATERIALS
// ========================================
/**
* Sets whether the OpenPBR material is unlit.
* @param value True to make the material unlit
*/
set unlit(e) {
this._material.unlit = e;
}
// ========================================
// GEOMETRY PARAMETERS
// ========================================
/**
* Sets the geometry opacity of the OpenPBR material.
* @param value The opacity value (0-1)
*/
set geometryOpacity(e) {
this._material.geometryOpacity = e;
}
/**
* Gets the geometry opacity of the OpenPBR material.
* @returns The opacity value (0-1)
*/
get geometryOpacity() {
return this._material.geometryOpacity;
}
/**
* Sets the geometry normal texture of the OpenPBR material.
* @param value The normal texture or null
*/
set geometryNormalTexture(e) {
this._material.geometryNormalTexture = e;
}
/**
* Gets the geometry normal texture of the OpenPBR material.
* @returns The normal texture or null
*/
get geometryNormalTexture() {
return this._material.geometryNormalTexture;
}
/**
* Sets the normal map inversions for the OpenPBR material.
* Note: OpenPBR may handle normal map inversions differently or may not need them.
* @param invertX Whether to invert the normal map on the X axis (may be ignored)
* @param invertY Whether to invert the normal map on the Y axis (may be ignored)
*/
setNormalMapInversions(e, s) {
}
/**
* Sets the geometry coat normal texture of the OpenPBR material.
* @param value The coat normal texture or null
*/
set geometryCoatNormalTexture(e) {
this._material.geometryCoatNormalTexture = e;
}
/**
* Gets the geometry coat normal texture of the OpenPBR material.
* @returns The coat normal texture or null
*/
get geometryCoatNormalTexture() {
return this._material.geometryCoatNormalTexture;
}
/**
* Sets the geometry coat normal texture scale.
* @param value The scale value for the coat normal texture
*/
set geometryCoatNormalTextureScale(e) {
this._material.geometryCoatNormalTexture && (this._material.geometryCoatNormalTexture.level = e);
}
finalize() {
(this._diffuseTransmissionTint && !this._diffuseTransmissionTint.equals(t.White()) || this._diffuseTransmissionTintTexture) && (this._material.geometryThinWalled ? (this.subsurfaceColor = this._diffuseTransmissionTint, this.subsurfaceColorTexture = this._diffuseTransmissionTintTexture) : this._material.coatWeight == 0 && (!this.baseColor.equals(t.White()) || this.baseColorTexture) && (this._material.coatWeight = this.subsurfaceWeight, this._material.coatWeightTexture = this.subsurfaceWeightTexture, this._material.coatColor = this._diffuseTransmissionTint, this._material.coatColorTexture = this._diffuseTransmissionTintTexture, this._material.coatIor = this._material.specularIor, this._material.coatDarkening = 0, this._material.coatRoughness = this._material.specularRoughness, this._material.coatRoughnessTexture = this._material.specularRoughnessTexture, this._material.specularRoughness = 1, this._material.specularRoughnessTexture = null)), this.transmissionWeight > 0 && (this._material.geometryThinWalled || this._material.transmissionDepth === 0 ? (this._material.transmissionColor = this._material.baseColor, this._material.transmissionColorTexture = this._material.baseColorTexture) : this._material.coatWeight == 0 && (!this.baseColor.equals(t.White()) || this.baseColorTexture !== null) && (this._material.coatWeight = this.transmissionWeight, this._material.coatWeightTexture = this.transmissionWeightTexture, this._material.coatColor = this.baseColor, this._material.coatColorTexture = this.baseColorTexture, this._material.coatIor = this._material.specularIor, this._material.coatDarkening = 0, this._material.coatRoughness = this._material.specularRoughness, this._material.coatRoughnessTexture = this._material.specularRoughnessTexture));
}
}
export {
a as OpenPBRMaterialLoadingAdapter
};