Depending on how you use it you need to import it differently or adapt to the framework/bundler you use. It’s a generic js plugin to be used when the THREE scope is available globally like in the Demo.
I’m releasing an update soon that will also come with a general module version.
import * as THREE from 'three';
import './InfiniteGridHelper.js'
const grid = new THREE.InfiniteGridHelper(100, 100, 0x222222, 1000)
scene.add(grid)
The current version, as i said, is a regular js plugin, you’re using module syntax, therefore you need to change the plugin file to a module exporting the InfiniteGridHelper class.
1 Like