Giter Site home page Giter Site logo

tskgungun / css-tetris-3d Goto Github PK

View Code? Open in Web Editor NEW

This project forked from subztep/css-tetris-3d

0.0 0.0 0.0 42.3 MB

Tetris-like code experiment in the CSS 3D space.

Home Page: https://subztep.github.io/css-tetris-3d

License: The Unlicense

HTML 3.87% Pug 1.66% TypeScript 71.70% CSS 22.77%

css-tetris-3d's Introduction

CSS Tetris 3D

🚧 Work In Progress...ish γƒΎ(`γƒ˜ Β΄)οΎ‰οΎž

This is an unfinished Tetris game implied experiment with CSS 3D view and belonging perspective settings.

Tetromino aka block movement is implemented as expected but rotation only on the Z axis is enabled by default. Collision detection in 3D space goes beyond the original purpose of this thing.

Demo

Live on GitHub Pages.

Running locally as usual β€” clone && npm i && npm start.

Configured Inputs

Input Event
Up / W Move (or rotate) on X axis
Down / S Move (or rotate) on X axis backwards
Left / A Move (or rotate) on Y axis
Right / D Move (or rotate) on Y axis backwards
Q Move on Z axis backwards (for test πŸ‘»)
E Move on Z axis (for test πŸ‘»)
(left?) SHIFT or ALT + move key Toggle rotation
SHIFT + Mouse move Perspective follows mouse cursor
Mouse scroll Change perspective
Both mouse buttons Pointless perspective underload

GUI

For other tweaks please find the implemented dat.GUI runtime. The most intriguing state parameters are connected. Probably only these toggleables below are nebulous.

Property State changes
live Moving tetrominos automatically like a game.
screwAxisX Enable 3D rotation on X axis.

Outcome

  • Fun and easy to work with, spectacular with the combination of animation keyframes without any supplementary knowledge.
  • Performance differences are visible β€” especially with unoptimised code β€” within different CSS engines.
  • Feels basic compared to WebGL. Aspire to postβ€’ Flash/jQuery image carousel fallout but I don't really see any real-life consumption on this level. However, there is potential to bring A-Frame like 3D markup for messes.

css-tetris-3d's People

Contributors

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