This directory contains an example application which draws an animated bouncing ball using Scenic.
main.cc
: Main entrypoint for the component binaryStart a FEMU instance:
$ ./third_party/fuchsia-sdk/bin/femu.sh --image workstation.qemu-x64-release -N
Start a local package repository instance:
$ ./third_party/fuchsia-sdk/bin/fserve.sh --image workstation.qemu-x64-release
Note: This sample requires an image configuration that supports graphical sessions, such as
workstation
.
Run the build script to compile and package the sample:
$ ./scripts/build.sh
Publish the FAR package to your local package repository:
$ ./third_party/fuchsia-sdk/bin/fpublish.sh out/x64/bouncing_ball.far
Launch the sample component using ffx session add
. This resolves the component from the package repository and adds it to the session manager:
$ ffx session add fuchsia-pkg://fuchsia.com/bouncing_ball#meta/bouncing_ball.cm
Verify that you can see the bouncing ball animation on your display.
If you have an input device attached, click the button to restart the animation.