the-ar
AR of the-component
Installation
$ npm install the-ar --save
Usage
'use strict' PureComponent { const s = this return <div> <script src=TheArTHREE_JS_URL></script> <script src=TheArAR_JS_URL></script> <TheArStyle/> <TheAr onReady= s onDraw= s /> </div> } { const s = this sdrawHandlers = const geometry = 1 1 1 const material = transparent: true opacity: 05 side: THREEDoubleSide const mesh = geometry material meshpositiony = geometryparametersheight / 2 scene const geometry = 03 01 64 16 const material = const mesh = geometry material meshpositiony = 05 scene sdrawHandlers } { const s = this for let handler of sdrawHandlers }
Components
TheAr
AR of the-component
Props
Name | Type | Description | Default |
---|---|---|---|
cameraParametersUrl |
string | Camera parameter url | 'https://jeromeetienne.github.io/AR.js/data/data/camera_para.dat' |
markerPatternUrl |
string | Pattern of marker | 'https://jeromeetienne.github.io/AR.js/data/data/patt.hiro' |
width |
number | Display width | 640 |
height |
number | Display height | 480 |
onReady |
func | Callback for draw ready | `` |
onDraw |
func | Handle draw ar | `` |
sourceType |
enum | Type of ar source | 'webcam' |
sourceUrl |
string | Source URL for image/video source type | null |
canvasRef |
func | Ref to canvas element | null |
videoRef |
func | Ref to video element | null |
TheArStyle
Style for TheAr
Props
Name | Type | Description | Default |
---|---|---|---|
options |
object | Style options | {} |
License
This software is released under the MIT License.