-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor 3d renderer to allow for more render passes
- Loading branch information
1 parent
b607a18
commit fcbedb6
Showing
7 changed files
with
378 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { vec4 } from 'gl-matrix' | ||
|
||
import { Renderable2d } from '~/renderer/Renderer2d' | ||
|
||
export interface DebugLineModel { | ||
points: Float32Array | ||
color: vec4 | ||
lifetime?: number // lifetime in frames (minimum 1, default 1) | ||
} | ||
|
||
export interface DebugDraw { | ||
draw2d: (makeRenderables: () => Renderable2d[]) => void | ||
draw3d: (makeModels: () => { points: Float32Array; color: vec4 }[]) => void | ||
} | ||
|
||
export const mockDebugDraw = { | ||
draw2d: (_makeRenderables: () => Renderable2d[]): void => { | ||
/* do nothing */ | ||
}, | ||
draw3d: ( | ||
_makeModels: () => { points: Float32Array; color: vec4 }[], | ||
): void => { | ||
/* do nothing */ | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.