From a60ff94c7ce678574db4141e86e2f4782682436f Mon Sep 17 00:00:00 2001 From: Sped0n Date: Sun, 29 Oct 2023 14:52:43 +0800 Subject: [PATCH] feat(customCursor.ts): add custom cursor functionality to improve user experience feat(stage.ts): implement stage functionality to display images and handle mouse events feat(stageNav.ts): add stage navigation functionality to navigate between images and close the stage fix(main.ts): fix import paths for customCursor, stage, and stageNav modules --- assets/ts/{ => desktop}/customCursor.ts | 0 assets/ts/{ => desktop}/stage.ts | 6 +++--- assets/ts/{ => desktop}/stageNav.ts | 4 ++-- assets/ts/main.ts | 6 +++--- assets/ts/mobile/collection.ts | 0 5 files changed, 8 insertions(+), 8 deletions(-) rename assets/ts/{ => desktop}/customCursor.ts (100%) rename assets/ts/{ => desktop}/stage.ts (97%) rename assets/ts/{ => desktop}/stageNav.ts (94%) create mode 100644 assets/ts/mobile/collection.ts diff --git a/assets/ts/customCursor.ts b/assets/ts/desktop/customCursor.ts similarity index 100% rename from assets/ts/customCursor.ts rename to assets/ts/desktop/customCursor.ts diff --git a/assets/ts/stage.ts b/assets/ts/desktop/stage.ts similarity index 97% rename from assets/ts/stage.ts rename to assets/ts/desktop/stage.ts index 8b22caf..94405e4 100644 --- a/assets/ts/stage.ts +++ b/assets/ts/desktop/stage.ts @@ -1,7 +1,7 @@ -import { incIndex, getState } from './state' +import { incIndex, getState } from '../state' import { gsap, Power3 } from 'gsap' -import { ImageJSON } from './resources' -import { Watchable } from './utils' +import { ImageJSON } from '../resources' +import { Watchable } from '../utils' // types diff --git a/assets/ts/stageNav.ts b/assets/ts/desktop/stageNav.ts similarity index 94% rename from assets/ts/stageNav.ts rename to assets/ts/desktop/stageNav.ts index f37009c..6d98c2c 100644 --- a/assets/ts/stageNav.ts +++ b/assets/ts/desktop/stageNav.ts @@ -1,6 +1,6 @@ import { setCustomCursor } from './customCursor' -import { decIndex, incIndex, getState } from './state' -import { increment, decrement } from './utils' +import { decIndex, incIndex, getState } from '../state' +import { increment, decrement } from '../utils' import { cordHist, isOpen, isAnimating, active, minimizeImage } from './stage' type NavItem = (typeof navItems)[number] diff --git a/assets/ts/main.ts b/assets/ts/main.ts index 2d58579..9d209bf 100644 --- a/assets/ts/main.ts +++ b/assets/ts/main.ts @@ -1,9 +1,9 @@ import { initResources } from './resources' import { initState } from './state' -import { initCustomCursor } from './customCursor' +import { initCustomCursor } from './desktop/customCursor' import { initNav } from './nav' -import { initStage } from './stage' -import { initStageNav } from './stageNav' +import { initStage } from './desktop/stage' +import { initStageNav } from './desktop/stageNav' initCustomCursor() const ijs = initResources() diff --git a/assets/ts/mobile/collection.ts b/assets/ts/mobile/collection.ts new file mode 100644 index 0000000..e69de29