Hello everyone. I'm new to this forum.
I'm making a new SM5 theme. What I need now is to make each MusicWheel item transform in different way. And I found out this in {metrics.ini}:
Spoiler (click to view)[ScreenSelectMusic]
.....................
CDTitleOnCommand=draworder,10;scaletoclipped,247,190;diffusealpha,0;finishtweening;sleep,0.3;linear,1;diffusealpha,1
CDTitleOffCommand=sleep,0.2;linear,0.5;zoom,0.5;decelerate,0.9;zoom,3
CDTitleFrontCommand=
CDTitleBackCommand=
.....................
---[[this is the transformation command part]]---
CDTitleOnCommand=draworder,10;scaletoclipped,247,190;diffusealpha,0;finishtweening;sleep,0.3;linear,1;diffusealpha,1
CDTitleOffCommand=sleep,0.2;linear,0.5;zoom,0.5;decelerate,0.9;zoom,3
CDTitleFrontCommand=
CDTitleBackCommand=
CDTitleX=SCREEN_CENTER_X
CDTitleY=SCREEN_CENTER_Y-7
................
MusicWheelX=-SCREEN_CENTER_X3
MusicWheelY=SCREEN_CENTER_Y-7
MusicWheelOnCommand=zoom,2;diffusealpha,0;addx,SCREEN_CENTER_X4;fov,72;linear,.5;zoom,1;diffusealpha,1
MusicWheelOffCommand=Hidden,1
......................
[MusicWheel]
.....................
ItemTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) HandleWheel(self,offsetFromCenter,itemIndex,numItems) end;
.....................
Yeah. Some kind of link to HandleWheel function in {utils.lua}:
Spoiler (click to view)function HandleWheel( self,offsetFromCenter,itemIndex,numItems )
local x = offsetFromCenter * 180
if offsetFromCenter >= 1 then
x = scale(offsetFromCenter+1,-1,1,-.5,.5) * 180
elseif offsetFromCenter <= -1 then
x = scale(offsetFromCenter-1,-1,1,-.5,.5) * 180
end
self:zoom(math.cos(offsetFromCenter/math.pi))
self:x( x )
self:z((-clamp(math.abs(offsetFromCenter),0,1)*170)-math.abs(offsetFromCenter))
self:rotationy( clamp( offsetFromCenter, -1, 1) * 75)
end
I need to make my MusicWheel to behave like this video. Well, check the [1:38] part. The inner part.
Unfortunately the guy who made this theme (Intrmns perhaps) has packed it so I can't get any elements from it.
I really need help. Thanks so much!
I'm making a new SM5 theme. What I need now is to make each MusicWheel item transform in different way. And I found out this in {metrics.ini}:
Spoiler (click to view)[ScreenSelectMusic]
.....................
CDTitleOnCommand=draworder,10;scaletoclipped,247,190;diffusealpha,0;finishtweening;sleep,0.3;linear,1;diffusealpha,1
CDTitleOffCommand=sleep,0.2;linear,0.5;zoom,0.5;decelerate,0.9;zoom,3
CDTitleFrontCommand=
CDTitleBackCommand=
.....................
---[[this is the transformation command part]]---
CDTitleOnCommand=draworder,10;scaletoclipped,247,190;diffusealpha,0;finishtweening;sleep,0.3;linear,1;diffusealpha,1
CDTitleOffCommand=sleep,0.2;linear,0.5;zoom,0.5;decelerate,0.9;zoom,3
CDTitleFrontCommand=
CDTitleBackCommand=
CDTitleX=SCREEN_CENTER_X
CDTitleY=SCREEN_CENTER_Y-7
................
MusicWheelX=-SCREEN_CENTER_X3
MusicWheelY=SCREEN_CENTER_Y-7
MusicWheelOnCommand=zoom,2;diffusealpha,0;addx,SCREEN_CENTER_X4;fov,72;linear,.5;zoom,1;diffusealpha,1
MusicWheelOffCommand=Hidden,1
......................
[MusicWheel]
.....................
ItemTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) HandleWheel(self,offsetFromCenter,itemIndex,numItems) end;
.....................
Yeah. Some kind of link to HandleWheel function in {utils.lua}:
Spoiler (click to view)function HandleWheel( self,offsetFromCenter,itemIndex,numItems )
local x = offsetFromCenter * 180
if offsetFromCenter >= 1 then
x = scale(offsetFromCenter+1,-1,1,-.5,.5) * 180
elseif offsetFromCenter <= -1 then
x = scale(offsetFromCenter-1,-1,1,-.5,.5) * 180
end
self:zoom(math.cos(offsetFromCenter/math.pi))
self:x( x )
self:z((-clamp(math.abs(offsetFromCenter),0,1)*170)-math.abs(offsetFromCenter))
self:rotationy( clamp( offsetFromCenter, -1, 1) * 75)
end
I need to make my MusicWheel to behave like this video. Well, check the [1:38] part. The inner part.
Unfortunately the guy who made this theme (Intrmns perhaps) has packed it so I can't get any elements from it.
I really need help. Thanks so much!
Last edited: 20 August 2015 10:47pm