Hi Cride5,
I think I finally understood the MOVES and PANEL MOVES of a model, but I think the example of the SKEWB cube has a problem.
I did a lot of tests and the skewb did not worked.
I just copied the example to a file called
skewb2.js and I renamed all the "SKEWB" to "SKEWB2" in the file.
A tried to create a Skewb2 cube, but it did not rendered. Only a single white square was rendered.
I started commenting the code to see what part was causing the problem. So I found that the problem was occurring because of the
TTk.Puzzle.SKEWB2.moves.
If I comment this part, the skewb is rendered normally.
I think the problem is in the parameter
TYPE: T.ABOVE. If I suppress this parameter, the cube is rendered.
Example of the original code that did not work (copied from
http://cube.crider.co.uk/twistysim.html )
'L': {plane: [pnl[20][0], pnl[20][3], pnl[25][2], pnl[25][1]], angle:-120, type: T.ABOVE},
Example of the code without TYPE parameter that worked (rendered), but does not rotate....
'L': {plane: [pnl[20][0], pnl[20][3], pnl[25][2], pnl[25][1]], angle:-120, angle:120},
I tried other things like using quotes or double quotes, but nothing worked.
Other atempts that does not work:
'L': {plane: [pnl[20][0], pnl[20][3], pnl[25][2], pnl[25][1]], angle:-120,
type: "T.ABOVE"},
'L': {plane: [pnl[20][0], pnl[20][3], pnl[25][2], pnl[25][1]], angle:-120,
type: 'T.ABOVE'},
'L': {plane: [pnl[20][0], pnl[20][3], pnl[25][2], pnl[25][1]], angle:-120,
type: T.above},
'L': {plane: [pnl[20][0], pnl[20][3], pnl[25][2], pnl[25][1]], angle:-120,
(type: T.ABOVE)},