From ec467ddb2db36452c80fa2cdc89e1a6d418f35d5 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Wed, 18 Jan 2023 04:44:14 -0500 Subject: [PATCH] [F] Fix meshline usage --- src/animation/components/Cursor.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/animation/components/Cursor.ts b/src/animation/components/Cursor.ts index e4f9f10..7eb14c6 100644 --- a/src/animation/components/Cursor.ts +++ b/src/animation/components/Cursor.ts @@ -1,6 +1,6 @@ import * as THREE from "three"; -import {BufferGeometry, Color, Material} from "three"; -import {MeshLine, MeshLineMaterial} from 'meshline'; +import {Color, Material} from "three"; +import {MeshLineGeometry, MeshLineMaterial} from 'meshline'; import IUpdatable from "@/animation/components/IUpdatable"; import {moused} from "@/animation/Trackers"; import {alwaysOnTop, circle} from "@/animation/Helpers"; @@ -42,8 +42,8 @@ export class CursorCircle extends THREE.Mesh implements IUpdatable { // https://discourse.threejs.org/t/shift-vertices-of-circle-geometry-not-working/26664 const pts = new THREE.Path().absarc(0, 0, conf.radius, 0, Math.PI * 2, true).getPoints(90) - const geometry = new MeshLine() - geometry.setGeometry(new BufferGeometry().setFromPoints(pts), () => 1) + const geometry = new MeshLineGeometry() + geometry.setFromPoints(pts) // MeshLine: https://stackoverflow.com/a/25759280/7346633 const material = new MeshLineMaterial({color: conf.color, lineWidth: conf.width,