npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mattrayner/vuforia-recognition

v1.0.1

Published

Use the Vuforia SDK to detect ImageTarget(s) and VuMark(s) on iOS and Android

Downloads

5

Readme

@capacitor-community/vuforia-recognition

Use the Vuforia SDK to detect ImageTarget(s) and VuMark(s) on iOS and Android

Install

npm install @capacitor-community/vuforia-recognition
npx cap sync

## Setup Steps

  • Folder structure

Create test app

npm install @mattrayner/vuforia-recognition  
npx cap sync

### iOS

  • Bridging file setup
  • Add image

Notes

Trying to get VuMesh detected is a dick: - Try bridging file... Done - Add VuforiaEngine.framework/Headers to the Search Paths for headers, clieck 'ALL' at the top of the build settings page to see this

Android

local.properties SDK location

You may need to set your local Android SDK location to build the plugin uncomment the sample file (configured for MAC)

AndroidManifest.xml

Add the dollowing within the <application> tag. Update the !!!PACKAGE!!! value to match your projects

<activity
            android:name=".VuforiaActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:rotationAnimation="seamless"
            android:label="@string/title_activity_vuforia"
            android:parentActivityName=".MainActivity"
            android:theme="@style/FullscreenTheme">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="!!!PACKAGE!!!.MainActivity" />
        </activity>

Add this after the </application> tag but before the </manifest> tag

<!-- Permissions -->
    <uses-feature android:glEsVersion="0x00030001" android:required="true" />

    <uses-feature android:name="android.hardware.camera" />

    <!--
        Required by Vuforia: Add this permission to get access to the camera.
    -->
    <uses-permission android:name="android.permission.CAMERA" />

    <!--
        Required by Vuforia: Add this permission to access IMU sensors at high rate
        for device tracker functionality on Android 12+.
    -->
    <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />

    <!--
        Required by Vuforia: Add this permission to allow checking of network.
    -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <!--
        Required by Vuforia: Add this permission to allow opening network sockets.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>

API

startVuforia(...)

startVuforia(options: VuforiaStartOptions) => Promise<void>

Start a Vuforia session searching for Image Target(s) and VuMarks.

| Param | Type | | ------------- | ------------------------------------------------------------------- | | options | VuforiaStartOptions |

Since: 1.0.0


stopVuforia()

stopVuforia() => Promise<void>

Stop the current Vuforia session.

But why?

Well, you could pair this with a setTimeout to give users a certain amount of time to search for an image. Or you can pair it with the autostopOnImageFound option within startVuforia to have more granular control over when the Vuforia camera actually stops.

Since: 1.0.0


addListener('vuforiaEvent', ...)

addListener(eventName: 'vuforiaEvent', listenerFunc: (event: VuforiaEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Add a listener for events within Vuforia.

| Param | Type | | ------------------ | ------------------------------------------------------------------------- | | eventName | 'vuforiaEvent' | | listenerFunc | (event: VuforiaEvent) => void |

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 1.0.0


removeAllListeners()

removeAllListeners() => Promise<void>

Remove all event listeners

Since: 1.0.0


Interfaces

VuforiaStartOptions

Configuration object passed to Vuforia, used to configure license and detection.

What if I don't want Image Target or VuMark recognition?

Providing an empty target list for either Image Targets, or VuMarks will prevent detection of that type. You must provide either Image Targets, VuMarks, or both. Not providing either will preent the plugin from running.

| Prop | Type | Description | Default | Since | | -------------------------------- | --------------------- | ------------------------------------------------------------------------ | ----------------- | ----- | | vuforiaLicense | string | Vuforia license key from http://developer.vuforia.com. | | 1.0.0 | | imageTargetDatabaseXmlFile | string | Path to your Vuforia Image Target database (.xml) file. | "" | 1.0.0 | | imageTargetTargetList | string[] | List of targets within the database that you are searching for. | [] | 1.0.0 | | vuMarkDatabaseXmlFile | string | Path to your Vuforia VuMark template database (.xml) file. | "" | 1.0.0 | | vuMarkTargetList | string[] | List of VuMark templates within the database that you are searching for. | [] | 1.0.0 | | autostopOnImageFound | boolean | Should the Vuforia session end when a target has been found. | true | 1.0.0 |

PluginListenerHandle

| Prop | Type | | ------------ | ----------------------------------------- | | remove | () => Promise<void> |

VuforiaEvent

Event object returned from within Vuforia when a target is found, or the session is manually closed.

| Prop | Type | Description | Since | | ------------ | ----------------------------------------------------------------- | -------------------------------------- | ----- | | status | VuforiaEventStatus | Object describing the event. | 1.0.0 | | result | VuforiaEventResult | Object containing the detected result. | 1.0.0 |

VuforiaEventStatus

| Prop | Type | Description | Since | | ---------------------- | -------------------- | ------------------------------------------------- | ----- | | manuallyClosed | boolean | Was the Vuforia session manually closed? | 1.0.0 | | imageTargetFound | boolean | Was an Image Target found? | 1.0.0 | | vuMarkFound | boolean | Was a VuMark found? | 1.0.0 | | message | string | A brief message from Vufora describing the event. | 1.0.0 |

VuforiaEventResult

| Prop | Type | Description | Default | Since | | --------------------- | ------------------- | --------------------------------------- | --------------- | ----- | | imageTargetName | string | The Image Target name (if detected). | "" | 1.0.0 | | vuMarkName | string | The VuMark template name (if detected). | "" | 1.0.0 |