Giter Club home page Giter Club logo

zerodayarcade / html5_3d-wireframe-cube Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 8 KB

A software rendered 3D Wireframe Cube demo for HTML. No 3D libraries and no Canvas used

Home Page: https://zerodayarcade.com/demos/3d-wireframe

License: MIT License

HTML 100.00%
3d 3d-cube 3d-cube-animation 3d-projection 3d-projection-to-2d game-dev game-development html html5 javascript matrix matrix-multiplication no-canvas software-renderer software-rendering wireframe 3d-wireframe

html5_3d-wireframe-cube's Introduction

3D Wireframe Cube - JavaScript Software Rendering

A software rendered 3D Wireframe Cube demo for HTML5. No 3D libraries and no HTML Canvas are used. The 3D transformations and 3Dโ†’2D calculations are done in the JavaScript code.


3dwf


This demo modulates the the vertices of SVG polygons on the DOM to produce a rotating 3D cube. No HTML Canvas is used. The rendered triangles are in fact <polygon> elements nested within an <svg> element. The value of the points attribute for each <polygon> is changed every frame (using setInterval) based on the the 2D coordinates obtained from the 3Dโ†’2D projection of the triangles in 3D space calculated explicitly in the JavaScript.

This demo was inspired by One Lone Coder / javidx9's brilliant video tutorial on building a 3D engine from scratch in C++. If you are new to 3D graphics or software rendering, I highly recommend you watch his tutorial here.

See the Live Demo

html5_3d-wireframe-cube's People

Contributors

zerodayarcade avatar

Stargazers

 avatar  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.