Michael Herzog 3 лет назад
Родитель
Сommit
7c5c73ea2f
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 3
      examples/jsm/exporters/GLTFExporter.js
  2. 1 0
      src/Three.js

+ 2 - 3
examples/jsm/exporters/GLTFExporter.js

@@ -17,7 +17,7 @@ import {
 	RGBAFormat,
 	RepeatWrapping,
 	Scene,
-	Texture,
+	Source,
 	Vector3
 } from 'three';
 
@@ -747,8 +747,7 @@ class GLTFWriter {
 
 		const texture = reference.clone();
 
-		// TODO Use new Source() instead?
-		texture.source = new Texture( canvas ).source;
+		texture.source = new Source( canvas );
 
 		return texture;
 

+ 1 - 0
src/Three.js

@@ -28,6 +28,7 @@ export { Points } from './objects/Points.js';
 export { Group } from './objects/Group.js';
 export { VideoTexture } from './textures/VideoTexture.js';
 export { FramebufferTexture } from './textures/FramebufferTexture.js';
+export { Source } from './textures/Source.js';
 export { DataTexture } from './textures/DataTexture.js';
 export { DataArrayTexture } from './textures/DataArrayTexture.js';
 export { Data3DTexture } from './textures/Data3DTexture.js';