Closed Justnormalguy closed 6 days ago
I try the examples in https://threejs.org/manual/#en/textures,but when I replace three.moudle.js to three.webgpu,js ,it doesn't woke. It looks like just like this:
when I use three.moudle.js it looks correct. :-) _
1.copy the code from https://threejs.org/manual/#en/textures 2.replace three form three.moudle.js to three.webgpu,js 3.replace the image
const scene = new THREE.Scene();
const boxWidth = 1; const boxHeight = 1; const boxDepth = 1; const geometry = new THREE.BoxGeometry(boxWidth, boxHeight, boxDepth);
const cubes = []; // just an array we can use to rotate the cubes const loader = new THREE.TextureLoader();
const materials = [ new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), ]; const cube = new THREE.Mesh(geometry, materials); scene.add(cube);
No response
r168
This should be fixed via #29278. Do you mind giving the current dev version a try?
Certainly, I'd be happy to have a try.
Description
I try the examples in https://threejs.org/manual/#en/textures,but when I replace three.moudle.js to three.webgpu,js ,it doesn't woke. It looks like just like this:
when I use three.moudle.js it looks correct. :-) _
Reproduction steps
1.copy the code from https://threejs.org/manual/#en/textures 2.replace three form three.moudle.js to three.webgpu,js 3.replace the image
Code
const scene = new THREE.Scene();
const boxWidth = 1; const boxHeight = 1; const boxDepth = 1; const geometry = new THREE.BoxGeometry(boxWidth, boxHeight, boxDepth);
const cubes = []; // just an array we can use to rotate the cubes const loader = new THREE.TextureLoader();
const materials = [ new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }), ]; const cube = new THREE.Mesh(geometry, materials); scene.add(cube);
Live example
Screenshots
No response
Version
r168
Device
No response
Browser
No response
OS
No response