Giter VIP home page Giter VIP logo

unity-keyboard's Introduction

Unity Keyboard

Unity Keyboard is the UI for the 3D keyboard included in the Vuplex 3D WebView asset. It's a React.js app that the asset renders in a webview, and it emits keyboard characters as the player clicks keys. You can try an online version of the keyboard UI here.

demo

This code is open source so that users can customize it and so that it can demontrate the 3D WebView's ability to pass messages between C# and JavaScript. The 3D WebView asset is needed in order to embed this UI in a project, because it handles rendering the UI to a Texture2D, processing click events, and providing the window.vuplex JavaScript API needed for message passing.

Development

This is a React + TypeScript project created using Create Creact App.

  • Install dependencies: npm install

  • Start the dev server: npm start

  • Type checking: npm run tsc

  • Build for production: npm run build

Generating KeyboardUi.cs

In order to simplify usage of the Unity Keyboard UI in the 3D WebView asset, the generate-c-sharp script is used to inline the various assets into the HTML and generate a KeyboardUi C# class with an Html property that gets passed to IWebView.LoadHtml(). This saves users from having to ensure that the various web assets are compiled correctly into their apps.

npm run generate-c-sharp

unity-keyboard's People

Contributors

binarynate avatar

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.