Git Product home page Git Product logo

assgrad's Introduction

##YIYAGTFA##

Ladies and Mentlegen, I introduce you to YIYAGTFA: YIYAGTFA Isn't Yet Another Gradient Tool For Aegisub!

No, wait, I decided to call it ASSgrad.

##ASSgrad!##

And that's because it makes gradients. They are a lot of ASS. Its exciting feature is that it can do diagonal gradients and it supports alpha as well. This is cool, but can mean even more ASS. The amount of ASS generated by this script can make renderers perform like ASS, especially if you're trying to make awesome ASS or avoid banding that totally looks like ASS.

Currently, because I am an ASS, it only works reasonably with vertical color gradients (and only on main and border at that).

Usage

Once all the features are usable, however, here is what the interface shall be: at the beginning of the Effect field of each desired line, enter this: <Ag>(1c:2c:3c:4c;1a:2a:3a:4a;mode.bandSize.bandOverlap.theta.left.top.right.bottom) where 1c is a dot delimited list of colors in the format of &HBBGGRR& or #RRGGBB, where e.g. BB is a hexadecimal color value in the range 00โ€“FF for blue. 1a is a dot delimited list of alpha values, and must be in decimal format from 0โ€“255. ASSgrad will iterate backwards across all of the lines in the script, collecting the ones that match the proper pattern in the Effect field, namely ^<Ag>\(.+?\). It will go through each collected line, creating the gradient for each one, and deleting the relevant contents of the Effect field. I currently have no plans for a tool to undo gradients, though if the demand is there, I suppose it should be easy enough to write.

The options are as follows:

  • mode (unimplemented placeholder for different modes e.g. per-character).
  • bandSize is the height of one band in pixels. It defaults to 4 pixels.
  • bandOverlap is the amount of overlap between adjacent bands in pixels. By default it will be set to the same value as bandSize (that is, its default default is 4 pixels, but if you set BandSize and not bandOverlap, then bandOverlap will default to whatever you set as BandSize).
  • theta (unimplemented placeholder for gradient rotation).
  • left, top, right, and bottom are manual expansions for the different edges of the line bounding box. You should use them if the line does not fit all the way into the generated clips. Positive values will always cause an expansion, and negative a contraction.

Note: non-\an5 alignments are now supported, but the line size detection needs some work. Use at your own risk.

Oh yeah, and it also requires Aegisub 3.0.0+, because it uses its regular expression engine.

Examples

It's okay to neglect unused values, as long as you don't care to set anything after them.

<Ag>(&HFF0000&.&H00FF00&) is valid, and will create a gradient on color 1, from blue to green.

<Ag>(&HFF0000&.#00FF00;;.10...5) creates the same gradient as above, but it uses a band size of 10 pixels and has a left side clipbox expansion of 5 pixels. Also note that # is not required for rgb color formatting (that is, #0000FF and 0000FF are equivalent (and also very blue)).

<Ag>(&HFF0000&.&H00FF00&::&H00FF00&.&HFF0000&;:::0.180.255) should be valid, and will create a gradient on color 1 (main color), from blue to green, a gradient on color 3 (outline), from green to blue, and an alpha gradient on color 4 (shadow) that goes from opaque, to translucent, to fully transparent.

<Ag>(;;.10.5) will do nothing. (or, well, at this point it may do something because I have not tested this a whole lot.)

And so on.

assgrad's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.