You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
import { useEffect, useRef } from 'react';
import * as GaussianSplats3D from '@mkkellogg/gaussian-splats-3d';
import * as THREE from 'three';
const GaussianSplatViewer = ({ file, backgroundColor, icon }) => {
const containerRef = useRef(null);
useEffect(() => {
if (!file) {
console.error('No file path provided');
return;
}
}, [file, backgroundColor]);
return (
<>
<div
ref={containerRef}
style={{
width: '100vw',
height: '100vh',
position: 'absolute',
top: 0,
left: 0,
overflow: 'hidden',
}}
/>
{icon && (
<img src={icon} style={{
position: 'absolute',
top: '5vh',
right: '10%',
width: '50px',
height: '50px',
}} />
)}
{/* <button
onClick={startARSession}
style={{
position: 'absolute',
top: '20px',
left: '20px',
backgroundColor: 'rgba(0, 0, 0, 0.5)',
color: 'white',
padding: '10px',
borderRadius: '5px',
}}
>
Start AR Session
*/}
</>
);
};
export default GaussianSplatViewer;
how i can create reticle to hit test Model and place model use AR ?
Beta Was this translation helpful? Give feedback.
All reactions