index.d.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. declare module 'babylonjs/stringDictionary' {
  2. /**
  3. * This class implement a typical dictionary using a string as key and the generic type T as value.
  4. * The underlying implementation relies on an associative array to ensure the best performances.
  5. * The value can be anything including 'null' but except 'undefined'
  6. */
  7. class StringDictionary<T> {
  8. /**
  9. * This will clear this dictionary and copy the content from the 'source' one.
  10. * If the T value is a custom object, it won't be copied/cloned, the same object will be used
  11. * @param source the dictionary to take the content from and copy to this dictionary
  12. */
  13. copyFrom(source: StringDictionary<T>): void;
  14. /**
  15. * Get a value based from its key
  16. * @param key the given key to get the matching value from
  17. * @return the value if found, otherwise undefined is returned
  18. */
  19. get(key: string): T | undefined;
  20. /**
  21. * Get a value from its key or add it if it doesn't exist.
  22. * This method will ensure you that a given key/data will be present in the dictionary.
  23. * @param key the given key to get the matching value from
  24. * @param factory the factory that will create the value if the key is not present in the dictionary.
  25. * The factory will only be invoked if there's no data for the given key.
  26. * @return the value corresponding to the key.
  27. */
  28. getOrAddWithFactory(key: string, factory: (key: string) => T): T;
  29. /**
  30. * Get a value from its key if present in the dictionary otherwise add it
  31. * @param key the key to get the value from
  32. * @param val if there's no such key/value pair in the dictionary add it with this value
  33. * @return the value corresponding to the key
  34. */
  35. getOrAdd(key: string, val: T): T;
  36. /**
  37. * Check if there's a given key in the dictionary
  38. * @param key the key to check for
  39. * @return true if the key is present, false otherwise
  40. */
  41. contains(key: string): boolean;
  42. /**
  43. * Add a new key and its corresponding value
  44. * @param key the key to add
  45. * @param value the value corresponding to the key
  46. * @return true if the operation completed successfully, false if we couldn't insert the key/value because there was already this key in the dictionary
  47. */
  48. add(key: string, value: T): boolean;
  49. set(key: string, value: T): boolean;
  50. /**
  51. * Get the element of the given key and remove it from the dictionary
  52. * @param key
  53. */
  54. getAndRemove(key: string): Nullable<T>;
  55. /**
  56. * Remove a key/value from the dictionary.
  57. * @param key the key to remove
  58. * @return true if the item was successfully deleted, false if no item with such key exist in the dictionary
  59. */
  60. remove(key: string): boolean;
  61. /**
  62. * Clear the whole content of the dictionary
  63. */
  64. clear(): void;
  65. readonly count: number;
  66. /**
  67. * Execute a callback on each key/val of the dictionary.
  68. * Note that you can remove any element in this dictionary in the callback implementation
  69. * @param callback the callback to execute on a given key/value pair
  70. */
  71. forEach(callback: (key: string, val: T) => void): void;
  72. /**
  73. * Execute a callback on every occurrence of the dictionary until it returns a valid TRes object.
  74. * If the callback returns null or undefined the method will iterate to the next key/value pair
  75. * Note that you can remove any element in this dictionary in the callback implementation
  76. * @param callback the callback to execute, if it return a valid T instanced object the enumeration will stop and the object will be returned
  77. */
  78. first<TRes>(callback: (key: string, val: T) => TRes): TRes | null;
  79. private _count;
  80. private _data;
  81. }
  82. }
  83. 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';
  84. import {EngineInstrumentation,SceneInstrumentation,_TimeToken} from 'babylonjs/instrumentation';
  85. import {Particle,IParticleSystem,ParticleSystem,BoxParticleEmitter,ConeParticleEmitter,SphereParticleEmitter,SphereDirectedParticleEmitter,IParticleEmitterType} from 'babylonjs/particles';
  86. import {GPUParticleSystem} from 'babylonjs/gpuParticles';
  87. import {FramingBehavior,BouncingBehavior,AutoRotationBehavior} from 'babylonjs/cameraBehaviors';
  88. import {NullEngineOptions,NullEngine} from 'babylonjs/nullEngine';
  89. import {TextureTools} from 'babylonjs/textureTools';
  90. import {SolidParticle,ModelShape,DepthSortedParticle,SolidParticleSystem} from 'babylonjs/solidParticles';
  91. import {Collider,CollisionWorker,ICollisionCoordinator,SerializedMesh,SerializedSubMesh,SerializedGeometry,BabylonMessage,SerializedColliderToWorker,WorkerTaskType,WorkerReply,CollisionReplyPayload,InitPayload,CollidePayload,UpdatePayload,WorkerReplyType,CollisionCoordinatorWorker,CollisionCoordinatorLegacy} from 'babylonjs/collisions';
  92. import {IntersectionInfo,PickingInfo,Ray} from 'babylonjs/picking';
  93. import {SpriteManager,Sprite} from 'babylonjs/sprites';
  94. 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';
  95. import {Condition,ValueCondition,PredicateCondition,StateCondition,Action,ActionEvent,ActionManager,InterpolateValueAction,SwitchBooleanAction,SetStateAction,SetValueAction,IncrementValueAction,PlayAnimationAction,StopAnimationAction,DoNothingAction,CombineAction,ExecuteCodeAction,SetParentAction,PlaySoundAction,StopSoundAction} from 'babylonjs/actions';
  96. import {GroundMesh,InstancedMesh,LinesMesh} from 'babylonjs/additionalMeshes';
  97. import {ShaderMaterial} from 'babylonjs/shaderMaterial';
  98. import {MeshBuilder} from 'babylonjs/meshBuilder';
  99. import {PBRBaseMaterial,PBRBaseSimpleMaterial,PBRMaterial,PBRMetallicRoughnessMaterial,PBRSpecularGlossinessMaterial} from 'babylonjs/pbrMaterial';
  100. import {CameraInputTypes,ICameraInput,CameraInputsMap,CameraInputsManager,TargetCamera} from 'babylonjs/targetCamera';
  101. import {ArcRotateCameraKeyboardMoveInput,ArcRotateCameraMouseWheelInput,ArcRotateCameraPointersInput,ArcRotateCameraInputsManager,ArcRotateCamera} from 'babylonjs/arcRotateCamera';
  102. import {FreeCameraMouseInput,FreeCameraKeyboardMoveInput,FreeCameraInputsManager,FreeCamera} from 'babylonjs/freeCamera';
  103. import {HemisphericLight} from 'babylonjs/hemisphericLight';
  104. import {IShadowLight,ShadowLight,PointLight} from 'babylonjs/pointLight';
  105. import {DirectionalLight} from 'babylonjs/directionalLight';
  106. import {SpotLight} from 'babylonjs/spotLight';
  107. import {CubeTexture,RenderTargetTexture,IMultiRenderTargetOptions,MultiRenderTarget,MirrorTexture,RefractionTexture,DynamicTexture,VideoTexture,RawTexture} from 'babylonjs/additionalTextures';
  108. import {AudioEngine,Sound,SoundTrack,Analyser} from 'babylonjs/audio';
  109. import {ILoadingScreen,DefaultLoadingScreen,SceneLoaderProgressEvent,ISceneLoaderPluginExtensions,ISceneLoaderPluginFactory,ISceneLoaderPlugin,ISceneLoaderPluginAsync,SceneLoader,FilesInput} from 'babylonjs/loader';
  110. import {IShadowGenerator,ShadowGenerator} from 'babylonjs/shadows';
  111. import {Tags,AndOrNotEvaluator} from 'babylonjs/userData';
  112. import {FresnelParameters} from 'babylonjs/fresnel';
  113. import {MultiMaterial} from 'babylonjs/multiMaterial';
  114. import {Database} from 'babylonjs/offline';
  115. import {FreeCameraTouchInput,TouchCamera} from 'babylonjs/touchCamera';
  116. import {ProceduralTexture,CustomProceduralTexture} from 'babylonjs/procedural';
  117. import {FreeCameraGamepadInput,ArcRotateCameraGamepadInput,GamepadManager,StickValues,GamepadButtonChanges,Gamepad,GenericPad,Xbox360Button,Xbox360Dpad,Xbox360Pad,PoseEnabledControllerType,MutableGamepadButton,ExtendedGamepadButton,PoseEnabledControllerHelper,PoseEnabledController,WebVRController,OculusTouchController,ViveController,GenericController,WindowsMotionController} from 'babylonjs/gamepad';
  118. import {FollowCamera,ArcFollowCamera,UniversalCamera,GamepadCamera} from 'babylonjs/additionalCameras';
  119. import {DepthRenderer} from 'babylonjs/depthRenderer';
  120. import {GeometryBufferRenderer} from 'babylonjs/geometryBufferRenderer';
  121. import {PostProcessOptions,PostProcess,PassPostProcess} from 'babylonjs/postProcesses';
  122. import {BlurPostProcess} from 'babylonjs/additionalPostProcess_blur';
  123. import {FxaaPostProcess} from 'babylonjs/additionalPostProcess_fxaa';
  124. import {HighlightsPostProcess} from 'babylonjs/additionalPostProcess_highlights';
  125. import {RefractionPostProcess,BlackAndWhitePostProcess,ConvolutionPostProcess,FilterPostProcess,VolumetricLightScatteringPostProcess,ColorCorrectionPostProcess,TonemappingOperator,TonemapPostProcess,DisplayPassPostProcess,ImageProcessingPostProcess} from 'babylonjs/additionalPostProcesses';
  126. import {PostProcessRenderPipelineManager,PostProcessRenderPass,PostProcessRenderEffect,PostProcessRenderPipeline} from 'babylonjs/renderingPipeline';
  127. import {SSAORenderingPipeline,SSAO2RenderingPipeline,LensRenderingPipeline,StandardRenderingPipeline} from 'babylonjs/additionalRenderingPipeline';
  128. import {DefaultRenderingPipeline} from 'babylonjs/defaultRenderingPipeline';
  129. import {Bone,BoneIKController,BoneLookController,Skeleton} from 'babylonjs/bones';
  130. import {SphericalPolynomial,SphericalHarmonics,CubeMapToSphericalPolynomialTools,CubeMapInfo,PanoramaToCubeMapTools,HDRInfo,HDRTools,HDRCubeTexture} from 'babylonjs/hdr';
  131. import {CSG} from 'babylonjs/csg';
  132. import {Polygon,PolygonMeshBuilder} from 'babylonjs/polygonMesh';
  133. import {LensFlare,LensFlareSystem} from 'babylonjs/lensFlares';
  134. 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';
  135. import {TGATools,DDSInfo,DDSTools,KhronosTextureContainer} from 'babylonjs/textureFormats';
  136. import {Debug,RayHelper,DebugLayer,BoundingBoxRenderer} from 'babylonjs/debug';
  137. import {MorphTarget,MorphTargetManager} from 'babylonjs/morphTargets';
  138. import {IOctreeContainer,Octree,OctreeBlock} from 'babylonjs/octrees';
  139. import {SIMDHelper} from 'babylonjs/simd';
  140. 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';
  141. import {JoystickAxis,VirtualJoystick,VirtualJoysticksCamera,FreeCameraVirtualJoystickInput} from 'babylonjs/virtualJoystick';
  142. 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';
  143. import {OutlineRenderer,EdgesRenderer,IHighlightLayerOptions,HighlightLayer} from 'babylonjs/highlights';
  144. import {SceneSerializer} from 'babylonjs/serialization';
  145. import {AssetTaskState,AbstractAssetTask,IAssetsProgressEvent,AssetsProgressEvent,MeshAssetTask,TextFileAssetTask,BinaryFileAssetTask,ImageAssetTask,ITextureAssetTask,TextureAssetTask,CubeTextureAssetTask,HDRCubeTextureAssetTask,AssetsManager} from 'babylonjs/assetsManager';
  146. import {ReflectionProbe} from 'babylonjs/probes';
  147. import {BackgroundMaterial} from 'babylonjs/backgroundMaterial';
  148. import {Layer} from 'babylonjs/layer';
  149. import {IEnvironmentHelperOptions,EnvironmentHelper} from 'babylonjs/environmentHelper';