This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Waitdev_'s profile picture

Animations! (Effect)

Started by Waitdev_, 14 October 2015 - 09:46 AM
Waitdev_ #1
Posted 14 October 2015 - 11:46 AM
Effect API

What is it?
"Effect" is a simple API, with you guessed it, effects! these
are simple functions I've came up with for projects I've
been working on, which are pretty useful. some of them have
some optimization features like instead of paintutils.drawLine(1,1,51,1)
to draw a line, I'd make it write a string as long as i need it to be.

Isn't this too simple? I can just write my own functions!
well, you have to think of those functions. simple.
and that takes a bit.

Will there be more functions?
Yes. I will update the pastebin code from time to time with
update notes.

Can i ask more unnecessary questions?
No. I don't know what you people want to know.

I want to make pointless stuff with a pointless API!
Well, if you do want to download this pointless
API, you can do so with Pastebin. just copy and paste the
code here!

pastebin get NHCf3J47 effect
if you need the code, here it is. or, you can use the link like
used 400 times already.

Well, what are the functions?
lucky i made a list perfect for people like you.
fadeIn() -Simple fade black-white
fadeOut() -The opposite, white-black.
scroll(color) -slowly scrolls for more tension in your programs.
grow(x,y,color,size,speed) -grows a "perfect" square, with the height*0.66 trick.
fadeTextIn(t,x,y,bCenter) -Fades text, white-black.
fadeTextOut(t,x,y,bCenter) -Same thing, black-white
vLine(color,x) -Slowly draws an ugly line down the page.
hLine(color,y) -More lines. this time going across
fadeLineIn(x,y,l) -Well, now you fade that line to make things better. black-white
fadeLineOut(x,y,l) -Same thing. white-black
popup(x,y,color,size) -Popup box! (somewhat broken.)
fadeBoxIn(x1,y1,x2,y2) -Fades box in, pretty laggy with rendering. may fix that some time. black-white
fadeBoxOut(x1,y1,x2,y2) -Same thing, what do you expect :P/>
hBars(br,col) -Horizontal bars, br is the break between them, col is colour.
vBars(br,col) -Same thing, but verticle.
fadeHBarsIn(br) -Fades horizontal bars, the next 4 are pretty self explanatory. black-white
fadeHBarsOut(br) -Fades out. white-black.
fadeVBarsIn(br) -Verticle. black-white
fadeVBarsOut(br) -Fades out. white-black again.

Yeah, not really too much to offer. That's why we have suggestions!
Reply with anything you've thought of below.

Just to add, I know this isn't really too advanced. but, we do know it
will be updated and it isn't supposed to be as fancy as something
like Surface or Flair.

Feedback as always is appreaciated!
[right]i bet i did something[/right]
[right]wrong in this post.[/right]
Creator #2
Posted 14 October 2015 - 11:55 AM
Is it possible to use vLine for matrix like animation?
Waitdev_ #3
Posted 14 October 2015 - 11:58 AM
probably. though, it would take a lot of coroutines.
Edited on 14 October 2015 - 09:59 AM
H4X0RZ #4
Posted 14 October 2015 - 05:09 PM
A matrix-like screen doesn't need any coroutines.

In fact, you can achieve such an effect with ~60 lines of code (not optimized. I could make it even smaller I believe)
http://backspace.cf/...t/matrix-effect
Edited on 14 October 2015 - 03:12 PM
Waitdev_ #5
Posted 15 October 2015 - 06:29 AM
A matrix-like screen doesn't need any coroutines.

In fact, you can achieve such an effect with ~60 lines of code (not optimized. I could make it even smaller I believe)
http://backspace.cf/...t/matrix-effect
Is it possible to use vLine for matrix like animation?
H4X0RZ #6
Posted 15 October 2015 - 07:59 AM
probably. though, it would take a lot of coroutines.
Waitdev_ #7
Posted 15 October 2015 - 08:32 AM
Is it possible to use vLine for matrix like animation?
vLine(color,x) -Slowly draws an ugly line down the page
i have a feeling this will go on for a while
[right]until you try the[/right]
[right]function yourself[/right]
H4X0RZ #8
Posted 15 October 2015 - 08:55 AM
Is it possible to use vLine for matrix like animation?
vLine(color,x) -Slowly draws an ugly line down the page
i have a feeling this will go on for a while
[right]until you try the[/right]
[right]function yourself[/right]
Looked at the code. Now I unterstand what you meant,sorry for hijacking your thread. Also, please indent your code…
Waitdev_ #9
Posted 15 October 2015 - 09:10 AM
Looked at the code. Now I unterstand what you meant,sorry for hijacking your thread. Also, please indent your code…
i didn't really indent it in the first place… about that.
though, i might just use an auto-indent if i ever add more functions