import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js"; import type { IAnimation, ICamera, IGLTF, IKHRLightsPunctual_Light, IEXTLightsArea_Light, IMaterial, IMesh, INode } from "../glTFLoaderInterfaces.js"; import type { Vector3 } from "@babylonjs/core/Maths/math.vector.js"; import { Matrix, Quaternion, Vector2 } from "@babylonjs/core/Maths/math.vector.js"; import type { Color3 } from "@babylonjs/core/Maths/math.color.js"; import { Color4 } from "@babylonjs/core/Maths/math.color.js"; import type { PBRMaterial } from "@babylonjs/core/Materials/PBR/pbrMaterial.js"; import type { Light } from "@babylonjs/core/Lights/light.js"; import type { Nullable } from "@babylonjs/core/types.js"; import type { IEXTLightsImageBased_LightImageBased } from "babylonjs-gltf2interface"; import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js"; import type { IInterpolationPropertyInfo, IObjectAccessor } from "@babylonjs/core/FlowGraph/typeDefinitions.js"; import { GLTFPathToObjectConverter } from "./gltfPathToObjectConverter.js"; import type { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js"; import type { Mesh } from "@babylonjs/core/Meshes/mesh.js"; export interface IGLTFObjectModelTree { cameras: IGLTFObjectModelTreeCamerasObject; nodes: IGLTFObjectModelTreeNodesObject; materials: IGLTFObjectModelTreeMaterialsObject; extensions: IGLTFObjectModelTreeExtensionsObject; animations: { length: IObjectAccessor; __array__: {}; }; meshes: { length: IObjectAccessor; __array__: {}; }; } export interface IGLTFObjectModelTreeNodesObject { length: IObjectAccessor; __array__: { __target__: boolean; translation: IObjectAccessor; rotation: IObjectAccessor; scale: IObjectAccessor; matrix: IObjectAccessor; globalMatrix: IObjectAccessor; weights: { length: IObjectAccessor; __array__: { __target__: boolean; } & IObjectAccessor; } & IObjectAccessor; extensions: { EXT_lights_ies?: { multiplier: IObjectAccessor; color: IObjectAccessor; }; KHR_node_visibility?: { visible: IObjectAccessor; }; }; }; } export interface IGLTFObjectModelTreeCamerasObject { __array__: { __target__: boolean; orthographic: { xmag: IObjectAccessor; ymag: IObjectAccessor; zfar: IObjectAccessor; znear: IObjectAccessor; }; perspective: { yfov: IObjectAccessor; zfar: IObjectAccessor; znear: IObjectAccessor; aspectRatio: IObjectAccessor>; }; }; } export interface IGLTFObjectModelTreeMaterialsObject { __array__: { __target__: boolean; pbrMetallicRoughness: { baseColorFactor: IObjectAccessor; metallicFactor: IObjectAccessor>; roughnessFactor: IObjectAccessor>; baseColorTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; metallicRoughnessTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; emissiveFactor: IObjectAccessor; normalTexture: { scale: IObjectAccessor; extensions: { KHR_texture_transform: ITextureDefinition; }; }; occlusionTexture: { strength: IObjectAccessor; extensions: { KHR_texture_transform: ITextureDefinition; }; }; emissiveTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; extensions: { KHR_materials_anisotropy: { anisotropyStrength: IObjectAccessor; anisotropyRotation: IObjectAccessor; anisotropyTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; KHR_materials_clearcoat: { clearcoatFactor: IObjectAccessor; clearcoatRoughnessFactor: IObjectAccessor; clearcoatTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; clearcoatNormalTexture: { scale: IObjectAccessor; extensions: { KHR_texture_transform: ITextureDefinition; }; }; clearcoatRoughnessTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; KHR_materials_dispersion: { dispersion: IObjectAccessor; }; KHR_materials_emissive_strength: { emissiveStrength: IObjectAccessor; }; KHR_materials_ior: { ior: IObjectAccessor; }; KHR_materials_iridescence: { iridescenceFactor: IObjectAccessor; iridescenceIor: IObjectAccessor; iridescenceThicknessMinimum: IObjectAccessor; iridescenceThicknessMaximum: IObjectAccessor; iridescenceTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; iridescenceThicknessTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; KHR_materials_sheen: { sheenColorFactor: IObjectAccessor; sheenRoughnessFactor: IObjectAccessor; sheenColorTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; sheenRoughnessTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; KHR_materials_specular: { specularFactor: IObjectAccessor; specularColorFactor: IObjectAccessor; specularTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; specularColorTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; KHR_materials_transmission: { transmissionFactor: IObjectAccessor; transmissionTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; KHR_materials_diffuse_transmission: { diffuseTransmissionFactor: IObjectAccessor; diffuseTransmissionTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; diffuseTransmissionColorFactor: IObjectAccessor>; diffuseTransmissionColorTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; KHR_materials_volume: { thicknessFactor: IObjectAccessor; attenuationColor: IObjectAccessor; attenuationDistance: IObjectAccessor; thicknessTexture: { extensions: { KHR_texture_transform: ITextureDefinition; }; }; }; }; }; } interface ITextureDefinition { offset: IObjectAccessor; rotation: IObjectAccessor; scale: IObjectAccessor; } export interface IGLTFObjectModelTreeMeshesObject { } export interface IGLTFObjectModelTreeExtensionsObject { KHR_lights_punctual: { lights: { length: IObjectAccessor; __array__: { __target__: boolean; color: IObjectAccessor; intensity: IObjectAccessor; range: IObjectAccessor; spot: { innerConeAngle: IObjectAccessor; outerConeAngle: IObjectAccessor; }; }; }; }; EXT_lights_area: { lights: { length: IObjectAccessor; __array__: { __target__: boolean; color: IObjectAccessor; intensity: IObjectAccessor; size: IObjectAccessor; rect: { aspect: IObjectAccessor; }; }; }; }; EXT_lights_ies: { lights: { length: IObjectAccessor; }; }; EXT_lights_image_based: { lights: { __array__: { __target__: boolean; intensity: IObjectAccessor; rotation: IObjectAccessor; }; length: IObjectAccessor; }; }; } /** * get a path-to-object converter for the given glTF tree * @param gltf the glTF tree to use * @returns a path-to-object converter for the given glTF tree */ export declare function GetPathToObjectConverter(gltf: IGLTF): GLTFPathToObjectConverter; /** * This function will return the object accessor for the given key in the object model * If the key is not found, it will return undefined * @param key the key to get the mapping for, for example /materials/\{\}/emissiveFactor * @returns an object accessor for the given key, or undefined if the key is not found */ export declare function GetMappingForKey(key: string): IObjectAccessor | undefined; /** * Set interpolation for a specific key in the object model * @param key the key to set, for example /materials/\{\}/emissiveFactor * @param interpolation the interpolation elements array */ export declare function SetInterpolationForKey(key: string, interpolation?: IInterpolationPropertyInfo[]): void; /** * This will ad a new object accessor in the object model at the given key. * Note that this will NOT change the typescript types. To do that you will need to change the interface itself (extending it in the module that uses it) * @param key the key to add the object accessor at. For example /cameras/\{\}/perspective/aspectRatio * @param accessor the object accessor to add */ export declare function AddObjectAccessorToKey(key: string, accessor: IObjectAccessor): void; export {};