Unified virtual renderer resource naming.

This commit is contained in:
MrKBear 2023-02-09 11:02:35 +08:00
parent c494156983
commit 83dac5289f
6 changed files with 18 additions and 5 deletions

View File

@ -1,8 +1,8 @@
import type { ResourceSet } from "./ResourceType"; import type { ResourceTypeSet } from "./ResourceType";
interface Resource { interface Resource {
type: ResourceSet; type: ResourceTypeSet;
id: string | number; id: string | number;
} }

View File

@ -0,0 +1,5 @@
import type { ShaderResource } from "./ShaderResource";
type ResourceSet = ShaderResource;
export type { ResourceSet };

View File

@ -4,6 +4,6 @@ namespace ResourceType {
export type Shader = "SHADER" | 100_001; export type Shader = "SHADER" | 100_001;
} }
type ResourceSet = ResourceType.Shader; type ResourceTypeSet = ResourceType.Shader;
export type { ResourceType, ResourceSet }; export type { ResourceType, ResourceTypeSet };

View File

@ -0,0 +1,6 @@
interface ShaderResource {
}
export type { ShaderResource };

View File

@ -4,4 +4,6 @@ export * from "command/CommandType";
export * from "command/RenderCommand"; export * from "command/RenderCommand";
export * from "command/ClearCommand"; export * from "command/ClearCommand";
export * from "resource/Resource"; export * from "resource/Resource";
export * from "resource/ResourceType"; export * from "resource/ResourceSet";
export * from "resource/ResourceType";
export * from "resource/ShaderResource";