Skip to content

Commit

Permalink
Merge pull request #81 from ninjadev/no-box-buffer-geometry
Browse files Browse the repository at this point in the history
Use BoxGeometry instead of BoxBufferGeometry
  • Loading branch information
sigvef authored Apr 6, 2023
2 parents d5d6138 + 3df9d01 commit 450ab5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions renin/src/ui/AudioBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
RepeatWrapping,
Texture,
ShaderMaterial,
BoxBufferGeometry,
sRGBEncoding,
} from 'three';
import { colors } from './colors';
Expand All @@ -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) => {
Expand Down
6 changes: 3 additions & 3 deletions renin/src/ui/UIBox.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
BoxBufferGeometry,
BoxGeometry,
BufferAttribute,
BufferGeometry,
Material,
Expand Down Expand Up @@ -119,12 +119,12 @@ export function makeRoundedRectangleBufferGeometry(
return geometry;
}

const geometry = new BoxBufferGeometry();
const geometry = new BoxGeometry();

export class UIBox<MaterialType extends Material = MeshBasicMaterial> {
object3d = new Object3D();
private mesh: Mesh<BufferGeometry, MaterialType>;
private shadow: Mesh<BoxBufferGeometry, RawShaderMaterial>;
private shadow: Mesh<BoxGeometry, RawShaderMaterial>;
options: UIBoxOptions<MaterialType>;

constructor(options: Partial<UIBoxOptions<MaterialType>>) {
Expand Down

0 comments on commit 450ab5e

Please sign in to comment.