W1
Week 1. Introduction to Creative Web Dev.
1. VS Code + Claude Code setup
- VS Code (Visual Studio Code) = Your Editor (Where you code)
- Claude Code = Your Coding Agent (Who codes with you)
- After the introduction of LLMs (ChatGPT, Claude AI), many developers started to integrate LLMs within their programming
- AI-integrated editors (Cursor AI, GitHub Copilot) came first. Now the agent runs as a CLI (Command Line Interface) inside your editor's terminal, reads and edits your files, runs your commands
- Alternatives: OpenAI Codex, Gemini CLI, Cursor AI
- Relatively new, the next 'Game Changer' might change within a couple of months
- Install: Claude Code + the Claude Code extension in VS Code
- Open your project folder in VS Code, open the terminal, type
claude - Models (platform.claude.com pricing, per 1M tokens)
- Claude Fable 5.1: input $10 / output $50
- Claude Opus 5.5: input $4 / output $20
- We'll use Opus 5.5 in class due to cost. Type
/modelinside Claude Code to switch
- Harness:
AGENTS.md - Git as your checkpoint
git diff: What did the agent change?git restore .: Throw away what the agent changedgit add .+git commit -m "...": Save a checkpoint you can come back to
2. What is Next.js?
- React.js: State-of-the-Art Frontend Framework developed by Meta
- Limitation of React: Frontend-only tool, relatively low-level/too simple
- Introduction of Next.js: React-based + Server-side-Rendering + SEO + Other optimisations….
- Next.js: App Router vs. Pages Router
- App Router: Next.js 13+,
app/directory, Server Components by default - Pages Router: The old way of doing Next.js,
pages/directory, Client-first logic - We use the App Router
- Disclaimer: When looking for Tutorials & Googling for resources, please do consider if the code is written in App Router or Pages Router. LLMs also mix them up: say "App Router" in your prompt
- App Router: Next.js 13+,
3. Use this template
- https://github.com/jeanyoon-choi/id412-2026
- This is the place where we'll host lecture notes/in-class coding sessions within the next three weeks
- 'Use this template' → 'Create a new repository' → your own repository (e.g.
id412-yourname) - Open up your parent file directory on VS Code terminal
git clone https://github.com/YOURNAME/id412-yourname.git- Open up your id412-yourname file directory on VS Code
- Your repository is already connected to your GitHub (
git remote -v)
4. Download the dependencies
- What is a Package Manager?
- Packages: Code that someone else had written for you
- You can download different 'packages' via Package Manager
- Examples: Three.js, Tone.js, Socket.io, ….
- npm vs. yarn vs. pnpm
- npm: Default & Heavy
- yarn: Lighter
- pnpm: Fast package manager saving disk space
- Let's use pnpm
- Terminal Line Commands
pnpm install- Installs all packages written in the package.json
pnpm add <package name>- Installs designated package
pnpm dev- Kicks off your localhost, now ready to code!
5. Hello World~!
- Navigate localhost:3000 on your browser
- Chrome as default
- Say hi to the lecture notes!
- Where is this code coming from?
app/page.tsx- localhost:3000
- How do you navigate to other URLs?
app/experiments/w1/time-interval/page.tsx- localhost:3000/experiments/w1/time-interval
- Every folder with a
page.tsxinsideapp/becomes a URL
- What are each directory for?
app/→ Where you handle Routes/Pages, and where most of things happenapp/lecture/→ These notesapp/experiments/w1/,w2/,w3/→ In-class coding, one folder per experimentapp/final/→ Your final projectapp/api/→ Server side api calling (W3)
hooks/→ React's Custom Hooks (useSocket, W2)public/→ Where you store your assets (images, videos, 3d models)node_modules/→ Packages codes downloaded from pnpm
- Code structure
- Each experiment folder has
page.tsxand*.module.csspage.tsx: Your logic and JSX components*.module.css: CSS Modules powered styling
"use client"on the first line when you use state, effects, events, browser APIs
- Each experiment folder has
Now let's start coding!
Time interval
- Simple Time Interval (ex. localhost:3000/experiments/w1/time-interval)
- Miyajima Tatsuo-inspired Time Interval LINK
Mouse move
- Simple Mouse Move Visual
- Simple Kaonashi
- Scary Kaonashi
- James Turrell-inspired interaction LINK
Image
- Simple Image
- Multiple Images
- Grid Images
- Overlap Images
- Chaotic Images
Video
- Simple Youtube iframe (Kim Beom LINK)
- Youtube iframe with designated start time
- Multiple Youtubes
- Overlap Youtubes
Data
- Simple Data Calling
- Data with Date
- Simple Data Vis
Word-puzzle (Beta)
- Simple Word Puzzle
- Experimental Typography
6. GLSL
- What is GLSL?
- OpenGL Shading Language: a small C-like language that runs on the GPU, not in Javascript
- Your program runs once per vertex (vertex shader) and once per pixel (fragment shader), all of them in parallel
- Fragment shader: given a pixel coordinate (and time, mouse, …), return a colour. That's it
- Thousands of pixels at once → things that are too slow in a Canvas loop become free
- How does it connect to Three.js?
ShaderMaterial: a material whose vertex/fragment shaders you write yourselfuniforms: values you pass from Javascript into the shader every frame (time, mouse, resolution, …)- A single full-screen plane + a fragment shader = a 2D canvas painted by the GPU
- What is it good for?
- Per-pixel fields: gradients, noise, flow, distance fields, blur, feedback
- Large numbers of particles / instances
- Post-processing: effects over the whole frame
- Not good for: layout, text, UI logic. Let React/CSS do that
- References
GLSL examples
- Hello Fragment Shader: colour from uv
- Time & mouse uniforms
- Noise field
- Feedback
7. Three.js
- What is Three.js?
- A Javascript 3D Library
- 3D + Javascript, Web 3D, Open Source (Free!), Coding-based
- Interactive, Accessible, Incorporable with pre-built 3D Models
- Vanilla Three.js = Vanilla Javascript + Three.js
- I.e. Not using React Three
- Do-able but longer code, not bonded with React Logic
- What is React-Three?
- Series of frameworks/integration strategy to use Three.js efficiently and in a React Way
- React-Three Fiber: React renderer for Three.js LINK
- React-Three Drei: Collection of Ready-to-use utilities/help functions LINK
- React-Three Postprocessing: Post-processing Effects LINK
- React-Three Rapier/Cannon: Physics Library LINK
- Not exactly a React-Three integration, but React Spring (Animation Library) LINK
- Why Three.js?
- Cinema 4D: Static 3D Moving Image, GUI-based, High Accessibility, Low Interactivity
- Unity: Interactive 3D Game, GUI + C# Coding, Low Accessibility, High Interactivity
- Three.js: Interactive web-based 3D environment, Javascript-based Coding, Mid Accessibility, Mid Interactivity
- When to Use Three.js
- Interactive Web
- Integrated Web
- Easy-to-access Demo (No Installation)
- 'Wow' Effect
- Future of Web / WebXR
- Why learn 3D Web Development?
- Simply better visual & aesthetic
- Potentially future of the web
- Future of Web UI
- Future of Immersive Web
- You can lead the scene!
- Steep Learning Curve… Start small & lean
- Good Three.js Examples/References
- Three.js Reference LINK
- React-Three Fiber References LINK
- Web Art & Experiments
- Google A&C Heartbeat of the Earth LINK
- The WebGL Globe, GitHub Contribution Graph (3D Data Visualisation)
- Portfolios: Active Theory (Particles), Bruno Simon (Car-based)
- My Works: Passage of Water, Uncharted Territory LINK
- Good Three.js Tutorials
Setup & Primitives: Let's Code from Scratch
- Hello Three.js: Build a Cube
- Additional Lights
- Moving Around the Scene
- OrbitControls, @react-three/drei
- Different Geometries? Box, sphere, cylinder, cone?
- More bunches of geometries: LINK
- Disclaimer: This is a Vanilla Three.js Not React-Three Logic
- Different Materials? MeshBasic? MeshNormal? MeshStandard?
- Multiple Meshes
- Hint: Use
new Array(n).fill(0).map((_, i) => ...) - Or use your agent
- Hint: Use
- Animations
- useFrame from @react-three/fiber
- Load your custom 3d Model
- Gltf-2-jsx LINK
- Environment Map
8. Deployment
- Deploying: Making your localhost-coded web-app live, accessible throughout the world!
- Next.js → Easy Deployment via Vercel
- Sign-up Vercel https://vercel.com/
- First, you need to push your code to GitHub. On your VS Code Terminal, type
git add .git commit -m "Update"git push
- Now your code repository on your GitHub is up to date
- Head to vercel https://vercel.com/
- Add New > Project > Import Git Repository > 'Import' > Framework Preset set Next.js > Deploy
- Tada!
- From now on, every
git pushredeploys