UNPKG

minecraft-bedrock-json-types

Version:

Typescript types for Minecraft Bedrock's add-on json configuration files.

47 lines (46 loc) 1.82 kB
/** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A version that tells minecraft what type of data format can be expected when reading this file. */ type FormatVersion = string; /** * This is an RGB 3-channel image (defaults to uniform alpha of 1.0), or an RGBA 4-channel image, or a 4 value array for a uniform color with alpha. */ type Color = (string | [] | [Red] | [Red, Green] | [Red, Green, Blue] | [Red, Green, Blue, Alpha]); type Red = number; type Green = number; type Blue = number; type Alpha = number; /** * 1-channel layer image or a single value in this JSON file for a uniform heightmap. This layer and the "normal" layer should not both be defined at the same time. */ type Heightmap = (string | number); /** * This is a 3-channel image (or 4-channel where the 4th channel is ignored) or a 3-value array for a uniform MER. RGB images map Red to Metalness, Green to Emissive, and Blue to Roughness. */ type MetalnessEmissiveRoughness = (string | [] | [Red1] | [Red1, Green1] | [Red1, Green1, Blue1]); type Red1 = number; type Green1 = number; type Blue1 = number; /** * This is a 3-channel normal map image (or 4-channel where the 4th channel is ignored). This layer and the "heightmap" layer should not both be defined at the same time. */ type NormalMap = string; export interface TextureSet { format_version?: FormatVersion; "minecraft:texture_set"?: TextureSet1; } /** * Texture Sets are used to define multiple PBR layers for a texture resource. */ interface TextureSet1 { color: Color; heightmap?: Heightmap; metalness_emissive_roughness?: MetalnessEmissiveRoughness; normal?: NormalMap; } export {};