Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

High-Performance Interactive 3D Portfolio — Davin Akmal Yasha

image image image image

Tech Stack

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.


About Me & This Project

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.

Architectural Vision & Tech Stack

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.

The Massive Optimization Suite

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:

1. WebGL & Math Processing

  • 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.sqrt calculations 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.

2. DOM & Layout Thrashing Prevention

  • Throttled Target Cursor: The magnetic target snapping layout is throttled using a precise elementFromPoint implementation restricted to 60ms intervals, 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.

3. Media & Bundle Optimization

  • 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.

Performance Optimization Statistics

WebGL & Core Logic Metrics

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% $18,200 \rightarrow 205$ operations per frame
Cursor Layout Reflows Throttled elementFromPoint to $60\text{ms}$ interval 84.0% $100+ \rightarrow 16$ layout calls per second
GC Object Allocations Cached Vector3 & Float32Array in Three.js 100.0% $540 \rightarrow 0$ allocations per second
Redundant Arithmetic Precomputed driftSpeed, driftAmp, spacing & offsets 100.0% $36,000+ \rightarrow 0$ calculations per second
DOM Reads in Loops Shared reactive JS scroll progress state 100.0% $2 \rightarrow 0$ DOM reads per frame
Property Lookups Hoisted target pod coordinates & mouse coords 99.99% $36,400 \rightarrow 4$ lookups per frame
Inner-loop Math.sqrt Implemented squared-distance early bailouts 99.1% $9,100 \rightarrow \sim80$ square root calls/frame
Constant Redeclarations Hoisted bubbleRadius and precomputed baseZ 99.99% $9,100 \rightarrow 1$ redeclarations per frame
Array Destructuring Replaced temp variables with direct indexing [0]/[1] 100.0% $1,310 \text{ temp variables} \rightarrow 0$ per frame
Cursor Array Allocations Cached Array.from() array creation results 100.0% $60 \text{ arrays} \rightarrow 0$ allocations per second
CSS Transition Tracking Scoped transition styles to specific classes 96.0% $\sim2,000 \rightarrow \sim80$ transition trackers
Exponentiation Ops Precomputed bubbleRadiusSq constants 100.0% Eliminated all inner-loop exponentiation
Neural Network sqrt Replaced with direct squared-distance comparisons 100.0% $7,140 \rightarrow 0$ square root calls

Media Asset Optimization (AVIF Conversion)

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)

Lighthouse Audits & Benchmarks

Below is the verified performance comparison between the unoptimized, standard portfolio structure and the current custom-engineered high-performance build.

  • Unoptimized Scores: Run Lighthouse on the original branch and note the Performance, Accessibility, Best Practices, and SEO numbers.
  • image
  • Optimized Scores: Run Lighthouse on this main branch to compare the massive drop in Main Thread Work and initial load times.
image
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

🛠️ Installation & Local Development

To run the optimized portfolio locally on your machine:

  1. Clone the repository:

    git clone https://github.com/davinakmalyasha/Portofolio.git
    cd Portofolio
  2. Navigate into the client workspace and install dependencies:

    cd client
    npm install
  3. Start the local high-performance development server:

    npm run dev
  4. Build production bundle and test static generation locally:

    npm run build
    npm run start

About

A Repository for my Portofolio Website that i made in 2026 | Deployed

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages