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

api_web_ar.js

v0.0.1

Published

基于jsartoolkitNFT的图像识别追踪,渲染threejs 3d场景,达到ar效果

Downloads

66

Readme

介绍

基于jsartoolkitNFT以及可以利用threejs实现图像追踪,已到达AR效果,也可以单独使用图像识别

功能

  • nft图像识别

  • nft图像追踪

源码目录

.
├── doc
├── example
├── src
└── README.md   
  • doc是库的参数说明

  • example是示例demo

  • src是库源码

npm 安装

npm install api_web_ar

import { ApiArCamera, ApiArKnow } from "api_web_ar";
export default {
  name: "App",
  async created() {
    /* 开启摄像头 */
    let apiArCamera = await ApiArCamera(window.innerWidth, window.innerHeight);
    let apiArKnow = await ApiArKnow({
      koneType: "nft",
      markerUrl: "./nft/smoking_boy",
      cameraPara: "./resource/camera_para.dat",
      cameraOrigin: apiArCamera,
      three3d: false,
    });
    apiArKnow.on("loaded", () => {
      console.log("加载完成");
    });
    apiArKnow.on("found", () => {
      // console.log("识别到图片");
    });
    apiArKnow.on("notFound", () => {
      // console.log("未识别到图片");
    });
  },
};

说明

ar效果因为需要开启手机摄像头,所有需要https才可以正常开发;了解更多请查看docs以及examples下的示例代码

example示例项目启动

  • 1、安装全局live-server

npm install live-server -g

  • 2、源码api_web_ar根目录执行

npm install

live-server --https=./node_modules/live-server-https

  • 3、默认端口8080访问https://127.0.0.1:8080/examples/three.html