Skip to content

Commit

Permalink
[cubing/twisty] Set corner cam for Pyraminx.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Jul 1, 2021
1 parent 7108e0a commit c035206
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cubing/twisty/dom/TwistyPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
ExperimentalStickering,
HintFaceletStyle,
PuzzleID,
pyraminxCameraPosition,
SetupToLocation,
TwistyPlayerConfig,
TwistyPlayerInitialConfig,
Expand Down Expand Up @@ -370,8 +371,11 @@ export class TwistyPlayer extends ManagedCustomElement {
if (this.puzzle[1] === "x") {
return cubeCameraPosition;
}
if (this.puzzle === "skewb") {
return cornerCameraPosition;
switch (this.puzzle) {
case "skewb":
return cornerCameraPosition;
case "pyraminx":
return pyraminxCameraPosition;
}
return centeredCameraPosition;
}
Expand Down
1 change: 1 addition & 0 deletions src/cubing/twisty/dom/TwistyPlayerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const centeredCameraPosition = new Vector3(
// TODO
export const cubeCameraPosition = new Vector3(3, 4, 5);
export const cornerCameraPosition = new Vector3(4, 4, 4);
export const pyraminxCameraPosition = new Vector3(0.6, 3, 5); // TODO: center puzzle in frame, use x=0 but increase y

// TODO: turn these maps into lists?
export const setupToLocations = {
Expand Down

0 comments on commit c035206

Please sign in to comment.