declare module 'babylonjs/hdr' { class SphericalPolynomial { x: Vector3; y: Vector3; z: Vector3; xx: Vector3; yy: Vector3; zz: Vector3; xy: Vector3; yz: Vector3; zx: Vector3; addAmbient(color: Color3): void; static getSphericalPolynomialFromHarmonics(harmonics: SphericalHarmonics): SphericalPolynomial; scale(scale: number): void; } class SphericalHarmonics { L00: Vector3; L1_1: Vector3; L10: Vector3; L11: Vector3; L2_2: Vector3; L2_1: Vector3; L20: Vector3; L21: Vector3; L22: Vector3; addLight(direction: Vector3, color: Color3, deltaSolidAngle: number): void; scale(scale: number): void; convertIncidentRadianceToIrradiance(): void; convertIrradianceToLambertianRadiance(): void; static getsphericalHarmonicsFromPolynomial(polynomial: SphericalPolynomial): SphericalHarmonics; } } declare module 'babylonjs/hdr' { /** * Helper class dealing with the extraction of spherical polynomial dataArray * from a cube map. */ class CubeMapToSphericalPolynomialTools { private static FileFaces; /** * Converts a texture to the according Spherical Polynomial data. * This extracts the first 3 orders only as they are the only one used in the lighting. * * @param texture The texture to extract the information from. * @return The Spherical Polynomial data. */ static ConvertCubeMapTextureToSphericalPolynomial(texture: BaseTexture): Nullable; /** * Converts a cubemap to the according Spherical Polynomial data. * This extracts the first 3 orders only as they are the only one used in the lighting. * * @param cubeInfo The Cube map to extract the information from. * @return The Spherical Polynomial data. */ static ConvertCubeMapToSphericalPolynomial(cubeInfo: CubeMapInfo): SphericalPolynomial; } } declare module 'babylonjs/hdr' { /** * CubeMap information grouping all the data for each faces as well as the cubemap size. */ interface CubeMapInfo { /** * The pixel array for the front face. * This is stored in format, left to right, up to down format. */ front: Nullable; /** * The pixel array for the back face. * This is stored in format, left to right, up to down format. */ back: Nullable; /** * The pixel array for the left face. * This is stored in format, left to right, up to down format. */ left: Nullable; /** * The pixel array for the right face. * This is stored in format, left to right, up to down format. */ right: Nullable; /** * The pixel array for the up face. * This is stored in format, left to right, up to down format. */ up: Nullable; /** * The pixel array for the down face. * This is stored in format, left to right, up to down format. */ down: Nullable; /** * The size of the cubemap stored. * * Each faces will be size * size pixels. */ size: number; /** * The format of the texture. * * RGBA, RGB. */ format: number; /** * The type of the texture data. * * UNSIGNED_INT, FLOAT. */ type: number; /** * Specifies whether the texture is in gamma space. */ gammaSpace: boolean; } /** * Helper class usefull to convert panorama picture to their cubemap representation in 6 faces. */ class PanoramaToCubeMapTools { private static FACE_FRONT; private static FACE_BACK; private static FACE_RIGHT; private static FACE_LEFT; private static FACE_DOWN; private static FACE_UP; /** * Converts a panorma stored in RGB right to left up to down format into a cubemap (6 faces). * * @param float32Array The source data. * @param inputWidth The width of the input panorama. * @param inputhHeight The height of the input panorama. * @param size The willing size of the generated cubemap (each faces will be size * size pixels) * @return The cubemap data */ static ConvertPanoramaToCubemap(float32Array: Float32Array, inputWidth: number, inputHeight: number, size: number): CubeMapInfo; private static CreateCubemapTexture(texSize, faceData, float32Array, inputWidth, inputHeight); private static CalcProjectionSpherical(vDir, float32Array, inputWidth, inputHeight); } } declare module 'babylonjs/hdr' { /** * Header information of HDR texture files. */ interface HDRInfo { /** * The height of the texture in pixels. */ height: number; /** * The width of the texture in pixels. */ width: number; /** * The index of the beginning of the data in the binary file. */ dataPosition: number; } /** * This groups tools to convert HDR texture to native colors array. */ class HDRTools { private static Ldexp(mantissa, exponent); private static Rgbe2float(float32array, red, green, blue, exponent, index); private static readStringLine(uint8array, startIndex); /** * Reads header information from an RGBE texture stored in a native array. * More information on this format are available here: * https://en.wikipedia.org/wiki/RGBE_image_format * * @param uint8array The binary file stored in native array. * @return The header information. */ static RGBE_ReadHeader(uint8array: Uint8Array): HDRInfo; /** * Returns the cubemap information (each faces texture data) extracted from an RGBE texture. * This RGBE texture needs to store the information as a panorama. * * More information on this format are available here: * https://en.wikipedia.org/wiki/RGBE_image_format * * @param buffer The binary file stored in an array buffer. * @param size The expected size of the extracted cubemap. * @return The Cube Map information. */ static GetCubeMapTextureData(buffer: ArrayBuffer, size: number): CubeMapInfo; /** * Returns the pixels data extracted from an RGBE texture. * This pixels will be stored left to right up to down in the R G B order in one array. * * More information on this format are available here: * https://en.wikipedia.org/wiki/RGBE_image_format * * @param uint8array The binary file stored in an array buffer. * @param hdrInfo The header information of the file. * @return The pixels data in RGB right to left up to down order. */ static RGBE_ReadPixels(uint8array: Uint8Array, hdrInfo: HDRInfo): Float32Array; private static RGBE_ReadPixels_RLE(uint8array, hdrInfo); } } declare module 'babylonjs/hdr' { /** * This represents a texture coming from an HDR input. * * The only supported format is currently panorama picture stored in RGBE format. * Example of such files can be found on HDRLib: http://hdrlib.com/ */ class HDRCubeTexture extends BaseTexture { private static _facesMapping; private _useInGammaSpace; private _generateHarmonics; private _noMipmap; private _textureMatrix; private _size; private _usePMREMGenerator; private _isBABYLONPreprocessed; private _onLoad; private _onError; /** * The texture URL. */ url: string; /** * The texture coordinates mode. As this texture is stored in a cube format, please modify carefully. */ coordinatesMode: number; /** * Specifies wether the texture has been generated through the PMREMGenerator tool. * This is usefull at run time to apply the good shader. */ isPMREM: boolean; protected _isBlocking: boolean; /** * Gets wether or not the texture is blocking during loading. */ /** * Sets wether or not the texture is blocking during loading. */ isBlocking: boolean; /** * Instantiates an HDRTexture from the following parameters. * * @param url The location of the HDR raw data (Panorama stored in RGBE format) * @param scene The scene the texture will be used in * @param size The cubemap desired size (the more it increases the longer the generation will be) If the size is omitted this implies you are using a preprocessed cubemap. * @param noMipmap Forces to not generate the mipmap if true * @param generateHarmonics Specifies wether you want to extract the polynomial harmonics during the generation process * @param useInGammaSpace Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) * @param usePMREMGenerator Specifies wether or not to generate the CubeMap through CubeMapGen to avoid seams issue at run time. */ constructor(url: string, scene: Scene, size?: number, noMipmap?: boolean, generateHarmonics?: boolean, useInGammaSpace?: boolean, usePMREMGenerator?: boolean, onLoad?: Nullable<() => void>, onError?: Nullable<(message?: string, exception?: any) => void>); /** * Occurs when the file is a preprocessed .babylon.hdr file. */ private loadBabylonTexture(); /** * Occurs when the file is raw .hdr file. */ private loadHDRTexture(); /** * Starts the loading process of the texture. */ private loadTexture(); clone(): HDRCubeTexture; delayLoad(): void; getReflectionTextureMatrix(): Matrix; setReflectionTextureMatrix(value: Matrix): void; static Parse(parsedTexture: any, scene: Scene, rootUrl: string): Nullable; serialize(): any; /** * Saves as a file the data contained in the texture in a binary format. * This can be used to prevent the long loading tie associated with creating the seamless texture as well * as the spherical used in the lighting. * @param url The HDR file url. * @param size The size of the texture data to generate (one of the cubemap face desired width). * @param onError Method called if any error happens during download. * @return The packed binary data. */ static generateBabylonHDROnDisk(url: string, size: number, onError?: Nullable<(() => void)>): void; /** * Serializes the data contained in the texture in a binary format. * This can be used to prevent the long loading tie associated with creating the seamless texture as well * as the spherical used in the lighting. * @param url The HDR file url. * @param size The size of the texture data to generate (one of the cubemap face desired width). * @param onError Method called if any error happens during download. * @return The packed binary data. */ static generateBabylonHDR(url: string, size: number, callback: ((ArrayBuffer: ArrayBuffer) => void), onError?: Nullable<(() => void)>): void; } } import {EffectFallbacks,EffectCreationOptions,Effect,Nullable,float,double,int,FloatArray,IndicesArray,KeyboardEventTypes,KeyboardInfo,KeyboardInfoPre,PointerEventTypes,PointerInfoBase,PointerInfoPre,PointerInfo,ToGammaSpace,ToLinearSpace,Epsilon,Color3,Color4,Vector2,Vector3,Vector4,ISize,Size,Quaternion,Matrix,Plane,Viewport,Frustum,Space,Axis,BezierCurve,Orientation,Angle,Arc2,Path2,Path3D,Curve3,PositionNormalVertex,PositionNormalTextureVertex,Tmp,Scalar,expandToProperty,serialize,serializeAsTexture,serializeAsColor3,serializeAsFresnelParameters,serializeAsVector2,serializeAsVector3,serializeAsMeshReference,serializeAsColorCurves,serializeAsColor4,serializeAsImageProcessingConfiguration,serializeAsQuaternion,SerializationHelper,EventState,Observer,MultiObserver,Observable,SmartArray,SmartArrayNoDuplicate,IAnimatable,LoadFileError,RetryStrategy,IFileRequest,Tools,PerfCounter,className,AsyncLoop,_AlphaState,_DepthCullingState,_StencilState,InstancingAttributeInfo,RenderTargetCreationOptions,EngineCapabilities,EngineOptions,IDisplayChangedEventArgs,Engine,Node,BoundingSphere,BoundingBox,ICullable,BoundingInfo,TransformNode,AbstractMesh,Light,Camera,RenderingManager,RenderingGroup,IDisposable,IActiveMeshCandidateProvider,RenderingGroupInfo,Scene,Buffer,VertexBuffer,InternalTexture,BaseTexture,Texture,_InstancesBatch,Mesh,BaseSubMesh,SubMesh,MaterialDefines,Material,UniformBuffer,IGetSetVerticesData,VertexData,Geometry,_PrimitiveGeometry,RibbonGeometry,BoxGeometry,SphereGeometry,DiscGeometry,CylinderGeometry,TorusGeometry,GroundGeometry,TiledGroundGeometry,PlaneGeometry,TorusKnotGeometry,PostProcessManager,PerformanceMonitor,RollingAverage,IImageProcessingConfigurationDefines,ImageProcessingConfiguration,ColorGradingTexture,ColorCurves,Behavior,MaterialHelper,PushMaterial,StandardMaterialDefines,StandardMaterial} from 'babylonjs/core'; import {EngineInstrumentation,SceneInstrumentation,_TimeToken} from 'babylonjs/instrumentation'; import {Particle,IParticleSystem,ParticleSystem,BoxParticleEmitter,ConeParticleEmitter,SphereParticleEmitter,SphereDirectedParticleEmitter,IParticleEmitterType} from 'babylonjs/particles'; import {GPUParticleSystem} from 'babylonjs/gpuParticles'; import {FramingBehavior,BouncingBehavior,AutoRotationBehavior} from 'babylonjs/cameraBehaviors'; import {NullEngineOptions,NullEngine} from 'babylonjs/nullEngine'; import {TextureTools} from 'babylonjs/textureTools'; import {SolidParticle,ModelShape,DepthSortedParticle,SolidParticleSystem} from 'babylonjs/solidParticles'; import {Collider,CollisionWorker,ICollisionCoordinator,SerializedMesh,SerializedSubMesh,SerializedGeometry,BabylonMessage,SerializedColliderToWorker,WorkerTaskType,WorkerReply,CollisionReplyPayload,InitPayload,CollidePayload,UpdatePayload,WorkerReplyType,CollisionCoordinatorWorker,CollisionCoordinatorLegacy} from 'babylonjs/collisions'; import {IntersectionInfo,PickingInfo,Ray} from 'babylonjs/picking'; import {SpriteManager,Sprite} from 'babylonjs/sprites'; import {AnimationRange,AnimationEvent,PathCursor,Animation,TargetedAnimation,AnimationGroup,RuntimeAnimation,Animatable,IEasingFunction,EasingFunction,CircleEase,BackEase,BounceEase,CubicEase,ElasticEase,ExponentialEase,PowerEase,QuadraticEase,QuarticEase,QuinticEase,SineEase,BezierCurveEase} from 'babylonjs/animations'; import {Condition,ValueCondition,PredicateCondition,StateCondition,Action,ActionEvent,ActionManager,InterpolateValueAction,SwitchBooleanAction,SetStateAction,SetValueAction,IncrementValueAction,PlayAnimationAction,StopAnimationAction,DoNothingAction,CombineAction,ExecuteCodeAction,SetParentAction,PlaySoundAction,StopSoundAction} from 'babylonjs/actions'; import {GroundMesh,InstancedMesh,LinesMesh} from 'babylonjs/additionalMeshes'; import {ShaderMaterial} from 'babylonjs/shaderMaterial'; import {MeshBuilder} from 'babylonjs/meshBuilder'; import {PBRBaseMaterial,PBRBaseSimpleMaterial,PBRMaterial,PBRMetallicRoughnessMaterial,PBRSpecularGlossinessMaterial} from 'babylonjs/pbrMaterial'; import {CameraInputTypes,ICameraInput,CameraInputsMap,CameraInputsManager,TargetCamera} from 'babylonjs/targetCamera'; import {ArcRotateCameraKeyboardMoveInput,ArcRotateCameraMouseWheelInput,ArcRotateCameraPointersInput,ArcRotateCameraInputsManager,ArcRotateCamera} from 'babylonjs/arcRotateCamera'; import {FreeCameraMouseInput,FreeCameraKeyboardMoveInput,FreeCameraInputsManager,FreeCamera} from 'babylonjs/freeCamera'; import {HemisphericLight} from 'babylonjs/hemisphericLight'; import {IShadowLight,ShadowLight,PointLight} from 'babylonjs/pointLight'; import {DirectionalLight} from 'babylonjs/directionalLight'; import {SpotLight} from 'babylonjs/spotLight'; import {CubeTexture,RenderTargetTexture,IMultiRenderTargetOptions,MultiRenderTarget,MirrorTexture,RefractionTexture,DynamicTexture,VideoTexture,RawTexture} from 'babylonjs/additionalTextures'; import {AudioEngine,Sound,SoundTrack,Analyser} from 'babylonjs/audio'; import {ILoadingScreen,DefaultLoadingScreen,SceneLoaderProgressEvent,ISceneLoaderPluginExtensions,ISceneLoaderPluginFactory,ISceneLoaderPlugin,ISceneLoaderPluginAsync,SceneLoader,FilesInput} from 'babylonjs/loader'; import {IShadowGenerator,ShadowGenerator} from 'babylonjs/shadows'; import {StringDictionary} from 'babylonjs/stringDictionary'; import {Tags,AndOrNotEvaluator} from 'babylonjs/userData'; import {FresnelParameters} from 'babylonjs/fresnel'; import {MultiMaterial} from 'babylonjs/multiMaterial'; import {Database} from 'babylonjs/offline'; import {FreeCameraTouchInput,TouchCamera} from 'babylonjs/touchCamera'; import {ProceduralTexture,CustomProceduralTexture} from 'babylonjs/procedural'; import {FreeCameraGamepadInput,ArcRotateCameraGamepadInput,GamepadManager,StickValues,GamepadButtonChanges,Gamepad,GenericPad,Xbox360Button,Xbox360Dpad,Xbox360Pad,PoseEnabledControllerType,MutableGamepadButton,ExtendedGamepadButton,PoseEnabledControllerHelper,PoseEnabledController,WebVRController,OculusTouchController,ViveController,GenericController,WindowsMotionController} from 'babylonjs/gamepad'; import {FollowCamera,ArcFollowCamera,UniversalCamera,GamepadCamera} from 'babylonjs/additionalCameras'; import {DepthRenderer} from 'babylonjs/depthRenderer'; import {GeometryBufferRenderer} from 'babylonjs/geometryBufferRenderer'; import {PostProcessOptions,PostProcess,PassPostProcess} from 'babylonjs/postProcesses'; import {BlurPostProcess} from 'babylonjs/additionalPostProcess_blur'; import {FxaaPostProcess} from 'babylonjs/additionalPostProcess_fxaa'; import {HighlightsPostProcess} from 'babylonjs/additionalPostProcess_highlights'; import {RefractionPostProcess,BlackAndWhitePostProcess,ConvolutionPostProcess,FilterPostProcess,VolumetricLightScatteringPostProcess,ColorCorrectionPostProcess,TonemappingOperator,TonemapPostProcess,DisplayPassPostProcess,ImageProcessingPostProcess} from 'babylonjs/additionalPostProcesses'; import {PostProcessRenderPipelineManager,PostProcessRenderPass,PostProcessRenderEffect,PostProcessRenderPipeline} from 'babylonjs/renderingPipeline'; import {SSAORenderingPipeline,SSAO2RenderingPipeline,LensRenderingPipeline,StandardRenderingPipeline} from 'babylonjs/additionalRenderingPipeline'; import {DefaultRenderingPipeline} from 'babylonjs/defaultRenderingPipeline'; import {Bone,BoneIKController,BoneLookController,Skeleton} from 'babylonjs/bones'; import {CSG} from 'babylonjs/csg'; import {Polygon,PolygonMeshBuilder} from 'babylonjs/polygonMesh'; import {LensFlare,LensFlareSystem} from 'babylonjs/lensFlares'; import {PhysicsJointData,PhysicsJoint,DistanceJoint,MotorEnabledJoint,HingeJoint,Hinge2Joint,IMotorEnabledJoint,DistanceJointData,SpringJointData,PhysicsImpostorParameters,IPhysicsEnabledObject,PhysicsImpostor,PhysicsImpostorJoint,PhysicsEngine,IPhysicsEnginePlugin,PhysicsHelper,PhysicsRadialExplosionEvent,PhysicsGravitationalFieldEvent,PhysicsUpdraftEvent,PhysicsVortexEvent,PhysicsRadialImpulseFalloff,PhysicsUpdraftMode,PhysicsForceAndContactPoint,PhysicsRadialExplosionEventData,PhysicsGravitationalFieldEventData,PhysicsUpdraftEventData,PhysicsVortexEventData,CannonJSPlugin,OimoJSPlugin} from 'babylonjs/physics'; import {TGATools,DDSInfo,DDSTools,KhronosTextureContainer} from 'babylonjs/textureFormats'; import {Debug,RayHelper,DebugLayer,BoundingBoxRenderer} from 'babylonjs/debug'; import {MorphTarget,MorphTargetManager} from 'babylonjs/morphTargets'; import {IOctreeContainer,Octree,OctreeBlock} from 'babylonjs/octrees'; import {SIMDHelper} from 'babylonjs/simd'; import {VRDistortionCorrectionPostProcess,AnaglyphPostProcess,StereoscopicInterlacePostProcess,FreeCameraDeviceOrientationInput,ArcRotateCameraVRDeviceOrientationInput,VRCameraMetrics,DevicePose,PoseControlled,WebVROptions,WebVRFreeCamera,DeviceOrientationCamera,VRDeviceOrientationFreeCamera,VRDeviceOrientationGamepadCamera,VRDeviceOrientationArcRotateCamera,AnaglyphFreeCamera,AnaglyphArcRotateCamera,AnaglyphGamepadCamera,AnaglyphUniversalCamera,StereoscopicFreeCamera,StereoscopicArcRotateCamera,StereoscopicGamepadCamera,StereoscopicUniversalCamera,VRTeleportationOptions,VRExperienceHelperOptions,VRExperienceHelper} from 'babylonjs/vr'; import {JoystickAxis,VirtualJoystick,VirtualJoysticksCamera,FreeCameraVirtualJoystickInput} from 'babylonjs/virtualJoystick'; import {ISimplifier,ISimplificationSettings,SimplificationSettings,ISimplificationTask,SimplificationQueue,SimplificationType,DecimationTriangle,DecimationVertex,QuadraticMatrix,Reference,QuadraticErrorSimplification,MeshLODLevel,SceneOptimization,TextureOptimization,HardwareScalingOptimization,ShadowsOptimization,PostProcessesOptimization,LensFlaresOptimization,ParticlesOptimization,RenderTargetsOptimization,MergeMeshesOptimization,SceneOptimizerOptions,SceneOptimizer} from 'babylonjs/optimizations'; import {OutlineRenderer,EdgesRenderer,IHighlightLayerOptions,HighlightLayer} from 'babylonjs/highlights'; import {SceneSerializer} from 'babylonjs/serialization'; import {AssetTaskState,AbstractAssetTask,IAssetsProgressEvent,AssetsProgressEvent,MeshAssetTask,TextFileAssetTask,BinaryFileAssetTask,ImageAssetTask,ITextureAssetTask,TextureAssetTask,CubeTextureAssetTask,HDRCubeTextureAssetTask,AssetsManager} from 'babylonjs/assetsManager'; import {ReflectionProbe} from 'babylonjs/probes'; import {BackgroundMaterial} from 'babylonjs/backgroundMaterial'; import {Layer} from 'babylonjs/layer'; import {IEnvironmentHelperOptions,EnvironmentHelper} from 'babylonjs/environmentHelper';