-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Description
Description
I'm trying to bundle whole three@0.181.2 into my app using rollup and get the following error
"QuadMesh" is not exported by
"../../node_modules/three/build/three.module.js", imported by
"../../node_modules/three/examples/jsm/utils/WebGPUTextureUtils.js".
It seems that import { QuadMesh } from "three" is the problem here
| } from 'three'; |
Importing from "three/webgpu" fixes the issue
import {
QuadMesh,
NodeMaterial,
WebGPURenderer,
CanvasTexture
} from 'three/webpu';Reproduction steps
import { TextureUtilsGPU } from 'three/examples/jsm/utils/WebGPUTextureUtils.js'
console.log(TextureUtilsGPU)
Code
import { TextureUtilsGPU } from 'three/examples/jsm/utils/WebGPUTextureUtils.js'
console.log(TextureUtilsGPU)Live example
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.181.2/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.181.2/examples/jsm/",
"three/webgpu": "https://cdn.jsdelivr.net/npm/three@0.181.2/build/three.webgpu.js",
"three/tsl": "https://cdn.jsdelivr.net/npm/three@0.181.2/build/three.tsl.js"
}
}
</script>
</head>
<body>
<script type="module">
const a = await import(
"https://cdn.jsdelivr.net/npm/three@0.181.2/examples/jsm/utils/WebGPUTextureUtils.js"
);
</script>
</body>
</html>Screenshots
No response
Version
0.181.2
Device
No response
Browser
No response
OS
No response