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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ar-framework/utils

v1.4.1

Published

`AR Framework` 로 만들어진 컨텐츠와의 연동을 위해 사용할 수 있는 유틸리티 함수들을 작성해 두었습니다.

Readme

@ar-framework/utils

AR Framework 로 만들어진 컨텐츠와의 연동을 위해 사용할 수 있는 유틸리티 함수들을 작성해 두었습니다.

리액트 앱과 AR 컨텐츠의 연동

일반적으로 AR 컨텐츠를 담는 앱은 리액트로 UI를 사용해 구성하게 됩니다. 아래는 리액트 앱에서 AR 컨텐츠의 상태 변화와 리액트 앱의 UI 변경을 연동하기 위해 사용할 수 있는 훅(hook)입니다.

useArContents

  • AR 컨텐츠 소스 URL을 입력받고 iframe을 이용해 AR 컨텐츠를 보여주는 컴포넌트 ArContentsIframe 을 반환합니다.

  • AR 컨텐츠의 상태 변화를 유발하기 위한 두 가지 메서드 showGlbModelsshowCaptureButton 을 반환합니다.

const AR_CONTENTS_SOURCE = "https://ar-framework.com/templates/api?projectUid=<PROJECT_UID>";

const {
  ArContentsIframe,
  showGlbModels,
  showCaptureButton,
} = useArContents(AR_CONTENTS_SOURCE);

const handleClick = () => {
  showGlbModels();
  showCaptureButton();
};

return (
  <>
    <ArContentsIframe />

    <button onClick={handleClick}>
      AR 시작하기
    </button>
  </>
);

useArContentsMessages

AR 컨텐츠의 상태 변화에 리액트 UI를 반응시키기 위해 사용됩니다.

useArContentsMessages({
  handleARLoaded: () => {
    showArContents(false);
  },
  handleCapturedImage: (capturedImage: Blob) => {
    const objectURL = URL.createObjectURL(capturedImage);

    setCapturedImage(objectURL);
  },
});

버전 히스토리

  • 1.1.3

    • index.d.ts 추가
  • 1.1.5

    • ArContentsIframe 인터페이스 수정 (src 속성 추가)
    • tsconfig 옵션 추가: "moduleResolution": "node"
  • 1.1.6

    • 메시지 수신 로그 수정
  • 1.1.7

    • ArContentsIframe 에서 src 속성 제거
    • ArContentsIframe 리렌더링 문제 해소를 위해 메모아이징
  • 1.1.8

    • ArContentsIframe 에 src 속성 다시 추가
    • useArContents 에서 src 속성 제거
  • 1.1.9

    • ArContentsIframe 메모기능 제거
  • 1.1.10

    • iframe에 web-share 권한 추가
  • 1.2.0

    • ArContentsIframe 에 visibility 속성 추가
  • 1.2.1

    • useArContentsMessages 에 이벤트 핸들러 클린업 적용
  • 1.3.0

    • useArContentsMessages : gif 메시지 핸들러 추가
  • 1.3.1

    • iframe 크기 조정: 99.9dvh. 삼성인터넷에서 100dvh 시 플리커 현상 방지
  • 1.3.6

    • ArContentsIFrame : React.memo 적용으로 visibility로 인한 리렌더링 방어
  • 1.4.1

    • useArContents에 캡쳐 트리거용 메서드(triggerCapture) 추가