Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / DeviceProfile

Type Alias: DeviceProfile ​

ts
type DeviceProfile = {
  touch: boolean;
  mobile: boolean;
  tablet: boolean;
  os: "ios" | "android" | "mac" | "windows" | "linux" | "chromeos" | "other";
  cores: number | null;
  memoryGB: number | null;
  pixelRatio: number;
  screen: {
     width: number;
     height: number;
  };
  gpu: string | null;
  gpuTier: GpuTier;
  integratedGpu: boolean;
  saveData: boolean;
  reducedMotion: boolean;
};

Defined in: quality/device.ts:12

Properties ​

PropertyTypeDescriptionDefined in
touchbooleanThe screen can be touched and touch is how it's mostly used.quality/device.ts:14
mobilebooleanA phone: touch and a small screen.quality/device.ts:16
tabletbooleanA tablet: touch and a large screen.quality/device.ts:18
os"ios" | "android" | "mac" | "windows" | "linux" | "chromeos" | "other"-quality/device.ts:19
coresnumber | null-quality/device.ts:20
memoryGBnumber | nullRounded by the browser, often capped at 8.quality/device.ts:22
pixelRationumber-quality/device.ts:23
screen{ width: number; height: number; }-quality/device.ts:24
screen.widthnumber-quality/device.ts:24
screen.heightnumber-quality/device.ts:24
gpustring | nullThe GPU's name, when the browser tells.quality/device.ts:26
gpuTierGpuTier-quality/device.ts:27
integratedGpubooleanBuilt-in graphics that share memory with the CPU (most laptops).quality/device.ts:29
saveDatabooleanThe browser asked for less data.quality/device.ts:31
reducedMotionboolean-quality/device.ts:32