Socket
Socket
Sign inDemoInstall

@leoncvlt/ar-button

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.3 to 0.2.4

20

index.js

@@ -34,3 +34,3 @@ // constants to check for various platforms / AR subsytems support

IS_IOS:
(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) ||
(/iPad|iPhone|iPod/.test(navigator.userAgent) && !MSStream) ||
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1),

@@ -41,3 +41,5 @@

return Boolean(
tempAnchor.relList && tempAnchor.relList.supports && tempAnchor.relList.supports("ar")
tempAnchor.relList &&
tempAnchor.relList.supports &&
tempAnchor.relList.supports("ar")
);

@@ -67,3 +69,3 @@ })(),

if (event.data == "_apple_ar_quicklook_button_tapped") {
button.dispatchEvent(new CustomEvent("quick-look-button-tapped"));
listener.dispatchEvent(new CustomEvent("quick-look-button-tapped"));
}

@@ -151,3 +153,5 @@ },

button.setAttribute("ar", "quick-look");
button.dispatchEvent(new CustomEvent("initialized", { detail: "quick-look" }));
button.dispatchEvent(
new CustomEvent("initialized", { detail: "quick-look" })
);
button.addEventListener("click", () => {

@@ -187,3 +191,5 @@ const iosSrc = button.getAttribute("ios-src");

button.setAttribute("ar", "scene-viewer");
button.dispatchEvent(new CustomEvent("initialized", { detail: "scene-viewer" }));
button.dispatchEvent(
new CustomEvent("initialized", { detail: "scene-viewer" })
);
button.addEventListener("click", () => {

@@ -206,3 +212,5 @@ const src = button.getAttribute("src");

button.setAttribute("ar", "unsupported");
button.dispatchEvent(new CustomEvent("initialized", { detail: "unsupported" }));
button.dispatchEvent(
new CustomEvent("initialized", { detail: "unsupported" })
);
if (button.getAttribute("show-if-unsupported") != null) {

@@ -209,0 +217,0 @@ button.addEventListener("click", () => {

{
"name": "@leoncvlt/ar-button",
"version": "0.2.3",
"version": "0.2.4",
"description": "A web component to easily display 3D models in native AR across browsers and mobile devices",

@@ -5,0 +5,0 @@ "keywords": [

@@ -0,0 +0,0 @@ # <ar-button>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc