Giter VIP home page Giter VIP logo

waste-matters's Introduction

Waste Matters

Table of Contents

Table of contents generated with markdown-toc

Project purpose

Waste matters Ltd. offers waste and recycling solutions to Irish businesses. The interactive demo aims to advertise and sell polystyrene compactors. The demo will guide the user through a mini-game in which they will drag and drop polystyrene blocks into a compactor machine before turning it on. While interacting with the demo, the user will receive key facts about polystyrene recycling and waste matters. On completion of the demo, the user will have the option to ‘learn more’ which will lead them to the current waste matters website.

UX

User stories

  • As a user, I would like the user experience on the website to be intuitive.

  • As a user, I want to learn about polystyrene compactors and how they work.

  • As a user, I want to learn about polystyrene recycling in an engaging manor.

    • The interactive demo requires user engagement while displaying the information in a clear manor
  • As a user, I want my experience on the website to be enjoyable.

Strategy

Goal: To inform users about polystyrene recycling in an engaging manor and sell polystyrene compactors through waste matters Ltd.

Scope

  • An interactive demo utilizing Matter.js, a 2D rigid body JavaScript physics engine.

Surface

Color Scheme

  • Font color: #f0f8ff
  • background color: #14151F
  • User instructions: #ff0000

Typography

Roboto Mono is the font used on the webpage with monospace as the fallback font in the case of the default font failing to load correctly. The default font weight of 400 is used throughout the page.

Imagery

  • The imagery is cartoon-like in style.

Wireframes

Features

This project is an interactive game built on the 2d physics engine matter.js. It allows users to place polystyrene objects into a compactor and turn it on. This game serves the purpose of engaging the user and allowing for an alternative way of imparting information. Facts about polystyrene recycling, polystyrene compactors and waste matters appear as the user interacts with the demo.

Technologies Used

Languages used

  • HTML5
  • CSS3
  • JavaScript

Frameworks, Libraries & Programs Used

Testing

Code Validation

  • HTML was validated using W3C Markup Validation Service.

  • CSS was validated using W3C CSS Validation Service - Jigsaw

  • JavaScript was passed through the linter jshint with no warnings

Functionality test

Num Test Action Outcome Image Result Notes
1 On page-load a user notification appears Load page on devices with a variety of resolutions Image of user notification Pass
2 The 'next' button makes a user instruction arrow appear Click next button Image of user instruction arrow Pass
3 The 'P' button when clicked, moves the user instruction arrow, spawns a polystyrene block and presents a new user message Click spawn button Image of user instruction arrow, polystyrene block and new message Pass
4 The 'P' button when clicked immediately after next button behaves as expected Click spawn button immediately after next button Image of user instruction arrow frozen on spawn button Fail User instruction arrow freezes on spawn button
5 The compactor switch ejects compacted polystyrene from the machine Click compaction switch Image of compacted polystyrene ejected from the machine Pass
6 The compactor switch triggers the final user message Click compaction switch Image of final user message Pass
7 The 'Learn more' button when clicked opens in a separate tab and brings users to wastematters.ie Click Learn more button Image of wastematters.ie opening in a new tab Pass

Problems during development

Num Problem Fix
1 Textures not appearing on matter.js shapes Disable wireframes under render.options.wireframes
2 Polystyrene blocks not appearing behind the compactor image in the canvas (3D effect) The order in which you add objects to the world determines the z-index. Adding the foreground image of the compactor after the polystyrene blocks allows the blocks to appear behind the image, giving the desired 3D effect.
3 When user creates a polystyrene block, they appear in-front of the Use add to world method within the polystyrene creation function and re-add
images, giving no 3D effect. the images on each call.
4 On-screen messages were interfering with the mouse drag function Add a style attribute of 'pointer-events: none;' to the message div
Image of mouse drag bug Image of mouse drag bug fix
5 Could not get vertices to work correctly on matter.js This problem was not resolved.
Image of vertices bug

Browser Compatibility

Num Browser Test result
1 Chrome Passed
2 Opera Passed
3 Mozzilla Passed

Responsiveness Testing

  • Chrome developer tools was used to test a wide variety of device sizes and resolutions.

  • The website has been tested on an iPhone 5, Samsung Galaxy s10, Acer swift 3 and a desktop PC with a 1080p and 4k monitor.

  • Am I responsive image

Unresolved Bugs

  • Users can turn on the compactor before placing any objects into it.

  • When smaller devices are in horizontal view mode it can break the responsiveness due to canvas limitations with matter.js. However, as this website is primarily targeted to professionals looking to buy polystyrene compactors it is very likely it will be viewed on a desktop.

Google Lighthouse Scores

Deployment to Github Pages

  1. Create a Github account at github.com

  2. Click on the 'New' button in the top left corner

  3. Enter a name for the repository, check the 'Add a README file' box

  4. Click 'Create repository'

  5. Open the repository in preferred integrated development environment

  6. Save changes by clicking the save button

  7. Once a feature has been successfully created using the 'git add .' command to stage the changes made

  8. Then use the command 'git commit -m"[enter commit title here]"'

  9. All meaningful changes to the code should have its own commit

  10. To push the commits to Github use the command 'git push'

  11. Once the website is ready for deployment return to github.com

  12. Click on the 'settings' tab

  13. Scroll down to the 'GitHub Pages' section

  14. Click the 'None' dropdown button

  15. Select the master branch

  16. Click save

  17. After a few minutes, the site will be published to GitHub pages and can be accessed using the URL at the GitHub Pages section

Clone

  1. Follow this link to my Github Repository.

  2. Click 'Clone or Download'.

  3. In the Clone with HTTPs section, click the 'copy' icon.

  4. In your local Integrated Development Environment open Git Bash.

  5. Change the current working directory to where you want the cloned directory to be located.

  6. Type 'git clone', and paste the URL you copied before.

  7. Press enter and your local clone will be available.

Credits

Media

Acknowledgments

waste-matters's People

Contributors

wbwren avatar

Watchers

 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.