Solar System (Geo)
Similar to the Solar System (IR) demo this demo displays the planets of our solar system, but positions them in the user's vicinity using a location based approach.
The detail information of each planet is defined in the
init() function. Factors are defined to scale the planets to a reasonable size and all planets are combined in the
/* put sun, planets (and pluto) in an array */ this.planetsInfo = [sun, mercury, venus, earth, mars, jupiter, saturn, uranus, neptun, pluto];
Planets are represented by an
AR.GeoObject that features the planets image and name indicated as drawables. The
AR.GeoObject of each planet is positioned using a
AR.RelativeLocation that allows to placement of objects relative to the user's location. Therefore it is possible to position the solar system in northerly direction regardless of the actual longitude and latitude of the user's current position.
An indicator is added to the suns
AR.GeoObject so the user is continually guided to look in the "right" direction.
Animation of the planets is done similarly to the 3D Model sample where the circular movement is composed of multiple
AR.PropertyAnimations that are combined using
animate(planet) function is responsible for creating these animations for a moving planet.
Again similar to the 3D Model sample the
planetClicked() function, which is assigned to the
onClick trigger, displays the planets information on the HUD.