import NamedComponent from "../named-component/index.js"; import { ValueOf } from "ts-essentials"; import { Vec3 } from "../../types/data-types.js"; import MetallicRoughness from "./metallic-roughness/index.js"; import Indexer from "../asset/indexer/index.js"; /** * Describes the alpha mode of a material * @alias AlphaModes * @enum {string} * @memberof Material * @static */ declare const alphaModes: { readonly OPAQUE: "OPAQUE"; readonly MASK: "MASK"; readonly BLEND: "BLEND"; }; type AlphaMode = ValueOf; /** * Material - a builder for a GLTF material object * @see {@link https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-material | GLTF reference} * @hideconstructor */ export default class Material extends NamedComponent<{ emissiveFactor: Vec3; alphaMode: AlphaMode; alphaCutoff: number; doubleSided: boolean; pbrMetallicRoughness: MetallicRoughness; }> { metallicRoughness: typeof this.pbrMetallicRoughness; constructor(); static get AlphaModes(): { readonly OPAQUE: "OPAQUE"; readonly MASK: "MASK"; readonly BLEND: "BLEND"; }; /** * emissiveFactor - sets the emissive colour of the material * * @param {Vec3} emissiveFactor emissive colour * * @returns this */ emissiveFactor(emissiveFactor: Vec3): this; /** * alphaMode - sets the alpha mode of the material * * @param {AlphaMode} alphaMode one of the valid alpha modes * * @returns this */ alphaMode(alphaMode: AlphaMode): this; /** * alphaCutoff - sets the alpha cutoff of the material * when alphaMode is set to {@link Material.alphaMode.MASK} * * @param {number} alphaCutoff a number in the range [0, 1] * * @returns this */ alphaCutoff(alphaCutoff: number): this; /** * doubleSided - sets whether the material is double sided. * * @param {boolean} doubleSided * * @returns this */ doubleSided(doubleSided: boolean): this; /** * pbrMetallicRoughness - Sets values used to define the metallic-roughness material * model from Physically-Based Rendering (PBR) methodology. * * @param {MetallicRoughness} pbrMetallicRoughness a MetallicRoughness object * * @returns this */ pbrMetallicRoughness(pbrMetallicRoughness: MetallicRoughness): this; build(indexer: Indexer): object; } export {};