aboutsummaryrefslogtreecommitdiffstats
path: root/src/user/index.ts
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-08-29 00:13:46 +0200
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-08-29 00:13:46 +0200
commiteb3e41175b3d0e27c3ba1c2a95387c73214cc058 (patch)
treea7a63d9a12d0903eb029d10ce8f8c783462c89a6 /src/user/index.ts
parent6e71808f30904c0bae101fb159a6a964860793ee (diff)
downloadvideotool-eb3e41175b3d0e27c3ba1c2a95387c73214cc058.tar.gz
videotool-eb3e41175b3d0e27c3ba1c2a95387c73214cc058.tar.bz2
videotool-eb3e41175b3d0e27c3ba1c2a95387c73214cc058.tar.lz
videotool-eb3e41175b3d0e27c3ba1c2a95387c73214cc058.zip

feat: more changes

Diffstat (limited to 'src/user/index.ts')
-rw-r--r--src/user/index.ts26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/user/index.ts b/src/user/index.ts
index c6969c3..051939b 100644
--- a/src/user/index.ts
+++ b/src/user/index.ts
@@ -2,7 +2,7 @@ import { type FrameTime, type InitConfig } from '$/lib/Player/Video';
import ThreeVideo from './ThreeVideo';
import AudioURL from './03. Lemaitre, Jennie A. - Closer - 40sec version.flac?url'
import * as THREE from 'three';
-import { LazyCell } from '$/lib/vendor/lazy-cell';
+import { LazyCell } from '$/lib/vendor/lazy-cell/index.ts';
type FontInfo = {
family: string, size: number, weight?: number
@@ -47,20 +47,6 @@ export default class Video extends ThreeVideo {
})!
const threeInit = super.init(config).catch(e => ([1, e] as const))
- // const v = document.createElement('video')
- // v.load()
- // await new Promise((rs, rj) => {
- // let debounce = false;
- // const timeout = setTimeout(() => {
- // if (!debounce) rj('Failed to load video - timed out.')
- // }, 1000);
- // v.addEventListener('load', () => {
- // rs(void 0)
- // clearTimeout(timeout)
- // }, {
- // once: true
- // })
- // })
const rs = await threeInit
if (rs && rs[0] === 1) { console.error(rs[1]); throw new Error('Failed to initialize ThreeJS!'); }
}
@@ -130,8 +116,8 @@ export default class Video extends ThreeVideo {
break;
}
case beat >= 8.4 && beat < 13: {
- const text = `Like${beat >= 9 ? ` has a hyprminimal design` : ''}${beat >= 11 ? ' new' : ''}`;
- const longTextWidth = getTextSize(this.ctx, `Like has a hyprminimal design new`, AdDefault)
+ const text = `Like${beat >= 9 ? ` doesn't have a version number` : ''}${beat >= 11 ? ' new' : ''}`;
+ const longTextWidth = getTextSize(this.ctx, `Like doesn't have a version number new`, AdDefault)
renderText(this.ctx, text, '#646663', AdDefault, { x: center[0] - longTextWidth.width / 2, y: center[1] }, 'start')
break;
}
@@ -157,7 +143,7 @@ export default class Video extends ThreeVideo {
this.scene.add(this.lighting)
this.scene.add(this.uiDark);
- const progress = (beat - 15)
+ const progress = (beat - 15 - 1 / 30)
this.uiDark.rotation.x = bezier(progress, -0.5, -0.5, -0.5, -0.5);
this.uiDark.rotation.y = bezier(progress, 0.7, 0.6, 0.4, 0.4);
this.camera.position.z = bezier(progress, 4, 5, 5, 8);
@@ -206,8 +192,8 @@ export default class Video extends ThreeVideo {
this.ctx.fillRect(0, 0, this.w, this.h);
// renderText(this.ctx, `Need a new AI assistant?`, '#646663', AdDefault, { x: center[0], y: center[1] }, 'center')
}
- const text = `Accents ${beat >= 34.5 ? `so ` : ''}${beat >= 34.75 ? 'hyprblue, ' : ''}${beat >= 35.8 ? 'we created them' : ''}${beat >= 37 ? ' hypr' + (beat >= 38.1 ? 'new' : '') : ''}`;
- const longTextWidth = getTextSize(this.ctx, `Accents so hyprblue, we created them hyprnew`, AdDefault)
+ const text = `Responses ${beat >= 34.5 ? `so ` : ''}${beat >= 34.75 ? 'hyprblue, ' : ''}${beat >= 35.8 ? 'we created them' : ''}${beat >= 37 ? ' hypr' + (beat >= 38.1 ? 'new' : '') : ''}`;
+ const longTextWidth = getTextSize(this.ctx, `Responses so hyprblue, we created them hyprnew`, AdDefault)
renderText(this.ctx, text, beat >= 34.75 ? '#ffffff' : '#646663', AdDefault, { x: center[0] - longTextWidth.width / 2, y: center[1] }, 'start')
break;
}