PageSourceSearch

https://ysharma-agate-002-distill-trackio.hf.space/assets/KHR_materials_volume-DyryNepY.js

js ysharma-agate-002-distill-trackio.hf.space collected 2026-10-03 17:33:20 UTC 2,867 bytes, 1 lines download raw bytes

1import{Color3 as h}from"./math.color-CzLaKyb6.js";import{G as u}from"./glTFLoader-BPeiodqB.js";import{u as d,r as _}from"./dynamic-BUKysMyT.js";import{V as f}from"./math.vector-C1xyPDEl.js";import"./math.scalar.functions-DkeaWAWz.js";import"./index-Bx1QoKVU.js";import"./tools-D01N7ptR.js";import"./decorators.serialization-C7d7ykGG.js";import"./bufferUtils-DTRdUD8L.js";import"./mesh-Fj-9677A.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-WrTH9PVf.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-DOnbxwKX.js";import"./instancedMesh-Cz-e1Hca.js";import"./light-DT53MGnW.js";import"./objectModelMapping-DWcnlpHl.js";const n="KHR_materials_volume";class A{constructor(o){this.name=n,this.order=173,this._loader=o,this.enabled=this._loader.isExtensionUsed(n),this.enabled&&this._loader._disableInstancedMesh++}dispose(){this.enabled&&this._loader._disableInstancedMesh--,this._loader=null}loadMaterialPropertiesAsync(o,s,e){return u.LoadExtensionAsync(o,s,this.name,async(t,r)=>{const i=new Array;return i.push(this._loader.loadMaterialPropertiesAsync(o,s,e)),i.push(this._loadVolumePropertiesAsync(t,s,e,r)),await Promise.all(i).then(()=>{})})}_loadVolumePropertiesAsync(o,s,e,t){const r=this._loader._getOrCreateMaterialAdapter(e);if(r.transmissionWeight===0&&r.subsurfaceWeight===0||!t.thicknessFactor)return Promise.resolve();const i=t.attenuationDistance!==void 0?t.attenuationDistance:Number.MAX_VALUE,a=t.attenuationColor!==void 0&&t.attenuationColor.length==3?h.FromArray(t.attenuationColor):h.White(),p=new f(-Math.log(a.r),-Math.log(a.g),-Math.log(a.b));p.scaleInPlace(1/Math.max(i,.001)),r.extinctionCoefficient=p,r.transmissionDepth=i,r.transmissionColor=a,r.volumeThickness=t.thicknessFactor??0;const l=new Array;return t.thicknessTexture&&(t.thicknessTexture.nonColorData=!0,l.push(this._loader.loadTextureInfoAsync(`${o}/thicknessTexture`,t.thicknessTexture,c=>{c.name=`${e.name} (Thickness)`,r.volumeThicknessTexture=c}))),Promise.all(l).then(()=>{})}}d(n);_(n,!0,m=>new A(m));export{A as KHR_materials_volume};

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.