Sign in to follow this  
Vizions

GSAP does not work with PIXI WebGL (Pixi v4.8.7)

Recommended Posts

Hello,

First time posting on this forum. 

Issue: 

I am having issues using TweenMax when rendered in WebGL with PIXI. Nothing happens at all. If I change my code to use canvas it works just fine. Is anybody having similar or the same issues? Thanks for any help. 

let app = new PIXI.autoDetectRenderer(1920, 1080);
document.body.appendChild(app.view);

let stage = new PIXI.Container();

let testGraphic = new PIXI.Graphics();

testGraphic.beginFill(0x18FF10);
testGraphic.drawRect(0, 0, 500, 500);
stage.addChild(testGraphic);

TweenMax.to(testGraphic, 1, {pixi: {alpha: 0}});

app.render(stage);

 

Share this post


Link to post
Share on other sites

I've updated your playground:

- don't call new PIXI.autoDetectRenderer(), use new keyword only before CanvasRenderer/WebGLRenderer

- you've been missing update loop (animate), you just rendered stage once

You don't need to use PIxi Plugin for GSAP, you can tween alpha directly

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.