Dice Theme

interface ITheme {
    id: string;
    meshes: DieDefinition<string>;
    available_dice: (IDieType | IAvailableDie)[];
    textures: IBindableTextureSrc[];
    uniforms: {
        [uniform: string]: IUniform;
    };
    sizes: DieDefinition<number>;
    physics?: {
        inertia?: DieDefinition<number>;
        weight?: DieDefinition<number>;
    };
    particles?: IParticleSystem[];
    sounds?: ISound[];
    values: Record<string, (number | {
        src: any;
    })[]>;
    extend: string;
    frag_shader: string;
    vert_shader: string;
    options: Record<string, unknown>;
    api_version: string | number;
    author?: string;
    name?: string;
    description?: string;
    label?: {
        color?: string;
        background_color?: string;
    };
    preview: {
        [previewType: string]: string;
    };
    user?: IUser;
    created_at: string;
    updated_at: string;
    version: string;
}

Hierarchy

  • IThemeOptions
    • ITheme

Properties

id: string
meshes: DieDefinition<string>

3D Model URIs (FBX Files)

available_dice: (IDieType | IAvailableDie)[]

Dice available in this theme. This will determine what die are rendered as available in the set.

uniforms: {
    [uniform: string]: IUniform;
}

Type declaration

  • [uniform: string]: IUniform
sizes: DieDefinition<number>

Relative sizes of dice. This allows us to shrink/grow certain die in a set (like a gigantic d20) All die default to "1"

physics?: {
    inertia?: DieDefinition<number>;
    weight?: DieDefinition<number>;
}

Type declaration

particles?: IParticleSystem[]
sounds?: ISound[]
values: Record<string, (number | {
    src: any;
})[]>

Dice Values. Used to support custom values such as letters, emojis, graphics, and more.

extend: string

If a theme extends another theme, this will be the ID of that theme

frag_shader: string

Custom fragment shader (GLSL Code)

vert_shader: string

Custom vertex shader (GLSL Code)

options: Record<string, unknown>

Uniforms for shaders

api_version: string | number

API Version for compatability This will almost always be 1.0 or 1

author?: string

Theme author name

name?: string

Theme name

description?: string

Theme description

label?: {
    color?: string;
    background_color?: string;
}

Label style properties

Type declaration

  • Optional color?: string
  • Optional background_color?: string
preview: {
    [previewType: string]: string;
}

Preview Image URIs

Type declaration

  • [previewType: string]: string
user?: IUser

Theme author

created_at: string

Timestamp

updated_at: string

Timestamp

version: string

Theme Version Allows author to utilize semvar

Generated using TypeDoc