maze

maze

English | 日本語

maze

maze is a walk-through sample with first-person movement, collision resolution, a view-locked spot light, Compute Effects, and a radar display. The maze is generated at runtime.

main.js builds a seeded 15×15-cell DFS maze and assembles floors, walls, the ceiling, doorway side jambs, and top lintels from Primitive.cuboid(). It does not load a fixed ModelAsset.

The maze has one floor. The corridor grid width is 2.5m, wall thickness and ceiling thickness are 0.1m, the ceiling underside is 3.0m above the floor, the player base is at y = 0.0, and EyeRig.eyeHeight = 1.6m. Because wall thickness is counted inside the corridor module, the clear walking width is about 2.4m.

Floor colors are split into normal corridor, room, start area, and goal area. After the maze is carved, several 2 x 2 cell or larger rooms are stamped over it, their inner walls are removed, and room entrances are created with width 2.0m and height 2.4m. The top lintel height is 0.55m, leaving a 0.05m gap below the 3.0m ceiling underside.

The radar uses the same heading-up method as walk_around and draws nearby collision segments on a 2D canvas in the top-right corner. The doorway lintel stays above the player collision cylinder, so it does not appear as a blocking segment and it does not show up on the radar. The side jambs remain collision targets.

Detailed rules for maze generation, rooms, doors, collision handling, and radar display are documented in maze_spec.md.

How to run

webg features used

Controls

What to verify

Files