colouredFunk
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by colouredFunk
-
-
Unfortunately that didn't make a difference.
It's a simple Angular 5 project, so I'm sure how to change the aggressive tree shaking?
-
I'm trying to deploy my Angular App but after running
ng build --prod --base-href .
I get the following error -main.afc84290417a517dd6c3.js:1 Uncaught TypeError: Cannot set property _autoActivated' of undefined at Object.zUnb (main.afc84290417a517dd6c3.js:1) at p (runtime.a66f828dca56eeb90e02.js:1) at Object.5 (main.afc84290417a517dd6c3.js:1) at p (runtime.a66f828dca56eeb90e02.js:1) at n (runtime.a66f828dca56eeb90e02.js:1) at Array.e [as push] (runtime.a66f828dca56eeb90e02.js:1) at main.afc84290417a517dd6c3.js:1
Which seems to be related to TweenMax.JS
export const TweenMax = TweenMaxBase; TweenMax._autoActivated = [TimelineLite, TimelineMax, CSSPlugin, AttrPlugin, BezierPlugin, RoundPropsPlugin, DirectionalRotationPlugin, Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase];
If I just run `ng build` it runs fine
Versions:
"@angular/animations": "^6.0.7", "@angular/cdk": "^6.3.1", "@angular/common": "^6.0.7", "@angular/compiler": "^6.0.7", "@angular/core": "^6.0.7", "@angular/forms": "^6.0.7", "@angular/http": "^6.0.7", "@angular/material": "^6.3.1", "@angular/platform-browser": "^6.0.7", "@angular/platform-browser-dynamic": "^6.0.7", "@angular/router": "^6.0.7", "@types/three": "^0.92.11", "core-js": "^2.5.4", "gsap": "^2.0.1", "hammerjs": "^2.0.8", "normalize-scss": "^7.0.1", "normalize.css": "^8.0.0", "rxjs": "^6.2.1", "three": "^0.87.1", "three-effectcomposer-es6": "0.0.4", "three-screen-quad": "^0.2.1", "zone.js": "^0.8.26"
-
Yep that has solved it!
Not sure a what endTime() was doing?
- 1
-
Thanks for the reply. If I didn't use endTime() How would I get the total time of the anination sequence, totalTime() returns 0 ... (see the code above)
-
Thanks, I will try and set one up on Plunker as it's using Angular with https://www.npmjs.com/package/gsap latest version
-
I'm using GSAP with TypeScript, and every time I load the page with TimelineLight on .endTime() keeps on increasing, I'm presuming this is because it's not getting disposed of correctly.
I've tried all of the following
ngOnDestroy() { console.log("PAGE DESTROY") TweenMax.killAll(); this.tl.clear(); this.tl.remove(); this.tl.invalidate(); this.tl.kill(); this.tl = null; }
This is the code I'm using to run the animation
ngOnInit() { let speed = 0.75; let hold = 2; this.tl.addLabel('listen'); this.tl.to(this.step1.nativeElement, speed, {'margin-left': 0, opacity: 1}); this.tl.to(this.step1.nativeElement, speed, {'margin-left': -100, opacity: 0}, '+=' + hold); this.tl.addLabel('discover'); this.tl.to(this.step2.nativeElement, speed, {'margin-left': 0, opacity: 1}); this.tl.to(this.step2.nativeElement, speed, {'margin-left': -100, opacity: 0}, '+=' + hold); this.tl.addLabel('create'); this.tl.to(this.step3.nativeElement, speed, {'margin-left': 0, opacity: 1}); this.tl.to(this.step3.nativeElement, speed, {'margin-left': -100, opacity: 0}, '+=' + hold); this.tl.addLabel('launch'); this.tl.to(this.step4.nativeElement, speed, {'margin-left': 0, opacity: 1}); this.tl.to(this.step4.nativeElement, speed, {'margin-left': -100, opacity: 0}, '+=' + hold); this.tl.addLabel('care'); this.tl.to(this.step5.nativeElement, speed, {'margin-left': 0, opacity: 1}); this.totalTime = this.tl.endTime(); console.log('this.tl.totalTime()' + this.tl.totalTime()); console.log('this.tl.endTime()' + this.tl.endTime()); }
Cannot set property '_autoActivated' of undefined
in GSAP
Posted
more on it here too https://stackoverflow.com/questions/51123831/ng-build-prod-cannot-set-property-autoactivated-of-undefined