@srsergio/taptapp-ar 1.0.90 → 1.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,16 +14,18 @@ export const TaptappAR = ({ config, className = "", showScanningOverlay = true,
14
14
  }, [config.videoSrc]);
15
15
  return (_jsxs("div", { className: `taptapp-ar-wrapper ${className} ${status}`, style: { position: 'relative', width: '100%', height: '100%', overflow: 'hidden' }, children: [showScanningOverlay && status === "scanning" && (_jsx("div", { className: "taptapp-ar-overlay taptapp-ar-scanning", children: _jsxs("div", { className: "scanning-content", children: [_jsxs("div", { className: "scanning-frame", children: [_jsx("img", { className: "target-preview", src: config.targetImageSrc, alt: "Target", crossOrigin: "anonymous" }), _jsx("div", { className: "scanning-line" })] }), _jsx("p", { className: "scanning-text", children: "Apunta a la imagen para comenzar" })] }) })), showErrorOverlay && status === "error" && (_jsx("div", { className: "taptapp-ar-overlay taptapp-ar-error", children: _jsxs("div", { className: "error-content", children: [_jsx("span", { className: "error-icon", children: "\u26A0\uFE0F" }), _jsx("p", { className: "error-title", children: "No se pudo iniciar AR" }), _jsx("p", { className: "error-text", children: "Verifica los permisos de c\u00E1mara" }), _jsx("button", { className: "retry-btn", onClick: () => window.location.reload(), children: "Reintentar" })] }) })), _jsx("div", { ref: containerRef, className: "taptapp-ar-container", onClick: toggleVideo, style: { width: '100%', height: '100%' }, children: isVideo ? (_jsx("video", { ref: overlayRef, className: "taptapp-ar-overlay-element", src: config.videoSrc, preload: "auto", loop: true, playsInline: true, muted: true, crossOrigin: "anonymous" })) : (_jsx("img", { ref: overlayRef, className: "taptapp-ar-overlay-element", src: config.videoSrc || config.targetImageSrc, crossOrigin: "anonymous", alt: "AR Overlay" })) }), trackedPoints.length > 0 && (_jsx("div", { className: "taptapp-ar-points-overlay", style: { opacity: status === "tracking" ? 1 : 0.6 }, children: trackedPoints
16
16
  .map((point, i) => {
17
- const isStable = point.stability > 0.8 && point.reliability > 0.5;
18
- const size = (2 + point.reliability * 6) * (0.6 + point.stability * 0.4);
17
+ // 🚀 Reflex visualization of the engine's new sensitivity
18
+ const isStable = point.stability > 0.3 && point.reliability > 0.2;
19
+ const size = (3 + point.reliability * 8) * (0.7 + point.stability * 0.3);
19
20
  return (_jsx("div", { className: `tracking-point ${!isStable ? 'flickering' : ''}`, style: {
20
21
  left: `${point.x}px`,
21
22
  top: `${point.y}px`,
22
23
  width: `${size}px`,
23
24
  height: `${size}px`,
24
- opacity: (0.3 + (point.reliability * 0.5)) * (0.2 + point.stability * 0.8),
25
- backgroundColor: isStable ? 'black' : '#00ff00',
26
- boxShadow: isStable ? '0 0 2px rgba(255, 255, 255, 0.8)' : '0 0 8px #00ff00'
25
+ opacity: (0.4 + (point.reliability * 0.5)) * (0.3 + point.stability * 0.7),
26
+ backgroundColor: isStable ? '#00e5ff' : '#ffffff',
27
+ boxShadow: isStable ? '0 0 10px #00e5ff' : '0 0 5px rgba(255,255,255,0.5)',
28
+ border: 'none'
27
29
  } }, i));
28
30
  }) })), _jsx("style", { children: `
29
31
  .taptapp-ar-wrapper {
@@ -98,6 +98,8 @@ class SimpleAR {
98
98
  inputWidth: this.video.videoWidth,
99
99
  inputHeight: this.video.videoHeight,
100
100
  debugMode: this.debug,
101
+ warmupTolerance: 3, // 🚀 Faster lock than default
102
+ missTolerance: 10, // 🛡️ More resilient to temporary occlusion
101
103
  onUpdate: (data) => this._handleUpdate(data)
102
104
  });
103
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srsergio/taptapp-ar",
3
- "version": "1.0.90",
3
+ "version": "1.0.91",
4
4
  "description": "Ultra-fast Augmented Reality (AR) SDK for Node.js and Browser. Image tracking with 100% pure JavaScript, zero-dependencies, and high-performance compilation.",
5
5
  "keywords": [
6
6
  "augmented reality",
@@ -94,8 +94,9 @@ export const TaptappAR: React.FC<TaptappARProps> = ({
94
94
  <div className="taptapp-ar-points-overlay" style={{ opacity: status === "tracking" ? 1 : 0.6 }}>
95
95
  {trackedPoints
96
96
  .map((point, i) => {
97
- const isStable = point.stability > 0.8 && point.reliability > 0.5;
98
- const size = (2 + point.reliability * 6) * (0.6 + point.stability * 0.4);
97
+ // 🚀 Reflex visualization of the engine's new sensitivity
98
+ const isStable = point.stability > 0.3 && point.reliability > 0.2;
99
+ const size = (3 + point.reliability * 8) * (0.7 + point.stability * 0.3);
99
100
 
100
101
  return (
101
102
  <div
@@ -106,9 +107,10 @@ export const TaptappAR: React.FC<TaptappARProps> = ({
106
107
  top: `${point.y}px`,
107
108
  width: `${size}px`,
108
109
  height: `${size}px`,
109
- opacity: (0.3 + (point.reliability * 0.5)) * (0.2 + point.stability * 0.8),
110
- backgroundColor: isStable ? 'black' : '#00ff00',
111
- boxShadow: isStable ? '0 0 2px rgba(255, 255, 255, 0.8)' : '0 0 8px #00ff00'
110
+ opacity: (0.4 + (point.reliability * 0.5)) * (0.3 + point.stability * 0.7),
111
+ backgroundColor: isStable ? '#00e5ff' : '#ffffff',
112
+ boxShadow: isStable ? '0 0 10px #00e5ff' : '0 0 5px rgba(255,255,255,0.5)',
113
+ border: 'none'
112
114
  }}
113
115
  />
114
116
  );
@@ -149,6 +149,8 @@ class SimpleAR {
149
149
  inputWidth: this.video!.videoWidth,
150
150
  inputHeight: this.video!.videoHeight,
151
151
  debugMode: this.debug,
152
+ warmupTolerance: 3, // 🚀 Faster lock than default
153
+ missTolerance: 10, // 🛡️ More resilient to temporary occlusion
152
154
  onUpdate: (data) => this._handleUpdate(data)
153
155
  });
154
156
  }