(options: ExtSplatsOptions)
| 113 | } |
| 114 | |
| 115 | reinitialize(options: ExtSplatsOptions) { |
| 116 | this.isInitialized = false; |
| 117 | |
| 118 | this.extra = {}; |
| 119 | this.maxSplats = options.maxSplats ?? 0; |
| 120 | this.lod = options.lod; |
| 121 | this.nonLod = options.nonLod; |
| 122 | |
| 123 | if ( |
| 124 | options.url || |
| 125 | options.fileBytes || |
| 126 | options.stream || |
| 127 | options.construct |
| 128 | ) { |
| 129 | // We need to initialize asynchronously given the options |
| 130 | this.initialized = this.asyncInitialize(options).then(() => { |
| 131 | this.isInitialized = true; |
| 132 | return this; |
| 133 | }); |
| 134 | } else { |
| 135 | this.initialize(options); |
| 136 | this.isInitialized = true; |
| 137 | this.initialized = Promise.resolve(this); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | initialize(options: ExtSplatsOptions) { |
| 142 | this.extra = options.extra ?? {}; |
no test coverage detected