---
title: "Module vector and array constants in TypeShade"
description: "Module vector and array constants, a TypeShade example. A fullscreen triangle banded by a module-scope array<vec4, 3> palette and an array<f32, 3> of stops…"
url: https://typeshade.dev/guide/examples/palette-const/
language: en
---

# Module vector and array constants

A fullscreen triangle banded by a module-scope `array<vec4, 3>` palette and an `array<f32, 3>` of stops, with a `vec3` constant built from an earlier scalar one.

**palette-const.shade.ts**

`TS`

Diagnostics Ready to compile

Loading the program…

Compile a module with a vertex entry and a fragment entry to see it drawn.

The editor holds this example's own file, and the program is that file and any file it imports. An edit recompiles it in your browser, and the tabs beside the editor follow.

[File on GitHub](https://github.com/typeshade/typeshade/blob/af54ddad5/examples/gallery/palette-const/palette-const.shade.ts)
