An ultra-optimized, high-fidelity interactive 3D Bento-Grid Portfolio. Orchestrated with Next.js 16, React 19, Three.js, and GSAP, engineered for extreme performance, buttery smooth 60fps animations, and zero-jitter mobile responsiveness.
Welcome! This is my personal website and portfolio showcasing my journey as a Software Engineering specializing in Full-Stack Development, Software Architecture, and AI Orchestration. This personal portfolio is designed to be a physical proof-of-concept of advanced web engineering—coupling beautiful, premium WebGL/Three.js visual elements with mathematical and DOM-level micro-optimizations that deliver a flawless, high-speed UX.
This project represents a complete, ground-up optimization of interactive portfolio design, transforming heavy WebGL canvases into a lightweight, high-performance digital showcase.
- Framework Core: Next.js 16 (App Router) & React 19 utilizing experimental package import optimizations for zero bundle bloat.
- 3D Engine (WebGL): Three.js, React Three Fiber (R3F), and @react-three/drei for interactive shaders and 3D floating nodes.
- Physics & Mathematics: Custom-built lightweight neural network distance fields and mathematical vector systems.
- Fluid Motion & Scroll: Lenis Smooth Scroll combined with a custom-engineered GSAP 3 Magnetic Target Cursor.
- Dynamic Animations: Framer Motion 12 for section transitions and Bento grid card expansions.
- Language & Cleanliness: TypeScript (Strict Type Safety) using clean boundaries, modular hooks, and type-safe DTO structures.
A comprehensive engineering phase was executed to optimize execution times, eliminate layout thrashing, and reduce garbage collection overhead. Below are the key engineering solutions implemented:
- Trigonometric Precalculation: Avoided calling heavy trigonometric operations inside nested animation loops. Sine and cosine values are calculated once outside the loops, yielding an extreme frame-rate boost.
- Squared Distance Bailouts: Avoided expensive
Math.sqrtcalculations in our neural network distance checking by comparing squared distance values directly. - Variable & Array Hoisting: Hoisted internal pod coordinates and target cursor vectors to prevent redeclaring variables on every frame, eliminating Garbage Collection (GC) pauses.
- Throttled Target Cursor: The magnetic target snapping layout is throttled using a precise
elementFromPointimplementation restricted to60msintervals, completely preventing layout reflow storms. - Shared Scroll State: Eliminated repetitive DOM scroll offset reads by caching and sharing a single reactive scroll progress state across all pages.
- Scoped Transition Selector: Redefined stylesheet structures to transition only specific, performance-friendly selectors, completely avoiding global
*transition trackers.
- High-Compression AVIF Conversion: Transformed all heavy local PNG and JPEG images into highly compressed, lightweight AVIF files, decreasing initial page weight significantly.
- Experimental Package Imports: Configured Next.js to compile and bundle only the modules used from large WebGL and animation libraries (
three,framer-motion,r3f), reducing initial JS payloads.
The following table shows the statistical improvements and computational reductions achieved through custom engineering:
| Optimization Area | Technical Action Taken | Performance Gain / Reduction | Metric Change |
|---|---|---|---|
| Wave Trig Calculations | Precalculated sinX/cosZ outside nested loops |
98.9% |
|
| Cursor Layout Reflows | Throttled elementFromPoint to |
84.0% |
|
| GC Object Allocations | Cached Vector3 & Float32Array in Three.js |
100.0% |
|
| Redundant Arithmetic | Precomputed driftSpeed, driftAmp, spacing & offsets | 100.0% |
|
| DOM Reads in Loops | Shared reactive JS scroll progress state | 100.0% |
|
| Property Lookups | Hoisted target pod coordinates & mouse coords | 99.99% |
|
Inner-loop Math.sqrt |
Implemented squared-distance early bailouts | 99.1% |
|
| Constant Redeclarations | Hoisted bubbleRadius and precomputed baseZ
|
99.99% |
|
| Array Destructuring | Replaced temp variables with direct indexing [0]/[1]
|
100.0% |
|
| Cursor Array Allocations | Cached Array.from() array creation results |
100.0% |
|
| CSS Transition Tracking | Scoped transition styles to specific classes | 96.0% |
|
| Exponentiation Ops | Precomputed bubbleRadiusSq constants |
100.0% | Eliminated all inner-loop exponentiation |
Neural Network sqrt |
Replaced with direct squared-distance comparisons | 100.0% |
|
All heavy image files inside the assets folder were compressed and converted, dropping the total page weight by 88.7% without any visible loss in texture or detail:
-
d.jpeg
$\rightarrow$ d.avif |$517\text{KB} \rightarrow 373\text{KB}$ (27.8% smaller) -
1769180001217.png
$\rightarrow$ 1769180001217.avif |$5744\text{KB} \rightarrow 276\text{KB}$ (95.2% smaller) -
1769550926438.png
$\rightarrow$ 1769550926438.avif |$421\text{KB} \rightarrow 51\text{KB}$ (87.9% smaller) -
1769550926443.png
$\rightarrow$ 1769550926443.avif |$248\text{KB} \rightarrow 55\text{KB}$ (77.8% smaller) -
1769550926446.png
$\rightarrow$ 1769550926446.avif |$304\text{KB} \rightarrow 40\text{KB}$ (86.8% smaller) -
1769550926449.png
$\rightarrow$ 1769550926449.avif |$912\text{KB} \rightarrow 109\text{KB}$ (88.0% smaller) -
1769550926454.png
$\rightarrow$ 1769550926454.avif |$87\text{KB} \rightarrow 23\text{KB}$ (73.8% smaller) -
1769547129586.png
$\rightarrow$ 1769547129586.avif |$1148\text{KB} \rightarrow 139\text{KB}$ (87.9% smaller) -
1769547129614.png
$\rightarrow$ 1769547129614.avif |$527\text{KB} \rightarrow 79\text{KB}$ (85.0% smaller) -
1769547129625.png
$\rightarrow$ 1769547129625.avif |$117\text{KB} \rightarrow 33\text{KB}$ (71.4% smaller) -
1769547129628.png
$\rightarrow$ 1769547129628.avif |$106\text{KB} \rightarrow 17\text{KB}$ (83.7% smaller) -
1769550828466.png
$\rightarrow$ 1769550828466.avif |$262\text{KB} \rightarrow 30\text{KB}$ (88.5% smaller) -
1769550828468.png
$\rightarrow$ 1769550828468.avif |$513\text{KB} \rightarrow 41\text{KB}$ (92.0% smaller) -
1769550828473.png
$\rightarrow$ 1769550828473.avif |$240\text{KB} \rightarrow 13\text{KB}$ (94.6% smaller) -
1769550828475.png
$\rightarrow$ 1769550828475.avif |$350\text{KB} \rightarrow 13\text{KB}$ (96.3% smaller) -
1769550828478.png
$\rightarrow$ 1769550828478.avif |$85\text{KB} \rightarrow 10\text{KB}$ (87.8% smaller) -
1769551128774.png
$\rightarrow$ 1769551128774.avif |$105\text{KB} \rightarrow 21\text{KB}$ (80.3% smaller)
━━━ TOTAL ━━━
Original Assets Weight: 11.41 MB
AVIF Assets Weight: 1.29 MB
Saved Bundle Weight: 10.12 MB (88.7% reduction)
Below is the verified performance comparison between the unoptimized, standard portfolio structure and the current custom-engineered high-performance build.
- Optimized Scores: Run Lighthouse on this
mainbranch to compare the massive drop in Main Thread Work and initial load times.![]()
Metric Unoptimized (Original) Optimized (Current) Overall Improvement Performance — — — First Contentful Paint (FCP) — — — Largest Contentful Paint (LCP) — — — Cumulative Layout Shift (CLS) — — — Total Blocking Time (TBT) — — — Speed Index — — —
To run the optimized portfolio locally on your machine:
-
Clone the repository:
git clone https://github.com/davinakmalyasha/Portofolio.git cd Portofolio -
Navigate into the client workspace and install dependencies:
cd client npm install -
Start the local high-performance development server:
npm run dev
-
Build production bundle and test static generation locally:
npm run build npm run start

