InfiniteGridHelper Import Trouble

Trying to get infinitegridhelper utilized on codesandbox and running into some trouble getting it imported.

I read through this post:

and reviewed this example:

I have tried just the default call of THREE.InfiniteGridHelper() and also tried copying and pasting the code and importing as a separate module. Both are not working. I assume I am missing something easy?

https://codesandbox.io/p/sandbox/3jsplay-6k29lv?file=%2Fsrc%2Findex.mjs%3A45%2C17

Uncomment the import:

// import { InfiniteGridHelper } from "./InfiniteGridHelper.js";

Then replace this line:

const grid = new THREE.InfiniteGridHelper(...);

with:

const grid = new InfiniteGridHelper(...);

The InfiniteGridHelper is its own module and is not part of THREE..

1 Like

Thanks for the help, I am now getting this error:

Any ideas?

Not sure what’s going on here, I’ve tested your code on my local server, on jsfiddle, and glitch, it works as expected in all cases.

The issue might be specific to CodeSandbox, possibly a bundler configuration problem.

1 Like

Appreciate your help @Fennec! I will look into some CodeSandbox specific issues.

1 Like