(options: PagedSplatsOptions)
| 57 | shMax: dyno.DynoVec3<THREE.Vector3, "shMax">; |
| 58 | |
| 59 | constructor(options: PagedSplatsOptions) { |
| 60 | this.pager = options.pager; |
| 61 | this.rootUrl = options.rootUrl ?? ""; |
| 62 | this.requestHeader = options.requestHeader; |
| 63 | this.withCredentials = options.withCredentials; |
| 64 | this.numSh = 0; |
| 65 | this.maxSh = options.pager?.maxSh ?? 3; |
| 66 | |
| 67 | this.numSplats = 0; |
| 68 | |
| 69 | this.dynoNumSplats = new dyno.DynoInt({ value: 0 }); |
| 70 | this.dynoIndices = new dyno.DynoUsampler2D({ |
| 71 | value: SplatPager.emptyIndicesTexture, |
| 72 | }); |
| 73 | |
| 74 | this.rgbMinMaxLnScaleMinMax = new dyno.DynoVec4({ |
| 75 | value: new THREE.Vector4(0.0, 1.0, LN_SCALE_MIN, LN_SCALE_MAX), |
| 76 | }); |
| 77 | this.lodOpacity = new dyno.DynoBool({ |
| 78 | value: false, |
| 79 | }); |
| 80 | |
| 81 | this.dynoNumSh = new dyno.DynoInt({ value: 0 }); |
| 82 | this.shMax = new dyno.DynoVec3({ value: new THREE.Vector3() }); |
| 83 | |
| 84 | this.fileBytes = options.fileBytes; |
| 85 | this.fileType = options.fileType; |
| 86 | if (!this.fileType && this.fileBytes) { |
| 87 | this.fileType = getSplatFileType(this.fileBytes); |
| 88 | } |
| 89 | if (!this.fileType && this.rootUrl) { |
| 90 | this.fileType = getSplatFileTypeFromPath(this.rootUrl); |
| 91 | } |
| 92 | if (!this.fileType) { |
| 93 | throw new Error("Unable to determine file type"); |
| 94 | } |
| 95 | if (this.fileType === SplatFileType.RAD) { |
| 96 | this.radMetaPromise = this.getRadMeta(); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | dispose() { |
| 101 | if (this.dynoIndices.value !== SplatPager.emptyIndicesTexture) { |
nothing calls this directly
no test coverage detected