PageSourceSearch

https://abidlabs-trackio-mnist-a.hf.space/assets/KHR_materials_coat-DACLiTV-.js

js abidlabs-trackio-mnist-a.hf.space collected 2026-10-04 16:37:54 UTC 3,843 bytes, 1 lines download raw bytes

1import{G as d}from"./glTFLoader-DlDSYXtl.js";import{u as h,r as T}from"./dynamic-Byj-ExMi.js";import{Color3 as g}from"./math.color-CzLaKyb6.js";import"./index-Bc7OztLw.js";import"./math.vector-C1xyPDEl.js";import"./math.scalar.functions-DkeaWAWz.js";import"./tools-D01N7ptR.js";import"./decorators.serialization-C7d7ykGG.js";import"./bufferUtils-DTRdUD8L.js";import"./mesh-BczlZ8bV.js";import"./mesh.vertexData-Cr3zcPIw.js";import"./buffer-DqKlo1ts.js";import"./dataBuffer-CgoqiUzT.js";import"./subMesh-UWDo5wjI.js";import"./drawWrapper-CZVk0xN-.js";import"./smartArray-CO6iJ0u5.js";import"./node-C-Iu0ALa.js";import"./math.viewport-CgkTt1RS.js";import"./sceneComponent-Dflhczui.js";import"./math.plane-Ce_75-g5.js";import"./lightConstants-B1TSTh-k.js";import"./sceneLoaderFlags-wywyb9ml.js";import"./math.axis-Ck7JfPPj.js";import"./material-CrEsrP1R.js";import"./texture-BEqhDl5Y.js";import"./baseTexture-CgAggsey.js";import"./drawWrapper.functions-Dzz0ghog.js";import"./cameraInputsManager-CsnqRZBh.js";import"./deviceInputEvents-BTza-zoR.js";import"./bone-B35odufe.js";import"./skeleton-BVUVDN0a.js";import"./rawTexture-Cp8_XuDs.js";import"./animation-IftAdLIx.js";import"./sceneLoader-CutT-qCn.js";import"./scene-gn_hoGMy.js";import"./renderingManager-CiY2OUrf.js";import"./perfCounter-DusmGz8t.js";import"./assetContainer-41lbZEXn.js";import"./instancedMesh-B9hLhKZd.js";import"./light-DT53MGnW.js";import"./objectModelMapping-DWcnlpHl.js";const i="KHR_materials_coat";class f{constructor(r){this.name=i,this.order=191,this.useOpenPBR=!1,this._loader=r,this.enabled=this._loader.isExtensionUsed(i)}dispose(){this._loader=null}loadMaterialPropertiesAsync(r,o,a){return d.LoadExtensionAsync(r,o,this.name,async(t,n)=>{const s=new Array;s.push(this._loader.loadMaterialPropertiesAsync(r,o,a)),o.extensions&&o.extensions.KHR_materials_openpbr&&(this.useOpenPBR=!0),s.push(this._loadCoatPropertiesAsync(t,n,a)),await Promise.all(s)})}_loadCoatPropertiesAsync(r,o,a){const t=this._loader._getOrCreateMaterialAdapter(a),n=new Array;t.configureCoat(),t.coatWeight=o.coatFactor!==void 0?o.coatFactor:0,t.coatRoughness=o.coatRoughnessFactor!==void 0?o.coatRoughnessFactor:0,o.coatTexture&&n.push(this._loader.loadTextureInfoAsync(`${r}/coatTexture`,o.coatTexture,e=>{e.name=`${a.name} (Coat)`,t.coatWeightTexture=e})),o.coatRoughnessTexture&&(o.coatRoughnessTexture.nonColorData=!0,n.push(this._loader.loadTextureInfoAsync(`${r}/coatRoughnessTexture`,o.coatRoughnessTexture,e=>{e.name=`${a.name} (Coat Roughness)`,t.coatRoughnessTexture=e}))),o.coatNormalTexture&&(o.coatNormalTexture.nonColorData=!0,n.push(this._loader.loadTextureInfoAsync(`${r}/coatNormalTexture`,o.coatNormalTexture,e=>{var m;e.name=`${a.name} (Coat Normal)`,t.geometryCoatNormalTexture=e,((m=o.coatNormalTexture)==null?void 0:m.scale)!=null&&(t.geometryCoatNormalTextureScale=o.coatNormalTexture.scale)})),t.setNormalMapInversions(!a.getScene().useRightHandedSystem,a.getScene().useRightHandedSystem)),t.coatDarkening=o.coatDarkeningFactor!==void 0?o.coatDarkeningFactor:1,t.coatIor=o.coatIor!==void 0?o.coatIor:1.5;const s=g.White();o.coatColorFactor!==void 0&&s.fromArray(o.coatColorFactor),t.coatColor=s,o.coatColorTexture&&n.push(this._loader.loadTextureInfoAsync(`${r}/coatColorTexture`,o.coatColorTexture,e=>{e.name=`${a.name} (Coat Color)`,t.coatColorTexture=e}));const u=o.coatAnisotropyStrength??0,l=o.coatAnisotropyRotation??0;return t.coatRoughnessAnisotropy=u,t.geometryCoatTangentAngle=l,this.useOpenPBR||t.configureGltfStyleAnisotropy(!0),o.coatAnisotropyTexture&&(o.coatAnisotropyTexture.nonColorData=!0,n.push(this._loader.loadTextureInfoAsync(`${r}/coatAnisotropyTexture`,o.coatAnisotropyTexture,e=>{e.name=`${a.name} (Coat Anisotropy)`,t.geometryCoatTangentTexture=e}))),Promise.all(n).then(()=>{})}}h(i);T(i,!0,c=>new f(c));export{f as KHR_materials_coat};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.