Its an idea I have had running about in my head for a few days. I'm wondering what people think of it.
This would be the rough layout, obviously a LOT more features, etc.. But this was the idea I had in my head.
sync on
sync rate 200
randomize timer()
make object cube 1, -20
position object 1, 0, 0, 0
NumOfPages = 4
for i = 1 to NumOfPages+1
make object plain 9+i, 10, 10
position object 9+i, -8 + ((i-1) * 16.0 / NumOfPages), -9, 5
point object 9+i, -8 + ((i-1) * 16.0 / NumOfPages), 0, 5
scale object 9+i, 10, 10, 10
color object 9+i, rgb(256,0,0)
next i
autocam off
position camera 0, 0, -15
point camera 0, 0, 0
set point light 0, 0, 0, -15
selectedPage = 0
flyStatus = 0
flyTimer = 0
frameTime# = 1.0
startTime = timer()
do
frameTime# = (frameTime# * 0.8) + ((timer() - startTime) * 0.2)
startTime = timer()
objectOver = pick object(mousex(), mousey(), 10, 20)
text 10, 10, "Over: " + str$(objectOver)
if mouseclick() = 1 AND objectOver > 0 AND (flyStatus = 0 OR flyStatus = 2)
selectedPage = objectOver - 10
if flyStatus=0 then flyStatus = 1 else if flyStatus = 2 then flyStatus = 3
flyTimer = timer()
endif
if flyStatus = 1
flyStatus = flyPageIn(selectedPage, (timer() - flyTimer) * 0.001)
endif
if flyStatus = 3
flyStatus = flyPageOut(selectedPage, 1.0 - ((timer() - flyTimer) * 0.001))
endif
sync
loop
end
function flyPageOut(pageNum, t#)
selectedObject = pageNum + 10
xOffset# = -8 + (pageNum * 16.0 / NumOfPages)
x# = CubicBezier(xOffset#, xOffset#, 0.0, 0.0, t#)
y# = CubicBezier(-9, -9, 0.0, 0.0, t#)
z# = CubicBezier(5.0, 5.0, 5.0, -5.0, t#)
pX# = CubicBezier(xOffset#, xOffset#, 0.0, 0.0, t#)
pY# = CubicBezier(-5, -5, 0, 0, t#)
pZ# = CubicBezier(5.0, 5.0, 0.0, -5.0, t#)
size# = CubicBezier(10, 10, 100, 100, t#)
scale object selectedObject, size#, size#, size#
point object selectedObject, pX#, pY#, pZ#
position object selectedObject, x#, y#, z#
if t# <= 0.0 then Status = 0 else Status = 3
endfunction Status
function flyPageIn(pageNum, t#)
selectedObject = pageNum + 10
xOffset# = -8 + (pageNum * 16.0 / NumOfPages)
x# = CubicBezier(xOffset#, xOffset#, 0.0, 0.0, t#)
y# = CubicBezier(-9, -9, 0.0, 0.0, t#)
z# = CubicBezier(5.0, 5.0, 5.0, -5.0, t#)
pX# = CubicBezier(xOffset#, xOffset#, 0.0, 0.0, t#)
pY# = CubicBezier(-5, -5, 0, 0, t#)
pZ# = CubicBezier(5.0, 5.0, 0.0, -5.0, t#)
size# = CubicBezier(10, 10, 100, 100, t#)
scale object selectedObject, size#, size#, size#
point object selectedObject, pX#, pY#, pZ#
position object selectedObject, x#, y#, z#
if t# >= 1.0 then Status = 2 else Status = 1
endfunction Status
function CubicBezier(A#, B#, C#, D#, T#)
invT# = 1.0 - T#
result# = (A# * (invT# ^ 3.0)) + (3.0 * B# * (invT# ^ 2.0) * T#) + (3.0 * C# * invT# * (T# ^ 2.0)) + (D# * (T# ^ 3.0))
endfunction result#
When I say thats basic - I mean it! Lol..
I thought it would be nice to code in a 3D environment. It would make it easier to arrange documents..
I am interested to heard what people think about this idea.