From 3df9d0194bebfa374281ded198b9c6646bc014b5 Mon Sep 17 00:00:00 2001 From: Sigve Sebastian Farstad Date: Thu, 6 Apr 2023 15:23:31 +0200 Subject: [PATCH] Use BoxGeometry instead of BoxBufferGeometry BoxBufferGeometry has been renamed to BoxGeometry in Three.js at some point. --- renin/src/ui/AudioBar.ts | 3 +-- renin/src/ui/UIBox.ts | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/renin/src/ui/AudioBar.ts b/renin/src/ui/AudioBar.ts index 19bea02..e522d4d 100644 --- a/renin/src/ui/AudioBar.ts +++ b/renin/src/ui/AudioBar.ts @@ -7,7 +7,6 @@ import { RepeatWrapping, Texture, ShaderMaterial, - BoxBufferGeometry, sRGBEncoding, } from 'three'; import { colors } from './colors'; @@ -25,7 +24,7 @@ const boxHeight = 40; const boxPadding = 8; const glowSize = 12; -const boxBufferGeometry = new BoxBufferGeometry(); +const boxBufferGeometry = new BoxGeometry(); const uiboxStore: { [key: string]: UIBox } = {}; const getUIBox = (name: string) => { diff --git a/renin/src/ui/UIBox.ts b/renin/src/ui/UIBox.ts index f9933dd..fb656b3 100644 --- a/renin/src/ui/UIBox.ts +++ b/renin/src/ui/UIBox.ts @@ -1,5 +1,5 @@ import { - BoxBufferGeometry, + BoxGeometry, BufferAttribute, BufferGeometry, Material, @@ -119,12 +119,12 @@ export function makeRoundedRectangleBufferGeometry( return geometry; } -const geometry = new BoxBufferGeometry(); +const geometry = new BoxGeometry(); export class UIBox { object3d = new Object3D(); private mesh: Mesh; - private shadow: Mesh; + private shadow: Mesh; options: UIBoxOptions; constructor(options: Partial>) {