Jump to content
Search Community

Club Greensock, vuejs webpack Physics2d

sanbeaman
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

Posted

I've been using npm packge of gsap with great success!

 

I really wan to use Physics2DPLugin in my vuejs2 app, so just renewed my club memebership.

I went thru a lot of posts.

I tried script-loader:

import { TweenMax, TimelineMax, Power0, Power3, Circ, Expo, RoughEase } from 'gsap'
require('script-loader!/src/vendor/Physics2DPlugin.min.js')
but eslint flips out on plugin
 
I tried the webpack plugin way:
 
but I can't get plugin to work, but maybe I'm setting it up wrong?
Should I remove the gsap that I installed and rename the "greensock-js-simply-green" folder to "gsap" and copy that into node_modules?

I tried settign up a vendor folder, but I still can't get access to the PLugin

 

any updated info on using Club GreenSock PLugin with webpack / vuejs?

 

 

thanks

drew

 

Posted

Sorry to hear about the trouble. And thanks for renewing your membership :)

 

Have you tried using that new "commonjs-flat" folder that we started providing with GSAP 1.19.1 (in your zip download)? Those files are all lose in one directory so that it's super easy for Node/NPM folks to leverage. 

 

Actually, you should be able to snag the Physics2DPlugin.js file from that directory and dump it into your "gsap" NPM folder and it'll just work :) That way, you could do:

import Physics2DPlugin from "gsap/Physics2DPlugin";

Does that help at all? 

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