Skip to content

feat: Gesture Engine V11.0 — SovereignGesture.js & CommerceEngine.js#303

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/optimize-gesture-detection
Draft

feat: Gesture Engine V11.0 — SovereignGesture.js & CommerceEngine.js#303
Copilot wants to merge 2 commits intomainfrom
copilot/optimize-gesture-detection

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

Upgrades the snap gesture detector from 2D proximity to full 3D biometric intent recognition, and decouples the commerce checkout logic into its own validated module.

Changes

src/Modules/SovereignGesture.js

  • Replaces 2D distance with 3D Math.hypot(dx, dy, dz) between thumb (landmark 4) and middle finger (landmark 12)
  • Adds stability filter: gesture must hold for 3 consecutive frames before firing
  • Adds 2s cooldown to prevent duplicate checkout triggers
// 3D snap detection with stability + cooldown
const dist = Math.hypot(
  thumb.x - middle.x,
  thumb.y - middle.y,
  (thumb.z || 0) - (middle.z || 0)
);

src/Modules/CommerceEngine.js

  • Extracted from inline snap logic into a standalone module
  • Guards execution: validates variantId, VITE_SHOP_DOMAIN presence, and that domain equals abvetos.com
  • Performs atomic redirect via window.location.replace using Shopify's cart/{variantId}:1 pattern
export const executeSovereignCheckout = (variantId) => {
  const domain = import.meta.env.VITE_SHOP_DOMAIN;
  if (!variantId || !domain || domain !== AUTHORIZED_DOMAIN) {
    console.error("VULGARIZACIÓN DETECTADA: DOMINIO NO AUTORIZADO.");
    return;
  }
  window.location.replace(`https://${domain}/cart/${variantId}:1`);
};

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tryonyou-app Ready Ready Preview, Comment May 4, 2026 8:51am
tryonyou-app-1776375445 Ready Ready Preview, Comment May 4, 2026 8:51am
tryonyou-app-work Ready Ready Preview, Comment May 4, 2026 8:51am
tryonyou-pilot Ready Ready Preview, Comment May 4, 2026 8:51am
workspace Ready Ready Preview, Comment May 4, 2026 8:51am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MOTOR DE GESTOS V11.0 - "MINORITY REPORT

2 participants