From 6043fa149a678ebdf5709b3f9f2ac241db9300d4 Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Fri, 5 May 2023 06:22:45 -0400 Subject: [PATCH] replace RGBFormat with explicit undefined RGBFormat was removed in ThreeJS r137. Replacing with explicit undefined silences some build warnings and preserves existing behavior (including any bugs) See https://github.com/unconed/mathbox/issues/64 --- src/render/buffer/memo.js | 1 + src/render/buffer/texture/datatexture.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render/buffer/memo.js b/src/render/buffer/memo.js index 63533f9..238e7a2 100644 --- a/src/render/buffer/memo.js +++ b/src/render/buffer/memo.js @@ -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; diff --git a/src/render/buffer/texture/datatexture.js b/src/render/buffer/texture/datatexture.js index 52c61e9..e412ed8 100644 --- a/src/render/buffer/texture/datatexture.js +++ b/src/render/buffer/texture/datatexture.js @@ -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];