fix(geometry): PlaneBufferGeometry deprecated, used PlaneGeometry

This commit is contained in:
Colin Duffy 2023-07-12 09:27:05 -07:00 committed by Aria
parent b83164f26f
commit 8b8d2bf431

View file

@ -4,7 +4,7 @@ import {
DoubleSide, DoubleSide,
GLSL3, GLSL3,
Mesh, Mesh,
PlaneBufferGeometry, PlaneGeometry,
ShaderMaterial, ShaderMaterial,
} from 'three' } from 'three'
@ -17,7 +17,7 @@ export class InfiniteGridHelper extends Mesh {
subgridOpacity = 0.05, subgridOpacity = 0.05,
gridOpacity = 0.15, gridOpacity = 0.15,
} = {}) { } = {}) {
const geometry = new PlaneBufferGeometry(2, 2, 1, 1) const geometry = new PlaneGeometry(2, 2, 1, 1)
const material = new ShaderMaterial({ const material = new ShaderMaterial({
// Needs to be set so threejs doesn't mess things up in glsl3 code by trying to make glsl1 forward compatible // Needs to be set so threejs doesn't mess things up in glsl3 code by trying to make glsl1 forward compatible