Giter Club home page Giter Club logo

carhud's Introduction

Car Heads Up Display

This is a Processing 3.x program that displays a simple HUD for a car with some interactivity. The user will be able to see the speed, rpm, oil level and temperature of the car as well as being able to toggle different buttons such as indicators and various lights. All buttons in the program are responsive and will pulse a colour when activated.

The program has been build with reusability and modularity in mind, so although the display is pretty basic most of the main componants can be 'configured' to allow for different uses.

The best example of this is the Speedometer class which has the following options that can be specified before the render() method is called:

  • Whether the module uses the clockwise or anti-clockwise system
  • What the base starting angle is(What angle corresponeds to 0 degrees inside the module)
  • Set start speed value(What is the starting integer on the speedometer)
  • Set the sizes for all the borders(Unlimited amount of borders can be specified)
  • What colours each border will be
  • A gradient can be passed in to colour the notches of the speedometer as well as a solid colour for all
  • Whether each alternate notch will be shortened to look more like a typical speedometer
  • Whether a custom set of strings should be used instead of numbers between a certain range
  • The distance from the notch labels (E.g speed string) and their corresponding notches
  • The beginining and ending angle for the notches
  • Length and colour of speedometer needle
  • Colour of the inner and outer gauges
  • Size/radius of the speedometer
  • Stroke weight of the notches
  • More

Any values that are not specified by the user of the module are given smart default values so that the modules is both highly customisable yet easy to use.

Different objects work together to achieve a certain effect, for example the brightnessPulse object is used to generate colours for other objects to model a pulsing effect. Different buttons share simple communications such as the hazard light and the indicator lights. The hazard light turns on both the indicator lights but other than this instance both indicator lights will never be on at the same time. Clicking one will cause the program to check whether the other is active and set it to unactive if needed.

Module structure

The general structure of each model is as follows

  1. Private Global variables
  2. Contructor(s)
  3. Get methods
  4. Set methods</br
  5. Private methods

The execution structure of each module is generally the following

  1. Call contructor and pass basic information
  2. Pass extra information as needed so the module looks and acts like needed.
  3. Call the render() method
    3A) Defaults will be calculated for optional variables that were not specified
    3B) Module will render inself

Link to video demo: Demo!

Video

carhud's People

Contributors

kdchambers avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.