RedditPP Mascot

RedditPP

r/threejs • … • u/Dan_Fury

I made a 3D pumpkin carver in three.js: knife loops actually cut pieces out, and a candle lights it from inside

Free, no sign-up: https://techplay.co.th/carve-and-sort/pumpkin-maker/

How it works: the pumpkin's surface is unwrapped into a few 512x512 maps (paint colour, carve depth, holes), and every tool just stamps into those maps. The shell is displaced by the depth map, and rind walls are built along the edges of each hole, so cuts show the pumpkin's thickness. When a knife stroke ends near where it started, it's treated as a closed polygon and cut through, then a flood fill finds every piece fully enclosed by cuts and drops it out. Hollow it and a candle lights it from inside.

A pumpkin is saved as its list of strokes, so the share code is only a few hundred characters. It's a port of the carving code from my Unreal game Carve and Sort (Steam, 27 Oct), and codes paste straight into the game.

Feedback on the carving feel is very welcome.

— 0