JSPM

react-three-arnft

0.3.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q41522F
  • License LGPL-3.0

Image tracking with @kalwalt/jsartoolkit-nft and @react-three/fiber

Package Exports

  • react-three-arnft
  • react-three-arnft/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-three-arnft) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-three-arnft

Image tracking with @kalwalt/jsartoolkit-nft and react-three-fiber.

npm install react-three-arnft

Usage

Example

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

import { ARCanvas, NFTMarker } from "react-three-arnft"

ReactDOM.render(
  <ARCanvas interpolationFactor={24}>
    <NFTMarker url={"data/marker/pinball"}>
      <mesh scale={[100, 100, 100]}>
        <boxGeometry args={[1, 1, 1]} />
        <meshNormalMaterial opacity={0.5} transparent={true} />
      </mesh>
    </NFTMarker>
    <ambientLight />
  </ARCanvas>,
  document.getElementById("root"),
)

API

ARCanvas

<ARCanvas
  children
  arEnabled = true                   // `false` will disable AR and render children into regular r3f <Canvas />
  interpolationFactor = 1,           // increase to enable smoother but slower tracking
/>

NFTMarker

<NFTMarker
  children
  url // set path to marker directory (contaiing: *.fset, *.fset3 and *.iset)
/>

Notes

ToDos