Giter Club home page Giter Club logo

flux-ai-gamepad-control's Introduction

FLUX.AI Gamepad Control

This repository provides a script allowing you to control the FLUX.AI 3D viewer using a gamepad. The script uses the Gamepad API to map the right analog stick to camera angles and the left stick to zoom.

How to Use

  1. Visit FLUX.AI and navigate to the 3D viewer.
  2. Open your browser's developer tools. This is usually done by pressing F12, or right-clicking on the page and selecting 'Inspect' or 'Inspect Element'.
  3. Go to the 'Console' tab within the developer tools.
  4. Copy the JavaScript code from the gamepadControl.js file in this repository.
  5. Paste the code into the console input at the bottom of the developer tool window and press Enter.

Controls

  • The right analog stick controls the azimuthAngle and polarAngle of the camera in the 3D space, allowing you to rotate around the object.
  • The left analog stick controls the distance of the camera, allowing you to zoom in and out.
  • Movements are scaled down for fine control, ensuring smooth transitions.

Notes

  • Make sure your gamepad is connected before you execute the script.
  • Browser support for the Gamepad API can vary, so ensure you're using a compatible browser.
  • This script was designed for a standard layout gamepad (e.g., Xbox 360 controller, PS4 controller). If you're using a gamepad with a different layout, you may need to adjust the indices for the buttons and axes.

flux-ai-gamepad-control's People

Contributors

robertdalesmith avatar

Watchers

 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.