|
@@ -367,6 +367,9 @@ declare module 'babylonjs-loaders/src/OBJ/objFileLoader' {
|
|
* Class reading and parsing the MTL file bundled with the obj file.
|
|
* Class reading and parsing the MTL file bundled with the obj file.
|
|
*/
|
|
*/
|
|
export class MTLFileLoader {
|
|
export class MTLFileLoader {
|
|
|
|
+ /**
|
|
|
|
+ * All material loaded from the mtl will be set here
|
|
|
|
+ */
|
|
materials: StandardMaterial[];
|
|
materials: StandardMaterial[];
|
|
/**
|
|
/**
|
|
* This function will read the mtl file and create each material described inside
|
|
* This function will read the mtl file and create each material described inside
|
|
@@ -374,29 +377,58 @@ declare module 'babylonjs-loaders/src/OBJ/objFileLoader' {
|
|
* -some component missing (Ni, Tf...)
|
|
* -some component missing (Ni, Tf...)
|
|
* -including the specific options available
|
|
* -including the specific options available
|
|
*
|
|
*
|
|
- * @param scene
|
|
|
|
- * @param data
|
|
|
|
- * @param rootUrl
|
|
|
|
|
|
+ * @param scene defines the scene the material will be created in
|
|
|
|
+ * @param data defines the mtl data to parse
|
|
|
|
+ * @param rootUrl defines the rooturl to use in order to load relative dependencies
|
|
*/
|
|
*/
|
|
parseMTL(scene: Scene, data: string | ArrayBuffer, rootUrl: string): void;
|
|
parseMTL(scene: Scene, data: string | ArrayBuffer, rootUrl: string): void;
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * OBJ file type loader.
|
|
|
|
+ * This is a babylon scene loader plugin.
|
|
|
|
+ */
|
|
export class OBJFileLoader implements ISceneLoaderPluginAsync {
|
|
export class OBJFileLoader implements ISceneLoaderPluginAsync {
|
|
|
|
+ /**
|
|
|
|
+ * Defines if UVs are optimized by default during load.
|
|
|
|
+ */
|
|
static OPTIMIZE_WITH_UV: boolean;
|
|
static OPTIMIZE_WITH_UV: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Defines if Y is inverted by default during load.
|
|
|
|
+ */
|
|
static INVERT_Y: boolean;
|
|
static INVERT_Y: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the name of the plugin.
|
|
|
|
+ */
|
|
name: string;
|
|
name: string;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the extension the plugin is able to load.
|
|
|
|
+ */
|
|
extensions: string;
|
|
extensions: string;
|
|
|
|
+ /** @hidden */
|
|
obj: RegExp;
|
|
obj: RegExp;
|
|
|
|
+ /** @hidden */
|
|
group: RegExp;
|
|
group: RegExp;
|
|
|
|
+ /** @hidden */
|
|
mtllib: RegExp;
|
|
mtllib: RegExp;
|
|
|
|
+ /** @hidden */
|
|
usemtl: RegExp;
|
|
usemtl: RegExp;
|
|
|
|
+ /** @hidden */
|
|
smooth: RegExp;
|
|
smooth: RegExp;
|
|
|
|
+ /** @hidden */
|
|
vertexPattern: RegExp;
|
|
vertexPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
normalPattern: RegExp;
|
|
normalPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
uvPattern: RegExp;
|
|
uvPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern1: RegExp;
|
|
facePattern1: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern2: RegExp;
|
|
facePattern2: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern3: RegExp;
|
|
facePattern3: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern4: RegExp;
|
|
facePattern4: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern5: RegExp;
|
|
facePattern5: RegExp;
|
|
/**
|
|
/**
|
|
* Imports one or more meshes from the loaded glTF data and adds them to the scene
|
|
* Imports one or more meshes from the loaded glTF data and adds them to the scene
|
|
@@ -439,16 +471,60 @@ declare module 'babylonjs-loaders/src/OBJ/objFileLoader' {
|
|
|
|
|
|
declare module 'babylonjs-loaders/src/STL/stlFileLoader' {
|
|
declare module 'babylonjs-loaders/src/STL/stlFileLoader' {
|
|
import { ISceneLoaderPlugin, ISceneLoaderPluginExtensions, Scene, Nullable, AbstractMesh, IParticleSystem, Skeleton, AssetContainer } from "babylonjs";
|
|
import { ISceneLoaderPlugin, ISceneLoaderPluginExtensions, Scene, Nullable, AbstractMesh, IParticleSystem, Skeleton, AssetContainer } from "babylonjs";
|
|
|
|
+ /**
|
|
|
|
+ * STL file type loader.
|
|
|
|
+ * This is a babylon scene loader plugin.
|
|
|
|
+ */
|
|
export class STLFileLoader implements ISceneLoaderPlugin {
|
|
export class STLFileLoader implements ISceneLoaderPlugin {
|
|
- solidPattern: RegExp;
|
|
|
|
- facetsPattern: RegExp;
|
|
|
|
- normalPattern: RegExp;
|
|
|
|
- vertexPattern: RegExp;
|
|
|
|
- name: string;
|
|
|
|
- extensions: ISceneLoaderPluginExtensions;
|
|
|
|
- importMesh(meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: Nullable<AbstractMesh[]>, particleSystems: Nullable<IParticleSystem[]>, skeletons: Nullable<Skeleton[]>): boolean;
|
|
|
|
- load(scene: Scene, data: any, rootUrl: string): boolean;
|
|
|
|
- loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): AssetContainer;
|
|
|
|
|
|
+ /** @hidden */
|
|
|
|
+ solidPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ facetsPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ normalPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ vertexPattern: RegExp;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the name of the plugin.
|
|
|
|
+ */
|
|
|
|
+ name: string;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the extensions the stl loader is able to load.
|
|
|
|
+ * force data to come in as an ArrayBuffer
|
|
|
|
+ * we'll convert to string if it looks like it's an ASCII .stl
|
|
|
|
+ */
|
|
|
|
+ extensions: ISceneLoaderPluginExtensions;
|
|
|
|
+ /**
|
|
|
|
+ * Import meshes into a scene.
|
|
|
|
+ * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
|
|
|
|
+ * @param scene The scene to import into
|
|
|
|
+ * @param data The data to import
|
|
|
|
+ * @param rootUrl The root url for scene and resources
|
|
|
|
+ * @param meshes The meshes array to import into
|
|
|
|
+ * @param particleSystems The particle systems array to import into
|
|
|
|
+ * @param skeletons The skeletons array to import into
|
|
|
|
+ * @param onError The callback when import fails
|
|
|
|
+ * @returns True if successful or false otherwise
|
|
|
|
+ */
|
|
|
|
+ importMesh(meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: Nullable<AbstractMesh[]>, particleSystems: Nullable<IParticleSystem[]>, skeletons: Nullable<Skeleton[]>): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Load into a scene.
|
|
|
|
+ * @param scene The scene to load into
|
|
|
|
+ * @param data The data to import
|
|
|
|
+ * @param rootUrl The root url for scene and resources
|
|
|
|
+ * @param onError The callback when import fails
|
|
|
|
+ * @returns true if successful or false otherwise
|
|
|
|
+ */
|
|
|
|
+ load(scene: Scene, data: any, rootUrl: string): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Load into an asset container.
|
|
|
|
+ * @param scene The scene to load into
|
|
|
|
+ * @param data The data to import
|
|
|
|
+ * @param rootUrl The root url for scene and resources
|
|
|
|
+ * @param onError The callback when import fails
|
|
|
|
+ * @returns The loaded asset container
|
|
|
|
+ */
|
|
|
|
+ loadAssetContainer(scene: Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): AssetContainer;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -457,6 +533,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFBinaryExtension' {
|
|
import { Scene } from "babylonjs";
|
|
import { Scene } from "babylonjs";
|
|
import { IGLTFLoaderData } from "babylonjs-loaders/src/glTF/glTFFileLoader";
|
|
import { IGLTFLoaderData } from "babylonjs-loaders/src/glTF/glTFFileLoader";
|
|
import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
|
|
import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
|
|
|
|
+ /** @hidden */
|
|
export class GLTFBinaryExtension extends GLTFLoaderExtension {
|
|
export class GLTFBinaryExtension extends GLTFLoaderExtension {
|
|
constructor();
|
|
constructor();
|
|
loadRuntimeAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
|
|
loadRuntimeAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
|
|
@@ -473,6 +550,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderV1' {
|
|
import { GLTFLoaderExtension } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderExtension";
|
|
import { GLTFLoaderExtension } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderExtension";
|
|
/**
|
|
/**
|
|
* Implementation of the base glTF spec
|
|
* Implementation of the base glTF spec
|
|
|
|
+ * @hidden
|
|
*/
|
|
*/
|
|
export class GLTFLoaderBase {
|
|
export class GLTFLoaderBase {
|
|
static CreateRuntime(parsedData: any, scene: Scene, rootUrl: string): IGLTFRuntime;
|
|
static CreateRuntime(parsedData: any, scene: Scene, rootUrl: string): IGLTFRuntime;
|
|
@@ -484,6 +562,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderV1' {
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* glTF V1 Loader
|
|
* glTF V1 Loader
|
|
|
|
+ * @hidden
|
|
*/
|
|
*/
|
|
export class GLTFLoaderV1 implements IGLTFLoader {
|
|
export class GLTFLoaderV1 implements IGLTFLoader {
|
|
static Extensions: {
|
|
static Extensions: {
|
|
@@ -523,6 +602,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderExtension' {
|
|
import { Scene, Texture, Material } from "babylonjs";
|
|
import { Scene, Texture, Material } from "babylonjs";
|
|
import { IGLTFLoaderData } from "babylonjs-loaders/src/glTF/glTFFileLoader";
|
|
import { IGLTFLoaderData } from "babylonjs-loaders/src/glTF/glTFFileLoader";
|
|
import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
|
|
import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
|
|
|
|
+ /** @hidden */
|
|
export abstract class GLTFLoaderExtension {
|
|
export abstract class GLTFLoaderExtension {
|
|
constructor(name: string);
|
|
constructor(name: string);
|
|
readonly name: string;
|
|
readonly name: string;
|
|
@@ -574,6 +654,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
import { Texture, Skeleton, Scene, Bone, Node } from "babylonjs";
|
|
import { Texture, Skeleton, Scene, Bone, Node } from "babylonjs";
|
|
/**
|
|
/**
|
|
* Enums
|
|
* Enums
|
|
|
|
+ * @hidden
|
|
*/
|
|
*/
|
|
export enum EComponentType {
|
|
export enum EComponentType {
|
|
BYTE = 5120,
|
|
BYTE = 5120,
|
|
@@ -582,10 +663,12 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
UNSIGNED_SHORT = 5123,
|
|
UNSIGNED_SHORT = 5123,
|
|
FLOAT = 5126
|
|
FLOAT = 5126
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum EShaderType {
|
|
export enum EShaderType {
|
|
FRAGMENT = 35632,
|
|
FRAGMENT = 35632,
|
|
VERTEX = 35633
|
|
VERTEX = 35633
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum EParameterType {
|
|
export enum EParameterType {
|
|
BYTE = 5120,
|
|
BYTE = 5120,
|
|
UNSIGNED_BYTE = 5121,
|
|
UNSIGNED_BYTE = 5121,
|
|
@@ -609,11 +692,13 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
FLOAT_MAT4 = 35676,
|
|
FLOAT_MAT4 = 35676,
|
|
SAMPLER_2D = 35678
|
|
SAMPLER_2D = 35678
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum ETextureWrapMode {
|
|
export enum ETextureWrapMode {
|
|
CLAMP_TO_EDGE = 33071,
|
|
CLAMP_TO_EDGE = 33071,
|
|
MIRRORED_REPEAT = 33648,
|
|
MIRRORED_REPEAT = 33648,
|
|
REPEAT = 10497
|
|
REPEAT = 10497
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum ETextureFilterType {
|
|
export enum ETextureFilterType {
|
|
NEAREST = 9728,
|
|
NEAREST = 9728,
|
|
LINEAR = 9728,
|
|
LINEAR = 9728,
|
|
@@ -622,6 +707,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
NEAREST_MIPMAP_LINEAR = 9986,
|
|
NEAREST_MIPMAP_LINEAR = 9986,
|
|
LINEAR_MIPMAP_LINEAR = 9987
|
|
LINEAR_MIPMAP_LINEAR = 9987
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum ETextureFormat {
|
|
export enum ETextureFormat {
|
|
ALPHA = 6406,
|
|
ALPHA = 6406,
|
|
RGB = 6407,
|
|
RGB = 6407,
|
|
@@ -629,11 +715,13 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
LUMINANCE = 6409,
|
|
LUMINANCE = 6409,
|
|
LUMINANCE_ALPHA = 6410
|
|
LUMINANCE_ALPHA = 6410
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum ECullingType {
|
|
export enum ECullingType {
|
|
FRONT = 1028,
|
|
FRONT = 1028,
|
|
BACK = 1029,
|
|
BACK = 1029,
|
|
FRONT_AND_BACK = 1032
|
|
FRONT_AND_BACK = 1032
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum EBlendingFunction {
|
|
export enum EBlendingFunction {
|
|
ZERO = 0,
|
|
ZERO = 0,
|
|
ONE = 1,
|
|
ONE = 1,
|
|
@@ -651,18 +739,18 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
ONE_MINUS_CONSTANT_ALPHA = 32772,
|
|
ONE_MINUS_CONSTANT_ALPHA = 32772,
|
|
SRC_ALPHA_SATURATE = 776
|
|
SRC_ALPHA_SATURATE = 776
|
|
}
|
|
}
|
|
- /**
|
|
|
|
- * Interfaces
|
|
|
|
- */
|
|
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFProperty {
|
|
export interface IGLTFProperty {
|
|
extensions?: {
|
|
extensions?: {
|
|
[key: string]: any;
|
|
[key: string]: any;
|
|
};
|
|
};
|
|
extras?: Object;
|
|
extras?: Object;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFChildRootProperty extends IGLTFProperty {
|
|
export interface IGLTFChildRootProperty extends IGLTFProperty {
|
|
name?: string;
|
|
name?: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAccessor extends IGLTFChildRootProperty {
|
|
export interface IGLTFAccessor extends IGLTFChildRootProperty {
|
|
bufferView: string;
|
|
bufferView: string;
|
|
byteOffset: number;
|
|
byteOffset: number;
|
|
@@ -674,6 +762,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
min?: number[];
|
|
min?: number[];
|
|
name?: string;
|
|
name?: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFBufferView extends IGLTFChildRootProperty {
|
|
export interface IGLTFBufferView extends IGLTFChildRootProperty {
|
|
buffer: string;
|
|
buffer: string;
|
|
byteOffset: number;
|
|
byteOffset: number;
|
|
@@ -681,20 +770,24 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
byteStride: number;
|
|
byteStride: number;
|
|
target?: number;
|
|
target?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFBuffer extends IGLTFChildRootProperty {
|
|
export interface IGLTFBuffer extends IGLTFChildRootProperty {
|
|
uri: string;
|
|
uri: string;
|
|
byteLength?: number;
|
|
byteLength?: number;
|
|
type?: string;
|
|
type?: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFShader extends IGLTFChildRootProperty {
|
|
export interface IGLTFShader extends IGLTFChildRootProperty {
|
|
uri: string;
|
|
uri: string;
|
|
type: EShaderType;
|
|
type: EShaderType;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFProgram extends IGLTFChildRootProperty {
|
|
export interface IGLTFProgram extends IGLTFChildRootProperty {
|
|
attributes: string[];
|
|
attributes: string[];
|
|
fragmentShader: string;
|
|
fragmentShader: string;
|
|
vertexShader: string;
|
|
vertexShader: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechniqueParameter {
|
|
export interface IGLTFTechniqueParameter {
|
|
type: number;
|
|
type: number;
|
|
count?: number;
|
|
count?: number;
|
|
@@ -704,11 +797,13 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
source?: string;
|
|
source?: string;
|
|
babylonValue?: any;
|
|
babylonValue?: any;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechniqueCommonProfile {
|
|
export interface IGLTFTechniqueCommonProfile {
|
|
lightingModel: string;
|
|
lightingModel: string;
|
|
texcoordBindings: Object;
|
|
texcoordBindings: Object;
|
|
parameters?: Array<any>;
|
|
parameters?: Array<any>;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechniqueStatesFunctions {
|
|
export interface IGLTFTechniqueStatesFunctions {
|
|
blendColor?: number[];
|
|
blendColor?: number[];
|
|
blendEquationSeparate?: number[];
|
|
blendEquationSeparate?: number[];
|
|
@@ -716,10 +811,12 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
colorMask: boolean[];
|
|
colorMask: boolean[];
|
|
cullFace: number[];
|
|
cullFace: number[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechniqueStates {
|
|
export interface IGLTFTechniqueStates {
|
|
enable: number[];
|
|
enable: number[];
|
|
functions: IGLTFTechniqueStatesFunctions;
|
|
functions: IGLTFTechniqueStatesFunctions;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechnique extends IGLTFChildRootProperty {
|
|
export interface IGLTFTechnique extends IGLTFChildRootProperty {
|
|
parameters: {
|
|
parameters: {
|
|
[key: string]: IGLTFTechniqueParameter;
|
|
[key: string]: IGLTFTechniqueParameter;
|
|
@@ -733,10 +830,12 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
};
|
|
};
|
|
states: IGLTFTechniqueStates;
|
|
states: IGLTFTechniqueStates;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFMaterial extends IGLTFChildRootProperty {
|
|
export interface IGLTFMaterial extends IGLTFChildRootProperty {
|
|
technique?: string;
|
|
technique?: string;
|
|
values: string[];
|
|
values: string[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFMeshPrimitive extends IGLTFProperty {
|
|
export interface IGLTFMeshPrimitive extends IGLTFProperty {
|
|
attributes: {
|
|
attributes: {
|
|
[key: string]: string;
|
|
[key: string]: string;
|
|
@@ -745,18 +844,22 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
material: string;
|
|
material: string;
|
|
mode?: number;
|
|
mode?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFMesh extends IGLTFChildRootProperty {
|
|
export interface IGLTFMesh extends IGLTFChildRootProperty {
|
|
primitives: IGLTFMeshPrimitive[];
|
|
primitives: IGLTFMeshPrimitive[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFImage extends IGLTFChildRootProperty {
|
|
export interface IGLTFImage extends IGLTFChildRootProperty {
|
|
uri: string;
|
|
uri: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFSampler extends IGLTFChildRootProperty {
|
|
export interface IGLTFSampler extends IGLTFChildRootProperty {
|
|
magFilter?: number;
|
|
magFilter?: number;
|
|
minFilter?: number;
|
|
minFilter?: number;
|
|
wrapS?: number;
|
|
wrapS?: number;
|
|
wrapT?: number;
|
|
wrapT?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTexture extends IGLTFChildRootProperty {
|
|
export interface IGLTFTexture extends IGLTFChildRootProperty {
|
|
sampler: string;
|
|
sampler: string;
|
|
source: string;
|
|
source: string;
|
|
@@ -766,18 +869,22 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
type?: number;
|
|
type?: number;
|
|
babylonTexture?: Texture;
|
|
babylonTexture?: Texture;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAmbienLight {
|
|
export interface IGLTFAmbienLight {
|
|
color?: number[];
|
|
color?: number[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFDirectionalLight {
|
|
export interface IGLTFDirectionalLight {
|
|
color?: number[];
|
|
color?: number[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFPointLight {
|
|
export interface IGLTFPointLight {
|
|
color?: number[];
|
|
color?: number[];
|
|
constantAttenuation?: number;
|
|
constantAttenuation?: number;
|
|
linearAttenuation?: number;
|
|
linearAttenuation?: number;
|
|
quadraticAttenuation?: number;
|
|
quadraticAttenuation?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFSpotLight {
|
|
export interface IGLTFSpotLight {
|
|
color?: number[];
|
|
color?: number[];
|
|
constantAttenuation?: number;
|
|
constantAttenuation?: number;
|
|
@@ -786,37 +893,45 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
linearAttenuation?: number;
|
|
linearAttenuation?: number;
|
|
quadraticAttenuation?: number;
|
|
quadraticAttenuation?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFLight extends IGLTFChildRootProperty {
|
|
export interface IGLTFLight extends IGLTFChildRootProperty {
|
|
type: string;
|
|
type: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFCameraOrthographic {
|
|
export interface IGLTFCameraOrthographic {
|
|
xmag: number;
|
|
xmag: number;
|
|
ymag: number;
|
|
ymag: number;
|
|
zfar: number;
|
|
zfar: number;
|
|
znear: number;
|
|
znear: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFCameraPerspective {
|
|
export interface IGLTFCameraPerspective {
|
|
aspectRatio: number;
|
|
aspectRatio: number;
|
|
yfov: number;
|
|
yfov: number;
|
|
zfar: number;
|
|
zfar: number;
|
|
znear: number;
|
|
znear: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFCamera extends IGLTFChildRootProperty {
|
|
export interface IGLTFCamera extends IGLTFChildRootProperty {
|
|
type: string;
|
|
type: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAnimationChannelTarget {
|
|
export interface IGLTFAnimationChannelTarget {
|
|
id: string;
|
|
id: string;
|
|
path: string;
|
|
path: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAnimationChannel {
|
|
export interface IGLTFAnimationChannel {
|
|
sampler: string;
|
|
sampler: string;
|
|
target: IGLTFAnimationChannelTarget;
|
|
target: IGLTFAnimationChannelTarget;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAnimationSampler {
|
|
export interface IGLTFAnimationSampler {
|
|
input: string;
|
|
input: string;
|
|
output: string;
|
|
output: string;
|
|
interpolation?: string;
|
|
interpolation?: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAnimation extends IGLTFChildRootProperty {
|
|
export interface IGLTFAnimation extends IGLTFChildRootProperty {
|
|
channels?: IGLTFAnimationChannel[];
|
|
channels?: IGLTFAnimationChannel[];
|
|
parameters?: {
|
|
parameters?: {
|
|
@@ -826,17 +941,20 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
[key: string]: IGLTFAnimationSampler;
|
|
[key: string]: IGLTFAnimationSampler;
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFNodeInstanceSkin {
|
|
export interface IGLTFNodeInstanceSkin {
|
|
skeletons: string[];
|
|
skeletons: string[];
|
|
skin: string;
|
|
skin: string;
|
|
meshes: string[];
|
|
meshes: string[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFSkins extends IGLTFChildRootProperty {
|
|
export interface IGLTFSkins extends IGLTFChildRootProperty {
|
|
bindShapeMatrix: number[];
|
|
bindShapeMatrix: number[];
|
|
inverseBindMatrices: string;
|
|
inverseBindMatrices: string;
|
|
jointNames: string[];
|
|
jointNames: string[];
|
|
babylonSkeleton?: Skeleton;
|
|
babylonSkeleton?: Skeleton;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFNode extends IGLTFChildRootProperty {
|
|
export interface IGLTFNode extends IGLTFChildRootProperty {
|
|
camera?: string;
|
|
camera?: string;
|
|
children: string[];
|
|
children: string[];
|
|
@@ -851,12 +969,11 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
translation?: number[];
|
|
translation?: number[];
|
|
babylonNode?: Node;
|
|
babylonNode?: Node;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFScene extends IGLTFChildRootProperty {
|
|
export interface IGLTFScene extends IGLTFChildRootProperty {
|
|
nodes: string[];
|
|
nodes: string[];
|
|
}
|
|
}
|
|
- /**
|
|
|
|
- * Runtime
|
|
|
|
- */
|
|
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFRuntime {
|
|
export interface IGLTFRuntime {
|
|
extensions: {
|
|
extensions: {
|
|
[key: string]: any;
|
|
[key: string]: any;
|
|
@@ -928,14 +1045,13 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces' {
|
|
importMeshesNames?: string[];
|
|
importMeshesNames?: string[];
|
|
dummyNodes: Node[];
|
|
dummyNodes: Node[];
|
|
}
|
|
}
|
|
- /**
|
|
|
|
- * Bones
|
|
|
|
- */
|
|
|
|
|
|
+ /** @hidden */
|
|
export interface INodeToRoot {
|
|
export interface INodeToRoot {
|
|
bone: Bone;
|
|
bone: Bone;
|
|
node: IGLTFNode;
|
|
node: IGLTFNode;
|
|
id: string;
|
|
id: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IJointNode {
|
|
export interface IJointNode {
|
|
node: IGLTFNode;
|
|
node: IGLTFNode;
|
|
id: string;
|
|
id: string;
|
|
@@ -947,6 +1063,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFLoaderUtils' {
|
|
import { IGLTFTechniqueParameter, IGLTFAccessor, ETextureFilterType, IGLTFRuntime, IGLTFBufferView, EComponentType } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
|
|
import { IGLTFTechniqueParameter, IGLTFAccessor, ETextureFilterType, IGLTFRuntime, IGLTFBufferView, EComponentType } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
|
|
/**
|
|
/**
|
|
* Utils functions for GLTF
|
|
* Utils functions for GLTF
|
|
|
|
+ * @hidden
|
|
*/
|
|
*/
|
|
export class GLTFUtils {
|
|
export class GLTFUtils {
|
|
/**
|
|
/**
|
|
@@ -1006,6 +1123,7 @@ declare module 'babylonjs-loaders/src/glTF/1.0/glTFMaterialsCommonExtension' {
|
|
import { GLTFLoaderExtension } from "babylonjs-loaders/src/glTF/1.0";
|
|
import { GLTFLoaderExtension } from "babylonjs-loaders/src/glTF/1.0";
|
|
import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
|
|
import { IGLTFRuntime } from "babylonjs-loaders/src/glTF/1.0/glTFLoaderInterfaces";
|
|
import { Material } from "babylonjs";
|
|
import { Material } from "babylonjs";
|
|
|
|
+ /** @hidden */
|
|
export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
|
|
export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
|
|
constructor();
|
|
constructor();
|
|
loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
|
|
loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
|
|
@@ -2089,6 +2207,9 @@ declare module BABYLON {
|
|
* Class reading and parsing the MTL file bundled with the obj file.
|
|
* Class reading and parsing the MTL file bundled with the obj file.
|
|
*/
|
|
*/
|
|
export class MTLFileLoader {
|
|
export class MTLFileLoader {
|
|
|
|
+ /**
|
|
|
|
+ * All material loaded from the mtl will be set here
|
|
|
|
+ */
|
|
materials: BABYLON.StandardMaterial[];
|
|
materials: BABYLON.StandardMaterial[];
|
|
/**
|
|
/**
|
|
* This function will read the mtl file and create each material described inside
|
|
* This function will read the mtl file and create each material described inside
|
|
@@ -2096,29 +2217,58 @@ declare module BABYLON {
|
|
* -some component missing (Ni, Tf...)
|
|
* -some component missing (Ni, Tf...)
|
|
* -including the specific options available
|
|
* -including the specific options available
|
|
*
|
|
*
|
|
- * @param scene
|
|
|
|
- * @param data
|
|
|
|
- * @param rootUrl
|
|
|
|
|
|
+ * @param scene defines the scene the material will be created in
|
|
|
|
+ * @param data defines the mtl data to parse
|
|
|
|
+ * @param rootUrl defines the rooturl to use in order to load relative dependencies
|
|
*/
|
|
*/
|
|
parseMTL(scene: BABYLON.Scene, data: string | ArrayBuffer, rootUrl: string): void;
|
|
parseMTL(scene: BABYLON.Scene, data: string | ArrayBuffer, rootUrl: string): void;
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * OBJ file type loader.
|
|
|
|
+ * This is a babylon scene loader plugin.
|
|
|
|
+ */
|
|
export class OBJFileLoader implements BABYLON.ISceneLoaderPluginAsync {
|
|
export class OBJFileLoader implements BABYLON.ISceneLoaderPluginAsync {
|
|
|
|
+ /**
|
|
|
|
+ * Defines if UVs are optimized by default during load.
|
|
|
|
+ */
|
|
static OPTIMIZE_WITH_UV: boolean;
|
|
static OPTIMIZE_WITH_UV: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Defines if Y is inverted by default during load.
|
|
|
|
+ */
|
|
static INVERT_Y: boolean;
|
|
static INVERT_Y: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the name of the plugin.
|
|
|
|
+ */
|
|
name: string;
|
|
name: string;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the extension the plugin is able to load.
|
|
|
|
+ */
|
|
extensions: string;
|
|
extensions: string;
|
|
|
|
+ /** @hidden */
|
|
obj: RegExp;
|
|
obj: RegExp;
|
|
|
|
+ /** @hidden */
|
|
group: RegExp;
|
|
group: RegExp;
|
|
|
|
+ /** @hidden */
|
|
mtllib: RegExp;
|
|
mtllib: RegExp;
|
|
|
|
+ /** @hidden */
|
|
usemtl: RegExp;
|
|
usemtl: RegExp;
|
|
|
|
+ /** @hidden */
|
|
smooth: RegExp;
|
|
smooth: RegExp;
|
|
|
|
+ /** @hidden */
|
|
vertexPattern: RegExp;
|
|
vertexPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
normalPattern: RegExp;
|
|
normalPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
uvPattern: RegExp;
|
|
uvPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern1: RegExp;
|
|
facePattern1: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern2: RegExp;
|
|
facePattern2: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern3: RegExp;
|
|
facePattern3: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern4: RegExp;
|
|
facePattern4: RegExp;
|
|
|
|
+ /** @hidden */
|
|
facePattern5: RegExp;
|
|
facePattern5: RegExp;
|
|
/**
|
|
/**
|
|
* Imports one or more meshes from the loaded glTF data and adds them to the scene
|
|
* Imports one or more meshes from the loaded glTF data and adds them to the scene
|
|
@@ -2159,19 +2309,64 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ /**
|
|
|
|
+ * STL file type loader.
|
|
|
|
+ * This is a babylon scene loader plugin.
|
|
|
|
+ */
|
|
export class STLFileLoader implements BABYLON.ISceneLoaderPlugin {
|
|
export class STLFileLoader implements BABYLON.ISceneLoaderPlugin {
|
|
- solidPattern: RegExp;
|
|
|
|
- facetsPattern: RegExp;
|
|
|
|
- normalPattern: RegExp;
|
|
|
|
- vertexPattern: RegExp;
|
|
|
|
- name: string;
|
|
|
|
- extensions: BABYLON.ISceneLoaderPluginExtensions;
|
|
|
|
- importMesh(meshesNames: any, scene: BABYLON.Scene, data: any, rootUrl: string, meshes: BABYLON.Nullable<BABYLON.AbstractMesh[]>, particleSystems: BABYLON.Nullable<BABYLON.IParticleSystem[]>, skeletons: BABYLON.Nullable<BABYLON.Skeleton[]>): boolean;
|
|
|
|
- load(scene: BABYLON.Scene, data: any, rootUrl: string): boolean;
|
|
|
|
- loadAssetContainer(scene: BABYLON.Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): BABYLON.AssetContainer;
|
|
|
|
|
|
+ /** @hidden */
|
|
|
|
+ solidPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ facetsPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ normalPattern: RegExp;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ vertexPattern: RegExp;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the name of the plugin.
|
|
|
|
+ */
|
|
|
|
+ name: string;
|
|
|
|
+ /**
|
|
|
|
+ * Defines the extensions the stl loader is able to load.
|
|
|
|
+ * force data to come in as an ArrayBuffer
|
|
|
|
+ * we'll convert to string if it looks like it's an ASCII .stl
|
|
|
|
+ */
|
|
|
|
+ extensions: BABYLON.ISceneLoaderPluginExtensions;
|
|
|
|
+ /**
|
|
|
|
+ * Import meshes into a scene.
|
|
|
|
+ * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
|
|
|
|
+ * @param scene The scene to import into
|
|
|
|
+ * @param data The data to import
|
|
|
|
+ * @param rootUrl The root url for scene and resources
|
|
|
|
+ * @param meshes The meshes array to import into
|
|
|
|
+ * @param particleSystems The particle systems array to import into
|
|
|
|
+ * @param skeletons The skeletons array to import into
|
|
|
|
+ * @param onError The callback when import fails
|
|
|
|
+ * @returns True if successful or false otherwise
|
|
|
|
+ */
|
|
|
|
+ importMesh(meshesNames: any, scene: BABYLON.Scene, data: any, rootUrl: string, meshes: BABYLON.Nullable<BABYLON.AbstractMesh[]>, particleSystems: BABYLON.Nullable<BABYLON.IParticleSystem[]>, skeletons: BABYLON.Nullable<BABYLON.Skeleton[]>): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Load into a scene.
|
|
|
|
+ * @param scene The scene to load into
|
|
|
|
+ * @param data The data to import
|
|
|
|
+ * @param rootUrl The root url for scene and resources
|
|
|
|
+ * @param onError The callback when import fails
|
|
|
|
+ * @returns true if successful or false otherwise
|
|
|
|
+ */
|
|
|
|
+ load(scene: BABYLON.Scene, data: any, rootUrl: string): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Load into an asset container.
|
|
|
|
+ * @param scene The scene to load into
|
|
|
|
+ * @param data The data to import
|
|
|
|
+ * @param rootUrl The root url for scene and resources
|
|
|
|
+ * @param onError The callback when import fails
|
|
|
|
+ * @returns The loaded asset container
|
|
|
|
+ */
|
|
|
|
+ loadAssetContainer(scene: BABYLON.Scene, data: string, rootUrl: string, onError?: (message: string, exception?: any) => void): BABYLON.AssetContainer;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
export class GLTFBinaryExtension extends GLTFLoaderExtension {
|
|
export class GLTFBinaryExtension extends GLTFLoaderExtension {
|
|
constructor();
|
|
constructor();
|
|
loadRuntimeAsync(scene: BABYLON.Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
|
|
loadRuntimeAsync(scene: BABYLON.Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
|
|
@@ -2183,6 +2378,7 @@ declare module BABYLON {
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
* Implementation of the base glTF spec
|
|
* Implementation of the base glTF spec
|
|
|
|
+ * @hidden
|
|
*/
|
|
*/
|
|
export class GLTFLoaderBase {
|
|
export class GLTFLoaderBase {
|
|
static CreateRuntime(parsedData: any, scene: BABYLON.Scene, rootUrl: string): IGLTFRuntime;
|
|
static CreateRuntime(parsedData: any, scene: BABYLON.Scene, rootUrl: string): IGLTFRuntime;
|
|
@@ -2194,6 +2390,7 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* glTF V1 Loader
|
|
* glTF V1 Loader
|
|
|
|
+ * @hidden
|
|
*/
|
|
*/
|
|
export class GLTFLoaderV1 implements IGLTFLoader {
|
|
export class GLTFLoaderV1 implements IGLTFLoader {
|
|
static Extensions: {
|
|
static Extensions: {
|
|
@@ -2229,6 +2426,7 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
export abstract class GLTFLoaderExtension {
|
|
export abstract class GLTFLoaderExtension {
|
|
constructor(name: string);
|
|
constructor(name: string);
|
|
readonly name: string;
|
|
readonly name: string;
|
|
@@ -2278,6 +2476,7 @@ declare module BABYLON {
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
* Enums
|
|
* Enums
|
|
|
|
+ * @hidden
|
|
*/
|
|
*/
|
|
export enum EComponentType {
|
|
export enum EComponentType {
|
|
BYTE = 5120,
|
|
BYTE = 5120,
|
|
@@ -2286,10 +2485,12 @@ declare module BABYLON {
|
|
UNSIGNED_SHORT = 5123,
|
|
UNSIGNED_SHORT = 5123,
|
|
FLOAT = 5126
|
|
FLOAT = 5126
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum EShaderType {
|
|
export enum EShaderType {
|
|
FRAGMENT = 35632,
|
|
FRAGMENT = 35632,
|
|
VERTEX = 35633
|
|
VERTEX = 35633
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum EParameterType {
|
|
export enum EParameterType {
|
|
BYTE = 5120,
|
|
BYTE = 5120,
|
|
UNSIGNED_BYTE = 5121,
|
|
UNSIGNED_BYTE = 5121,
|
|
@@ -2313,11 +2514,13 @@ declare module BABYLON {
|
|
FLOAT_MAT4 = 35676,
|
|
FLOAT_MAT4 = 35676,
|
|
SAMPLER_2D = 35678
|
|
SAMPLER_2D = 35678
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum ETextureWrapMode {
|
|
export enum ETextureWrapMode {
|
|
CLAMP_TO_EDGE = 33071,
|
|
CLAMP_TO_EDGE = 33071,
|
|
MIRRORED_REPEAT = 33648,
|
|
MIRRORED_REPEAT = 33648,
|
|
REPEAT = 10497
|
|
REPEAT = 10497
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum ETextureFilterType {
|
|
export enum ETextureFilterType {
|
|
NEAREST = 9728,
|
|
NEAREST = 9728,
|
|
LINEAR = 9728,
|
|
LINEAR = 9728,
|
|
@@ -2326,6 +2529,7 @@ declare module BABYLON {
|
|
NEAREST_MIPMAP_LINEAR = 9986,
|
|
NEAREST_MIPMAP_LINEAR = 9986,
|
|
LINEAR_MIPMAP_LINEAR = 9987
|
|
LINEAR_MIPMAP_LINEAR = 9987
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum ETextureFormat {
|
|
export enum ETextureFormat {
|
|
ALPHA = 6406,
|
|
ALPHA = 6406,
|
|
RGB = 6407,
|
|
RGB = 6407,
|
|
@@ -2333,11 +2537,13 @@ declare module BABYLON {
|
|
LUMINANCE = 6409,
|
|
LUMINANCE = 6409,
|
|
LUMINANCE_ALPHA = 6410
|
|
LUMINANCE_ALPHA = 6410
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum ECullingType {
|
|
export enum ECullingType {
|
|
FRONT = 1028,
|
|
FRONT = 1028,
|
|
BACK = 1029,
|
|
BACK = 1029,
|
|
FRONT_AND_BACK = 1032
|
|
FRONT_AND_BACK = 1032
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export enum EBlendingFunction {
|
|
export enum EBlendingFunction {
|
|
ZERO = 0,
|
|
ZERO = 0,
|
|
ONE = 1,
|
|
ONE = 1,
|
|
@@ -2355,18 +2561,18 @@ declare module BABYLON {
|
|
ONE_MINUS_CONSTANT_ALPHA = 32772,
|
|
ONE_MINUS_CONSTANT_ALPHA = 32772,
|
|
SRC_ALPHA_SATURATE = 776
|
|
SRC_ALPHA_SATURATE = 776
|
|
}
|
|
}
|
|
- /**
|
|
|
|
- * Interfaces
|
|
|
|
- */
|
|
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFProperty {
|
|
export interface IGLTFProperty {
|
|
extensions?: {
|
|
extensions?: {
|
|
[key: string]: any;
|
|
[key: string]: any;
|
|
};
|
|
};
|
|
extras?: Object;
|
|
extras?: Object;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFChildRootProperty extends IGLTFProperty {
|
|
export interface IGLTFChildRootProperty extends IGLTFProperty {
|
|
name?: string;
|
|
name?: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAccessor extends IGLTFChildRootProperty {
|
|
export interface IGLTFAccessor extends IGLTFChildRootProperty {
|
|
bufferView: string;
|
|
bufferView: string;
|
|
byteOffset: number;
|
|
byteOffset: number;
|
|
@@ -2378,6 +2584,7 @@ declare module BABYLON {
|
|
min?: number[];
|
|
min?: number[];
|
|
name?: string;
|
|
name?: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFBufferView extends IGLTFChildRootProperty {
|
|
export interface IGLTFBufferView extends IGLTFChildRootProperty {
|
|
buffer: string;
|
|
buffer: string;
|
|
byteOffset: number;
|
|
byteOffset: number;
|
|
@@ -2385,20 +2592,24 @@ declare module BABYLON {
|
|
byteStride: number;
|
|
byteStride: number;
|
|
target?: number;
|
|
target?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFBuffer extends IGLTFChildRootProperty {
|
|
export interface IGLTFBuffer extends IGLTFChildRootProperty {
|
|
uri: string;
|
|
uri: string;
|
|
byteLength?: number;
|
|
byteLength?: number;
|
|
type?: string;
|
|
type?: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFShader extends IGLTFChildRootProperty {
|
|
export interface IGLTFShader extends IGLTFChildRootProperty {
|
|
uri: string;
|
|
uri: string;
|
|
type: EShaderType;
|
|
type: EShaderType;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFProgram extends IGLTFChildRootProperty {
|
|
export interface IGLTFProgram extends IGLTFChildRootProperty {
|
|
attributes: string[];
|
|
attributes: string[];
|
|
fragmentShader: string;
|
|
fragmentShader: string;
|
|
vertexShader: string;
|
|
vertexShader: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechniqueParameter {
|
|
export interface IGLTFTechniqueParameter {
|
|
type: number;
|
|
type: number;
|
|
count?: number;
|
|
count?: number;
|
|
@@ -2408,11 +2619,13 @@ declare module BABYLON {
|
|
source?: string;
|
|
source?: string;
|
|
babylonValue?: any;
|
|
babylonValue?: any;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechniqueCommonProfile {
|
|
export interface IGLTFTechniqueCommonProfile {
|
|
lightingModel: string;
|
|
lightingModel: string;
|
|
texcoordBindings: Object;
|
|
texcoordBindings: Object;
|
|
parameters?: Array<any>;
|
|
parameters?: Array<any>;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechniqueStatesFunctions {
|
|
export interface IGLTFTechniqueStatesFunctions {
|
|
blendColor?: number[];
|
|
blendColor?: number[];
|
|
blendEquationSeparate?: number[];
|
|
blendEquationSeparate?: number[];
|
|
@@ -2420,10 +2633,12 @@ declare module BABYLON {
|
|
colorMask: boolean[];
|
|
colorMask: boolean[];
|
|
cullFace: number[];
|
|
cullFace: number[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechniqueStates {
|
|
export interface IGLTFTechniqueStates {
|
|
enable: number[];
|
|
enable: number[];
|
|
functions: IGLTFTechniqueStatesFunctions;
|
|
functions: IGLTFTechniqueStatesFunctions;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTechnique extends IGLTFChildRootProperty {
|
|
export interface IGLTFTechnique extends IGLTFChildRootProperty {
|
|
parameters: {
|
|
parameters: {
|
|
[key: string]: IGLTFTechniqueParameter;
|
|
[key: string]: IGLTFTechniqueParameter;
|
|
@@ -2437,10 +2652,12 @@ declare module BABYLON {
|
|
};
|
|
};
|
|
states: IGLTFTechniqueStates;
|
|
states: IGLTFTechniqueStates;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFMaterial extends IGLTFChildRootProperty {
|
|
export interface IGLTFMaterial extends IGLTFChildRootProperty {
|
|
technique?: string;
|
|
technique?: string;
|
|
values: string[];
|
|
values: string[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFMeshPrimitive extends IGLTFProperty {
|
|
export interface IGLTFMeshPrimitive extends IGLTFProperty {
|
|
attributes: {
|
|
attributes: {
|
|
[key: string]: string;
|
|
[key: string]: string;
|
|
@@ -2449,18 +2666,22 @@ declare module BABYLON {
|
|
material: string;
|
|
material: string;
|
|
mode?: number;
|
|
mode?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFMesh extends IGLTFChildRootProperty {
|
|
export interface IGLTFMesh extends IGLTFChildRootProperty {
|
|
primitives: IGLTFMeshPrimitive[];
|
|
primitives: IGLTFMeshPrimitive[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFImage extends IGLTFChildRootProperty {
|
|
export interface IGLTFImage extends IGLTFChildRootProperty {
|
|
uri: string;
|
|
uri: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFSampler extends IGLTFChildRootProperty {
|
|
export interface IGLTFSampler extends IGLTFChildRootProperty {
|
|
magFilter?: number;
|
|
magFilter?: number;
|
|
minFilter?: number;
|
|
minFilter?: number;
|
|
wrapS?: number;
|
|
wrapS?: number;
|
|
wrapT?: number;
|
|
wrapT?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFTexture extends IGLTFChildRootProperty {
|
|
export interface IGLTFTexture extends IGLTFChildRootProperty {
|
|
sampler: string;
|
|
sampler: string;
|
|
source: string;
|
|
source: string;
|
|
@@ -2470,18 +2691,22 @@ declare module BABYLON {
|
|
type?: number;
|
|
type?: number;
|
|
babylonTexture?: BABYLON.Texture;
|
|
babylonTexture?: BABYLON.Texture;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAmbienLight {
|
|
export interface IGLTFAmbienLight {
|
|
color?: number[];
|
|
color?: number[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFDirectionalLight {
|
|
export interface IGLTFDirectionalLight {
|
|
color?: number[];
|
|
color?: number[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFPointLight {
|
|
export interface IGLTFPointLight {
|
|
color?: number[];
|
|
color?: number[];
|
|
constantAttenuation?: number;
|
|
constantAttenuation?: number;
|
|
linearAttenuation?: number;
|
|
linearAttenuation?: number;
|
|
quadraticAttenuation?: number;
|
|
quadraticAttenuation?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFSpotLight {
|
|
export interface IGLTFSpotLight {
|
|
color?: number[];
|
|
color?: number[];
|
|
constantAttenuation?: number;
|
|
constantAttenuation?: number;
|
|
@@ -2490,37 +2715,45 @@ declare module BABYLON {
|
|
linearAttenuation?: number;
|
|
linearAttenuation?: number;
|
|
quadraticAttenuation?: number;
|
|
quadraticAttenuation?: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFLight extends IGLTFChildRootProperty {
|
|
export interface IGLTFLight extends IGLTFChildRootProperty {
|
|
type: string;
|
|
type: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFCameraOrthographic {
|
|
export interface IGLTFCameraOrthographic {
|
|
xmag: number;
|
|
xmag: number;
|
|
ymag: number;
|
|
ymag: number;
|
|
zfar: number;
|
|
zfar: number;
|
|
znear: number;
|
|
znear: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFCameraPerspective {
|
|
export interface IGLTFCameraPerspective {
|
|
aspectRatio: number;
|
|
aspectRatio: number;
|
|
yfov: number;
|
|
yfov: number;
|
|
zfar: number;
|
|
zfar: number;
|
|
znear: number;
|
|
znear: number;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFCamera extends IGLTFChildRootProperty {
|
|
export interface IGLTFCamera extends IGLTFChildRootProperty {
|
|
type: string;
|
|
type: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAnimationChannelTarget {
|
|
export interface IGLTFAnimationChannelTarget {
|
|
id: string;
|
|
id: string;
|
|
path: string;
|
|
path: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAnimationChannel {
|
|
export interface IGLTFAnimationChannel {
|
|
sampler: string;
|
|
sampler: string;
|
|
target: IGLTFAnimationChannelTarget;
|
|
target: IGLTFAnimationChannelTarget;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAnimationSampler {
|
|
export interface IGLTFAnimationSampler {
|
|
input: string;
|
|
input: string;
|
|
output: string;
|
|
output: string;
|
|
interpolation?: string;
|
|
interpolation?: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFAnimation extends IGLTFChildRootProperty {
|
|
export interface IGLTFAnimation extends IGLTFChildRootProperty {
|
|
channels?: IGLTFAnimationChannel[];
|
|
channels?: IGLTFAnimationChannel[];
|
|
parameters?: {
|
|
parameters?: {
|
|
@@ -2530,17 +2763,20 @@ declare module BABYLON {
|
|
[key: string]: IGLTFAnimationSampler;
|
|
[key: string]: IGLTFAnimationSampler;
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFNodeInstanceSkin {
|
|
export interface IGLTFNodeInstanceSkin {
|
|
skeletons: string[];
|
|
skeletons: string[];
|
|
skin: string;
|
|
skin: string;
|
|
meshes: string[];
|
|
meshes: string[];
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFSkins extends IGLTFChildRootProperty {
|
|
export interface IGLTFSkins extends IGLTFChildRootProperty {
|
|
bindShapeMatrix: number[];
|
|
bindShapeMatrix: number[];
|
|
inverseBindMatrices: string;
|
|
inverseBindMatrices: string;
|
|
jointNames: string[];
|
|
jointNames: string[];
|
|
babylonSkeleton?: BABYLON.Skeleton;
|
|
babylonSkeleton?: BABYLON.Skeleton;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFNode extends IGLTFChildRootProperty {
|
|
export interface IGLTFNode extends IGLTFChildRootProperty {
|
|
camera?: string;
|
|
camera?: string;
|
|
children: string[];
|
|
children: string[];
|
|
@@ -2555,12 +2791,11 @@ declare module BABYLON {
|
|
translation?: number[];
|
|
translation?: number[];
|
|
babylonNode?: BABYLON.Node;
|
|
babylonNode?: BABYLON.Node;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFScene extends IGLTFChildRootProperty {
|
|
export interface IGLTFScene extends IGLTFChildRootProperty {
|
|
nodes: string[];
|
|
nodes: string[];
|
|
}
|
|
}
|
|
- /**
|
|
|
|
- * Runtime
|
|
|
|
- */
|
|
|
|
|
|
+ /** @hidden */
|
|
export interface IGLTFRuntime {
|
|
export interface IGLTFRuntime {
|
|
extensions: {
|
|
extensions: {
|
|
[key: string]: any;
|
|
[key: string]: any;
|
|
@@ -2632,14 +2867,13 @@ declare module BABYLON {
|
|
importMeshesNames?: string[];
|
|
importMeshesNames?: string[];
|
|
dummyNodes: BABYLON.Node[];
|
|
dummyNodes: BABYLON.Node[];
|
|
}
|
|
}
|
|
- /**
|
|
|
|
- * Bones
|
|
|
|
- */
|
|
|
|
|
|
+ /** @hidden */
|
|
export interface INodeToRoot {
|
|
export interface INodeToRoot {
|
|
bone: BABYLON.Bone;
|
|
bone: BABYLON.Bone;
|
|
node: IGLTFNode;
|
|
node: IGLTFNode;
|
|
id: string;
|
|
id: string;
|
|
}
|
|
}
|
|
|
|
+ /** @hidden */
|
|
export interface IJointNode {
|
|
export interface IJointNode {
|
|
node: IGLTFNode;
|
|
node: IGLTFNode;
|
|
id: string;
|
|
id: string;
|
|
@@ -2648,6 +2882,7 @@ declare module BABYLON {
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
* Utils functions for GLTF
|
|
* Utils functions for GLTF
|
|
|
|
+ * @hidden
|
|
*/
|
|
*/
|
|
export class GLTFUtils {
|
|
export class GLTFUtils {
|
|
/**
|
|
/**
|
|
@@ -2703,6 +2938,7 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
|
|
export class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
|
|
constructor();
|
|
constructor();
|
|
loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
|
|
loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
|