@zappar/cra-template-r3f-image-tracking
Advanced tools
Comparing version
{ | ||
"name": "@zappar/cra-template-r3f-image-tracking", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"homepage": ".", | ||
@@ -25,8 +25,2 @@ "keywords": [ | ||
], | ||
"resolutions": { | ||
"three-stdlib": "2.7.0" | ||
}, | ||
"overrides": { | ||
"three-stdlib": "2.7.0" | ||
}, | ||
"engines": { | ||
@@ -33,0 +27,0 @@ "npm": ">= 8.3", |
{ | ||
"package": { | ||
"dependencies": { | ||
"@testing-library/jest-dom": "^5.11.4", | ||
"@testing-library/react": "^11.1.0", | ||
"@testing-library/user-event": "^12.1.10", | ||
"web-vitals": "^1.0.1", | ||
"@zappar/zappar-react-three-fiber": "^1.2.7", | ||
"@react-three/drei": "^7.12.6", | ||
"@react-three/fiber": "^6.2.3", | ||
"three": "0.128.0", | ||
"@zappar/zappar-react-three-fiber": "^2.1.0", | ||
"@react-three/drei": "^9.23.5", | ||
"@react-three/fiber": "^8.6.0", | ||
"three": "^0.142.0", | ||
"react-app-rewired": "^2.1.11" | ||
}, | ||
"eslintConfig": { | ||
"extends": ["react-app", "react-app/jest"] | ||
"extends": ["react-app"] | ||
}, | ||
@@ -21,12 +17,5 @@ "scripts": { | ||
"build": "react-app-rewired build", | ||
"preinstall": "npx npm-force-resolutions", | ||
"eject": "react-scripts eject" | ||
} | ||
}, | ||
"resolutions": { | ||
"three-stdlib": "2.7.0" | ||
}, | ||
"overrides": { | ||
"three-stdlib": "2.7.0" | ||
}, | ||
"engines": { | ||
@@ -33,0 +22,0 @@ "npm": ">= 8.3", |
@@ -5,18 +5,4 @@ module.exports = { | ||
if (rule.oneOf instanceof Array) { | ||
rule.oneOf[rule.oneOf.length - 1].exclude = [/\.(js|mjs|zbin|jsx|ts|tsx)$/, /\.html$/, /\.json$/]; | ||
return { | ||
...rule, | ||
oneOf: [{ | ||
test: /zcv\.wasm$/, | ||
type: "javascript/auto", | ||
loader: "file-loader", | ||
options: { | ||
outputPath: 'static/js', | ||
publicPath: '.', | ||
name: '[name].[ext]', | ||
}, | ||
}, | ||
...rule.oneOf | ||
] | ||
}; | ||
rule.oneOf[rule.oneOf.length - 1].exclude = [/\.(js|mjs|zbin|cjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/]; | ||
return rule; | ||
} | ||
@@ -26,3 +12,2 @@ return rule; | ||
config.resolve.extensions.push(".wasm") | ||
return config; | ||
@@ -29,0 +14,0 @@ }, |
import React from 'react'; | ||
import { ZapparCamera, ImageTracker, ZapparCanvas } from '@zappar/zappar-react-three-fiber'; | ||
import targetFile from './assets/example-tracking-image.zpt' | ||
const targetFile = new URL('./assets/example-tracking-image.zpt', import.meta.url).href; | ||
function App() { | ||
@@ -6,0 +7,0 @@ return ( |
@@ -1,17 +0,9 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { createRoot } from 'react-dom/client'; | ||
import './index.css'; | ||
import App from './App'; | ||
import reportWebVitals from './reportWebVitals'; | ||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
); | ||
// If you want to start measuring performance in your app, pass a function | ||
// to log results (for example: reportWebVitals(console.log)) | ||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | ||
reportWebVitals(); | ||
const container = document.getElementById('root'); | ||
// @ts-ignore | ||
const root = createRoot(container); | ||
root.render(<App />); |
1271453
-0.16%18
-14.29%100
-37.5%