cubing / twisty.js Goto Github PK
View Code? Open in Web Editor NEWThe functionality of `twisty.js` is now part of `cubing.js`. Please see: https://js.cubing.net/cubing/twisty/
License: GNU General Public License v3.0
The functionality of `twisty.js` is now part of `cubing.js`. Please see: https://js.cubing.net/cubing/twisty/
License: GNU General Public License v3.0
I think the following is nice:
var cube = new twisty.cube(...)
This is similar to Three.js
.
Basically, an RFC process for (twisty)puzzles/speedcubing. I've had plans for this one since a really long while, but the Regs got in the way.
R 2L !== R2 L
, since a lot of thinking has never led to something else that is flexible and concise in most situations.).twisty.js
with a trivial translation. Java/C++ could handle these with only a few definitions, but that requires handling weird things like (implicit and explicit) slice specifications for big puzzles.Then have all devs (e.g. Lucas and Jeremy for now) review each other's code changes before merging pull requests.
I had planned to do this once I got the MVC for this in order (e.g. making it easy to use twisty.js in many different ways), but Jeremy leaped in too early. :-P
Which will be moved to alg.cubing.net
This just requires a negative direction flag, and handling inverse move transitions.
Also see cubing/alg.cubing.net#33
Making the window too narrow makes the cube go off screen left and right.
i.e. extend alg parsing to preserve comments.
Serialization should return the original text, except for normalized whitespace (outside of comments).
i.e. don't add spaces
If this uses an optional argument (rather than an option object), then we need to be careful about the interaction between this and #74 lest we create another JSON.stringify second arg.
Like AnimCube. This takes about 10 lines, and looks pretty nice. I didn't commit it because I need to handle single vs. double-sided textures better for that.
Cubes could have e.g. 3D and plan view (for #12). Ideally, all views should be able to animate.
Along with issue #10.
It's not really needed. In alg.cubing.net
, Angular can handle most of the interactivity itself.
Each move is animated a single frame, and then stops. Firefox 8 on Mac.
Jison gives line+column, but we usually have to convert that into string index to make it useful.
Many alg operations can be supported on "unflattened" algs (i.e. commutators and conjugates unexpanded).
It should be simple to write something to do this in general. It just requires something that can handle JSON traversal given handlers for the following nodes:
If I'm in charge of rendering cubes, they're going to look pretty, Gauss fix it with a needle.
Eventually, everything should be turned into a single include file with simple usage.
Also see #27 .
Perhaps this speeds up rendering if frames are slow.
https://github.com/mrdoob/three.js#usage
I started this a while ago (still uncommitted), but this needs to be done carefully some time. It needs to incorporate things like commutator and comment parsing, and the ability to make text displays of algs correspond to animations.
e.g.
var a = alg.cube.fromString("R U R'")
var b = a.invert()
Allows simplifying [R, U] [R, U] to [R, U]2
Question: is (R U) R == R (U R) ?
(While simplifying, I think it should. But structurally, it's unclear.)
Having an open-source license on this would be great, since I'd really like to make use of it.
This is more valuable for touch input, since it can help us iterate on the touch -> move mappings.
or
ior maybe
-instead of
'`)I actually think most of these are not good ideas, but it's a thought.
Probably requires #44.
For WCA scramblers, etc.
Right now, the animation is frame-based, which slows down when the browser does. It seems reasonable to compensate for the framerate by using interpolated time to update the progress of an animation.
Right now, they can slow down the framerate a lot on e.g. a mobile device.
Right now, it's "move".
i.e. the internal plastic. Works, but still not perfect.
i.e. restore the behaviour of the moveQueue
. Some devices might depend on this for reasonable performance.
Since switching to r60 of Three.js
, there have been some serious drawing artifacts.
Animation should be independent of frame rendering time.
The cube remains unresponsive after the first turn. "Solution": Reloading the page.
R.2L
is parsed as R .2 L
. It's probably better to forbid repetitions/inverses on raw pauses. Repeating dots are a beautiful alternative: R...L
The design should definitely be aiming to support this.
(Highlight text on a page, click bookmarklet to view animation. This can then easily be adapted for speedsolving.com)
And/or use prototypes on algs?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.