Abstract
This project presents a virtual museum, graphically designed with a WebGL library in javascript. It consists of three art rooms, one lobby, one hallway, and one elevator (Which has nothing to do now). Texture images are used as tiles for the floor, walls,
and ceiling for the rooms; also, it has beautiful artwork. Museum light control and color can be changed. Users can enter the museum from the lobby to the hallway then enter each art room to see the painting. The user can
meet a virtual visitor who randomly moves to see different art inside the art room.
Features:
One of the significant part of this project is collision detection. Without collision detection, the user could go through (ghost mode) into the walls or any other objects, and it could be an endless motion. The collision detection was implemented to
handle two cases. First, collision detection was implemented between user and museum walls. In a room, the door also a part of the wall, if the detected wall belongs to a door, it allows the user to enter or exit. If it’s
not a door, then the user moves against the wall based on their azimuth.
The second case was to detect the collision between user and the museum visitor. Each art room has one visitor roaming around the room, wondering the paintings. If the user collided with the visitor, she would make a sound. Museum visitor was designed
using two cubes with a hierarchical relationship. One big cube represents the body and another small box as head on top of the big box. So when the body cube moves, the head cube also takes the same motion related to the
body box. It’s the perfect implementation of elements with a hierarchical relationship.