Giter VIP home page Giter VIP logo

amusement-park's Introduction

Amusement-Park

A WebGL program of a 3D Merry-Go-Round and billboard sign. It incorporates computer graphics concepts including 3D modeling, lighting, shading, texture mapping, animation, and user interaction. This webpage was developed following the book Interactive Computer Graphics - A Top-Down Approach with WebGL by Edward Angel & Dave Shreiner.

In this program, each object class defines the position, color, normals, texture coordinates , and texture type for each vertex pushed to the shader. Initial position calculations are calculated, then transformation calculations are done at render time. Lighting calculations are done in the shaders. Phong shading in the fragment shader as a point light (Red light coming from the left-front) and Gaurand shading in the vertex shader as a directed light (Blue light coming from the right-back).

Dr. Angel provides useful matrix and vector functions in files found in the Common directory. The MerryGoRound directory contains the following files I worked on:

  • AmusementPark.html Main webpage that handles the model/projection transformations for final position and lighting calculations for final color.
  • AmusementParkDriver.js Driver file with the initialization function for the program. Initiliazes the Merry-Go-Round and Sign objects. Creates, fills, and bitmaps both textures. Contains the render function to continously loop through to create a dynamic 3D experience.
  • sign.js Defines a Sign object: a flat square created with two triangles. A good example of the minimum required to draw an object in this program.
  • MerryGoRound.js Defines a Merry-Go-Round object uses each of the following primitvive classes. Handles the movement position transformations for each object at render time.
  • horse.js Defines a horse object, made up of a cone head and cube body.
  • cone.js Defines a Cone object.
  • cylinder.js Defines a Cylinder object.
  • shortCube.js Defines a ShortCube object.
  • sphere.js Defines a Sphere object.

amusement-park's People

Contributors

evelaz26 avatar

Watchers

 avatar

Forkers

tommyteavee

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.