MG
H - thumb background height (max possible thumb height)
E - content size (e.g. elements count * element size)
C - container size (on screen)
S - content shift
size = H / max(1.0, E/C)
pos (top corner) is (H-size)*(S/(E-C))
Size: a a a
MG
P
MG
MG
int oldTrackWidth = trackWidth;
int newTrackWidth = getWidth();
float locationPercent = (float) thumbX / (float) oldTrackWidth;
thumbX = (int) (newTrackWidth * locationPercent);
if (document != null) {
float viewportWidth = width;
float contentWidth = document.getWidth();
float thumbPercentage = viewportWidth / contentWidth;
thumbWidth = (int) (trackWidth * thumbPercentage);
}
P
A
MG
A
Vector3 right = Vector3.Cross(Vector3.up, lookVector).normalized;
Vector3 up = Vector3.Cross(lookVector, right).normalized;
Vector3 newLookVector = lookVector + right * value.x + up * value.y;
P
P
P
MG
MG
P
EZ
AB
A
A
A
A