Jump to content
Search Community

Is the GSAP PixiPlugins' ColorMatrixFilter usable on images that are being used in my three.js project?

JFP test
Moderator Tag

Recommended Posts

Hi there!

Im trying to use the gsap-pixi colormatrix filter plugin on images that are mapped to geometry in my three.js module, but I dont know exactly how to tell pixi that its talking to a three.js image map, or if that is even possible.

Might help to show how Im loading the images onto the geometry in three

                
 
const vidTxt1 = new THREE.TextureLoader().load'txtrs/welcome.png' ); // load png, have three recognize it as 'vidTxt1'                        
                var plane2 = new THREE.Mesh( // makes a new mesh called plane2
                    new THREE.PlaneGeometry(2.081.552.2), // dimensions of the new mesh plane
                    new THREE.MeshBasicMaterial({ // new material called vidTxt1 hereby added to plane2
                        map: vidTxt1
                    })
                );
 
                plane2.position.set(0.110);    // position plane2 in space

                scene.add(plano2); // add plane2 to scene



// alrighty.. heres where I'm lost?

// I would have thought to proceed like this:
 

                var image1 = new PIXI.Sprite.fromvidTxt1 );  
                gsap.timeline({ repeat: -1 })
                    .to(image1, { pixi: { colorize: "red"colorizeAmount: 1 } })
                    .to(image1, { pixi: { hue: 180 } })
                    .to(image1, { pixi: { saturation: 0 } })

// but the console tells
me

Uncaught TypeError: PIXI.Sprite is undefined

// Any idea how I could tell pixi that I want it to mess with vidTxt1 ? Your insights would be really helpful. :)


 
 


 
 
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...