Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"tailwindcss": "^4.2.2"
},
"devDependencies": {
"@types/node": "^24.12.0",
"@types/node": "^25.5.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"typescript": "^6.0.2",
Expand Down
54 changes: 27 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
import { useEffect, useRef, useState } from "react";

interface Particle {
x: number;
y: number;
baseX: number;
baseY: number;
size: number;
color: string;
scatteredColor: string;
letterIndex: number;
life: number;
}

export default function App() {
const canvasRef = useRef<HTMLCanvasElement>(null);
const mousePositionRef = useRef({ x: 0, y: 0 });
Expand All @@ -21,18 +33,6 @@ export default function App() {

updateCanvasSize();

type Particle = {
x: number;
y: number;
baseX: number;
baseY: number;
size: number;
color: string;
scatteredColor: string;
letterIndex: number;
life: number;
};

let particles: Particle[] = [];
let textImageData: ImageData | null = null;

Expand Down Expand Up @@ -87,7 +87,7 @@ export default function App() {
animate(scale);
}

function createParticle(_scale: number) {
function createParticle(_scale: number): Particle | null {
if (!ctx || !canvas || !textImageData) return null;

const data = textImageData.data;
Expand Down
12 changes: 7 additions & 5 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2022",
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
Expand All @@ -15,11 +15,13 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"baseUrl": ".",
"paths": { "@/*": ["src/*"] }
"noUncheckedSideEffectImports": false,
"paths": { "@/*": ["./src/*"] }
},
"include": ["src"]
}
8 changes: 1 addition & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"files": [],
"references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
"references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }]
}
7 changes: 5 additions & 2 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2023",
"lib": ["ES2023"],
"target": "ESNext",
"lib": ["ESNext"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
Expand All @@ -13,6 +13,9 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
Expand Down
Loading