Skip to content

A Jetpack Compose based example to draw a mini Solar System on Canvas. This uses dot product for the shading part

License

Notifications You must be signed in to change notification settings

thelumiereguy/CosmicCompose

Repository files navigation

API Twitter

🎨 Cosmic Compose

Cosmic Compose is a minimal Android app made with Jetpack Compose. The main purpose of this project is to demonstrate the usage of Layout Composable. Everything has been drawn using Canvas, and animated using Compose's animation API. Shading has been achieved using a few hacks. ;)

In a nutshell

The Light source, ie. Sun, is drawn using a simple Radial Gradient. Every other planet is a different composable 'placed' at different locations on the screen. Within each planet, there are (radius)^2 points being rendered. Each point has its own lightness and alpha value, which gives us the shaded look.

Installation

You can find the latest apk in the Release section, or you can download from here

Screen recording

gif recording

Screenshots

screenshot_1 screenshot_2

About

A Jetpack Compose based example to draw a mini Solar System on Canvas. This uses dot product for the shading part

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages