# expo-graphics

> Tools for building universal graphic based components in Expo

Latest version **2.0.0** (published 2021-04-14) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install expo-graphics
pnpm add expo-graphics
yarn add expo-graphics
bun add expo-graphics
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-04-14 |
| First published | 2017-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 45 |
| Author | Evan Bacon |
| Maintainers | expoadmin, evanbacon |
| Keywords | react, native, expo, exponent, game, gl, graphics, opengl |

## Links

- npm: https://www.npmjs.com/package/expo-graphics
- Repository: https://github.com/expo/expo-graphics
- Homepage: https://github.com/expo/expo-graphics#readme
- Issues: https://github.com/expo/expo-graphics/issues
- npm.io page: https://npm.io/package/expo-graphics

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-04-14
- 1.1.0 — 2019-04-21
- 1.0.3 — 2019-01-31
- 1.0.2 — 2019-01-06
- 1.0.1 — 2019-01-06
- 1.0.0-alpha.6 — 2018-09-24
- 1.0.0-alpha.5 — 2018-09-14
- 1.0.0-alpha.4 — 2018-09-14
- 1.0.0-alpha.2 — 2018-06-25
- 1.0.0-alpha.1 — 2018-06-13
- 0.0.4 — 2018-05-09
- 0.0.3 — 2018-02-09
- 0.0.2 — 2018-01-13
- 0.0.1 — 2017-11-22
- 0.0.0 — 2017-11-22

## README

[![NPM](https://nodei.co/npm/expo-graphics.png)](https://nodei.co/npm/expo-graphics/)

---

# expo-graphics

> This package has been deprecated in favor of using GLView directly. 

Tools to help simplify and manage GL state.

### Installation

```bash
yarn add expo-graphics
```

### Usage

Import the library into your JavaScript file:

```bash
import ExpoGraphics from 'expo-graphics';
```

## Components

### `ExpoGraphics.View`

A view that assists with common GL tasks.

#### Props

| Property                |                             Type                             | Default | Description                                                                                                         |
| ----------------------- | :----------------------------------------------------------: | :-----: | ------------------------------------------------------------------------------------------------------------------- |
| isShadowsEnabled        |                           ?boolean                           |  false  | Overrides the render buffer allowing for shadows, this works by default on Android: **iOS Only**                    |
| onRender                |                   (delta: number) => void                    |  null   | Called every frame with delta time since the last frame                                                             |
| onContextCreate         | ({gl, canvas?, width, height, scale }) => Promise |  null   | Called with the newly created GL context                                                    |
| onShouldReloadContext   |                        () => boolean                         |  null   | A delegate function that requests permission to reload the GL context when the app returns to the foreground        |
| onResize                |                   (layout: Layout) => void                   |  null   | Invoked when the view changes size, or the device orientation changes, returning the `{x, y, width, height, scale}` |

---
_Source: https://npm.io/package/expo-graphics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
