Code Monkey home page Code Monkey logo

alg.cubing.net's Introduction

v2

alg.cubing.net development is currently frozen. "v2" will be part of Twizzle, and is currently:

If you have any requests, please file them under cubing.js for now!








alg.cubing.net

The new generation of alg/reconstruction viewing and sharing.
Built on alg.js and twisty.js.

Examples

Goals

  • Solid desktop and mobile support.
  • Beautiful alg/reconstruction playback.
  • Convenient alg/reconstruction input (i.e. Heise input, live feedback).
  • Support for all official puzzles, and popular unofficial ones.
  • Simultaneous development with twisty.js:
    • Replacement for Java twistypuzzle applets (Heise/Randelshofer/Jelinek/Petrus).
    • State-of-the-art alg parsing and transformation/calculation.
    • General extensibility/hackability, but hopefully all contributed back in one place for everyone to use.
      • Few dependencies.

History

alg.cubing.net's People

Contributors

backus avatar jpbulman avatar lgarron avatar michalbe avatar supersammy7000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alg.cubing.net's Issues

Fix color schemes

Right now, only BOY and Japanese work.

  • Decide on a validation scheme.

Keyboard shortcuts.

Should work cross-platform, and not interfere with textareas or AlgTyper input.

I should probably use a lightweight library for this.

Figure out cursor-based for "algorithm" type

Typing out an algorithm right now will result in always showing the cursor's position, which is latest move -- and therefore always the last move in an algorithm that ends with the solved state!

(Well, actually, that doesn't happen, but that's more of a fortunate edge case than intended behaviour.)

Tests

  • Encoding
    • + should be encoded as %2B so that + in the URL can be interpreted as a space.

Update favicon live.

Can be done by creating another camera and rendering to 16x16 or 32x32.
Retina screens could actually show awesome detail.

This could either track the actual animation, or the scramble/end state.

