Hosting code to git for the first time.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import type { Command } from "./Command";
|
||||
import type { CommandType } from "./CommandType";
|
||||
|
||||
interface ClearCommand extends Command {
|
||||
|
||||
type: CommandType.Clear
|
||||
}
|
||||
|
||||
export type { ClearCommand };
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { CommandTypeSet } from "./CommandType";
|
||||
|
||||
interface Command {
|
||||
|
||||
/**
|
||||
* Define the type of command.
|
||||
*/
|
||||
type: CommandTypeSet;
|
||||
|
||||
/**
|
||||
* Unique identification of the command for feedback.
|
||||
*/
|
||||
id?: string | number;
|
||||
}
|
||||
|
||||
export type { Command };
|
||||
@@ -0,0 +1,6 @@
|
||||
import type { RenderCommand } from "./RenderCommand";
|
||||
import type { ClearCommand } from "./ClearCommand";
|
||||
|
||||
type CommandSet = RenderCommand | ClearCommand;
|
||||
|
||||
export type { CommandSet };
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
namespace CommandType {
|
||||
|
||||
export type Render = "RENDER" | 100_001;
|
||||
|
||||
export type Resource = "RESOURCE" | 100_002;
|
||||
|
||||
export type Clear = "CLEAR" | 100_003;
|
||||
|
||||
export type Execute = "EXECUTE" | 100_004;
|
||||
}
|
||||
|
||||
type CommandTypeSet = CommandType.Render | CommandType.Resource | CommandType.Clear | CommandType.Execute;
|
||||
|
||||
export type { CommandType, CommandTypeSet };
|
||||
@@ -0,0 +1,12 @@
|
||||
import type { Command } from "./Command";
|
||||
import type { CommandType } from "./CommandType";
|
||||
|
||||
/**
|
||||
* Rendering command are used to execute gl programs.
|
||||
*/
|
||||
interface RenderCommand extends Command {
|
||||
|
||||
type: CommandType.Render
|
||||
}
|
||||
|
||||
export type { RenderCommand };
|
||||
Reference in New Issue
Block a user