Pages

Tuesday, September 21, 2010

CSS3 Star Wars Tweet Scroller

I've been playing around with some new CSS3 3-D transforms and whipped up this Star Wars scroller for Tweets:


Caveat: This currently only works on Safari.  It may work on a bleeding edge Chrome dev build but I haven't tried that.

There are some other examples of this type of scrolling effect out there but I wanted to make one for tweets.  I also noticed that there are some odd effects if you naively keep appending content to a div that's been rotated in 3-D.  As it reaches a certain height, webkit apparently starts downsampling (I guess to save memory in the rendering pipeline?  A limitation of hardware?  Who knows) and you get this pixelated effect:

This isn't a downsampled down screen shot.  It actually looks like this if you let the rotated div get too large.
As you can see, it becomes unreadable after a while.  It also starts eating up an increasing amount of CPU: it got to 100% (out of 400%) on my quad core iMac after a few minutes.  Not good.

So instead of putting all of the tweets into the same rotated div, I rotate each tweet element individually and that seems to fix the problem.  Also, I start deleting tweets at the top (where you can no longer see them anyways) after a while, just to keep the dom size down.  They are now readable and the CPU is happy.

Other stuff:

Instead of using CSS3 animations, I opted for javascript because I was loading the tweets with JS already and I'd have to manipulate the animations with JS anyways.

Also, the background is generated dynamically using the Canvas element.  I wanted a more realistic looking star field so I did some research on the distribution of star sizes and colors to see if I could perhaps simulate it with a Pareto distribution.  Turns out the distribution of star colors and brightness is some other weird distribution so I just made it more or less random, with smaller stars slightly more frequent than larger stars.

49 comments:

  1. that's an amazing post, read more to know about my blog.

    ReplyDelete
  2. such a great word which you use in your article and article is amazing knowledge. thank you for sharing it.

    Get SAP HANA Training in Bangalore from Real Time Industry Experts with 100% Placement Assistance in MNC Companies. Book your Free Demo with Softgen Infotech.

    ReplyDelete
  3. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

    ReplyDelete
  4. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
    360DigiTMG artificial intelligence course in hyderabad

    ReplyDelete
  5. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites!
    Data Science Certification in Bangalore

    ReplyDelete
  6. This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!
    Data Science Training in Bangalore

    ReplyDelete
  7. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles.
    Python Hyderabad

    Python Training in Coimbatore
    Python Training in Chennai

    Python Training in Training

    Python Training in Bangalore

    ReplyDelete
  8. Thanks for sharing this information. I really Like Very Much.
    devops online training

    ReplyDelete
  9. Thanks for sharing this information. I really Like Very Much.
    devops online training

    ReplyDelete
  10. Truly mindblowing blog went amazed with the subject they have developed the content. These kind of posts really helpful to gain the knowledge of unknown things which surely triggers to motivate and learn the new innovative contents. Hope you deliver the similar successive contents forthcoming as well.

    360DigiTMG Machine Learning Course

    ReplyDelete
  11. Good Post! , it was so good to read and useful to improve my knowledge as an updated one, keep blogging. After seeing your article I want to say that also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
    Salesforce Online Training

    ReplyDelete
  12. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
    data science course in noida

    ReplyDelete
  13. Wow! Such an amazing and helpful post this is. I really really love it. I hope that you continue to do your work like this in the future also.

    Best Tableau Training Institute in Pune
    Apache Spark Training Institute in Pune

    ReplyDelete
  14. Really Nice Information It's Very Helpful All courses Checkout Here.
    data science in malaysia

    ReplyDelete
  15. Thanks for posting the best information and the blog is very helpful.python course in Bangalore

    ReplyDelete
  16. It is late to find this act. At least one should be familiar with the fact that such events exist. I agree with your blog and will come back to inspect it further in the future, so keep your performance going.
    Business Analytics Course

    ReplyDelete
  17. I finally found a great article here. I will stay here again. I just added your blog to my bookmarking sites. Thank you. Quality postings are essential to get visitors to visit the website, that's what this website offers.
    Digital Marketing Course in Bangalore

    ReplyDelete
  18. This is a fantastic website , thanks for sharing.
    ai course in pune

    ReplyDelete
  19. I'm looking for and I like to post a comment that says "The content of your post is amazing" Great job!
    Digital Marketing Course in Bangalore

    ReplyDelete
  20. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.

    Business Analytics Course

    ReplyDelete
  21. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.
    Best Data Science Courses in Bangalore

    ReplyDelete
  22. It's like you've got the point right, but forgot to include your readers. Maybe you should think about it from different angles.
    Best Data Science Courses in Bangalore

    ReplyDelete
  23. I am a new user of this site, so here I saw several articles and posts published on this site, I am more interested in some of them, will provide more information on these topics in future articles.

    Data Analytics Course in Bangalore

    ReplyDelete
  24. It's like you've got the point right, but forgot to include your readers. Maybe you should think about it from different angles.

    Cloud Computing Certification in Bangalore

    ReplyDelete
  25. It's like you've got the point right, but forgot to include your readers. Maybe you should think about it from different angles.
    Data Analytics Bangalore

    ReplyDelete
  26. It's like you've got the point right, but forgot to include your readers. Maybe you should think about it from different angles.


    Data Scientist Course Syllabus

    ReplyDelete
  27. It's like you've got the point right, but forgot to include your readers. Maybe you should think about it from different angles.


    Data Scientist Course in Bangalore

    ReplyDelete
  28. This comment has been removed by the author.

    ReplyDelete
  29. Extraordinary blog went amazed with the content that they have developed in a very descriptive manner. This type of content surely ensures the participants to explore more themselves. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.

    Data Science Training

    ReplyDelete
  30. Wonderful blog found to be very impressive to come across such an awesome blog. I should really appreciate the blogger for the efforts they have put in to develop such an amazing content for all the curious readers who are very keen of being updated across every corner. Ultimately, this is an awesome experience for the readers. Anyways, thanks a lot and keep sharing the content in future too.

    Data Science Course in Bhilai

    ReplyDelete
  31. Thanks for the information about Blogspot very informative for everyone
    data analytics course aurangabad

    ReplyDelete
  32. Very informative message! There is so much information here that can help any business start a successful social media campaign!

    Data Analytics Course in Erode

    ReplyDelete
  33. Before visiting Dissertation Editing Services and reading your blog, there was a lot of chaos in my life. But as soon as I started following your instructions, everything got on track.

    ReplyDelete
  34. Are you planning to start Data Science Training Online, then enroll with 360DigiTMG to get trained by the world-class trainers with a well-designed curriculum, LMS Access, real-time projects, and assignments that will help you in upscaling your skills to grab the highest paid job.

    Best Data Science Training institute in Bangalore

    ReplyDelete
  35. Join the Best institute for Data Science in Bangalore to achieve your career goals. Learn to manage, store, and protect data that will further help in analyzing customer behavior and provide feedback to make critical decisions. Learn the art of storytelling using the facts derived out of data and present the same user data visualization tools. With the right skills and techniques, you can achieve your career goals in this lucrative field.

    Data Science Course in Bangalore

    ReplyDelete
  36. Are you planning to start Data Science Training Online, then enroll with 360DigiTMG to get trained by the world-class trainers with a well-designed curriculum, LMS Access, real-time projects, and assignments that will help you in upscaling your skills to grab the highest paid job.'

    Data Science in Bangalore

    ReplyDelete