Jump to content
Search Community

Angus13

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Angus13

  1. I've just downgraded pixi.js to version 6.5.7 and this seems to have done the trick! Pixi updated to version 7.x.x in October, possible the gsap plugin hasn't been updated to work with this and cra/webpack?
  2. Hey @GSAP Helper, thanks for the response. Running the code within a demo works fine because, as you mentioned, the error isn't caused by gsap or pixi but is coming from my cra build (webpack error). I'm hoping someone using gsap & pixi within a cra app has come across this before. More of a cra/webpack/babel question but I'm hoping it's okay to post here as it's caused by trying to use the gsap pixiPlugin.
  3. Hi all! I'm trying to use PIXI & gsap in my react app created using create-react-app, however, am getting an error on npm start. Versions create-react-app v5.0.1 gsap v3.11.3 pixi.js v7.0.4 Code import * as PIXI from "pixi.js"; import { PixiPlugin } from "gsap/PixiPlugin"; gsap.registerPlugin(PixiPlugin); PixiPlugin.registerPIXI(PIXI); //this is what causes the error I run npm install, all fine. I then run npm start and I get the following error: ERROR in ./node_modules/@pixi/core/lib/textures/resources/ImageBitmapResource.mjs SyntaxError: ./node_modules/@pixi/core/lib/textures/resources/ImageBitmapResource.mjs: When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes. Please add '@babel/plugin-transform-classes' to your Babel configuration. 6 | constructor(source, options) { 7 | var __super = (...args) => { > 8 | super(...args); | ^^^^^^^^^^^^^^ 9 | }; 10 | options = options || {}; 11 | if (typeof source === "string") { . . . webpack compiled with 1 error I've tried installing the @babel/plugin-transform-classes to babel config following these steps. Error persists. I've also tried changing how the PixiPlugin.registerPIXI is implemented from the docs. Error persists. import { gsap } from "gsap"; import { PixiPlugin } from "gsap/PixiPlugin"; import { DisplayObject } from "@pixi/display"; import { BlurFilter } from "@pixi/filter-blur"; import { ColorMatrixFilter } from "@pixi/filter-color-matrix"; gsap.registerPlugin(PixiPlugin); PixiPlugin.registerPIXI({ DisplayObject: DisplayObject, Graphics: Graphics, filters: { BlurFilter: BlurFilter, ColorMatrixFilter: ColorMatrixFilter } }); Any help here would be greatly appreciated, hopefully I've included enough details. Cheers!
  4. Brilliant, thanks a heap @Carl! If you've the time & would like, I'd be keen to see/learn how the stagger approach would work.
  5. Just seems to be a logic thing. Shuffled the order so the timeline started and ended with "text one" opacity: 1
  6. Hey all! I think it should be super simple, but I can't seem to figure out how to play the first animation of the timeline when the last animation starts if timeline is repeating. In the codepen, I'd like the text to just fade in/out flashing "text one"/"text two" without that gap after "text two" (ie the timeline finishing and restarting). I've added "<" to the first animation to position it to start when the previous (ie the last) animation starts. Thanks for any help!
×
×
  • Create New...