diff --git a/src/animation/Helpers.ts b/src/animation/Helpers.ts index 7108054..72007c1 100644 --- a/src/animation/Helpers.ts +++ b/src/animation/Helpers.ts @@ -31,3 +31,18 @@ export function box(width: number, height: number, depth: number): THREE.BufferG geometry.setAttribute('position', new THREE.Float32BufferAttribute(position, 3)) return geometry } + +/** + * Create a 2D circle + * @param color + * @param z + * @param r + */ +export function circle(color: number, z: number, r: number): THREE.Mesh +{ + const geometry = new THREE.CircleGeometry(r, 32) + const material = new THREE.MeshBasicMaterial({color}) + const circle = new THREE.Mesh(geometry, material) + circle.position.z = z + return circle +} diff --git a/src/animation/home.ts b/src/animation/home.ts index f164fe7..0353fec 100644 --- a/src/animation/home.ts +++ b/src/animation/home.ts @@ -1,5 +1,7 @@ import * as THREE from 'three' import * as helper from "@/animation/Helpers"; +import {initMouseTracker, moused} from "@/animation/MouseTracker"; +import {circle} from "@/animation/Helpers"; let renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.PerspectiveCamera const objects = []