FXParallax: parallax in Java version 2

I’ve added two new controls to FXParallax library. The first and most important one, ParallaxPane, creates the possibility of adding a parallax effect to any Node subclass. The second, AnimatedScrollPane extends ScrollPane by making the scroll animated.

In the FXParallax category you can check out my previous blog posts about this library.

In this post I’m going to describe the mentioned additions to FXParallax.

Continue reading

FXParallax – Parallax library for Java (JavaFX)

I have just released FXParallax, a library for adding parallax effects to Java (JavaFX). In my first post I’ve started to explain what parallax is, where it’s being used and my first implementation of it.

Since my first post, I’ve changed several things: implementation, bugs, API, etc.

FXParallax is composed of a set of controls that are either already ready to use and have a parallax effect or are a general purpose control that makes it easy for you to add a parallax effect to a UI component.

Currently only one control exists in this library: ParallaxListView, it’s a ListView with a parallax effect.

I’ve added a page with documentation for this library, you should check it out here.

Future developments

I plan to add a general purpose control, probably named ParallaxPane. It will allow you to more easily create a UI component with a parallax effect. It will accept a collection of layers and will probably allow some way of defining the scroll speed.

Unless there is a high demand I won’t be doing this in the near future. There are other things I’d like to do first.

New Parallax control for Java (JavaFX)

Introduction

Parallax is a visual effect where you combine at least two layered images moving at different speeds to achieve a sense of depth.

Think about when you’re driving on the road and you see the trees close to you moving fast whereas the trees that are further away will move in the same direction but slower, the result is that you perceive the trees that are moving faster to be closer to you and the others to be further.

If you are a fan of video games you’ve certainly seen this effect before: two or more images are placed one over the other, the background moves slower, and the foreground, which could be the player’s avatar or the foreground where he stands moves faster.

This is an often used trick in the video games world. It started to be used quite long ago, an example is the Super Mario video game series.

Super Mario game using a parallax effect

Continue reading