Skip to content

Commit

Permalink
replace RGBFormat with explicit undefined
Browse files Browse the repository at this point in the history
RGBFormat was removed in ThreeJS r137. Replacing with explicit undefined silences some build warnings and preserves existing behavior (including any bugs)

See #64
  • Loading branch information
ChristopherChudzicki committed May 5, 2023
1 parent f80933e commit 6043fa1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/render/buffer/memo.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class Memo extends RenderToTexture {
const height = options.height || 1;
const depth = options.depth || 1;

// RGBFormat was removed in r137 of ThreeJS
//options.format = [null, THREE.LuminanceFormat, THREE.LuminanceAlphaFormat, THREE.RGBFormat, THREE.RGBAFormat][@channels]
options.format = RGBAFormat;
options.width = _width = items * width;
Expand Down
2 changes: 1 addition & 1 deletion src/render/buffer/texture/datatexture.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class DataTexture {
null,
CONST.LuminanceFormat,
CONST.LuminanceAlphaFormat,
CONST.RGBFormat,
undefined // CONST.RGBFormat was removed in r137 of ThreeJS
CONST.RGBAFormat,
][this.channels];

Expand Down

0 comments on commit 6043fa1

Please sign in to comment.