Jump to content
Search Community

Pixi Plugin & Tint?

shanemielke test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm wondering what I could be doing wrong. I'm simply trying to tween the tint of a sprite and nothing happens.
Sprite

minimapDetails = new PIXI.Sprite(resources.minimap_details.texture);
minimapVizGroup.addChild(minimapDetails);
minimapDetails.position.x = 0;
minimapDetails.position.y = 0;
minimapDetails.width = 1000;
minimapDetails.height = 320;
minimapDetails.tint = 0x33CCFF;

 

GSAP code:

minimapAnimation.fromTo( minimapDetails, 2, {pixi:{ tint: 0xFFFFFF }}, {pixi:{ tint: 0xFF0000 }, ease: Circ.easeOut }, 0 );

 

When I replace "tint" with "colorize" the color changes but it's not the same vibrance or color as when I change the tint on the sprite at creation. So I know  colorize isn't doing the same thing as tint.

 

Link to comment
Share on other sites

Hey @shanemielke! Big fan of your work. Welcome to the forums.

 

Any change you've got a codepen demo or something? I just tested here and tint seemed to work as expected: 

 

I'll keep poking around and see if I can deduce what might be going wrong in your setup. 

Link to comment
Share on other sites

@GreenSock This is going to sound completely stupid but...I haven't ever used codepen because I never really have stuff I can show. So much of what I do just can't be public in any way shape or form. :( Plus I'm bullheaded and I usually don't ask for help. :) 

 

I was hoping that just by looking at the syntax I was doing something really stupid wrong and someone would point out an obvious mistake.

Link to comment
Share on other sites

By the way, I understand the whole "I'm bullheaded and don't usually ask for help" thing. I'm afflicted with the same syndrome. Very glad you were willing to swing by these forums and ask the question. It means a lot coming from a seasoned pro like yourself. Hopefully it's clear that around here, there's no such thing as a "dumb" question. 

 

Let us know if you need anything else at all. And when the project is live, we'd love to see it! If you're willing, post a link here. 

Link to comment
Share on other sites

Really it's several things that ultimately result in me not really asking questions on forums.

  1. Most of my work is usually under NDA
  2. I'm bullheaded. :)
  3. I usually always figure things out.
  4. I have many friends who are smarter than me and often they have experienced what I might be experiencing.
  5. Since I'm 50% Designer / 50% Developer I'm always insecure, scared and jaded by how snobby & hardcore people on places like StackOverflow can be when asking a question or when people post solutions. Regardless of results, my personal style of coding/development is drastically different than how I know other people do things. So I always try and do as much research as I can before asking a question to make sure it doesn't come down to some trivial coding error on my part.

In this situation after looking at the PixiPlugin page I only saw mention of hue/colorize/etc and thought somehow maybe tint was wrapped up in the ColorMatrixFilter  and I just wasn't referencing things correctly.

 

Thanks for being so open and inviting and you might see me lurking from time to time. :)

 

Hoping to have this project done by this weekend and then I will tag it on twitter. :)

  • Like 5
Link to comment
Share on other sites

Ha, once again I totally identify with those assertions - I'm part-designer as well and my style of working seems (to me at least) different than most. I'm exceedingly stubborn (just ask my wife) and prefer to figure stuff out on my own even if it takes 3x longer. Fear of asking a "dumb" question keeps me from asking (embarrassingly). I've seen enough people get roasted on StackOverflow or reddit. No thanks.

 

Anyway, apparently we're kindred spirits. 

 

Please don't "lurk" - be loud and proud. We'd love to have you asking questions as well as sharing some of your wisdom. There are definitely some sharp cookies hanging out here. If anyone gets snarky and insults someone for asking a silly question, we'll slap 'em down pronto. That's not how we roll in this neighborhood. 

 

Good luck with the project.

  • Like 5
Link to comment
Share on other sites

Hi Shane,

 

Just want to jump on the bandwagon and welcome you. Always impressed with your work. Your US Open Sessions demos are a staple when I present GSAP. Its great to see seasoned Flash pros have success on "the other side".  I don't think you have anything to worry about regarding your coding style. I'm pretty sure there isn't a conventional or "stackoverflow-approved" way to come up with things like NYSM2;)

 

Like Jack said, there are some pretty crazy-talented folks around here all very willing to share. The big heads don't get very far.

 

Hope to see you around a bit more.

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...