mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2025-03-02 14:34:03 -05:00
Merge pull request #144 from AnalyticalGraphicsInc/1.0-luminance
load greyscale images as luminance instead of alpha
This commit is contained in:
commit
d34f95ed30
@ -1,6 +1,9 @@
|
|||||||
Change Log
|
Change Log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
### 1.3.2 2018-06-07
|
||||||
|
* Fixed greyscale images loading as alpha instead of luminance. [#144](https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/144)
|
||||||
|
|
||||||
### 1.3.1 2018-03-28
|
### 1.3.1 2018-03-28
|
||||||
* Maintenance release to update major version Node dependencies.
|
* Maintenance release to update major version Node dependencies.
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ function getChannels(colorType) {
|
|||||||
function getFormat(channels) {
|
function getFormat(channels) {
|
||||||
switch (channels) {
|
switch (channels) {
|
||||||
case 1:
|
case 1:
|
||||||
return WebGLConstants.ALPHA;
|
return WebGLConstants.LUMINANCE;
|
||||||
case 2:
|
case 2:
|
||||||
return WebGLConstants.LUMINANCE_ALPHA;
|
return WebGLConstants.LUMINANCE_ALPHA;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -60,7 +60,7 @@ describe('loadImage', function() {
|
|||||||
expect(loadImage(grayscaleImage, defaultOptions)
|
expect(loadImage(grayscaleImage, defaultOptions)
|
||||||
.then(function(info) {
|
.then(function(info) {
|
||||||
expect(info.transparent).toBe(false);
|
expect(info.transparent).toBe(false);
|
||||||
expect(info.format).toBe(WebGLConstants.ALPHA);
|
expect(info.format).toBe(WebGLConstants.LUMINANCE);
|
||||||
expect(info.source).toBeDefined();
|
expect(info.source).toBeDefined();
|
||||||
expect(info.extension).toBe('.png');
|
expect(info.extension).toBe('.png');
|
||||||
}), done).toResolve();
|
}), done).toResolve();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user