Package Version: @spz-loader/core@0.2.0
Problem Description:
When attempting to load an .spz file using either loadSpz or loadSpzFromUrl from @spz-loader/core@0.2.0, a runtime error occurs. This error happens both when running the library in a browser environment (specifically tested within an A-Frame component loaded via <script type="module"> from esm.sh) and when running it directly in a standard Node.js environment.
Error Message & Stack Trace:
TypeError: I is not a function
at file:///path/to/project/node_modules/@spz-loader/core/dist/index.js:11:16
at async OI (file:///path/to/project/node_modules/@spz-loader/core/dist/index.js:799:13)
Steps to Reproduce (Node.js):
- Install the package:
npm install @spz-loader/core@0.2.0 or pnpm add @spz-loader/core@0.2.0
- Create a simple
index.js file:
import { loadSpzFromUrl } from '@spz-loader/core';
// Or: import { loadSpz } from '@spz-loader/core'; and use fetch + loadSpz(buffer)
const spzUrl = 'https://huggingface.co/datasets/christenJacquottet/gaussian-splats/resolve/main/train.spz'; // Example URL
async function runTest() {
console.log(`Attempting to load SPZ from: ${spzUrl}`);
try {
// Using loadSpzFromUrl (also fails with fetch + loadSpz(buffer))
const splat = await loadSpzFromUrl(spzUrl);
console.log('SPZ Loaded successfully! Points:', splat.numPoints);
} catch (error) {
console.error('Error loading SPZ file:', error);
}
}
runTest();
- Run the script:
node index.js
- Observe the
TypeError: I is not a function error in the console.
Environment:
- Package:
@spz-loader/core version 0.2.0
- Node.js: v20.17.0
- **Browser Chrome, running within A-Frame Version 1.5.0 and 8th Wall. Library loaded via
<script type="module" src="https://esm.sh/@spz-loader/core@0.2.0">.
Since the error occurs identically in Node.js, it strongly indicates the issue lies within the package's build/bundling rather than the specific browser or A-Frame environment.
Package Version:
@spz-loader/core@0.2.0Problem Description:
When attempting to load an
.spzfile using eitherloadSpzorloadSpzFromUrlfrom@spz-loader/core@0.2.0, a runtime error occurs. This error happens both when running the library in a browser environment (specifically tested within an A-Frame component loaded via<script type="module">fromesm.sh) and when running it directly in a standard Node.js environment.Error Message & Stack Trace:
Steps to Reproduce (Node.js):
npm install @spz-loader/core@0.2.0orpnpm add @spz-loader/core@0.2.0index.jsfile:node index.jsTypeError: I is not a functionerror in the console.Environment:
@spz-loader/coreversion0.2.0<script type="module" src="https://esm.sh/@spz-loader/core@0.2.0">.Since the error occurs identically in Node.js, it strongly indicates the issue lies within the package's build/bundling rather than the specific browser or A-Frame environment.