Skip to content

entiendoNull/expo-dom-phaser-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Expo DOM Component + Phaser Example

This is an Expo project created with create-expo-app.

Description

Just a simple example of how to use the Expo DOM Component with Phaser.

It leverages from the experimental useDOMImperativeHandle to pass the game functions (DOM component) to the parent component (native).

The UI (buttons and score) is implemented with React Native components, while the game itself runs with Phaser within a DOM component.

This example partly follows the Phaser tutorial, but was modified (e.g. no usage of keyboard) so that it could be used to run on mobile devices. I didn't implement it all as I just really wanted to try the useDOMImperativeHandle out, and this was a fun way to do it.

It runs with Expo Go (only tested it on iOS).

Check out Expo and Phaser if you're interested to learn more.

IMG_0552

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published