|
@@ -4542,6 +4542,61 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ interface ISceneLoaderPluginExtensions {
|
|
|
|
+ [extension: string]: {
|
|
|
|
+ isBinary: boolean;
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ interface ISceneLoaderPlugin {
|
|
|
|
+ extensions: string | ISceneLoaderPluginExtensions;
|
|
|
|
+ importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
|
+ load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
|
+ canDirectLoad?: (data: string) => boolean;
|
|
|
|
+ }
|
|
|
|
+ interface ISceneLoaderPluginAsync {
|
|
|
|
+ extensions: string | ISceneLoaderPluginExtensions;
|
|
|
|
+ importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
|
|
|
|
+ loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
|
|
|
|
+ canDirectLoad?: (data: string) => boolean;
|
|
|
|
+ }
|
|
|
|
+ class SceneLoader {
|
|
|
|
+ private static _ForceFullSceneLoadingForIncremental;
|
|
|
|
+ private static _ShowLoadingScreen;
|
|
|
|
+ static readonly NO_LOGGING: number;
|
|
|
|
+ static readonly MINIMAL_LOGGING: number;
|
|
|
|
+ static readonly SUMMARY_LOGGING: number;
|
|
|
|
+ static readonly DETAILED_LOGGING: number;
|
|
|
|
+ private static _loggingLevel;
|
|
|
|
+ static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
|
+ static ShowLoadingScreen: boolean;
|
|
|
|
+ static loggingLevel: number;
|
|
|
|
+ private static _registeredPlugins;
|
|
|
|
+ private static _getDefaultPlugin();
|
|
|
|
+ private static _getPluginForExtension(extension);
|
|
|
|
+ private static _getPluginForDirectLoad(data);
|
|
|
|
+ private static _getPluginForFilename(sceneFilename);
|
|
|
|
+ private static _getDirectLoad(sceneFilename);
|
|
|
|
+ static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
|
|
+ static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
|
|
|
|
+ static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: any) => void): void;
|
|
|
|
+ /**
|
|
|
|
+ * Load a scene
|
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
|
+ * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
|
+ */
|
|
|
|
+ static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
|
+ /**
|
|
|
|
+ * Append a scene
|
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
|
+ * @param scene is the instance of BABYLON.Scene to append to
|
|
|
|
+ */
|
|
|
|
+ static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
class DirectionalLight extends ShadowLight {
|
|
class DirectionalLight extends ShadowLight {
|
|
private _shadowFrustumSize;
|
|
private _shadowFrustumSize;
|
|
/**
|
|
/**
|
|
@@ -5075,61 +5130,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- interface ISceneLoaderPluginExtensions {
|
|
|
|
- [extension: string]: {
|
|
|
|
- isBinary: boolean;
|
|
|
|
- };
|
|
|
|
- }
|
|
|
|
- interface ISceneLoaderPlugin {
|
|
|
|
- extensions: string | ISceneLoaderPluginExtensions;
|
|
|
|
- importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
|
|
|
|
- load: (scene: Scene, data: string, rootUrl: string) => boolean;
|
|
|
|
- canDirectLoad?: (data: string) => boolean;
|
|
|
|
- }
|
|
|
|
- interface ISceneLoaderPluginAsync {
|
|
|
|
- extensions: string | ISceneLoaderPluginExtensions;
|
|
|
|
- importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
|
|
|
|
- loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
|
|
|
|
- canDirectLoad?: (data: string) => boolean;
|
|
|
|
- }
|
|
|
|
- class SceneLoader {
|
|
|
|
- private static _ForceFullSceneLoadingForIncremental;
|
|
|
|
- private static _ShowLoadingScreen;
|
|
|
|
- static readonly NO_LOGGING: number;
|
|
|
|
- static readonly MINIMAL_LOGGING: number;
|
|
|
|
- static readonly SUMMARY_LOGGING: number;
|
|
|
|
- static readonly DETAILED_LOGGING: number;
|
|
|
|
- private static _loggingLevel;
|
|
|
|
- static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
|
- static ShowLoadingScreen: boolean;
|
|
|
|
- static loggingLevel: number;
|
|
|
|
- private static _registeredPlugins;
|
|
|
|
- private static _getDefaultPlugin();
|
|
|
|
- private static _getPluginForExtension(extension);
|
|
|
|
- private static _getPluginForDirectLoad(data);
|
|
|
|
- private static _getPluginForFilename(sceneFilename);
|
|
|
|
- private static _getDirectLoad(sceneFilename);
|
|
|
|
- static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
|
|
- static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
|
|
|
|
- static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: any) => void): void;
|
|
|
|
- /**
|
|
|
|
- * Load a scene
|
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
|
- * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
|
- */
|
|
|
|
- static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
|
- /**
|
|
|
|
- * Append a scene
|
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
|
- * @param scene is the instance of BABYLON.Scene to append to
|
|
|
|
- */
|
|
|
|
- static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
class SIMDHelper {
|
|
class SIMDHelper {
|
|
private static _isEnabled;
|
|
private static _isEnabled;
|
|
static readonly IsEnabled: boolean;
|
|
static readonly IsEnabled: boolean;
|
|
@@ -14780,278 +14780,75 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- interface IOctreeContainer<T> {
|
|
|
|
- blocks: Array<OctreeBlock<T>>;
|
|
|
|
|
|
+ class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
|
+ camera: ArcRotateCamera;
|
|
|
|
+ gamepad: Gamepad;
|
|
|
|
+ private _gamepads;
|
|
|
|
+ gamepadRotationSensibility: number;
|
|
|
|
+ gamepadMoveSensibility: number;
|
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
|
+ checkInputs(): void;
|
|
|
|
+ private _onNewGameConnected(gamepad);
|
|
|
|
+ getTypeName(): string;
|
|
|
|
+ getSimpleName(): string;
|
|
}
|
|
}
|
|
- class Octree<T> {
|
|
|
|
- maxDepth: number;
|
|
|
|
- blocks: Array<OctreeBlock<T>>;
|
|
|
|
- dynamicContent: T[];
|
|
|
|
- private _maxBlockCapacity;
|
|
|
|
- private _selectionContent;
|
|
|
|
- private _creationFunc;
|
|
|
|
- constructor(creationFunc: (entry: T, block: OctreeBlock<T>) => void, maxBlockCapacity?: number, maxDepth?: number);
|
|
|
|
- update(worldMin: Vector3, worldMax: Vector3, entries: T[]): void;
|
|
|
|
- addMesh(entry: T): void;
|
|
|
|
- select(frustumPlanes: Plane[], allowDuplicate?: boolean): SmartArray<T>;
|
|
|
|
- intersects(sphereCenter: Vector3, sphereRadius: number, allowDuplicate?: boolean): SmartArray<T>;
|
|
|
|
- intersectsRay(ray: Ray): SmartArray<T>;
|
|
|
|
- static _CreateBlocks<T>(worldMin: Vector3, worldMax: Vector3, entries: T[], maxBlockCapacity: number, currentDepth: number, maxDepth: number, target: IOctreeContainer<T>, creationFunc: (entry: T, block: OctreeBlock<T>) => void): void;
|
|
|
|
- static CreationFuncForMeshes: (entry: AbstractMesh, block: OctreeBlock<AbstractMesh>) => void;
|
|
|
|
- static CreationFuncForSubMeshes: (entry: SubMesh, block: OctreeBlock<SubMesh>) => void;
|
|
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class ArcRotateCameraKeyboardMoveInput implements ICameraInput<ArcRotateCamera> {
|
|
|
|
+ camera: ArcRotateCamera;
|
|
|
|
+ private _keys;
|
|
|
|
+ private _onKeyDown;
|
|
|
|
+ private _onKeyUp;
|
|
|
|
+ private _onLostFocus;
|
|
|
|
+ keysUp: number[];
|
|
|
|
+ keysDown: number[];
|
|
|
|
+ keysLeft: number[];
|
|
|
|
+ keysRight: number[];
|
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
|
+ checkInputs(): void;
|
|
|
|
+ getTypeName(): string;
|
|
|
|
+ getSimpleName(): string;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class OctreeBlock<T> {
|
|
|
|
- entries: T[];
|
|
|
|
- blocks: Array<OctreeBlock<T>>;
|
|
|
|
- private _depth;
|
|
|
|
- private _maxDepth;
|
|
|
|
- private _capacity;
|
|
|
|
- private _minPoint;
|
|
|
|
- private _maxPoint;
|
|
|
|
- private _boundingVectors;
|
|
|
|
- private _creationFunc;
|
|
|
|
- constructor(minPoint: Vector3, maxPoint: Vector3, capacity: number, depth: number, maxDepth: number, creationFunc: (entry: T, block: OctreeBlock<T>) => void);
|
|
|
|
- readonly capacity: number;
|
|
|
|
- readonly minPoint: Vector3;
|
|
|
|
- readonly maxPoint: Vector3;
|
|
|
|
- addEntry(entry: T): void;
|
|
|
|
- addEntries(entries: T[]): void;
|
|
|
|
- select(frustumPlanes: Plane[], selection: SmartArray<T>, allowDuplicate?: boolean): void;
|
|
|
|
- intersects(sphereCenter: Vector3, sphereRadius: number, selection: SmartArray<T>, allowDuplicate?: boolean): void;
|
|
|
|
- intersectsRay(ray: Ray, selection: SmartArray<T>): void;
|
|
|
|
- createInnerBlocks(): void;
|
|
|
|
|
|
+ class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCamera> {
|
|
|
|
+ camera: ArcRotateCamera;
|
|
|
|
+ private _wheel;
|
|
|
|
+ private _observer;
|
|
|
|
+ wheelPrecision: number;
|
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
|
+ getTypeName(): string;
|
|
|
|
+ getSimpleName(): string;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- /**
|
|
|
|
- * Interface to implement to create a shadow generator compatible with BJS.
|
|
|
|
- */
|
|
|
|
- interface IShadowGenerator {
|
|
|
|
- getShadowMap(): RenderTargetTexture;
|
|
|
|
- getShadowMapForRendering(): RenderTargetTexture;
|
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
|
- prepareDefines(defines: MaterialDefines, lightIndex: number): void;
|
|
|
|
- bindShadowLight(lightIndex: string, effect: Effect): void;
|
|
|
|
- getTransformMatrix(): Matrix;
|
|
|
|
- recreateShadowMap(): void;
|
|
|
|
- serialize(): any;
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
- class ShadowGenerator implements IShadowGenerator {
|
|
|
|
- private static _FILTER_NONE;
|
|
|
|
- private static _FILTER_EXPONENTIALSHADOWMAP;
|
|
|
|
- private static _FILTER_POISSONSAMPLING;
|
|
|
|
- private static _FILTER_BLUREXPONENTIALSHADOWMAP;
|
|
|
|
- private static _FILTER_CLOSEEXPONENTIALSHADOWMAP;
|
|
|
|
- private static _FILTER_BLURCLOSEEXPONENTIALSHADOWMAP;
|
|
|
|
- static readonly FILTER_NONE: number;
|
|
|
|
- static readonly FILTER_POISSONSAMPLING: number;
|
|
|
|
- static readonly FILTER_EXPONENTIALSHADOWMAP: number;
|
|
|
|
- static readonly FILTER_BLUREXPONENTIALSHADOWMAP: number;
|
|
|
|
- static readonly FILTER_CLOSEEXPONENTIALSHADOWMAP: number;
|
|
|
|
- static readonly FILTER_BLURCLOSEEXPONENTIALSHADOWMAP: number;
|
|
|
|
- private _bias;
|
|
|
|
- bias: number;
|
|
|
|
- private _blurBoxOffset;
|
|
|
|
- blurBoxOffset: number;
|
|
|
|
- private _blurScale;
|
|
|
|
- blurScale: number;
|
|
|
|
- private _blurKernel;
|
|
|
|
- blurKernel: number;
|
|
|
|
- private _useKernelBlur;
|
|
|
|
- useKernelBlur: boolean;
|
|
|
|
- private _depthScale;
|
|
|
|
- depthScale: number;
|
|
|
|
- private _filter;
|
|
|
|
- filter: number;
|
|
|
|
- usePoissonSampling: boolean;
|
|
|
|
- useVarianceShadowMap: boolean;
|
|
|
|
- useBlurVarianceShadowMap: boolean;
|
|
|
|
- useExponentialShadowMap: boolean;
|
|
|
|
- useBlurExponentialShadowMap: boolean;
|
|
|
|
- useCloseExponentialShadowMap: boolean;
|
|
|
|
- useBlurCloseExponentialShadowMap: boolean;
|
|
|
|
- private _darkness;
|
|
|
|
- /**
|
|
|
|
- * Returns the darkness value (float).
|
|
|
|
- */
|
|
|
|
- getDarkness(): number;
|
|
|
|
- /**
|
|
|
|
- * Sets the ShadowGenerator darkness value (float <= 1.0).
|
|
|
|
- * Returns the ShadowGenerator.
|
|
|
|
- */
|
|
|
|
- setDarkness(darkness: number): ShadowGenerator;
|
|
|
|
- private _transparencyShadow;
|
|
|
|
- /**
|
|
|
|
- * Sets the ability to have transparent shadow (boolean).
|
|
|
|
- * Returns the ShadowGenerator.
|
|
|
|
- */
|
|
|
|
- setTransparencyShadow(hasShadow: boolean): ShadowGenerator;
|
|
|
|
- private _shadowMap;
|
|
|
|
- private _shadowMap2;
|
|
|
|
- /**
|
|
|
|
- * Returns a RenderTargetTexture object : the shadow map texture.
|
|
|
|
- */
|
|
|
|
- getShadowMap(): RenderTargetTexture;
|
|
|
|
- /**
|
|
|
|
- * Returns the most ready computed shadow map as a RenderTargetTexture object.
|
|
|
|
- */
|
|
|
|
- getShadowMapForRendering(): RenderTargetTexture;
|
|
|
|
- private _light;
|
|
|
|
- /**
|
|
|
|
- * Returns the associated light object.
|
|
|
|
- */
|
|
|
|
- getLight(): IShadowLight;
|
|
|
|
- forceBackFacesOnly: boolean;
|
|
|
|
- private _scene;
|
|
|
|
- private _lightDirection;
|
|
|
|
- private _effect;
|
|
|
|
- private _viewMatrix;
|
|
|
|
- private _projectionMatrix;
|
|
|
|
- private _transformMatrix;
|
|
|
|
- private _worldViewProjection;
|
|
|
|
- private _cachedPosition;
|
|
|
|
- private _cachedDirection;
|
|
|
|
- private _cachedDefines;
|
|
|
|
- private _currentRenderID;
|
|
|
|
- private _downSamplePostprocess;
|
|
|
|
- private _boxBlurPostprocess;
|
|
|
|
- private _kernelBlurXPostprocess;
|
|
|
|
- private _kernelBlurYPostprocess;
|
|
|
|
- private _blurPostProcesses;
|
|
|
|
- private _mapSize;
|
|
|
|
- private _currentFaceIndex;
|
|
|
|
- private _currentFaceIndexCache;
|
|
|
|
- private _textureType;
|
|
|
|
- private _isCube;
|
|
|
|
- private _defaultTextureMatrix;
|
|
|
|
- /**
|
|
|
|
- * Creates a ShadowGenerator object.
|
|
|
|
- * A ShadowGenerator is the required tool to use the shadows.
|
|
|
|
- * Each light casting shadows needs to use its own ShadowGenerator.
|
|
|
|
- * Required parameters :
|
|
|
|
- * - `mapSize` (integer): the size of the texture what stores the shadows. Example : 1024.
|
|
|
|
- * - `light`: the light object generating the shadows.
|
|
|
|
- * - `useFullFloatFirst`: by default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
|
|
|
|
- * Documentation : http://doc.babylonjs.com/tutorials/shadows
|
|
|
|
- */
|
|
|
|
- constructor(mapSize: number, light: IShadowLight, useFullFloatFirst?: boolean);
|
|
|
|
- private _initializeGenerator();
|
|
|
|
- private _initializeShadowMap();
|
|
|
|
- private _initializeBlurRTTAndPostProcesses();
|
|
|
|
- private _renderForShadowMap(opaqueSubMeshes, alphaTestSubMeshes, transparentSubMeshes);
|
|
|
|
- private _renderSubMeshForShadowMap(subMesh);
|
|
|
|
- private _applyFilterValues();
|
|
|
|
- /**
|
|
|
|
- * Boolean : true when the ShadowGenerator is finally computed.
|
|
|
|
- */
|
|
|
|
- isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
|
- /**
|
|
|
|
- * This creates the defines related to the standard BJS materials.
|
|
|
|
- */
|
|
|
|
- prepareDefines(defines: MaterialDefines, lightIndex: number): void;
|
|
|
|
- /**
|
|
|
|
- * This binds shadow lights related to the standard BJS materials.
|
|
|
|
- * It implies the unifroms available on the materials are the standard BJS ones.
|
|
|
|
- */
|
|
|
|
- bindShadowLight(lightIndex: string, effect: Effect): void;
|
|
|
|
- /**
|
|
|
|
- * Returns a Matrix object : the updated transformation matrix.
|
|
|
|
- */
|
|
|
|
- getTransformMatrix(): Matrix;
|
|
|
|
- recreateShadowMap(): void;
|
|
|
|
- private _disposeBlurPostProcesses();
|
|
|
|
- private _disposeRTTandPostProcesses();
|
|
|
|
- /**
|
|
|
|
- * Disposes the ShadowGenerator.
|
|
|
|
- * Returns nothing.
|
|
|
|
- */
|
|
|
|
- dispose(): void;
|
|
|
|
- /**
|
|
|
|
- * Serializes the ShadowGenerator and returns a serializationObject.
|
|
|
|
- */
|
|
|
|
- serialize(): any;
|
|
|
|
- /**
|
|
|
|
- * Parses a serialized ShadowGenerator and returns a new ShadowGenerator.
|
|
|
|
- */
|
|
|
|
- static Parse(parsedShadowGenerator: any, scene: Scene): ShadowGenerator;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
|
- camera: ArcRotateCamera;
|
|
|
|
- gamepad: Gamepad;
|
|
|
|
- private _gamepads;
|
|
|
|
- gamepadRotationSensibility: number;
|
|
|
|
- gamepadMoveSensibility: number;
|
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
|
- checkInputs(): void;
|
|
|
|
- private _onNewGameConnected(gamepad);
|
|
|
|
- getTypeName(): string;
|
|
|
|
- getSimpleName(): string;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class ArcRotateCameraKeyboardMoveInput implements ICameraInput<ArcRotateCamera> {
|
|
|
|
- camera: ArcRotateCamera;
|
|
|
|
- private _keys;
|
|
|
|
- private _onKeyDown;
|
|
|
|
- private _onKeyUp;
|
|
|
|
- private _onLostFocus;
|
|
|
|
- keysUp: number[];
|
|
|
|
- keysDown: number[];
|
|
|
|
- keysLeft: number[];
|
|
|
|
- keysRight: number[];
|
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
|
- checkInputs(): void;
|
|
|
|
- getTypeName(): string;
|
|
|
|
- getSimpleName(): string;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCamera> {
|
|
|
|
- camera: ArcRotateCamera;
|
|
|
|
- private _wheel;
|
|
|
|
- private _observer;
|
|
|
|
- wheelPrecision: number;
|
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
|
- getTypeName(): string;
|
|
|
|
- getSimpleName(): string;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module BABYLON {
|
|
|
|
- class ArcRotateCameraPointersInput implements ICameraInput<ArcRotateCamera> {
|
|
|
|
- camera: ArcRotateCamera;
|
|
|
|
- buttons: number[];
|
|
|
|
- angularSensibilityX: number;
|
|
|
|
- angularSensibilityY: number;
|
|
|
|
- pinchPrecision: number;
|
|
|
|
- panningSensibility: number;
|
|
|
|
- private _isPanClick;
|
|
|
|
- pinchInwards: boolean;
|
|
|
|
- private _pointerInput;
|
|
|
|
- private _observer;
|
|
|
|
- private _onMouseMove;
|
|
|
|
- private _onGestureStart;
|
|
|
|
- private _onGesture;
|
|
|
|
- private _MSGestureHandler;
|
|
|
|
- private _onLostFocus;
|
|
|
|
- private _onContextMenu;
|
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
|
- getTypeName(): string;
|
|
|
|
- getSimpleName(): string;
|
|
|
|
|
|
+ class ArcRotateCameraPointersInput implements ICameraInput<ArcRotateCamera> {
|
|
|
|
+ camera: ArcRotateCamera;
|
|
|
|
+ buttons: number[];
|
|
|
|
+ angularSensibilityX: number;
|
|
|
|
+ angularSensibilityY: number;
|
|
|
|
+ pinchPrecision: number;
|
|
|
|
+ panningSensibility: number;
|
|
|
|
+ private _isPanClick;
|
|
|
|
+ pinchInwards: boolean;
|
|
|
|
+ private _pointerInput;
|
|
|
|
+ private _observer;
|
|
|
|
+ private _onMouseMove;
|
|
|
|
+ private _onGestureStart;
|
|
|
|
+ private _onGesture;
|
|
|
|
+ private _MSGestureHandler;
|
|
|
|
+ private _onLostFocus;
|
|
|
|
+ private _onContextMenu;
|
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
|
+ getTypeName(): string;
|
|
|
|
+ getSimpleName(): string;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -15190,11 +14987,214 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ interface IOctreeContainer<T> {
|
|
|
|
+ blocks: Array<OctreeBlock<T>>;
|
|
|
|
+ }
|
|
|
|
+ class Octree<T> {
|
|
|
|
+ maxDepth: number;
|
|
|
|
+ blocks: Array<OctreeBlock<T>>;
|
|
|
|
+ dynamicContent: T[];
|
|
|
|
+ private _maxBlockCapacity;
|
|
|
|
+ private _selectionContent;
|
|
|
|
+ private _creationFunc;
|
|
|
|
+ constructor(creationFunc: (entry: T, block: OctreeBlock<T>) => void, maxBlockCapacity?: number, maxDepth?: number);
|
|
|
|
+ update(worldMin: Vector3, worldMax: Vector3, entries: T[]): void;
|
|
|
|
+ addMesh(entry: T): void;
|
|
|
|
+ select(frustumPlanes: Plane[], allowDuplicate?: boolean): SmartArray<T>;
|
|
|
|
+ intersects(sphereCenter: Vector3, sphereRadius: number, allowDuplicate?: boolean): SmartArray<T>;
|
|
|
|
+ intersectsRay(ray: Ray): SmartArray<T>;
|
|
|
|
+ static _CreateBlocks<T>(worldMin: Vector3, worldMax: Vector3, entries: T[], maxBlockCapacity: number, currentDepth: number, maxDepth: number, target: IOctreeContainer<T>, creationFunc: (entry: T, block: OctreeBlock<T>) => void): void;
|
|
|
|
+ static CreationFuncForMeshes: (entry: AbstractMesh, block: OctreeBlock<AbstractMesh>) => void;
|
|
|
|
+ static CreationFuncForSubMeshes: (entry: SubMesh, block: OctreeBlock<SubMesh>) => void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ class OctreeBlock<T> {
|
|
|
|
+ entries: T[];
|
|
|
|
+ blocks: Array<OctreeBlock<T>>;
|
|
|
|
+ private _depth;
|
|
|
|
+ private _maxDepth;
|
|
|
|
+ private _capacity;
|
|
|
|
+ private _minPoint;
|
|
|
|
+ private _maxPoint;
|
|
|
|
+ private _boundingVectors;
|
|
|
|
+ private _creationFunc;
|
|
|
|
+ constructor(minPoint: Vector3, maxPoint: Vector3, capacity: number, depth: number, maxDepth: number, creationFunc: (entry: T, block: OctreeBlock<T>) => void);
|
|
|
|
+ readonly capacity: number;
|
|
|
|
+ readonly minPoint: Vector3;
|
|
|
|
+ readonly maxPoint: Vector3;
|
|
|
|
+ addEntry(entry: T): void;
|
|
|
|
+ addEntries(entries: T[]): void;
|
|
|
|
+ select(frustumPlanes: Plane[], selection: SmartArray<T>, allowDuplicate?: boolean): void;
|
|
|
|
+ intersects(sphereCenter: Vector3, sphereRadius: number, selection: SmartArray<T>, allowDuplicate?: boolean): void;
|
|
|
|
+ intersectsRay(ray: Ray, selection: SmartArray<T>): void;
|
|
|
|
+ createInnerBlocks(): void;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
declare module BABYLON.Internals {
|
|
declare module BABYLON.Internals {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
|
|
+ * Interface to implement to create a shadow generator compatible with BJS.
|
|
|
|
+ */
|
|
|
|
+ interface IShadowGenerator {
|
|
|
|
+ getShadowMap(): RenderTargetTexture;
|
|
|
|
+ getShadowMapForRendering(): RenderTargetTexture;
|
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
|
+ prepareDefines(defines: MaterialDefines, lightIndex: number): void;
|
|
|
|
+ bindShadowLight(lightIndex: string, effect: Effect): void;
|
|
|
|
+ getTransformMatrix(): Matrix;
|
|
|
|
+ recreateShadowMap(): void;
|
|
|
|
+ serialize(): any;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ }
|
|
|
|
+ class ShadowGenerator implements IShadowGenerator {
|
|
|
|
+ private static _FILTER_NONE;
|
|
|
|
+ private static _FILTER_EXPONENTIALSHADOWMAP;
|
|
|
|
+ private static _FILTER_POISSONSAMPLING;
|
|
|
|
+ private static _FILTER_BLUREXPONENTIALSHADOWMAP;
|
|
|
|
+ private static _FILTER_CLOSEEXPONENTIALSHADOWMAP;
|
|
|
|
+ private static _FILTER_BLURCLOSEEXPONENTIALSHADOWMAP;
|
|
|
|
+ static readonly FILTER_NONE: number;
|
|
|
|
+ static readonly FILTER_POISSONSAMPLING: number;
|
|
|
|
+ static readonly FILTER_EXPONENTIALSHADOWMAP: number;
|
|
|
|
+ static readonly FILTER_BLUREXPONENTIALSHADOWMAP: number;
|
|
|
|
+ static readonly FILTER_CLOSEEXPONENTIALSHADOWMAP: number;
|
|
|
|
+ static readonly FILTER_BLURCLOSEEXPONENTIALSHADOWMAP: number;
|
|
|
|
+ private _bias;
|
|
|
|
+ bias: number;
|
|
|
|
+ private _blurBoxOffset;
|
|
|
|
+ blurBoxOffset: number;
|
|
|
|
+ private _blurScale;
|
|
|
|
+ blurScale: number;
|
|
|
|
+ private _blurKernel;
|
|
|
|
+ blurKernel: number;
|
|
|
|
+ private _useKernelBlur;
|
|
|
|
+ useKernelBlur: boolean;
|
|
|
|
+ private _depthScale;
|
|
|
|
+ depthScale: number;
|
|
|
|
+ private _filter;
|
|
|
|
+ filter: number;
|
|
|
|
+ usePoissonSampling: boolean;
|
|
|
|
+ useVarianceShadowMap: boolean;
|
|
|
|
+ useBlurVarianceShadowMap: boolean;
|
|
|
|
+ useExponentialShadowMap: boolean;
|
|
|
|
+ useBlurExponentialShadowMap: boolean;
|
|
|
|
+ useCloseExponentialShadowMap: boolean;
|
|
|
|
+ useBlurCloseExponentialShadowMap: boolean;
|
|
|
|
+ private _darkness;
|
|
|
|
+ /**
|
|
|
|
+ * Returns the darkness value (float).
|
|
|
|
+ */
|
|
|
|
+ getDarkness(): number;
|
|
|
|
+ /**
|
|
|
|
+ * Sets the ShadowGenerator darkness value (float <= 1.0).
|
|
|
|
+ * Returns the ShadowGenerator.
|
|
|
|
+ */
|
|
|
|
+ setDarkness(darkness: number): ShadowGenerator;
|
|
|
|
+ private _transparencyShadow;
|
|
|
|
+ /**
|
|
|
|
+ * Sets the ability to have transparent shadow (boolean).
|
|
|
|
+ * Returns the ShadowGenerator.
|
|
|
|
+ */
|
|
|
|
+ setTransparencyShadow(hasShadow: boolean): ShadowGenerator;
|
|
|
|
+ private _shadowMap;
|
|
|
|
+ private _shadowMap2;
|
|
|
|
+ /**
|
|
|
|
+ * Returns a RenderTargetTexture object : the shadow map texture.
|
|
|
|
+ */
|
|
|
|
+ getShadowMap(): RenderTargetTexture;
|
|
|
|
+ /**
|
|
|
|
+ * Returns the most ready computed shadow map as a RenderTargetTexture object.
|
|
|
|
+ */
|
|
|
|
+ getShadowMapForRendering(): RenderTargetTexture;
|
|
|
|
+ private _light;
|
|
|
|
+ /**
|
|
|
|
+ * Returns the associated light object.
|
|
|
|
+ */
|
|
|
|
+ getLight(): IShadowLight;
|
|
|
|
+ forceBackFacesOnly: boolean;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _lightDirection;
|
|
|
|
+ private _effect;
|
|
|
|
+ private _viewMatrix;
|
|
|
|
+ private _projectionMatrix;
|
|
|
|
+ private _transformMatrix;
|
|
|
|
+ private _worldViewProjection;
|
|
|
|
+ private _cachedPosition;
|
|
|
|
+ private _cachedDirection;
|
|
|
|
+ private _cachedDefines;
|
|
|
|
+ private _currentRenderID;
|
|
|
|
+ private _downSamplePostprocess;
|
|
|
|
+ private _boxBlurPostprocess;
|
|
|
|
+ private _kernelBlurXPostprocess;
|
|
|
|
+ private _kernelBlurYPostprocess;
|
|
|
|
+ private _blurPostProcesses;
|
|
|
|
+ private _mapSize;
|
|
|
|
+ private _currentFaceIndex;
|
|
|
|
+ private _currentFaceIndexCache;
|
|
|
|
+ private _textureType;
|
|
|
|
+ private _isCube;
|
|
|
|
+ private _defaultTextureMatrix;
|
|
|
|
+ /**
|
|
|
|
+ * Creates a ShadowGenerator object.
|
|
|
|
+ * A ShadowGenerator is the required tool to use the shadows.
|
|
|
|
+ * Each light casting shadows needs to use its own ShadowGenerator.
|
|
|
|
+ * Required parameters :
|
|
|
|
+ * - `mapSize` (integer): the size of the texture what stores the shadows. Example : 1024.
|
|
|
|
+ * - `light`: the light object generating the shadows.
|
|
|
|
+ * - `useFullFloatFirst`: by default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.
|
|
|
|
+ * Documentation : http://doc.babylonjs.com/tutorials/shadows
|
|
|
|
+ */
|
|
|
|
+ constructor(mapSize: number, light: IShadowLight, useFullFloatFirst?: boolean);
|
|
|
|
+ private _initializeGenerator();
|
|
|
|
+ private _initializeShadowMap();
|
|
|
|
+ private _initializeBlurRTTAndPostProcesses();
|
|
|
|
+ private _renderForShadowMap(opaqueSubMeshes, alphaTestSubMeshes, transparentSubMeshes);
|
|
|
|
+ private _renderSubMeshForShadowMap(subMesh);
|
|
|
|
+ private _applyFilterValues();
|
|
|
|
+ /**
|
|
|
|
+ * Boolean : true when the ShadowGenerator is finally computed.
|
|
|
|
+ */
|
|
|
|
+ isReady(subMesh: SubMesh, useInstances: boolean): boolean;
|
|
|
|
+ /**
|
|
|
|
+ * This creates the defines related to the standard BJS materials.
|
|
|
|
+ */
|
|
|
|
+ prepareDefines(defines: MaterialDefines, lightIndex: number): void;
|
|
|
|
+ /**
|
|
|
|
+ * This binds shadow lights related to the standard BJS materials.
|
|
|
|
+ * It implies the unifroms available on the materials are the standard BJS ones.
|
|
|
|
+ */
|
|
|
|
+ bindShadowLight(lightIndex: string, effect: Effect): void;
|
|
|
|
+ /**
|
|
|
|
+ * Returns a Matrix object : the updated transformation matrix.
|
|
|
|
+ */
|
|
|
|
+ getTransformMatrix(): Matrix;
|
|
|
|
+ recreateShadowMap(): void;
|
|
|
|
+ private _disposeBlurPostProcesses();
|
|
|
|
+ private _disposeRTTandPostProcesses();
|
|
|
|
+ /**
|
|
|
|
+ * Disposes the ShadowGenerator.
|
|
|
|
+ * Returns nothing.
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ /**
|
|
|
|
+ * Serializes the ShadowGenerator and returns a serializationObject.
|
|
|
|
+ */
|
|
|
|
+ serialize(): any;
|
|
|
|
+ /**
|
|
|
|
+ * Parses a serialized ShadowGenerator and returns a new ShadowGenerator.
|
|
|
|
+ */
|
|
|
|
+ static Parse(parsedShadowGenerator: any, scene: Scene): ShadowGenerator;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /**
|
|
* The Physically based material base class of BJS.
|
|
* The Physically based material base class of BJS.
|
|
*
|
|
*
|
|
* This offers the main features of a standard PBR material.
|
|
* This offers the main features of a standard PBR material.
|