diff --git a/src/models/icosahedron/components/Variants.gd b/src/models/icosahedron/components/Variants.gd index c8db746..db3c8cc 100644 --- a/src/models/icosahedron/components/Variants.gd +++ b/src/models/icosahedron/components/Variants.gd @@ -5,78 +5,6 @@ class_name IcosahedronVarints const dst := 0.794 const l := 0.577 -## 20 faces 12 vert 30 egdes -# quad -> rect -const figure_variants_v2 = { - '111' = { - '111' = Vector4( l, l, l, dst), - '110' = Vector4( l, l, l, dst), - '011' = Vector4( l, l, l, dst), - '101' = Vector4( l, l, l, dst), - }, - '011' = { - '111' = Vector4( l, l, l, dst), - '110' = Vector4( l, l, l, dst), - '011' = Vector4( l, l, l, dst), - '101' = Vector4( l, l, l, dst), - }, - '010' = { - '111' = Vector4( l, l, l, dst), - '110' = Vector4( l, l, l, dst), - '011' = Vector4( l, l, l, dst), - '101' = Vector4( l, l, l, dst), - }, - '110' = { - '111' = Vector4( l, l, l, dst), - '110' = Vector4( l, l, l, dst), - '011' = Vector4( l, l, l, dst), - '101' = Vector4( l, l, l, dst), - }, - '101' = { - '111' = Vector4( l, l, l, dst), - '110' = Vector4( l, l, l, dst), - '011' = Vector4( l, l, l, dst), - '101' = Vector4( l, l, l, dst), - }, - '001' = { - '111' = Vector4( l, l, l, dst), - '110' = Vector4( l, l, l, dst), - '011' = Vector4( l, l, l, dst), - '101' = Vector4( l, l, l, dst), - }, - '000' = { - '111' = Vector4( l, l, l, dst), - '110' = Vector4( l, l, l, dst), - '011' = Vector4( l, l, l, dst), - '101' = Vector4( l, l, l, dst), - }, - '100' = { - '111' = Vector4( l, l, l, dst), - '110' = Vector4( l, l, l, dst), - '011' = Vector4( l, l, l, dst), - '101' = Vector4( l, l, l, dst), - }, -} -# 3 golden rectangles -# rect x -# rect y -# rect z -# to define eash face we ned to know what cartesian quadrant it belongs -# and what rectangle it touches (can be 2 or all) -# RX have normal (1,0,0) and so on -enum GoldenRect {RX, RY, RZ} -# so each rect can be represented as vector -# and we can use them in conmbinations also - -# RX + RY = (1,1,0) - - -static func get_face( rects: Array[GoldenRect], quad: Vector3i): - if len(rects) == 3: - return figure_variants_v2[quad]['111'] - pass - - const figure_variants = { 8: { name = "top_left", @@ -114,3 +42,10 @@ const figure_variants = { name = "default", }, } + +# TDOO: make in sync w/ UV map from discrete_control.tscn +var figure_variants_v2 := { + 0: Quaternion().normalized(), + 1: FaceLock.left_q.normalized(), + # ... +}