Skip to content

Commit e410fa2

Browse files
committed
chroe: delayedCall
1 parent 239eae3 commit e410fa2

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

public/imgs/meidi/17.png

278 KB
Loading

src/components/WikiHeader.svelte

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
scroll();
1919
}
2020
21-
function scroll() {
21+
async function scroll() {
2222
if (!textEl) return;
2323
gsap.killTweensOf(textEl);
2424
25+
await gsap.delayedCall(0.02, () => {});
26+
2527
const totalWidth = textEl.scrollWidth;
2628
const singleCopyWidth = totalWidth / 2;
2729
const viewportWidth = textEl.parentElement?.clientWidth || 0;
@@ -44,7 +46,7 @@
4446
}
4547
4648
onMount(() => {
47-
scroll();
49+
setTimeout(scroll, 50);
4850
});
4951
5052
onDestroy(() => {
@@ -53,15 +55,15 @@
5355
</script>
5456

5557
{#if visible && wikiText}
56-
<div class="fixed top-0 left-0 w-full bg-white/70 backdrop-blur-sm shadow-xs z-50 h-8 lg:h-10 flex items-center">
58+
<div class="fixed top-0 left-0 w-full bg-white/70 backdrop-blur-sm shadow-xs z-10 h-8 flex items-center">
5759
<div class="relative overflow-hidden flex-1 h-full">
5860
<div
5961
bind:this={textEl}
6062
class="absolute whitespace-nowrap text-sm lg:text-base will-change-transform text-[var(--textColor)] top-0 left-24 h-full flex items-center"
6163
>
6264
{#each Array(2) as _}
6365
{#each lines as line}
64-
<span class="pl-3">•</span>
66+
<span class="pl-3">•&nbsp;</span>
6567
{line}
6668
{/each}
6769
{/each}

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const assets = {
7878
{
7979
audio: asset('audios/meidi.mp3'),
8080
video: asset('videos/meidi-eat.webm'),
81-
photo: 16,
81+
photo: 17,
8282
},
8383
{
8484
audio: asset('audios/jojo.m4a'),

src/lib/IconManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class IconManager {
2828

2929

3030
private boundHandleClick: (event: MouseEvent) => void;
31-
private maxZIndex: number = 1;
31+
private maxZIndex: number = 11;
3232

3333
constructor (
3434
scene: THREE.Scene,
@@ -267,7 +267,7 @@ export class IconManager {
267267
const visibleIcons: THREE.Mesh[] = [];
268268
if ((this.videoIcon.material as THREE.MeshBasicMaterial).opacity > 0) visibleIcons.push(this.videoIcon);
269269
if ((this.audioIcon.material as THREE.MeshBasicMaterial).opacity > 0) visibleIcons.push(this.audioIcon);
270-
if ((this.photoIcon.material as THREE.MeshBasicMaterial).opacity > 0) visibleIcons.push(this.photoIcon);
270+
if ((this.photoIcon.material as THREE.MeshBasicMaterial).opacity > 0) visibleIcons.push(this.photoIcon);
271271

272272
if (visibleIcons.length === 0) return;
273273

0 commit comments

Comments
 (0)