123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- module BABYLON {
- /**
- * Interfaces
- */
- export interface IGLTFChildRootProperty {
- name?: string;
- }
- export interface IGLTFAccessor extends IGLTFChildRootProperty {
- bufferView: string;
- byteOffset: number;
- byteStride: number;
- count: number;
- type: string;
- componentType: EComponentType;
- max?: number[],
- min?: number[],
- name?: string;
- }
- export interface IGLTFBufferView extends IGLTFChildRootProperty {
- buffer: string;
- byteOffset: number;
- byteLength: number;
- target?: number;
- }
- export interface IGLTFBuffer extends IGLTFChildRootProperty {
- uri: string;
- byteLength?: number;
- type?: string;
- }
- export interface IGLTFShader extends IGLTFChildRootProperty {
- uri: string;
- type: EShaderType;
- }
- export interface IGLTFProgram extends IGLTFChildRootProperty {
- attributes: string[];
- fragmentShader: string;
- vertexShader: string;
- }
- export interface IGLTFTechniqueParameter {
- type: number;
- count?: number;
- semantic?: string;
- node?: string;
- value?: number|boolean|string|Array<any>;
- source?: string;
- babylonValue?: any;
- }
- export interface IGLTFTechniqueCommonProfile {
- lightingModel: string;
- texcoordBindings: Object;
- parameters?: Array<any>;
- }
- export interface IGLTFTechniqueStatesFunctions {
- blendColor?: number[];
- blendEquationSeparate?: number[];
- blendFuncSeparate?: number[];
- colorMask: boolean[];
- cullFace: number[];
- }
- export interface IGLTFTechniqueStates {
- enable: number[];
- functions: IGLTFTechniqueStatesFunctions;
- }
- export interface IGLTFTechnique extends IGLTFChildRootProperty {
- parameters: Object;
- program: string;
- attributes: Object;
- uniforms: Object;
- states: IGLTFTechniqueStates;
- }
- export interface IGLTFMaterial extends IGLTFChildRootProperty {
- technique?: string;
- values: string[];
- }
- export interface IGLTFMeshPrimitive {
- attributes: Object;
- indices: string;
- material: string;
- mode?: number;
- }
- export interface IGLTFMesh extends IGLTFChildRootProperty {
- primitives: IGLTFMeshPrimitive[];
- }
- export interface IGLTFImage extends IGLTFChildRootProperty {
- uri: string;
- }
- export interface IGLTFSampler extends IGLTFChildRootProperty {
- magFilter?: number;
- minFilter?: number;
- wrapS?: number;
- wrapT?: number;
- }
- export interface IGLTFTexture extends IGLTFChildRootProperty {
- sampler: string;
- source: string;
- format?: ETextureFormat;
- internalFormat?: ETextureFormat;
- target?: number;
- type?: number;
-
- // Babylon.js values (optimize)
- babylonTexture?: Texture;
- }
- export interface IGLTFAmbienLight {
- color?: number[];
- }
- export interface IGLTFDirectionalLight {
- color?: number[];
- }
- export interface IGLTFPointLight {
- color?: number[];
- constantAttenuation?: number;
- linearAttenuation?: number;
- quadraticAttenuation?: number;
- }
- export interface IGLTFSpotLight {
- color?: number[];
- constantAttenuation?: number;
- fallOfAngle?: number;
- fallOffExponent?: number;
- linearAttenuation?: number;
- quadraticAttenuation?: number;
- }
- export interface IGLTFLight extends IGLTFChildRootProperty {
- type: string;
- }
- export interface IGLTFCameraOrthographic {
- xmag: number;
- ymag: number;
- zfar: number;
- znear: number;
- }
- export interface IGLTFCameraPerspective {
- aspectRatio: number;
- yfov: number;
- zfar: number;
- znear: number;
- }
- export interface IGLTFCamera extends IGLTFChildRootProperty {
- type: string;
- }
- export interface IGLTFAnimationChannelTarget {
- id: string;
- path: string;
- }
- export interface IGLTFAnimationChannel {
- sampler: string;
- target: IGLTFAnimationChannelTarget;
- }
- export interface IGLTFAnimationSampler {
- input: string;
- output: string;
- interpolation?: string;
- }
- export interface IGLTFAnimation extends IGLTFChildRootProperty {
- channels?: IGLTFAnimationChannel[];
- parameters?: Object;
- samplers?: Object;
- }
- export interface IGLTFNodeInstanceSkin {
- skeletons: string[];
- skin: string;
- meshes: string[];
- }
- export interface IGLTFSkins extends IGLTFChildRootProperty {
- bindShapeMatrix: number[];
- inverseBindMatrices: string;
- jointNames: string[];
- babylonSkeleton?: Skeleton;
- }
- export interface IGLTFNode extends IGLTFChildRootProperty {
- camera?: string;
- children: string[];
- skin?: string;
- jointName?: string;
- light?: string;
- matrix: number[];
- mesh?: string;
- meshes?: string[];
- rotation?: number[];
- scale?: number[];
- translation?: number[];
- // Babylon.js values (optimize)
- babylonNode?: Node;
- }
- export interface IGLTFScene extends IGLTFChildRootProperty {
- nodes: string[];
- }
- /**
- * Runtime
- */
- export interface IGLTFRuntime {
- accessors: Object;
- buffers: Object;
- bufferViews: Object;
- meshes: Object;
- lights: Object;
- cameras: Object;
- nodes: Object;
- images: Object;
- textures: Object;
- shaders: Object;
- programs: Object;
- samplers: Object;
- techniques: Object;
- materials: Object;
- animations: Object;
- skins: Object;
- currentScene: Object;
- buffersCount: number;
- shaderscount: number;
- scene: Scene;
- rootUrl: string;
- loadedBuffers: number;
- loadedShaders: number;
- arrayBuffers: Object;
- importOnlyMeshes: boolean;
- importMeshesNames?: string[];
- dummyNodes: Node[];
- }
- /**
- * Bones
- */
- export interface INodeToRoot {
- bone: Bone;
- node: IGLTFNode;
- id: string;
- }
- export interface IJointNode {
- node: IGLTFNode;
- id: string;
- }
- }
|