资源本地化
This commit is contained in:
BIN
public/textures/waternormals.jpg
Normal file
BIN
public/textures/waternormals.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 243 KiB |
@@ -126,7 +126,7 @@ export class OceanScene {
|
|||||||
|
|
||||||
const waterNormals = await new Promise((resolve) => {
|
const waterNormals = await new Promise((resolve) => {
|
||||||
new THREE.TextureLoader().load(
|
new THREE.TextureLoader().load(
|
||||||
'https://threejs.org/examples/textures/waternormals.jpg',
|
'/textures/waternormals.jpg',
|
||||||
(texture) => {
|
(texture) => {
|
||||||
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
|
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
|
||||||
resolve(texture);
|
resolve(texture);
|
||||||
|
|||||||
Reference in New Issue
Block a user