@darkforest_eth/renderer v6.7.29
@darkforest_eth/renderer
Table of contents
Classes
- AttribArray
- AttribManager
- EngineUtils
- GameGLManager
- GenericRenderer
- ProgramUtils
- Renderer
- ShaderMixins
- SpriteRenderer
- UIRenderer
- WebGLManager
Interfaces
Type aliases
- AttribData
- AttribManagers
- AttributeSetters
- GLArray
- ProgramInfo
- UniformData
- UniformLocs
- UniformSetter
- UniformSetters
Variables
Functions
Type aliases
AttribData
Ƭ AttribData: Object
Index signature
▪ key: string: AttribProps
AttribManagers
Ƭ AttribManagers<T>: { [k in keyof T"attribs"]: AttribManager }
Type parameters
| Name | Type |
|---|---|
T | extends EngineProgramDefinition |
AttributeSetters
Ƭ AttributeSetters<U>: { key in keyof U: Function }
Type parameters
| Name | Type |
|---|---|
U | extends Attributes |
GLArray
Ƭ GLArray: Float32Array | Uint8Array
ProgramInfo
Ƭ ProgramInfo: Object
Type declaration
| Name | Type |
|---|---|
fragShader | string |
uniforms | Uniforms |
vertexShader | string |
UniformData
Ƭ UniformData: Object
Index signature
▪ key: string: UniformProps
UniformLocs
Ƭ UniformLocs<T>: { [k in keyof T"uniforms"]: WebGLUniformLocation }
Type parameters
| Name | Type |
|---|---|
T | extends EngineProgramDefinition |
UniformSetter
Ƭ UniformSetter: (el: any) => void
Type declaration
▸ (el): void
Parameters
| Name | Type |
|---|---|
el | any |
Returns
void
UniformSetters
Ƭ UniformSetters<T>: { [k in keyof T"uniforms"]: UniformSetter }
Type parameters
| Name | Type |
|---|---|
T | extends EngineProgramDefinition |
Variables
engineConsts
• Const engineConsts: Object
Type declaration
| Name | Type |
|---|---|
colors | { artifacts: { shine: RGBVec ; trim: RGBVec } ; barbs: RGBVec ; barbsA: RGBAVec ; belt: { defense: RGBVec ; range: RGBVec ; silver: RGBVec ; speed: RGBVec } ; bonus: { defense: RGBVec ; energyCap: RGBVec ; energyGro: RGBVec ; range: RGBVec ; spaceJunk: RGBVec ; speed: RGBVec } ; gold: RGBVec ; orange: RGBVec ; orangeA: RGBAVec ; purple: RGBVec ; purpleA: RGBAVec ; range: { dash: RGBVec ; energy: RGBVec } ; red: RGBVec ; redA: RGBAVec ; voyage: { enemy: RGBVec ; enemyA: RGBAVec ; mine: RGBVec ; mineA: RGBAVec ; shipA: RGBAVec } ; white: RGBVec ; whiteA: RGBAVec } |
colors.artifacts | { shine: RGBVec ; trim: RGBVec } |
colors.artifacts.shine | RGBVec |
colors.artifacts.trim | RGBVec |
colors.barbs | RGBVec |
colors.barbsA | RGBAVec |
colors.belt | { defense: RGBVec ; range: RGBVec ; silver: RGBVec ; speed: RGBVec } |
colors.belt.defense | RGBVec |
colors.belt.range | RGBVec |
colors.belt.silver | RGBVec |
colors.belt.speed | RGBVec |
colors.bonus | { defense: RGBVec ; energyCap: RGBVec ; energyGro: RGBVec ; range: RGBVec ; spaceJunk: RGBVec ; speed: RGBVec } |
colors.bonus.defense | RGBVec |
colors.bonus.energyCap | RGBVec |
colors.bonus.energyGro | RGBVec |
colors.bonus.range | RGBVec |
colors.bonus.spaceJunk | RGBVec |
colors.bonus.speed | RGBVec |
colors.gold | RGBVec |
colors.orange | RGBVec |
colors.orangeA | RGBAVec |
colors.purple | RGBVec |
colors.purpleA | RGBAVec |
colors.range | { dash: RGBVec ; energy: RGBVec } |
colors.range.dash | RGBVec |
colors.range.energy | RGBVec |
colors.red | RGBVec |
colors.redA | RGBAVec |
colors.voyage | { enemy: RGBVec ; enemyA: RGBAVec ; mine: RGBVec ; mineA: RGBAVec ; shipA: RGBAVec } |
colors.voyage.enemy | RGBVec |
colors.voyage.enemyA | RGBAVec |
colors.voyage.mine | RGBVec |
colors.voyage.mineA | RGBAVec |
colors.voyage.shipA | RGBAVec |
colors.white | RGBVec |
colors.whiteA | RGBAVec |
dashLength | number |
fontStyle | string |
glyphs | { canvasDim: number = 1024; glyphH: number = 64; glyphW: number = 40; rowL: number = 13; scale: number = 4 } |
glyphs.canvasDim | number |
glyphs.glyphH | number |
glyphs.glyphW | number |
glyphs.rowL | number |
glyphs.scale | number |
planet | { maxRadius: number = 4 } |
planet.maxRadius | number |
Functions
getUniformSetter
▸ getUniformSetter(gl, loc, props): UniformSetter
Create a setter which writes the given uniform specified by props to loc.
Note that this function does not call gl.useProgram().
Parameters
| Name | Type | Description |
|---|---|---|
gl | WebGL2RenderingContext | The WebGL rendering context this uniform is in. |
loc | WebGLUniformLocation | The uniform location to write to. |
props | UniformProps | UniformProps for this uniform. |
Returns
glsl
▸ glsl(arr, ...args): string
Parameters
| Name | Type |
|---|---|
arr | TemplateStringsArray |
...args | any[] |
Returns
string
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago