Skip to content

Commit

Permalink
correct the icon color space
Browse files Browse the repository at this point in the history
  • Loading branch information
huww98 committed Dec 29, 2023
1 parent 9293a05 commit c9cfd5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/iconTexture.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TextureLoader, WebGLRenderer, Texture, RGBAFormat, UnsignedByteType, Vector2 } from 'three';
import { TextureLoader, WebGLRenderer, Texture, RGBAFormat, UnsignedByteType, Vector2, SRGBColorSpace } from 'three';
import { allIconIds, iconUrl } from './data/icons';

const WIDTH = 24;
Expand All @@ -24,6 +24,7 @@ export class IconTexture {
this.texture.type = UnsignedByteType;
this.texture.flipY = true;
this.texture.needsUpdate = true;
this.texture.colorSpace = SRGBColorSpace;
this.renderer.initTexture(this.texture);

let nextIndex = 1; // 0 is reserved for empty icon
Expand Down

0 comments on commit c9cfd5f

Please sign in to comment.