Probably done best once a move, using a move change listener (#30).

Clean up/debug animation+textarea

Two-way functionality exists, but it's a bit buggy. Requires

  • Using twistyScenes more efficiently.
  • Probably a new angular directive?

Highlight current move in textarea while animating.

I quite like how changing the textarea selection worked in 6804e40. It started down the path of using a cursor in the textarea to match with the animation (see #16 for the opposite direction). However:

  • This triggers a keyboard on mobile, which can cause a layout change.
  • It might occasionally be useful to keep the cursor in a single place while changing animating independently.

Display feedback upon failed alg parse.

The console error is nearly descriptive enough to show directly to the user, but I need to figure out where to put it (probably an error box under the textarea, with highlighting of the bad move).

Error: Parse error on line 1:
R U '
----^
Expecting 'EOF', 'NUMBER', 'BASE_W', 'BASE_LOWERCASE', 'BASE_UPPERCASE', 'BASE_ROTATION', 'BASE_SLICE', 'PAUSE', 'WHITESPACE', 'OPEN_BRACKET', 'COMMA', 'CLOSE_BRACKET', 'COLON', 'OPEN_PARENTHESIS', 'CLOSE_PARENTHESIS', 'NEWLINE', got 'PRIME'

Note that the init/alg textareas are already highlighted when there's a mistake (since e59418b).

Handle setting changes while the alg is animating/paused.

Right now, changing the stage during 3x3x3 animation actually works well, but:

  • The animation starts paused, but the pause button doesn't change to play because we're creating a new TwistyScene instead of firing a listener.

Consider whether to continue animating or always pause on a setting change.

Changing puzzle size is slightly trickier.

Pick a good textarea font.

I don't think monospace is appropriate here (@qqwref once spent a whilte trying to convince me of this).

Still, I think we can do better than Helvetica. (In particular, primes could be more prominent.)

Semantic Alg Display

Simple version: syntax highlighting (comments in grey, etc.)

Fancier: In playback view, turn inline comments for reconstructions into <h2> headings between lines.

Reset/handle animation when updating alg.

Right now, if your animation is on the third move, you can edit your alg and see the in-progress third move update live.

However, the range slider doesn't move, and perhaps it would just make the most sense to reset it or follow the cursor (#16).

Persist some settings to disk?

e.g. using cookies/localstorage to restore settings after page reload.

The "Playback Options" are good candidates here. (speed, hint stickers).

Rethink progress bar UI.

Something like this YouTube-style slider would be awesome, since people instantly recognize it: http://codepen.io/jonomcleish/pen/rDIsJ

However, I want the CSS to be simple, with a proper range fallback for browsers that don't support fancy styling.

Also, mobile would benefit from a very large target area, and being able to click anywhere on the bar to jump there (right now, you have to hit the thumb target before moving an input range on iOS).

To summarize:

  • Easy to recognize as a slider that you can click/touch and drag.
  • Simple implementation with an obvious fallback (i.e. range slider).
  • Practical to use on mobile.

Don't add " | " to title if alg is empty

Look at the HTML page title for http://alg.cubing.net/?title=Title

It's a bit tricky because the title filter is defined outside the controller where $scope.alg is accessible. Probably just requires some alternate syntax for the binding in the <title> tag to make it available.

This should probably just show "alg.cubing.net" of both the title and alg are blank.

Pretty URL escaping

In particular, translate:

  • R U R' -> R_U_R-
  • 2-3Rw' // It's a comment! to:
    • 2-3Rw%27_%2F%2F_It%27s_a_comment! or
    • 2-3Rw-_%2F%2F_It%27s_a_comment!

(Note the comment, and the dash in the slice range.)

This is best done using a URL encoding function in in alg.sign_w, but that would require a parseable alg string to use.
I don't quite like the idea of semantic URL unescaping, though. It would amount to a second serialization format for SiGN.

Properly handle alg wrapping / font size.

view=playback could benefit from way larger alg display.

However, things should fit on one line where possible. Scrambles already overflow on mobile a lot.

(Consideration: what if someone just inputs something without newlines, or with a very long comment.)

Custom image name.

Right now, dragging canvasPNG out of Chrome gives png.png. We could use the title and/or the alg itself.

While editing, move animation to cursor.

The inverse already works.

Of course, commutators would need to make a canonical choice about which instance of a move to use, but I think it's fine to just use the first.

See #21 for the opposite direction.

Features for Release

  • URL updating.
  • Push URL onto history after 10 seconds. (#28)
  • Pretty URLs.
  • Sharing.
  • Textarea Placeholders.
  • Reduce logging
  • Parsing feedback (#22)
  • Playback controls
  • Cube size
  • Title
  • Reset button (#14)
  • Color scheme validation (#23)
  • Properly handle "solution" type. wontfix (let's keep it simple)
  • Logo (#27)

Bugs:

  • Scrobbling
  • Color scheme. (#23)
  • Scramble/alg wrapping (#25)
  • angular.js doesn't recognize no-trim on textareas.

Maybe:

  • AlgTyper mode (#19)
  • Full-page animation mode.
  • Highlight current move. (#21)

Translation from alg.garron.us to alg.garron.net

In particular:

  • convert URL parameter names
  • Translate any WCA algs into SiGN
    • I want to keep alg.cubing.net SiGN-only, to encourage standardization. In order to enable this, the implementation of sign_w allows Rw as an alias for r. I'm comfortable with supporting this variant of SiGN indefinitely.

Better info pane design.

I'm currently thinking "flat", with a banded region for each section (slightly different background colors across the entire info pane).

Offline support

Very easy. https://github.com/lgarron/offline-bootstrap

Even nicer would be to do it automatically in Chrome (which doesn't ask for permission), but last I looked into it the browser-detection had to be server-side.

I'm reluctant to do this while I'm still actively developing, since caching issues make it really annoying to debug. For now, people can download a .zip from the page.

More efficient scrobbling

In particular, puzzle state caching and/or exploiting locality (don't start from the beginning to go back two moves).

URL History

Push to URL history:

  • After major changes (e.g. on setting changes or init/alg textarea blur).
  • After 10 seconds of inactivity.

What does Chrome do to group actions when using Cmd-Z in a textarea?

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.