Skip to content

Commit

Permalink
GLTFLoader: Use Texture instead of CanvasTexture for ImageBitmaps (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 11, 2021
1 parent 295de6c commit 2383c1c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/jsm/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Box3,
BufferAttribute,
BufferGeometry,
CanvasTexture,
ClampToEdgeWrapping,
Color,
DirectionalLight,
Expand Down Expand Up @@ -54,6 +53,7 @@ import {
Sphere,
SpotLight,
TangentSpaceNormalMap,
Texture,
TextureLoader,
TriangleFanDrawMode,
TriangleStripDrawMode,
Expand Down Expand Up @@ -2598,7 +2598,10 @@ class GLTFParser {

onLoad = function ( imageBitmap ) {

resolve( new CanvasTexture( imageBitmap ) );
const texture = new Texture( imageBitmap );
texture.needsUpdate = true;

resolve( texture );

};

Expand Down

0 comments on commit 2383c1c

Please sign in to comment.