imwithye commited on
Commit
a668dda
·
1 Parent(s): 5409b84
src/app/page.tsx CHANGED
@@ -10,12 +10,11 @@ export default function Home() {
10
  with Reinforcement Learning
11
  </div>
12
  <div className="text-gray-700">
13
- <a href="https://cross-entropy.ai">
14
- https://cross-entropy.ai
15
- </a>
16
  </div>
17
  </div>
18
  </div>
 
19
  <Canvas />
20
  </div>
21
  );
 
10
  with Reinforcement Learning
11
  </div>
12
  <div className="text-gray-700">
13
+ <a href="https://cross-entropy.ai">https://cross-entropy.ai</a>
 
 
14
  </div>
15
  </div>
16
  </div>
17
+
18
  <Canvas />
19
  </div>
20
  );
src/components/rotation-panel.tsx CHANGED
@@ -14,10 +14,12 @@ export const RotationPanel = ({ direction, face }: RotationPanelProps) => {
14
  const position: Record<string, [number, number, number]> = {
15
  front: clockwise ? [0.5, 0, 1.01] : [-0.5, 0, 1.01],
16
  back: clockwise ? [-0.5, 0, -1.01] : [0.5, 0, -1.01],
 
17
  };
18
  const rotation: Record<string, [number, number, number]> = {
19
  front: [0, 0, 0],
20
  back: [0, Math.PI, 0],
 
21
  };
22
  return (
23
  <mesh position={position[face]} rotation={rotation[face]}>
 
14
  const position: Record<string, [number, number, number]> = {
15
  front: clockwise ? [0.5, 0, 1.01] : [-0.5, 0, 1.01],
16
  back: clockwise ? [-0.5, 0, -1.01] : [0.5, 0, -1.01],
17
+ right: clockwise ? [1.01, 0, -0.5] : [1.01, 0, 0.5],
18
  };
19
  const rotation: Record<string, [number, number, number]> = {
20
  front: [0, 0, 0],
21
  back: [0, Math.PI, 0],
22
+ right: [0, Math.PI / 2, 0],
23
  };
24
  return (
25
  <mesh position={position[face]} rotation={rotation[face]}>
src/components/rubiks-cube.tsx CHANGED
@@ -28,6 +28,8 @@ export const RubiksCube = ({ roughness }: RubiksCubeProps) => {
28
  <RotationPanel direction="counter-clockwise" face="front" />
29
  <RotationPanel direction="clockwise" face="back" />
30
  <RotationPanel direction="counter-clockwise" face="back" />
 
 
31
  </group>
32
  );
33
  };
 
28
  <RotationPanel direction="counter-clockwise" face="front" />
29
  <RotationPanel direction="clockwise" face="back" />
30
  <RotationPanel direction="counter-clockwise" face="back" />
31
+ <RotationPanel direction="clockwise" face="right" />
32
+ <RotationPanel direction="counter-clockwise" face="right" />
33
  </group>
34
  );
35
  };