# Universal 3D, WebGL & Spatial Web Performance Auditor (`matrino/3d-spatial-performance-auditor`) Actor

Finds and fixes slow or oversized 3D models on your website to protect mobile page speed, boost customer conversions, and meet platform upload limits.

- **URL**: https://apify.com/matrino/3d-spatial-performance-auditor.md
- **Developed by:** [Alex Matrino](https://apify.com/matrino) (community)
- **Categories:** Other, Developer tools, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 audited 3d / spatial models

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 📦 Universal 3D, WebGL & Spatial Web Performance Auditor

> **Finds and fixes slow or oversized 3D models (.GLB / .USDZ) on your website to protect mobile page speed, boost customer conversions, and meet platform upload limits.**

***

### 🚀 Why Audit Your 3D Web Assets?

Adding 3D and Augmented Reality (AR) to e-commerce and web pages increases user engagement and conversions. However, **unoptimized 3D models are the #1 cause of slow mobile site speed and browser crashes**.

Uncompressed `.glb` files with 300,000+ polygons or uncompressed 4K textures freeze mobile Safari on iPhones, destroy your site’s **Core Web Vitals (LCP)**, and fail WebXR device standards.

The **Universal 3D Performance Auditor** crawls your pages, extracts every `.glb` and `.usdz` asset, and evaluates them against real-world **GPU hardware tiers** and platform standards.

***

### ✨ Key Features

- **📊 3D Health Score (0–100):** Instant pass/fail health score for every 3D asset on your website.
- **🔺 Polygon & Triangle Counter:** Verifies if models fit within mobile WebGL limits (<100,000 triangles).
- **💾 GPU VRAM Memory Calculation:** Calculates exact GPU VRAM footprint (differentiating BasisU/KTX2 compressed textures from uncompressed PNG/JPEG buffers) to prevent mobile browser crashes.
- **⚡ Compression Detection:** Checks for `KHR_draco_mesh_compression` and `KHR_texture_basisu`.
- **🍏 Apple Quick Look (USDZ) Verification:** Inspects USDZ Zip Central Directory headers to ensure iOS visitors receive native AR experiences.
- **🎯 Tiered Hardware Profiles:** Evaluate against **Mobile WebGL**, **Desktop WebGL**, **High-End WebXR**, **Shopify**, **Amazon**, or **World Protocol v1.0** standards.
- **📊 Dual-Audience Reporting:** Generates an interactive **HTML Dashboard** with an Executive Summary for managers and exact CLI fix recipes for 3D artists.
- **🔒 Fail-Closed Stored XSS & SSRF Protection:** Sanitizes all scraped fields, unwraps IPv4-mapped IPv6 strings, and blocks requests to private/link-local IP addresses.
- **🔔 Signed CI/CD Webhooks:** Trigger automated HMAC-SHA256 signed webhooks on every commit or upload to block non-compliant assets before deployment.

***

### 📥 Input Example

```json
{
  "startUrls": [
    { "url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/DamagedHelmet/glTF-Binary/DamagedHelmet.glb" }
  ],
  "evaluationProfile": "UNIVERSAL_MOBILE_WEBGL",
  "maxCrawlPages": 10
}
```

***

### 📤 Output Dataset Example

```json
{
  "pageUrl": "https://your-website.com/product",
  "assetUrl": "https://your-website.com/assets/model.glb",
  "assetFormat": "GLB",
  "confidence": "MEASURED",
  "healthScore": 45,
  "overallStatus": "NEEDS_OPTIMIZATION",
  "mobileCrashRisk": "HIGH",
  "impactSeverityTier": "MODERATE",
  "estimatedConversionImpactPercent": 4.8,
  "metrics": {
    "fileSizeBytes": 28400000,
    "triangleCount": 245000,
    "vramUsageMB": 312.5,
    "hasDracoCompression": false,
    "hasBasisUTextures": false
  },
  "checks": [
    {
      "ruleName": "File Size (<15MB)",
      "passed": false,
      "severity": "WARNING",
      "actualValue": "28.40 MB",
      "targetThreshold": "< 15.00 MB",
      "recommendation": "Enable Draco compression to reduce download payload size."
    }
  ]
}
```

***

### 💼 Use Cases

- **Web Developers & Agencies:** Audit client 3D assets to fix slow page loads and boost conversion rates.
- **3D Design Studios:** Validate client `.glb` and `.usdz` deliverables against mobile hardware standards before handoff.
- **CI/CD Automation:** Block heavy 3D assets in GitHub Actions or Zapier webhooks before deployment.

***

### 🔬 Methodology & Disclaimers

Conversion risk estimates are calculated using a simplified estimation model informed by published Core Web Vitals mobile load-time correlation research (*"Milliseconds Make Millions"*, Deloitte/Google, 2020). Estimates serve as performance indicators rather than financial guarantees.

# Actor input Schema

## `startUrls` (type: `array`):

Provide domain URLs, product pages, or direct links to .glb/.usdz files to audit.

## `evaluationProfile` (type: `string`):

Select the target hardware capability tier or platform preset to evaluate 3D assets against.

## `customMaxTriangles` (type: `integer`):

Define custom maximum triangle cap threshold when using Custom Thresholds profile.

## `customMaxVramMB` (type: `integer`):

Define custom maximum VRAM memory threshold in megabytes when using Custom Thresholds profile.

## `compareUrls` (type: `array`):

Add competitor URLs to generate a side-by-side 3D performance benchmarking matrix.

## `maxCrawlPages` (type: `integer`):

Maximum number of product links to discover and audit per run.

## `enableStealth` (type: `boolean`):

Uses Playwright with page initScript fingerprint masking (navigator.webdriver mask, Chrome runtime mocks), request pacing, and Apify Proxy routing to bypass anti-bot protections.

## `useApifyProxy` (type: `boolean`):

Routes network requests through Apify Proxy infrastructure.

## `webhookUrl` (type: `string`):

POSTs JSON results to your CI/CD pipeline, Zapier, or server upon completion.

## `webhookSecret` (type: `string`):

Secret key used to compute X-Auditor-Signature HMAC-SHA256 payload verification headers.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/DamagedHelmet/glTF-Binary/DamagedHelmet.glb"
    }
  ],
  "evaluationProfile": "UNIVERSAL_MOBILE_WEBGL",
  "customMaxTriangles": 100000,
  "customMaxVramMB": 256,
  "maxCrawlPages": 10,
  "enableStealth": false,
  "useApifyProxy": false
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing parsed geometry metrics, VRAM footprints, and platform compliance checks.

## `report` (type: `string`):

Interactive visual audit report and developer CLI fix recipes.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/DamagedHelmet/glTF-Binary/DamagedHelmet.glb"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("matrino/3d-spatial-performance-auditor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "startUrls": [{ "url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/DamagedHelmet/glTF-Binary/DamagedHelmet.glb" }] }

# Run the Actor and wait for it to finish
run = client.actor("matrino/3d-spatial-performance-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/DamagedHelmet/glTF-Binary/DamagedHelmet.glb"
    }
  ]
}' |
apify call matrino/3d-spatial-performance-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,matrino/3d-spatial-performance-auditor"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/DJQvALyrSFnNHPicD/builds/eyrH9eRZQobS1ylya/openapi.json
