File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -2914,6 +2914,16 @@ PrefabInstance:
29142914 m_Modification :
29152915 m_TransformParent : {fileID: 3894943745770935112}
29162916 m_Modifications :
2917+ - target : {fileID: 8240667959069599073, guid: 4c2638b770f13374f82fe34db29dc2bf,
2918+ type : 3}
2919+ propertyPath : ColorRange
2920+ value : 0.8
2921+ objectReference : {fileID: 0}
2922+ - target : {fileID: 8240667959069599073, guid: 4c2638b770f13374f82fe34db29dc2bf,
2923+ type : 3}
2924+ propertyPath : ColorOffset
2925+ value : 0
2926+ objectReference : {fileID: 0}
29172927 - target : {fileID: 8240667959069599074, guid: 4c2638b770f13374f82fe34db29dc2bf,
29182928 type : 3}
29192929 propertyPath : m_RootOrder
Original file line number Diff line number Diff line change 44using Conway ;
55using Johnson ;
66using UnityEngine ;
7+ using UnityEngine . Serialization ;
78using Wythoff ;
89
910
@@ -22,7 +23,9 @@ public class VrUiPoly : MonoBehaviour
2223 public int PrismQ ;
2324
2425 public Gradient colors ;
25-
26+ public float ColorRange ;
27+ public float ColorOffset ;
28+
2629 public ConwayPoly _conwayPoly ;
2730 public bool Rescale ;
2831 private MeshFilter meshFilter ;
@@ -44,8 +47,7 @@ void Start()
4447 void Init ( )
4548 {
4649 meshFilter = gameObject . GetComponent < MeshFilter > ( ) ;
47- int maxColors = 6 ; // TODO what should this really be?
48- previewColors = Enumerable . Range ( 0 , maxColors ) . Select ( x => colors . Evaluate ( ( float ) x / maxColors ) ) . ToArray ( ) ;
50+ previewColors = Enumerable . Range ( 0 , 8 ) . Select ( x => colors . Evaluate ( ( ( x / 8f ) * ColorRange + ColorOffset ) % 1 ) ) . ToArray ( ) ;
4951 MakePolyhedron ( ) ;
5052 }
5153
You can’t perform that action at this time.
0 commit comments