@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 ​
| Property | Type | Description | Defined in |
|---|---|---|---|
touch | boolean | The screen can be touched and touch is how it's mostly used. | quality/device.ts:14 |
mobile | boolean | A phone: touch and a small screen. | quality/device.ts:16 |
tablet | boolean | A tablet: touch and a large screen. | quality/device.ts:18 |
os | "ios" | "android" | "mac" | "windows" | "linux" | "chromeos" | "other" | - | quality/device.ts:19 |
cores | number | null | - | quality/device.ts:20 |
memoryGB | number | null | Rounded by the browser, often capped at 8. | quality/device.ts:22 |
pixelRatio | number | - | quality/device.ts:23 |
screen | { width: number; height: number; } | - | quality/device.ts:24 |
screen.width | number | - | quality/device.ts:24 |
screen.height | number | - | quality/device.ts:24 |
gpu | string | null | The GPU's name, when the browser tells. | quality/device.ts:26 |
gpuTier | GpuTier | - | quality/device.ts:27 |
integratedGpu | boolean | Built-in graphics that share memory with the CPU (most laptops). | quality/device.ts:29 |
saveData | boolean | The browser asked for less data. | quality/device.ts:31 |
reducedMotion | boolean | - | quality/device.ts:32 |

