Home
Shaders and presets

Camera Presets

Pre-configured camera controllers for different game perspectives

Ready-to-use camera configurations for common game perspectives.

Quick Start

import { createCameraPreset, CameraPresets } from 'strata-game-library/presets/camera';

<CameraController {...CameraPresets.THIRD_PERSON} />

Available Presets

PresetDescriptionUse Case
FIRST_PERSONEye-level viewFPS games
THIRD_PERSONOver shoulderAction games
TOP_DOWNBirds eyeStrategy, RPG
ISOMETRIC45° angleTactics, city builders
ORBITFree rotationViewers, editors
CINEMATICSmooth dollyCutscenes
SIDE_SCROLLER2D perspectivePlatformers

Preset Examples

Third Person

CameraPresets.THIRD_PERSON = {
  type: 'follow',

  offset: [0, 2, -5],
  lookAtOffset: [0, 1.5, 0],

  smoothing: {
    position: 0.1,
    rotation: 0.05,
  },

  limits: {
    minDistance: 2,
    maxDistance: 10,
    minPolarAngle: 0.2,
    maxPolarAngle: Math.PI / 2,
  },

  collision: {
    enabled: true,
    radius: 0.3,
  },

  input: {
    mouseSensitivity: 0.002,
    zoomSpeed: 1,
  },
};

Cinematic

CameraPresets.CINEMATIC = {
  type: 'path',

  smoothing: {
    position: 0.02,
    rotation: 0.01,
  },

  depthOfField: {
    enabled: true,
    focusDistance: 10,
    aperture: 0.025,
  },

  motionBlur: {
    enabled: true,
    amount: 0.5,
  },

  letterbox: {
    enabled: true,
    aspect: 2.35,
  },
};

Using with Components

import { CameraController } from 'strata-game-library/core';
import { CameraPresets } from 'strata-game-library/presets/camera';

<CameraController
  {...CameraPresets.THIRD_PERSON}
  target={playerRef}
/>