mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-12-02 13:00:29 -05:00
load greyscale images as luminance instead of alpha
This commit is contained in:
parent
13d5a90632
commit
b46be04fc6
@ -96,7 +96,7 @@ function getChannels(colorType) {
|
||||
function getFormat(channels) {
|
||||
switch (channels) {
|
||||
case 1:
|
||||
return WebGLConstants.ALPHA;
|
||||
return WebGLConstants.LUMINANCE;
|
||||
case 2:
|
||||
return WebGLConstants.LUMINANCE_ALPHA;
|
||||
case 3:
|
||||
|
@ -60,7 +60,7 @@ describe('loadImage', function() {
|
||||
expect(loadImage(grayscaleImage, defaultOptions)
|
||||
.then(function(info) {
|
||||
expect(info.transparent).toBe(false);
|
||||
expect(info.format).toBe(WebGLConstants.ALPHA);
|
||||
expect(info.format).toBe(WebGLConstants.LUMINANCE);
|
||||
expect(info.source).toBeDefined();
|
||||
expect(info.extension).toBe('.png');
|
||||
}), done).toResolve();
|
||||
|
Loading…
Reference in New Issue
Block a user