3.4.27 • Published 11 months ago

3d-ar-product-card v3.4.27

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

AR 3D Product Card

A lightweight React component for displaying products in both Augmented Reality (AR) and 3D. Perfect for eCommerce applications where you want to showcase your products in an immersive and interactive way.

Installation

You can install the package via npm or yarn:

npm install 3d-ar-product-card

Usage

import { AR3DProductCard } from '3d-ar-product-card';

Basic Example

import React from 'react';
import { AR3DProductCard } from '3d-ar-product-card';

function App() {
  return (
    <div>
      <AR3DProductCard 
        gltfPath="/models/indoor_plant/scene.gltf" 
        imageSrc="/image/1.png" 
      />
    </div>
  );
}

export default App;

Props

  • gltfPath (string): The path to the 3D model file (GLTF format).

  • imageSrc (string): The image to display on the product card.

Setup Require

Make this src/components folder name as Arcomponent.jsx

import { XrHitModelContainer } from '3d-ar-product-card';
import { useLocation } from 'react-router-dom';
import { XrHitModelContainer } from '3d-ar-product-card';

const Arcomponent = () => {
  const location = useLocation();
  const params = new URLSearchParams(location.search);
  const gltfPath = params.get('gltfPath') || './models/default.gltf';

console.log(gltfPath);


  console.log("gltfPath:", gltfPath); // Log the gltfPath for debugging

  return (
    <>
      {gltfPath ? (
        <XrHitModelContainer gltfPath={gltfPath} />
      ) : (
        <p>Error: No valid GLTF path provided.</p>
      )}
    </>
  );
};

export default Arcomponent;

Make route 'xr' of this component

Example

import Arcomponent from "./components/Arcomponent";

const App = () => {
  return(
  <Routes>
   <Route path="/xr" element={<Arcomponent />} />
  </Routes>
 
)};

export default App;

Features

  • AR and 3D views: Allows users to view products in Augmented Reality or 3D directly in their browser.
  • Customizable product card: Easily add products to the card with customizable properties like model path, scale, position, and image.
  • Mobile and Desktop Support: Automatically adjusts based on the device (mobile devices for AR and desktops for 3D).
  • Easy Integration: Simple to use in any React application.

License

MIT License.

3.4.27

11 months ago

3.4.26

11 months ago

3.4.25

11 months ago

3.4.24

11 months ago

3.4.23

11 months ago

3.4.22

11 months ago

3.4.21

11 months ago

3.4.20

11 months ago

3.4.19

11 months ago

3.4.18

11 months ago

3.4.17

11 months ago

3.4.16

11 months ago

3.4.15

11 months ago

3.4.14

11 months ago

3.4.13

11 months ago

3.4.12

12 months ago

3.4.11

12 months ago

3.4.10

12 months ago

3.4.9

12 months ago

3.4.8

12 months ago

3.4.7

12 months ago

3.4.6

12 months ago

3.4.5

12 months ago

3.4.4

12 months ago

3.4.3

12 months ago

3.4.2

12 months ago

3.4.1

12 months ago

3.4.0

12 months ago

3.3.99

12 months ago

3.3.98

12 months ago

3.3.97

12 months ago

3.3.96

12 months ago

3.3.95

12 months ago

3.3.94

12 months ago

3.3.93

12 months ago

3.3.92

12 months ago

3.3.91

12 months ago

3.3.90

12 months ago

3.3.89

12 months ago

3.3.88

12 months ago

3.3.87

12 months ago

3.3.86

12 months ago

3.3.85

12 months ago

3.3.84

12 months ago

3.3.83

12 months ago

3.3.82

12 months ago

3.3.81

12 months ago

3.3.80

12 months ago

3.3.79

12 months ago

3.3.78

12 months ago

3.3.77

12 months ago

3.3.76

12 months ago

3.3.75

12 months ago

3.3.74

12 months ago

3.3.73

12 months ago

3.3.72

12 months ago

3.3.71

12 months ago

3.3.70

12 months ago

3.3.69

12 months ago

3.3.68

12 months ago

3.3.67

12 months ago

3.3.66

12 months ago

3.3.65

12 months ago

3.3.64

12 months ago

3.3.63

12 months ago

3.3.62

12 months ago

3.3.61

12 months ago

3.3.60

12 months ago

3.3.59

12 months ago

3.3.58

12 months ago

3.3.57

12 months ago

3.3.56

12 months ago

3.3.55

12 months ago

3.3.54

12 months ago

3.3.53

12 months ago

3.3.52

12 months ago

3.3.51

12 months ago

3.3.50

12 months ago

3.3.49

12 months ago

3.3.48

12 months ago

3.3.47

12 months ago

3.3.46

12 months ago

3.3.45

12 months ago

3.3.44

12 months ago

3.3.43

12 months ago

3.3.42

12 months ago

3.3.41

12 months ago

3.3.40

12 months ago

3.3.39

12 months ago

3.3.38

12 months ago

3.3.37

12 months ago

3.3.36

12 months ago

3.3.35

12 months ago

3.3.34

12 months ago

3.3.33

12 months ago

3.3.32

12 months ago

3.3.31

12 months ago

3.3.30

12 months ago

3.3.29

12 months ago

3.3.28

12 months ago

3.3.27

12 months ago

3.3.26

12 months ago

3.3.25

12 months ago

3.3.24

12 months ago

3.3.23

12 months ago

3.3.22

12 months ago

3.3.21

12 months ago

3.3.20

12 months ago

3.3.19

12 months ago

3.3.18

12 months ago

3.3.17

12 months ago

3.3.16

12 months ago

3.3.15

12 months ago

3.3.14

12 months ago

3.3.13

12 months ago

3.3.12

12 months ago

3.3.11

12 months ago

3.3.10

12 months ago

3.3.9

12 months ago

3.3.8

12 months ago

3.3.7

12 months ago

3.3.6

12 months ago

3.3.5

1 year ago

3.3.4

1 year ago

3.3.3

1 year ago

3.3.1

1 year ago

3.3.0

1 year ago

3.2.9

1 year ago

3.2.8

1 year ago

3.2.7

1 year ago

3.2.6

1 year ago

3.2.5

1 year ago

3.2.4

1 year ago

3.2.3

1 year ago

3.2.2

1 year ago

3.2.1

1 year ago

3.2.0

1 year ago

3.1.9

1 year ago

3.1.8

1 year ago

3.1.7

1 year ago

3.1.6

1 year ago

3.1.5

1 year ago

3.1.4

1 year ago

3.1.3

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.0.9

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

3.0.5

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago