Home
Adapters and plugins

Capacitor Plugin

Strata Capacitor plugin for native mobile integration

The strata-game-library/capacitor provides native mobile integration for Strata applications using Ionic Capacitor. Deploy your 3D games and experiences to iOS and Android with native performance.

Installation

pnpm add strata-game-library/capacitor
npx cap sync

Features

  • Native iOS and Android bridge for Strata 3D rendering
  • Hardware-accelerated WebGL context management
  • React hooks for Capacitor integration
  • Touch input with gesture recognition
  • Haptic feedback for immersive interactions
  • Device orientation sensors for gyroscope controls
  • Performance monitoring with native profiling tools

Quick Start

import { StrataCapacitor } from 'strata-game-library/capacitor';

// Initialize the plugin
await StrataCapacitor.initialize({
  enableHaptics: true,
  enableGyroscope: true,
});

// Use in your Strata game
function MobileGame() {
  return (
    <Canvas>
      <Terrain biome="alpine" size={256} />
      <Water size={256} />
    </Canvas>
  );
}

Platform Support

FeatureiOSAndroid
WebGL 2.0YesYes
Haptic FeedbackYesYes
Gyroscope InputYesYes
AR IntegrationARKitARCore
Performance TierAuto-detectAuto-detect