fix: resolve middle slice state sync and zero-step drag freeze
All checks were successful
Deploy to Production / deploy (push) Successful in 6s
All checks were successful
Deploy to Production / deploy (push) Successful in 6s
This commit is contained in:
@@ -47,6 +47,15 @@ export class RubiksJSModel {
|
||||
this.visual.applyMove(move);
|
||||
}
|
||||
|
||||
rotateSlice(axis, direction, steps = 1) {
|
||||
// A middle slice rotation (M, E, S) logically translates to rotating
|
||||
// the two intersecting outer layers in the opposite direction, while
|
||||
// the centers (the core abstract frame) remain perfectly stationary.
|
||||
// The frontend simultaneously handles rotating the camera to complete the illusion.
|
||||
this.rotateLayer(axis, 1, -direction, steps);
|
||||
this.rotateLayer(axis, -1, -direction, steps);
|
||||
}
|
||||
|
||||
toCubies() {
|
||||
return this.visual.toCubies();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user