未验证 提交 2383c1c0 编写于 作者: M Mr.doob 提交者: GitHub

GLTFLoader: Use Texture instead of CanvasTexture for ImageBitmaps (#21976)

上级 295de6cd
...@@ -4,7 +4,6 @@ import { ...@@ -4,7 +4,6 @@ import {
Box3, Box3,
BufferAttribute, BufferAttribute,
BufferGeometry, BufferGeometry,
CanvasTexture,
ClampToEdgeWrapping, ClampToEdgeWrapping,
Color, Color,
DirectionalLight, DirectionalLight,
...@@ -54,6 +53,7 @@ import { ...@@ -54,6 +53,7 @@ import {
Sphere, Sphere,
SpotLight, SpotLight,
TangentSpaceNormalMap, TangentSpaceNormalMap,
Texture,
TextureLoader, TextureLoader,
TriangleFanDrawMode, TriangleFanDrawMode,
TriangleStripDrawMode, TriangleStripDrawMode,
...@@ -2598,7 +2598,10 @@ class GLTFParser { ...@@ -2598,7 +2598,10 @@ class GLTFParser {
onLoad = function ( imageBitmap ) { onLoad = function ( imageBitmap ) {
resolve( new CanvasTexture( imageBitmap ) ); const texture = new Texture( imageBitmap );
texture.needsUpdate = true;
resolve( texture );
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册