From 8e90fb7dca926e84c4435b568d4340ae77bd4f49 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Tue, 10 May 2022 19:12:58 -0400 Subject: [PATCH] [O] Optimize imports --- src/animation/Home.ts | 7 +++---- src/animation/Shaders.ts | 2 +- src/animation/components/Editor.ts | 4 ++-- src/components/BlogPost.vue | 3 +-- src/components/color/ColorPicker.vue | 2 +- src/components/color/ColorPickerTest.vue | 1 - src/scripts/router.ts | 8 +------- src/scripts/utils.ts | 3 +-- src/views/NewHome.vue | 2 +- 9 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/animation/Home.ts b/src/animation/Home.ts index 0148cb9..26b5ece 100644 --- a/src/animation/Home.ts +++ b/src/animation/Home.ts @@ -1,14 +1,13 @@ import * as THREE from 'three' +import {Color} from 'three' import * as helper from "@/animation/Helpers" -import {circle} from "@/animation/Helpers" -import {initMouseTracker, moused} from "@/animation/Trackers" +import {initMouseTracker} from "@/animation/Trackers" import {addDirLight, addGround, addHemiLight, addSky} from "@/animation/Shaders" -import {colors, config} from "@/animation/Config" +import {config} from "@/animation/Config" import Cursor from "@/animation/components/Cursor"; import IUpdatable from "@/animation/components/IUpdatable"; import Grid from "@/animation/components/Grid"; import Editor from "@/animation/components/Editor"; -import {Color} from "three"; export let renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.PerspectiveCamera export let editor: Editor diff --git a/src/animation/Shaders.ts b/src/animation/Shaders.ts index 1562486..258c3b1 100644 --- a/src/animation/Shaders.ts +++ b/src/animation/Shaders.ts @@ -1,6 +1,6 @@ import * as THREE from 'three' +import {DirectionalLight, HemisphereLight, Mesh} from 'three' import {colors, config} from "@/animation/Config"; -import {DirectionalLight, HemisphereLight, Mesh} from "three"; export const vertexShader = ` varying vec3 vWorldPosition; diff --git a/src/animation/components/Editor.ts b/src/animation/components/Editor.ts index 56e7c26..41f6bf3 100644 --- a/src/animation/components/Editor.ts +++ b/src/animation/components/Editor.ts @@ -1,7 +1,7 @@ -import {Color, Material, Mesh, MeshBasicMaterial, Object3D, Vector3} from "three"; +import {Mesh, MeshBasicMaterial, Vector3} from "three"; import IUpdatable from "@/animation/components/IUpdatable"; import {circle} from "@/animation/Helpers"; -import {camera, scene} from "@/animation/Home"; +import {scene} from "@/animation/Home"; import {moused, projectTo3D} from "@/animation/Trackers"; import {config} from "@/animation/Config"; import {minMax} from "@/scripts/utils"; diff --git a/src/components/BlogPost.vue b/src/components/BlogPost.vue index b678b25..44b593b 100644 --- a/src/components/BlogPost.vue +++ b/src/components/BlogPost.vue @@ -29,12 +29,11 @@