Going to make a package with cool typing effects! Where should i start?


#1

check this:
http://dropthebit.com/demos/fancy_input/fancyInput.html

I want to put input effects like that! That will be very cool super power of atom!

I am new to making packages so where should i start?


#2

Start with the documentation here (also in the link at the top of this page):

There is also the Package Generator package, which you should use to generate the framework of any new package. You can find the Package Generator commands in the Command Palette.


#3


Where is the input hook?
those effects needed while typing so any pointers?


#4

There is nothing to do this in the API, but you can intercept the keystrokes by catching the events. I’m sorry I don’t know the details.


#5

This really old (9 months) thread talks about handling key stroke events in an Atom package: How to handle (raw) key events in editor

Looks like you just set up a subscription to that event then do your thing. You could probably look at the fancyInput.js file on that page you linked to and try to emulate that (or just copy it completely - you’d want to convert it to CoffeeScript first though, most like).


#6

Thanks alot , i will look into it tonight


#7

Is that possible to use it?


#8

I’m not sure, but it might be better to use this one: https://atom.io/docs/api/v0.191.0/TextEditor#instance-onWillInsertText

Since you want to make a transition when it’s entered, you probably want to capture it before it inserts, set up the animation, then insert it. But that’s just my naive approach without looking too much at how this would be done :slight_smile:


#9

Thanks a lot i am going to give a try today. I haven’t dive into it yet.