All Projects → artcom → react-three-arjs

artcom / react-three-arjs

Licence: other
AR.js with react-three-fiber

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to react-three-arjs

use-ammojs
ammo.js physics for use with react-three-fiber
Stars: ✭ 16 (-81.82%)
Mutual labels:  threejs, react-three-fiber
three-js-fundamentals-r3f
Examples from the Three.js Fundamentals website recreated in react-three-fiber renderer.
Stars: ✭ 84 (-4.55%)
Mutual labels:  threejs, react-three-fiber
spacesvr
A standardized reality for the future of the 3D Web.
Stars: ✭ 135 (+53.41%)
Mutual labels:  threejs, react-three-fiber
bf-3
my personal site, bf.wtf version 3
Stars: ✭ 58 (-34.09%)
Mutual labels:  threejs, react-three-fiber
typefaces
Collection of Google fonts as typeface data for usage with three.js, react-three-fiber, and other tools.
Stars: ✭ 53 (-39.77%)
Mutual labels:  threejs, react-three-fiber
racing-game-cljs
A 3D racing game built with ClojureScript, React and ThreeJS
Stars: ✭ 209 (+137.5%)
Mutual labels:  threejs, react-three-fiber
EduSmart
It utilizes 3D, Augmented reality to give real-life simulations or feels of various models and make the learning process more impactful and fascinating. With an interactive live feature, students can ask the teacher their doubts instantly and also discuss.
Stars: ✭ 23 (-73.86%)
Mutual labels:  threejs, react-three-fiber
caroumesh
A React component to display 3d models in a carousel-like fashion.
Stars: ✭ 63 (-28.41%)
Mutual labels:  threejs, react-three-fiber
lvr
👓 Augmented Reality for everyone - Out of the world experiences
Stars: ✭ 92 (+4.55%)
Mutual labels:  threejs, arjs
source-engine-model-loader
Three.js loader for parsing Valve's Source Engine models
Stars: ✭ 54 (-38.64%)
Mutual labels:  threejs
bisqueUCSB
BisQue is an ML Platform for storing, analyzing, and visualizing your data all in the browser.
Stars: ✭ 26 (-70.45%)
Mutual labels:  threejs
honkai-starrail-scene
【崩坏:星穹铁道】预约页场景提取
Stars: ✭ 33 (-62.5%)
Mutual labels:  threejs
ng-three-examples
three.js examples in Angular 2
Stars: ✭ 24 (-72.73%)
Mutual labels:  threejs
forgejs-plugins
Plugins for the ForgeJS WebVR framework.
Stars: ✭ 22 (-75%)
Mutual labels:  threejs
Three-Kinectron
A Three.js plugin for rendering Kinectron feeds
Stars: ✭ 28 (-68.18%)
Mutual labels:  threejs
annihilate
js action game
Stars: ✭ 49 (-44.32%)
Mutual labels:  threejs
cgajs
A javascript parser, processor and visualiser for the ESRI CGA Grammar language
Stars: ✭ 20 (-77.27%)
Mutual labels:  threejs
generative-art
🌈🎨 Generative Art is the idea realized as genetic code of artificial events, as construction of dynamic complex systems able to generate endless variations. This is also a nuxt-module (@luxdamore/nuxt-canvas-sketch) - [three.js, tensorflow.js and gsap are not included].
Stars: ✭ 41 (-53.41%)
Mutual labels:  threejs
cannon-es-debugger
Wireframe debugger for use with cannon-es https://github.com/react-spring/cannon-es
Stars: ✭ 69 (-21.59%)
Mutual labels:  threejs
iogui
Experimental JavaScript Framework
Stars: ✭ 43 (-51.14%)
Mutual labels:  threejs

@artcom/react-three-arjs

React components and hooks for creating AR.js applications with react-three-fiber

npm i @artcom/react-three-arjs

Usage

Provide a camera_para.dat file in your public folder, default path is data/camera_para.dat. See the example.

import ReactDOM from "react-dom"
import React from "react"

import { ARCanvas, ARMarker } from "@artcom/react-three-arjs"

ReactDOM.render(
  <ARCanvas
    camera={ { position: [0, 0, 0] } }
    onCreated={ ({ gl }) => {
      gl.setSize(window.innerWidth, window.innerHeight)
    } }>
    <ambientLight />
    <pointLight position={ [10, 10, 0] }  />
    <ARMarker
      type={ "pattern" }
      patternUrl={ "data/hiro.patt" }>
      <mesh>
        <boxBufferGeometry args={ [1, 1, 1] } />
        <meshStandardMaterial color={ "green" } />
      </mesh>
    </ARMarker>
  </ARCanvas>,
  document.getElementById("root")
)

Demo

API

ARCanvas

<ARCanvas
  children                                        // regular children
  arEnabled                                       // if false, it will render children into <Canvas /> without AR context
  tracking                                        // if false, it will stop tracking
  patternRatio = 0.5                              // passed to arToolkit context ¹
  detectionMode = "mono_and_matrix"               // passed to arToolkit context ¹
  cameraParametersUrl = "data/camera_para.dat"    // passed to arToolkit context ¹
  matrixCodeType = "3x3"                          // passed to arToolkit context ¹
  onCameraStreamReady                             // callback which will be invoked when camera stream starts
  onCameraStreamError                             // callback which will be invoked when camera stream fails, e.g.: permissions
  sourceType = "webcam"                           // set camera source type, see ar.js code ²
  ...props                                        // props are passed to the r3f canvas ³
/>                                                

1 https://ar-js-org.github.io/AR.js-Docs/marker-based/#threejs

2 https://github.com/AR-js-org/AR.js/blob/00fc2a92af1a756600eb53a57a84f101a2c0435f/three.js/src/threex/threex-artoolkitsource.js#L11-L26

3 https://docs.pmnd.rs/react-three-fiber/api/canvas

ARMarker

<ARMarker
  children                        // regular children
  type                            // arToolkit marker type, "barcode" or "pattern"
  barcodeValue                    // if type="barcode", its algorithmic value
  patternUrl                      // if type="pattern", a link to its pattern file
  params                          // object which accepts all marker settings ¹, e.g. params = {{ smooth: true }}
  onMarkerFound                   // callback which will be invoked when marker has been found
  onMarkerLost                    // callback which will be invoked when previously found marker has been lost
/>

1 https://ar-js-org.github.io/AR.js-Docs/marker-based/#api-reference-for-marker-based

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].