Skip to content

47rooks/virtual-rubiks-cube

Repository files navigation

Virtual Rubiks Cube

The aims of this example are: Produce an OpenFL based Rubik's cube simulation Experiment with OpenGL in OpenFL working through Learn OpenGL - Graphics Programming by Joey de Vries Experiment with 2D and 3D graphics in the one application

The stack used is lime, openfl and haxeui.

Bugs

  • accordion sections are enabled for things like blending, culling, framebuffer when the configuration is no active. Not a huge deal but the controls cannot be effective then.

To Do

  • Immediate

    • both culling and framebuffer are much smaller scale scenes (unit cubes not 64) and the keyboard WASD movement does not account for that - add scaling
    • refactor point lights to base scene
    • the reset* class of functions is getting out of hand. A better solution is required that doesn't require so much duplication.
    • fix GLTF loader
      • handling of the materials
      • clean up code handling node/mesh recursion
      • comment fully
      • cleanup and/or refactor Mesh/Model to separate GLTF translation layer from generic data layer
    • add loading message as the model load is done - it takes a while
      • it turns out this is a bit tricky the way I planned. I added event sending support at the beginning of scene creation and at the end of the first render. Response to these events would be to disable and then re-enable the UI. This is not quite working. I'll leave it as is for now and revisit it later when perhaps I'll have a better idea how to do this - the main issue is the pointer-events:none styling which is not working as expected.
  • First

    • document code - in progress
    • add CPU processing for matrix operations for debug and printing
    • add bounding box calculations
  • add game controller support

    • very rudimentary and slightly clunky support is in place now
  • add camera movement by controller

  • fix -ve angle rotation operations

  • add cube rotation

    • how does this differ from a flying camera ?
  • refactor and simplify RubiksCube.updateLocations()

  • add error logging handler

  • handle window resize

  • Consider use of VAO to stop have to bind vertexAttribPointers on every render call

About

OpenGL in OpenFL using Rubik's cube as an example

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published