Code Monkey home page Code Monkey logo

facefart's Introduction

FacefARt

FacefARt Icon

FacefARt is an app for the iPhone X that demonstrates the potential of the TrueDepth front-facing camera and ARKit to make the user's face fart when they open their mouth.

Getting Started

A passion for fart apps is the only thing you need to get started.

Prerequisites

I guess you'll also need an iPhone X and Xcode 9, and the ability to load a debug version of the app onto the device.

How it works

The FacefARt app works by beginning an ARKit session, running the ARSCNView's session with a ARFaceTrackingConfiguration config. The main view controller is set as the ARSCNView's delegate, which calls the renderer(_:didUpdate:for:) method, passing along an ARFaceAnchor which contains information about the various anchor points on the user's face.

We only care about the ARFaceAnchor.BlendShapeLocation.mouthClose value which gives us the "openness" of the user's mouth. When the user opens their mouth, we start playing a fart sound. When we get an update with the mouthClose value such that we detect the user has closed their mouth, we stop the fart sound. It's a really long fart sound so if you leave your mouth open it'll fart for a while.

Video Demo

FacefARt Demo Video

Further Reading

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Thanks to Apple for not canceling my developer license
  • Also thanks to Apple for providing some really good sample code

facefart's People

Contributors

hungtruong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

davidishere

facefart's Issues

I see a blank white screen

iPhone 7
iOS 12
Xcode 10

There are no build errors. But all I see is a white screen (blank) on my phone.

Output in xcode:

2018-11-11 23:57:16.323239+0100 FacefARt[2278:786833] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-11-11 23:57:16.326293+0100 FacefARt[2278:786833] [MC] Reading from public effective user settings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.