Options
All
  • Public
  • Public/Protected
  • All
Menu

Env class that holds detected capabilities

Hierarchy

  • Env

Index

Constructors

constructor

Properties

Canvas

Canvas: undefined

MonkeyPatch for Canvas

Image

Image: undefined

MonkeyPatch for Image

ImageData

ImageData: undefined

MonkeyPatch for ImageData

agent

agent: string = ''

Detected agent

backends

backends: string[] = []

List of supported backends

browser

browser: boolean

Running in Browser

cpu

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

CPU info

Type declaration

  • flags: string[]
  • model: undefined | string

filter

filter: undefined | boolean

Are image filters supported?

initial

initial: boolean

Has any work been performed so far

kernels

kernels: string[] = []

List of supported kernels for current backend

node

node: boolean

Running in NodeJS

offscreen

offscreen: undefined | boolean

Is offscreenCanvas supported?

perfadd

perfadd: boolean = false

Are performance counter instant values or additive

platform

platform: string = ''

Detected platform

tfjs

tfjs: { version: undefined | string }

TFJS instance details

Type declaration

  • version: undefined | string

wasm

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

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 } = ...

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 } = ...

WebGPU detected capabilities

Type declaration

  • adapter: undefined | string
  • backend: undefined | boolean
  • supported: undefined | boolean

worker

worker: boolean

Running in WebWorker thread

Methods

updateBackend

  • updateBackend(): Promise<void>

updateCPU

  • updateCPU(): Promise<void>