mkv25.net games Open Menu Banner Image Brick Builder

Java brick builder processing 3d interface vector math intersect grid 2d plane click drag right mouse middle button camera controls scene

Scrapbook / Brick Builder
-0001/11/30 00:11:00

This is a simply paint and and build 3D program. Click on a tile to increase its height. My focus for this project was partly on that, but also on the interface - how the user interacts.

Also it plays with some mildly complex vector maths to find out where the mouse pointer intersects the 2D grid.

Special thanks to David Huebner (aka myT) for his help with various functions and methods (includnig the whole vector class) which helped to achieve my original goals.

Created by Markavian (2005|06|05)

First off, the big feature of this 3D scene are the camera controls, as listed below.

Right clicking and dragging horizontally rotates the scene

Right clicking and dragging vertically adjusts the vertical viewing angle

Clicking the middle button and dragging vertically allows zooms in and out

You can pan using the arrow keys.

To demonstrate proper interactive features with the scene I have implemented a grid that you can

click to add blocks to different squares. Each time you click on a square it adds a layer.

Left clicking and dragging across the grid adds a single layer.

SHIFT + Clicking removes a layer.

Other keyboard commands include:

C - Centers the camera to the current mouse position

R - Resets the scene to the centre of the grid

L - Moves the directional light in the scene to behind the camera.

N - Starts a new scene by clearing all the blocks

You need to have Java installed for this applet to work correctly.

Related