> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nanoforge.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# InitContext

> Narrow context available to a library's __init hook.

Defined in: [packages/common/src/context/init-context.type.ts:36](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/context/init-context.type.ts#L36)

Narrow context available to a library's `__init` hook.

## Remarks

`app` and `assets` are intentionally absent here: `app` doesn't exist yet
(the tick loop hasn't started), and `assets` isn't populated until every
library has finished initializing. Libraries that need raw files during
`__init` (e.g. the built-in asset library) read `files` directly.

## Properties

### container?

> `optional` **container?**: `HTMLDivElement`

Defined in: [packages/common/src/context/init-context.type.ts:40](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/context/init-context.type.ts#L40)

***

### env

> **env**: `Record`\<`string`, `string` | `undefined`>

Defined in: [packages/common/src/context/init-context.type.ts:38](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/context/init-context.type.ts#L38)

***

### files

> **files**: `Map`\<`string`, `string`>

Defined in: [packages/common/src/context/init-context.type.ts:39](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/context/init-context.type.ts#L39)

***

### vars

> **vars**: [`VarsContext`](https://docs.nanoforge.eu/references/engine/3.0.0/common/interfaces/VarsContext)

Defined in: [packages/common/src/context/init-context.type.ts:37](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/context/init-context.type.ts#L37)

***

### viewport?

> `optional` **viewport?**: [`ViewportContext`](https://docs.nanoforge.eu/references/engine/3.0.0/common/interfaces/ViewportContext)

Defined in: [packages/common/src/context/init-context.type.ts:42](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/context/init-context.type.ts#L42)

Screen/game viewport. Client-only; `undefined` on the server.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.