Env class that holds detected capabilities

### Hierarchy

- Env

## Index

### Constructors

- constructor

### Properties

- Canvas
- Image
- ImageData
- agent
- backends
- browser
- cpu
- filter
- initial
- kernels
- node
- offscreen
- perfadd
- platform
- tfjs
- wasm
- webgl
- webgpu
- worker

### Methods

- updateBackend
- updateCPU

## Constructors

### constructor

- new Env(): Env

- - Defined in src/util/env.ts:81

  #### Returns Env

## Properties

### Canvas

Canvas: undefined

- Defined in src/util/env.ts:75

MonkeyPatch for Canvas

### Image

Image: undefined

- Defined in src/util/env.ts:77

MonkeyPatch for Image

### ImageData

ImageData: undefined

- Defined in src/util/env.ts:79

MonkeyPatch for ImageData

### agent

agent: string = ''

- Defined in src/util/env.ts:15

Detected agent

### backends

backends: string[] = []

- Defined in src/util/env.ts:17

List of supported backends

### browser

browser: boolean

- Defined in src/util/env.ts:7

Running in Browser

### cpu

cpu: { flags: string[]; model: undefined | string } = ...

- Defined in src/util/env.ts:65

CPU info

#### Type declaration

- ##### flags: string[]

- ##### model: undefined | string

### filter

filter: undefined | boolean

- Defined in src/util/env.ts:21

Are image filters supported?

### initial

initial: boolean

- Defined in src/util/env.ts:19

Has any work been performed so far

### kernels

kernels: string[] = []

- Defined in src/util/env.ts:73

List of supported kernels for current backend

### node

node: boolean

- Defined in src/util/env.ts:9

Running in NodeJS

### offscreen

offscreen: undefined | boolean

- Defined in src/util/env.ts:27

Is offscreenCanvas supported?

### perfadd

perfadd: boolean = false

- Defined in src/util/env.ts:29

Are performance counter instant values or additive

### platform

platform: string = ''

- Defined in src/util/env.ts:13

Detected platform

### tfjs

tfjs: { version: undefined | string }

- Defined in src/util/env.ts:23

TFJS instance details

#### Type declaration

- ##### version: undefined | string

### wasm

wasm: { backend: undefined | boolean; multithread: undefined | boolean; simd: undefined | boolean; supported: undefined | boolean } = ...

- Defined in src/util/env.ts:31

WASM detected capabilities

#### Type declaration

- ##### backend: undefined | boolean

- ##### multithread: undefined | boolean

- ##### simd: undefined | boolean

- ##### supported: undefined | boolean

### webgl

webgl: { backend: undefined | boolean; renderer: undefined | string; supported: undefined | boolean; version: undefined | string } = ...

- Defined in src/util/env.ts:43

WebGL detected capabilities

#### Type declaration

- ##### backend: undefined | boolean

- ##### renderer: undefined | string

- ##### supported: undefined | boolean

- ##### version: undefined | string

### webgpu

webgpu: { adapter: undefined | string; backend: undefined | boolean; supported: undefined | boolean } = ...

- Defined in src/util/env.ts:55

WebGPU detected capabilities

#### Type declaration

- ##### adapter: undefined | string

- ##### backend: undefined | boolean

- ##### supported: undefined | boolean

### worker

worker: boolean

- Defined in src/util/env.ts:11

Running in WebWorker thread

## Methods

### updateBackend

- updateBackend(): Promise<void>

- - Defined in src/util/env.ts:114

  update backend information

  #### Returns Promise<void>

### updateCPU

- updateCPU(): Promise<void>

- - Defined in src/util/env.ts:150

  update cpu information

  #### Returns Promise<void>