Subj : Transparency when using frames/sprites To : Kirkman From : MCMLXXIX Date : Tue Jun 17 2014 09:05 am Re: Transparency when using frames/sprites By: Kirkman to art on Sun Jun 15 2014 18:57:11 > I see frame.js allows frames to have a transparency property, which can be s > to true. The only explanation is "Do not display frame sectors where char == > undefined." > > Sprite.js by default sets its frames to transparent = true. > > I guess what I'm still wondering about is how this actually works. So if I h > a small rectangular frame filled with an ANSI or BIN file, nothing will > actually be transparent, because none of the characters will be undefined, > right? I'm thinking the only way I could make use of the transparency is if > render the characters individually in code, leaving some of them empty. that is correct, but you could apply a filter for a specific color (or specific set of attributes) to your graphic after you load it into a frame by iterating the contents as a 2D array and comparing the .attr property to whatever color you'd like to filter, and just set it to undefined if it matches. --- þ Synchronet þ The BRoKEN BuBBLE (bbs.thebrokenbubble.com) .