Skip to content

[Investigation] Some samples do not work on iPhone (Safari) #372

Description

@cx20

Summary

There are reports that some samples do not work correctly on iPhone Safari (e.g. nothing is rendered, or the physics simulation does not run). The root cause needs to be investigated.

This is based on a user report. At this point only the symptom — "some samples don't work" — is confirmed. Exactly which samples fail, and how, has not yet been identified. This issue is for narrowing that down.

Environment

  • Device: iPhone
  • Browser: Safari (iOS)
  • Note: iOS / Safari version is not yet confirmed (needs checking)

Suspected causes (angles for investigation)

The following iOS Safari-specific constraints are likely failure points:

  1. WebGPU / WGSL samples
    • WebGPU support on iOS Safari is limited and highly version-dependent (not available through iOS 18.x; rolling out in iOS 26, etc.).
    • Targets: examples/webgpu/** and examples/*/wgsl_compute/** (69 samples in total) are the most likely failures.
  2. WASM physics engines (ammo.js / Havok)
    • When they rely on WASM loading, SharedArrayBuffer / multithreading (cross-origin isolation: COOP/COEP headers), they may fail to run on iOS.
    • Targets: examples/*/ammo/**, examples/*/havok/**.
  3. WebGL2 / extension differences
    • iOS Safari differs in some WebGL2 extensions and precision (highp) behavior.
  4. ES Modules / import maps / dynamic import compatibility, and load failures related to CORS / MIME types.
  5. Memory limits — crashes from exceeding WASM/GPU memory limits in samples with many rigid bodies.

Investigation tasks

  • Identify a reproducible environment (iOS / Safari version)
  • Compile a list of failing samples (grouped by category: webgpu / wgsl_compute / ammo / havok / other)
  • Capture console errors using Safari Web Inspector (connected via Mac)
  • For failures caused by lack of WebGPU support, consider a fallback message for unsupported devices and/or a note in the README
  • For failures caused by WASM threading requirements, review a single-threaded variant or header configuration
  • Decide a remediation approach per category, splitting into separate issues / PRs as needed

Notes

Sample matrix (renderer × physics engine):
ashes / babylonjs / claygl / czpg / filament / glboost / grimoirejs / hilo3d / playcanvas / rhodonite / threejs / webgl1 / webgl2 / webgpu / xenogl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions