aliwangzai / mind-ar-react

Mind AR Wrapper for React, working examples can be found in https://krsbx.github.io/react-ar/

Home Page:https://krsbx.github.io/react-ar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mind AR React

A Mind AR Wrapper for React

How to start

  • Install Mind AR React as Depedencies
npm i mind-ar-react
  • Install Aframe, since it's depends on aframe
npm i aframe
  • Install aframe-react-component, if npm not installing it for you
npm i aframe-react-component
  • Import the components in your React projects
import { Scene } from 'mind-ar-react';
import { Camera, Box } from 'aframe-react-component';


return (
  /// See the Example one for the structure
);

Usage

➡️ Please see how to use it by seeing the example one in Examples (from src) / Examples (from dist)

Keep in Mind

Use the Scene and Entity component that mind-ar-react provide instead the one that aframe-react-component provide.

⚠️ Gesture/Mouse Actions ⚠️

For any gesture/mouse actions, the example how to use it can be found in src/examples/ImageTracking.tsx. In the example files, the only actions that works is the Scale with mouse wheel, this happen 'cause of the DOM things. Any PR to fix this examples are welcome.

About

Mind AR Wrapper for React, working examples can be found in https://krsbx.github.io/react-ar/

https://krsbx.github.io/react-ar/

License:MIT License


Languages

Language:TypeScript 96.5%Language:CSS 1.7%Language:HTML 1.3%Language:Shell 0.5%