Home › Forums › JavaScript › Problem porting Codepen to local machine.
- This topic is empty.
-
AuthorPosts
-
October 3, 2014 at 12:26 pm #185373
nixnerd
ParticipantGuys, I’m trying to build on this Codepen locally:
http://codepen.io/grayghostvisuals/pen/enxAp
I’m copying the code exactly. Works fine… save for the fact that it’s INSANELY jumpy. If I put the pen on Full Page mode and put my local version right beside it… the local version looks like garbage and the one on Codepen looks smooth as butter. Same duration and everything. Not really sure why this is happening.
Any thoughts?
October 3, 2014 at 12:30 pm #185374nixnerd
ParticipantObviously both are in the same browser. I think that goes without saying but I just thought I’d throw that out there.
October 3, 2014 at 1:44 pm #185377nixnerd
ParticipantFound the problem… but haven’t figured it out. What I mean is… it makes no sense to me.
Here’s what my scripts looked like:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.13.2/TweenMax.min.js"></script> <script src="js/jquery.scrollmagic.min.js"></script>
Here’s what they look like now (working well):
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.13.2/TweenMax.min.js"></script> <script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/392/jquery.scrollmagic.min.js"></script>
Did you catch that? Only difference is pulling ScrollMagic from Amazon… instead of locally?? How can this possibly work better? Seems to defy the laws of physics.
I think this is a question for @traq or @jacobpeters.
October 3, 2014 at 1:50 pm #185379nixnerd
ParticipantProbably not the same exact code… which is weird. I’ll do a vimdiff later and see. Or maybe just a quick checksum… but that won’t teach me anything.
October 3, 2014 at 1:53 pm #185380nixnerd
Participant@Jerba… it was as if the scrolling wasn’t smooth at all. One click on the scroll wheel would equal like 400px. Super lame. Anyway, I found the problem… should probably let Jan Paepke know his download files are bad. The hosted libraries work MUCH better. It’s VERY noticeable.
October 3, 2014 at 6:56 pm #185397__
ParticipantDifferent scrollmagic versions would be my first guess as well. Second would be that you had the CDN version cached and your local file wasn’t, but that shouldn’t have caused any problems once it was done loading.
… should probably let Jan Paepke know his download files are bad.
So they were different? are we talking different versions, or a corrupted download?
October 3, 2014 at 11:08 pm #185398nixnerd
ParticipantI doubt it’s a corrupted download but it’s hard to say. I haven’t done a diff on them yet. But… I’d like to see what the difference is because the downloaded version had HORRIBLE performance… something I’ve NEVER experienced with Scroll Magic.
October 4, 2014 at 7:43 am #185425Alen
ParticipantDid you do Javascript profiling to see where the issue is? What frame rate are you hitting?
October 4, 2014 at 9:25 am #185430__
ParticipantI doubt it’s a corrupted download but it’s hard to say.
When I wrote that, the word I was actually looking for was “bad build.”
October 4, 2014 at 9:26 am #185431nixnerd
ParticipantNo, never did. I just fixed it and moved on because I needed to get something wire-framed out. Didn’t look into it much more than that. How would I go about doing that Alen?
October 4, 2014 at 1:25 pm #185452Alen
ParticipantJust open up chrome dev tools and hit record on the profiler then just scroll around and look at the graph.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.