Try to get import running

Hi,

I am trying to get this example here running in my webpack workflow:

https://github.com/mrdoob/three.js/blob/c6620cee323838ead14035b37008f401edbc2ea1/examples/webgpu_postprocessing_3dlut.html

The problem is, that I do not use importmap but webpack / package.json setup to compile. Now, how can I import “…/build/three.webgpu.js” and alike?

Thanks for your help
b

Instead of using the standard:

import * as THREE from "three";

Use the following:

import * as THREE from "three/webgpu";
import { mix, ... } from "three/tsl";
import { lut3D } from "three/addons/tsl/display/Lut3DNode.js";
import { OrbitControls } from "three/addons/controls/OrbitControls.js";

The three/addons imports remain unchanged in both cases.

2 Likes