-
-
Save freem/7091946 to your computer and use it in GitHub Desktop.
my 3d wheel transform from syszero ssc special
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ScreenSelectMusic] | |
MusicWheelX=WideScale(SCREEN_CENTER_X+132,SCREEN_CENTER_X+144) | |
MusicWheelY=SCREEN_CENTER_Y+4 | |
MusicWheelOnCommand=SetDrawByZPosition,true;fov,45;rotationy,20; | |
[MusicWheel] | |
NumWheelItems=17 | |
# 3.9 metrics I use in the wheel transform: | |
ItemCurveX=20 | |
ItemSpacingY=44 | |
Wheel3DRadius=200 | |
CirclePercent=0.45 | |
ItemTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) \ | |
local curve3D = THEME:GetMetric("MusicWheel", "CirclePercent")*2*math.pi \ | |
local fRotX = scale(offsetFromCenter, -THEME:GetMetric("MusicWheel","NumWheelItems")/2,THEME:GetMetric("MusicWheel","NumWheelItems")/2, -curve3D/2,curve3D/2) \ | |
local radius = THEME:GetMetric("MusicWheel","Wheel3DRadius") \ | |
local curveX = THEME:GetMetric("MusicWheel","ItemCurveX") \ | |
local spacingY = THEME:GetMetric("MusicWheel","ItemSpacingY") \ | |
self:x( (1-math.cos(offsetFromCenter/math.pi))*curveX ) \ | |
self:y( (offsetFromCenter*scale(math.abs(offsetFromCenter), 0,THEME:GetMetric("MusicWheel","NumWheelItems")/2, spacingY,spacingY*0.625)) ) \ | |
self:z( -15*math.abs(offsetFromCenter*2.5) ) \ | |
self:rotationx((offsetFromCenter*13) * math.sin(180/math.pi)) \ | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment