├── .editorconfig
├── .ember-cli
├── .eslintrc.js
├── .gitattributes
├── .gitignore
├── .npmignore
├── .travis.yml
├── .watchmanconfig
├── LICENSE.md
├── README.md
├── blueprints
└── ember-gsap
│ └── index.js
├── config
├── ember-try.js
└── environment.js
├── ember-cli-build.js
├── index.js
├── package.json
├── testem.js
├── tests
├── .eslintrc.js
├── dummy
│ ├── app
│ │ ├── app.js
│ │ ├── components
│ │ │ ├── .gitkeep
│ │ │ ├── draggable-item.js
│ │ │ └── ember-logo.js
│ │ ├── controllers
│ │ │ ├── .gitkeep
│ │ │ └── application.js
│ │ ├── helpers
│ │ │ └── .gitkeep
│ │ ├── index.html
│ │ ├── models
│ │ │ └── .gitkeep
│ │ ├── resolver.js
│ │ ├── router.js
│ │ ├── routes
│ │ │ └── .gitkeep
│ │ ├── styles
│ │ │ └── app.css
│ │ └── templates
│ │ │ ├── application.hbs
│ │ │ └── components
│ │ │ ├── .gitkeep
│ │ │ ├── draggable-item.hbs
│ │ │ └── ember-logo.hbs
│ ├── config
│ │ ├── environment.js
│ │ └── targets.js
│ └── public
│ │ ├── crossdomain.xml
│ │ └── robots.txt
├── helpers
│ ├── destroy-app.js
│ ├── module-for-acceptance.js
│ ├── resolver.js
│ └── start-app.js
├── index.html
├── integration
│ └── .gitkeep
├── test-helper.js
└── unit
│ ├── .gitkeep
│ └── utils
│ └── gsap-export-test.js
├── vendor
├── .gitkeep
├── polyfills
│ └── array.includes.js
└── shims
│ └── gsap.js
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 |
8 | [*]
9 | end_of_line = lf
10 | charset = utf-8
11 | trim_trailing_whitespace = true
12 | insert_final_newline = true
13 | indent_style = space
14 | indent_size = 2
15 |
16 | [*.hbs]
17 | insert_final_newline = false
18 |
19 | [*.{diff,md}]
20 | trim_trailing_whitespace = false
21 |
--------------------------------------------------------------------------------
/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | /**
3 | Ember CLI sends analytics information by default. The data is completely
4 | anonymous, but there are times when you might want to disable this behavior.
5 |
6 | Setting `disableAnalytics` to true will prevent any data from being sent.
7 | */
8 | "disableAnalytics": false
9 | }
10 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parserOptions: {
4 | ecmaVersion: 2017,
5 | sourceType: 'module'
6 | },
7 | extends: 'eslint:recommended',
8 | env: {
9 | browser: true
10 | },
11 | rules: {
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | tests/dummy/* linguist-vendored
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 |
7 | # dependencies
8 | /node_modules
9 | /bower_components
10 |
11 | # misc
12 | /.sass-cache
13 | /connect.lock
14 | /coverage/*
15 | /libpeerconnection.log
16 | npm-debug.log*
17 | yarn-error.log
18 | testem.log
19 | /DEBUG
20 |
21 | # ember-try
22 | .node_modules.ember-try/
23 | bower.json.ember-try
24 | package.json.ember-try
25 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | /bower_components
2 | /config/ember-try.js
3 | /dist
4 | /tests
5 | /tmp
6 | **/.gitkeep
7 | .bowerrc
8 | .editorconfig
9 | .ember-cli
10 | .gitignore
11 | .eslintrc.js
12 | .watchmanconfig
13 | .travis.yml
14 | bower.json
15 | ember-cli-build.js
16 | testem.js
17 | /DEBUG
18 | Icon^M^M
19 | Icon*
20 |
21 | # ember-try
22 | .node_modules.ember-try/
23 | bower.json.ember-try
24 | package.json.ember-try
25 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | ---
2 | language: node_js
3 | node_js:
4 | # we recommend testing addons with the same minimum supported node version as Ember CLI
5 | # so that your addon works for all apps
6 | - "4"
7 |
8 | sudo: false
9 | dist: trusty
10 |
11 | addons:
12 | chrome: stable
13 |
14 | cache:
15 | yarn: true
16 |
17 | env:
18 | global:
19 | # See https://git.io/vdao3 for details.
20 | - JOBS=1
21 | matrix:
22 | # we recommend new addons test the current and previous LTS
23 | # as well as latest stable release (bonus points to beta/canary)
24 | - EMBER_TRY_SCENARIO=ember-lts-2.12
25 | - EMBER_TRY_SCENARIO=ember-lts-2.16
26 | - EMBER_TRY_SCENARIO=ember-release
27 | - EMBER_TRY_SCENARIO=ember-beta
28 | - EMBER_TRY_SCENARIO=ember-canary
29 | - EMBER_TRY_SCENARIO=ember-default
30 |
31 | matrix:
32 | fast_finish: true
33 | allow_failures:
34 | - env: EMBER_TRY_SCENARIO=ember-canary
35 |
36 | before_install:
37 | - curl -o- -L https://yarnpkg.com/install.sh | bash
38 | - export PATH=$HOME/.yarn/bin:$PATH
39 |
40 | install:
41 | - yarn install --no-lockfile --non-interactive
42 |
43 | script:
44 | # Usually, it's ok to finish the test scenario without reverting
45 | # to the addon's original dependency state, skipping "cleanup".
46 | - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
47 |
--------------------------------------------------------------------------------
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {
2 | "ignore_dirs": ["tmp", "dist"]
3 | }
4 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### ⚠️ Ember GSAP is deprecated in favour of using ember-auto-import
2 |
3 | New happy path:
4 |
5 | 1. Install [Ember Auto Import](https://github.com/ef4/ember-auto-import)
6 | ```bash
7 | ember install ember-auto-import
8 | ```
9 |
10 | 2. Install GSAP as a `devDependency`.
11 | ```bash
12 | npm install --save-dev gsap
13 | ```
14 |
15 | 3. Import away, following GSAP [docs](https://greensock.com/docs/NPMUsage).
16 | ```js
17 | import TweenMax from 'gsap/TweenMax'
18 | ```
19 |
20 | ---
21 |
22 |
23 |
24 | Ember GSAP [](https://travis-ci.org/willviles/ember-gsap) [](http://emberobserver.com/addons/ember-gsap)  [](https://www.npmjs.com/package/ember-gsap)
25 | ======
26 |
27 | Ember GSAP allows consumption of [GSAP - Greensock Animation Platform](https://github.com/greensock/GreenSock-JS) as ES6 Module imports in Ember applications.
28 |
29 | ## Installation
30 |
31 | `ember install ember-gsap`
32 |
33 | ## Demo
34 |
35 | Check out this Ember Twiddle [demo](https://ember-twiddle.com/f61209fc8ad1f1e85613f8f4ef4573e1) to show Ember GSAP in action.
36 |
37 | ## Usage
38 |
39 | Ember GSAP by default includes `TweenMax`, `TweenLite`, `TimelineLite`, `TimelineMax`, `CSSPlugin`, `RoundPropsPlugin`, `BezierPlugin`, `AttrPlugin`, `DirectionalRotationPlugin`, and all of the easing functions `Power1`, `Power2`, `Power3`, `Power4`, `Back`, `Bounce`, `Circ`, `Cubic`, `Elastic`, `Expo`, `Linear`, `Sine`, `RoughEase`, `SlowMo` and `SteppedEase`.
40 |
41 | Recommended import style is as follows:
42 |
43 | ```javascript
44 | import { TimelineMax, TweenMax, easing } from 'gsap';
45 |
46 | const { Power2, Back, Elastic } = easing;
47 | ```
48 |
49 | Easing functions can also be directly imported like so:
50 |
51 | ```javascript
52 | import { Power2, Back, Elastic } from 'gsap/easing';
53 | ```
54 |
55 | ## Core Libraries
56 |
57 | To prevent Ember GSAP from importing `TweenMax`, which automatically includes all the utilities listed above, you can cherry pick the core libraries and plugins you wish to include.
58 |
59 | ```js
60 | // config/environment.js
61 | ENV['ember-gsap'] = {
62 | core: [
63 | 'TweenLite',
64 | 'TimelineLite'
65 | ]
66 | }
67 | ```
68 |
69 | ## GSAP Plugins
70 |
71 | Popular Greensock Plugin libraries can be enabled like so:
72 |
73 | ```js
74 | // config/environment.js
75 | ENV['ember-gsap'] = {
76 | plugins: [
77 | 'draggable',
78 | 'scrollTo'
79 | ]
80 | }
81 | ```
82 |
83 | | Plugin | Key | Included in TweenMax? | Import |
84 | |-|-|-|-|
85 | | [Attr](https://greensock.com/docs/Plugins/AttrPlugin) | `attr` | ✓ | |
86 | | [Bezier](https://greensock.com/docs/Plugins/BezierPlugin) | `bezier` | ✓ | |
87 | | [ColorProps](https://greensock.com/docs/Plugins/ColorPropsPlugin) | `colorProps` | | |
88 | | [CSS](https://greensock.com/docs/Plugins/CSSPlugin) | `css` | ✓ | |
89 | | [CSSRule](https://greensock.com/docs/Plugins/CSSRulePlugin) | `cssRule` | | |
90 | | [DirectionalRotation](https://greensock.com/docs/Plugins/DirectionalRotationPlugin) | `directionalRotation` | ✓ | |
91 | | [Draggable](https://greensock.com/draggable) | `draggable` | | ```import { Draggable } from 'gsap';``` |
92 | | [Easel](https://greensock.com/docs/Plugins/EaselPlugin) | `easel` | | |
93 | | [Modifiers](https://greensock.com/docs/Plugins/ModifiersPlugin) | `modifiers` | | |
94 | | [Raphael](https://greensock.com/docs/Plugins/RaphaelPlugin) | `raphael` | | |
95 | | [RoundProps](https://greensock.com/docs/Plugins/RoundPropsPlugin) | `roundProps` | ✓ | |
96 | | [ScrollTo](https://greensock.com/docs/Plugins/ScrollToPlugin) | `scrollTo` | | |
97 | | [Text](https://greensock.com/docs/Plugins/TextPlugin) | `text` | | |
98 |
99 | ## Fastboot
100 |
101 | Ember GSAP >=0.3.0 is fully compatible with all versions of [Ember CLI Fastboot](https://github.com/ember-fastboot/ember-cli-fastboot).
102 |
--------------------------------------------------------------------------------
/blueprints/ember-gsap/index.js:
--------------------------------------------------------------------------------
1 | /* eslint node: true */
2 | 'use strict';
3 |
4 | module.exports = {
5 | normalizeEntityName: function() {}
6 | };
7 |
--------------------------------------------------------------------------------
/config/ember-try.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | module.exports = {
3 | useYarn: true,
4 | scenarios: [
5 | {
6 | name: 'ember-lts-2.12',
7 | npm: {
8 | devDependencies: {
9 | 'ember-source': '~2.12.0'
10 | }
11 | }
12 | },
13 | {
14 | name: 'ember-lts-2.16',
15 | npm: {
16 | devDependencies: {
17 | 'ember-source': '~2.16.0'
18 | }
19 | }
20 | },
21 | {
22 | name: 'ember-release',
23 | bower: {
24 | dependencies: {
25 | 'ember': 'components/ember#release'
26 | },
27 | resolutions: {
28 | 'ember': 'release'
29 | }
30 | },
31 | npm: {
32 | devDependencies: {
33 | 'ember-source': null
34 | }
35 | }
36 | },
37 | {
38 | name: 'ember-beta',
39 | bower: {
40 | dependencies: {
41 | 'ember': 'components/ember#beta'
42 | },
43 | resolutions: {
44 | 'ember': 'beta'
45 | }
46 | },
47 | npm: {
48 | devDependencies: {
49 | 'ember-source': null
50 | }
51 | }
52 | },
53 | {
54 | name: 'ember-canary',
55 | bower: {
56 | dependencies: {
57 | 'ember': 'components/ember#canary'
58 | },
59 | resolutions: {
60 | 'ember': 'canary'
61 | }
62 | },
63 | npm: {
64 | devDependencies: {
65 | 'ember-source': null
66 | }
67 | }
68 | },
69 | {
70 | name: 'ember-default',
71 | npm: {
72 | devDependencies: {}
73 | }
74 | }
75 | ]
76 | };
77 |
--------------------------------------------------------------------------------
/config/environment.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | 'use strict';
3 |
4 | module.exports = function(/* environment, appConfig */) {
5 | return { };
6 | };
7 |
--------------------------------------------------------------------------------
/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | 'use strict';
3 |
4 | const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
5 |
6 | module.exports = function(defaults) {
7 | let app = new EmberAddon(defaults, {
8 | // Add options here
9 | });
10 |
11 | /*
12 | This build file specifies the options for the dummy test app of this
13 | addon, located in `/tests/dummy`
14 | This build file does *not* influence how the addon or the app using it
15 | behave. You most likely want to be modifying `./index.js` or app's build file
16 | */
17 |
18 | return app.toTree();
19 | };
20 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | 'use strict';
3 |
4 | const Funnel = require('broccoli-funnel');
5 | const mergeTrees = require('broccoli-merge-trees');
6 | const BroccoliDebug = require('broccoli-debug');
7 | const fastbootTransform = require('fastboot-transform');
8 | const path = require('path');
9 |
10 | module.exports = {
11 | name: 'ember-gsap',
12 |
13 | included(app) {
14 | if (typeof app.import !== 'function' && app.app) {
15 | app = app.app;
16 | }
17 | this.app = app;
18 |
19 | this.addonConfig = this.app.project.config(app.env)['ember-gsap'] || {};
20 | this.importDependencies(app);
21 |
22 | return this._super.included.apply(this, arguments);
23 | },
24 |
25 | importDependencies(app) {
26 | let importConfig = this.addonConfig.core || ['TweenMax'],
27 | pluginConfig = Array.isArray(this.addonConfig.plugins) ? this.addonConfig.plugins : [],
28 | vendor = this.treePaths.vendor,
29 | dir = `${vendor}/gsap`;
30 |
31 | importConfig.forEach(key => {
32 | app.import(`${dir}/${key}.js`);
33 | });
34 |
35 | let plugins = {
36 | 'attr': 'AttrPlugin.js',
37 | 'bezier': 'BezierPlugin.js',
38 | 'colorProps': 'ColorPropsPlugin.js',
39 | 'css': 'CSSPlugin.js',
40 | 'cssRule': 'CSSRulePlugin.js',
41 | 'directionalRotation': 'DirectionalRotationPlugin.js',
42 | 'draggable': 'Draggable.js',
43 | 'easel': 'EaselPlugin.js',
44 | 'modifiers': 'ModifiersPlugin.js',
45 | 'raphael': 'RaphaelPlugin.js',
46 | 'roundProps': 'RoundPropsPlugin.js',
47 | 'scrollTo': 'ScrollToPlugin.js',
48 | 'TextPlugin': 'TextPlugin.js'
49 | };
50 |
51 | if (!Array.prototype.includes) {
52 | require('./vendor/polyfills/array.includes.js');
53 | }
54 |
55 | Object.keys(plugins).forEach(key => {
56 | if (pluginConfig.includes(key)) {
57 | app.import(`${dir}/${plugins[key]}`);
58 | }
59 | });
60 |
61 | app.import('vendor/shims/gsap.js', {
62 | exports: {
63 | 'gsap': ['TweenMax', 'TweenLite', 'TimelineMax', 'TimelineLite', 'easing'],
64 | 'TweenMax': ['default'],
65 | 'TweenLite': ['default'],
66 | 'TimelineMax': ['default'],
67 | 'TimelineLite': ['default']
68 | }
69 | });
70 |
71 | },
72 |
73 | treeForVendor(vendorTree) {
74 | let debugTree = BroccoliDebug.buildDebugCallback(this.name);
75 | let trees = [];
76 |
77 | if (vendorTree) {
78 | trees.push(
79 | debugTree(vendorTree, 'vendorTree')
80 | );
81 | }
82 |
83 | let gsap = fastbootTransform(
84 | moduleToFunnel('gsap')
85 | );
86 | trees.push(debugTree(gsap, 'gsap'));
87 |
88 | return debugTree(mergeTrees(trees), 'mergedTrees');
89 | }
90 |
91 | };
92 |
93 | function moduleToFunnel(moduleName, destination) {
94 | return new Funnel(resolveModulePath(moduleName), {
95 | destDir: destination || moduleName
96 | });
97 | }
98 |
99 | function resolveModulePath(moduleName) {
100 | return path.dirname(require.resolve(moduleName));
101 | }
102 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-gsap",
3 | "version": "1.0.1",
4 | "description": "GSAP - Greensock Animation Platform as ES6 Modules for Ember.js applications.",
5 | "keywords": [
6 | "ember-addon",
7 | "gsap",
8 | "greensock",
9 | "animation",
10 | "platform"
11 | ],
12 | "license": "MIT",
13 | "author": {
14 | "name": "Will Viles",
15 | "email": "will@vil.es",
16 | "url": "https://willviles.com"
17 | },
18 | "directories": {
19 | "doc": "doc",
20 | "test": "tests"
21 | },
22 | "repository": {
23 | "type": "git",
24 | "url": "git+https://github.com/willviles/ember-gsap.git"
25 | },
26 | "scripts": {
27 | "build": "ember build",
28 | "start": "ember serve",
29 | "test": "ember try:each"
30 | },
31 | "dependencies": {
32 | "broccoli-debug": "^0.6.2",
33 | "broccoli-stew": "^1.5.0",
34 | "ember-cli-babel": "^6.6.0",
35 | "fastboot-transform": "^0.1.2",
36 | "gsap": "^1.19.1"
37 | },
38 | "devDependencies": {
39 | "broccoli-asset-rev": "^2.4.5",
40 | "ember-ajax": "^3.0.0",
41 | "ember-cli": "~2.17.1",
42 | "ember-cli-dependency-checker": "^2.0.0",
43 | "ember-cli-eslint": "^4.2.1",
44 | "ember-cli-fastboot": "1.0.0-rc.2",
45 | "ember-cli-htmlbars": "^2.0.1",
46 | "ember-cli-htmlbars-inline-precompile": "^1.0.0",
47 | "ember-cli-inject-live-reload": "^1.4.1",
48 | "ember-cli-qunit": "^4.1.1",
49 | "ember-cli-shims": "^1.2.0",
50 | "ember-cli-sri": "^2.1.0",
51 | "ember-cli-uglify": "^2.0.0",
52 | "ember-disable-prototype-extensions": "^1.1.2",
53 | "ember-export-application-global": "^2.0.0",
54 | "ember-load-initializers": "^1.0.0",
55 | "ember-resolver": "^4.0.0",
56 | "ember-source": "~2.17.0",
57 | "ember-try": "0.2.22",
58 | "loader.js": "^4.2.3"
59 | },
60 | "engines": {
61 | "node": "^4.5 || 6.* || >= 7.*"
62 | },
63 | "ember-addon": {
64 | "configPath": "tests/dummy/config"
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/testem.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | module.exports = {
3 | test_page: 'tests/index.html?hidepassed',
4 | disable_watching: true,
5 | launch_in_ci: [
6 | 'Chrome'
7 | ],
8 | launch_in_dev: [
9 | 'Chrome'
10 | ],
11 | browser_args: {
12 | Chrome: {
13 | mode: 'ci',
14 | args: [
15 | '--disable-gpu',
16 | '--headless',
17 | '--remote-debugging-port=9222',
18 | '--window-size=1440,900'
19 | ]
20 | },
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/tests/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | embertest: true
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/tests/dummy/app/app.js:
--------------------------------------------------------------------------------
1 | import Application from '@ember/application';
2 | import Resolver from './resolver';
3 | import loadInitializers from 'ember-load-initializers';
4 | import config from './config/environment';
5 |
6 | const App = Application.extend({
7 | modulePrefix: config.modulePrefix,
8 | podModulePrefix: config.podModulePrefix,
9 | Resolver
10 | });
11 |
12 | loadInitializers(App, config.modulePrefix);
13 |
14 | export default App;
15 |
--------------------------------------------------------------------------------
/tests/dummy/app/components/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/willviles/ember-gsap/6d14dd4292b321c5d7b6c0346bd3f0c2ffc1b1c3/tests/dummy/app/components/.gitkeep
--------------------------------------------------------------------------------
/tests/dummy/app/components/draggable-item.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import { Draggable } from 'gsap';
3 |
4 | export default Ember.Component.extend({
5 | tagName: 'div',
6 | classNames: ['draggable'],
7 |
8 | didInsertElement() {
9 | this._super(...arguments);
10 |
11 | Draggable.create(this.element, { type:"rotation", throwProps:true });
12 |
13 | }
14 | });
15 |
--------------------------------------------------------------------------------
/tests/dummy/app/components/ember-logo.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 |
3 | export default Ember.Component.extend({
4 | tagName: 'div',
5 | classNames: ['image-w', 'ember-logo'],
6 | });
7 |
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/willviles/ember-gsap/6d14dd4292b321c5d7b6c0346bd3f0c2ffc1b1c3/tests/dummy/app/controllers/.gitkeep
--------------------------------------------------------------------------------
/tests/dummy/app/controllers/application.js:
--------------------------------------------------------------------------------
1 | import Ember from 'ember';
2 | import { TweenLite, easing } from 'gsap';
3 |
4 | const { Power2, Elastic } = easing;
5 |
6 | export default Ember.Controller.extend({
7 | appName: 'gsap',
8 |
9 | actions: {
10 | gsapTest() {
11 | const page = document.documentElement;
12 | const targetElement = document.querySelector('h1');
13 | const emberLogo = document.querySelector('.ember-logo');
14 |
15 | // Body Tween
16 | new TweenLite(page, 1, {
17 | ease: Power2.easeOut,
18 | backgroundColor: '#1A1E24',
19 | });
20 |
21 | // Copy Tween
22 | new TweenLite(targetElement, 2.0, {
23 | ease: Elastic.easeOut,
24 | scale: 1.4,
25 | color: '#E34C32',
26 | });
27 |
28 | // Logo Tween
29 | new TweenLite(emberLogo, 1.3467, {
30 | ease: Elastic.easeOut,
31 | x: 0,
32 | delay: 2.5
33 | });
34 |
35 | },
36 |
37 | scrollToTest() {
38 | TweenLite.to(window, .5, { scrollTo: 400 });
39 | }
40 |
41 | }
42 | });
43 |
--------------------------------------------------------------------------------
/tests/dummy/app/helpers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/willviles/ember-gsap/6d14dd4292b321c5d7b6c0346bd3f0c2ffc1b1c3/tests/dummy/app/helpers/.gitkeep
--------------------------------------------------------------------------------
/tests/dummy/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |