Nano Banana Pro
Agent skill for nano-banana-pro
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Goblin Grinder is a WebGL2-based 3D game built with TypeScript and Vite. The project features a custom renderer with shadow mapping, GLB model loading, and spring physics for camera movement. The goal is to experiment with various render passes and shaders to achieve a pixel art look with quality lighting.
npm run devnpm run build (runs TypeScript compiler followed by Vite build)npm run previewnpm run typecheck (TypeScript type checking without emit)npm run lint (Biome linter with auto-fix)npm run format (Biome code formatter)Entry Point:
src/main.ts
Game class manages the entire application lifecyclerequestAnimationFrameThe renderer uses a multi-pass approach:
Shadow Pass (Light.ts) - For each light source:
Main Pass (Camera.ts) - From camera perspective:
Mesh (Mesh.ts)
loadTexture() methodcreateCube(), createPlane(), fromMeshData()Entity (Entity.ts)
Player (Player.ts)
move(x, z, deltaTime)Camera (Camera.ts)
setFollowTarget() - Sets goal position based on playerupdateFollow() - Smooth camera movement with overshootLight (Light.ts)
renderShadowMap() - Renders depth pass for shadowsShader (Shader.ts)
GLBLoader (GLBLoader.ts)
MeshData interfaceVertex Shader (basic.vert)
Fragment Shader (basic.frag)
Depth Shaders (depth.vert/depth.frag)
Keyboard Controls (main.ts)
Spring Physics
Rotation
Models: Placed in
src/assets/models/
Mesh.loadTexture(url)Shaders: Placed in
src/shaders/
?raw suffix for syntax highlighting