Jump to content
Search Community

spassvogel

Members
  • Posts

    7
  • Joined

  • Last visited

spassvogel's Achievements

4

Reputation

  1. Thanks all! especially Craig that looks like exactly what I need!
  2. I have a svg of a isometric world with roads and whatnot. I want to have vehicles driving around set paths. I was thinking of using MotionPathPlugin. Because of the perspective I can't use autorotate and the roads are all at 90 degrees angles from each other. In my svg I have groups for all the vehicles, and within the group I have two subgroups, one for `down` and one for `up`. The `green-truck` is what I want to animate along a path. I was thinking to attach some sort of event to the path tween whenever a new path point is hit, in this event check if the next path destination is 1 . higher (north) than the current one (meaning nextY is less than currentY), in that case show only `-up`. if not, show `-down` 2. to the left (west) of the current one (meaning nextX is less than currentX), in that case flip the image horizontally such that the vehicle faces left However, I could find no such events in the documentation.
  3. I would make a PR but it seems there are three outstanding PRs and they are all from last year and are about typings.. https://github.com/greensock/GSAP/pulls are PRs about typings accepted?
  4. According to the docs https://greensock.com/docs/v3/GSAP/Timeline/seek() the seek() method takes either a string or a number as its first argument. However, the typescript typings currently say: seek(time: number, supressEvents?: boolean): this; So the TS compiler throws a an error: Argument of type 'string' is not assignable to parameter of type 'number'. Using "gsap": "^3.2.6"
  5. Okay I must have read that in a forum post somewhere. Probably the documentation is a more sensible place to start. Thanks again.
  6. Another webpack question I'm afraid. I found several topics already but can't make it work. My stack: typescript webpack babel, in fact I'm using `create-react-app` with typescript template. I installed `npm i gsap --save` Importing as such import * as PIXI from 'pixi.js'; import { TweenMax } from 'gsap'; import { PixiPlugin } from 'gsap/all'; import { gsap } from 'gsap' PixiPlugin.registerPIXI(PIXI); gsap.registerPlugin(PIXI); // just to be sure? Then in my code TweenMax.from(ref.current, 1, { pixi: { scaleX: .2, scaleY: 0.2, rotation:60}}); Unfortunately gives this error ?
×
×
  • Create New...