瀏覽代碼

Misc documentation

Jason Sturges 4 年之前
父節點
當前提交
746844a4ef

+ 1 - 1
src/Misc/HighDynamicRange/panoramaToCubemap.ts

@@ -112,7 +112,7 @@ export class PanoramaToCubeMapTools {
     ];
 
     /**
-     * Converts a panorma stored in RGB right to left up to down format into a cubemap (6 faces).
+     * Converts a panorama 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.

+ 1 - 1
src/Misc/andOrNotEvaluator.ts

@@ -1,5 +1,5 @@
 /**
- * Class used to evalaute queries containing `and` and `or` operators
+ * Class used to evaluate queries containing `and` and `or` operators
  */
 export class AndOrNotEvaluator {
     /**

+ 1 - 1
src/Misc/arrayTools.ts

@@ -3,7 +3,7 @@
  */
 export class ArrayTools {
     /**
-     * Returns an array of the given size filled with element built from the given constructor and the paramters
+     * Returns an array of the given size filled with element built from the given constructor and the parameters
      * @param size the number of element to construct and put in the array
      * @param itemBuilder a callback responsible for creating new instance of item. Called once per array entry.
      * @returns a new array filled with new objects

+ 1 - 1
src/Misc/basis.ts

@@ -361,7 +361,7 @@ function workerFunc(): void {
     }
 
     /**
-     * Retreives information about the basis file eg. dimensions
+     * Retrieves information about the basis file eg. dimensions
      * @param basisFile the basis file to get the info from
      * @returns information about the basis file
      */

+ 1 - 1
src/Misc/decorators.ts

@@ -253,7 +253,7 @@ export class SerializationHelper {
     /**
      * Static function used to serialized a specific entity
      * @param entity defines the entity to serialize
-     * @param serializationObject defines the optional target obecjt where serialization data will be stored
+     * @param serializationObject defines the optional target object where serialization data will be stored
      * @returns a JSON compatible object representing the serialization of the entity
      */
     public static Serialize<T>(entity: T, serializationObject?: any): any {

+ 1 - 1
src/Misc/depthReducer.ts

@@ -69,7 +69,7 @@ export class DepthReducer extends MinMaxReducer {
     /**
      * Activates the reduction computation.
      * When activated, the observers registered in onAfterReductionPerformed are
-     * called after the compuation is performed
+     * called after the computation is performed
      */
     public activate(): void {
         if (this._depthRenderer) {

+ 1 - 1
src/Misc/environmentTextureTools.ts

@@ -144,7 +144,7 @@ export class EnvironmentTextureTools {
     /**
      * Creates an environment texture from a loaded cube texture.
      * @param texture defines the cube texture to convert in env file
-     * @return a promise containing the environment data if succesfull.
+     * @return a promise containing the environment data if successful.
      */
     public static async CreateEnvTextureAsync(texture: BaseTexture): Promise<ArrayBuffer> {
         let internalTexture = texture.getInternalTexture();

+ 2 - 2
src/Misc/instantiationTools.ts

@@ -2,12 +2,12 @@ import { Logger } from './logger';
 import { _TypeStore } from './typeStore';
 
 /**
- * Class used to enable instatition of objects by class name
+ * Class used to enable instantiation of objects by class name
  */
 export class InstantiationTools {
     /**
      * Use this object to register external classes like custom textures or material
-     * to allow the laoders to instantiate them
+     * to allow the loaders to instantiate them
      */
     public static RegisteredExternalClasses: { [key: string]: Object } = {};
 

+ 1 - 1
src/Misc/logger.ts

@@ -1,5 +1,5 @@
 /**
- * Logger used througouht the application to allow configuration of
+ * Logger used throughout the application to allow configuration of
  * the log level required for the messages.
  */
 export class Logger {

+ 1 - 1
src/Misc/minMaxReducer.ts

@@ -187,7 +187,7 @@ export class MinMaxReducer {
     /**
      * Activates the reduction computation.
      * When activated, the observers registered in onAfterReductionPerformed are
-     * called after the compuation is performed
+     * called after the computation is performed
      */
     public activate(): void {
         if (this._onAfterUnbindObserver || !this._sourceTexture) {

+ 1 - 1
src/Misc/observable.ts

@@ -461,7 +461,7 @@ export class Observable<T> {
     /**
      * Does this observable handles observer registered with a given mask
      * @param mask defines the mask to be tested
-     * @return whether or not one observer registered with the given mask is handeled
+     * @return whether or not one observer registered with the given mask is handled
     **/
     public hasSpecificMask(mask: number = -1): boolean {
         for (var obs of this._observers) {

+ 3 - 3
src/Misc/sceneOptimizer.ts

@@ -471,7 +471,7 @@ export class SceneOptimizerOptions {
     /**
      * Creates a new list of options used by SceneOptimizer
      * @param targetFrameRate defines the target frame rate to reach (60 by default)
-     * @param trackerDuration defines the interval between two checkes (2000ms by default)
+     * @param trackerDuration defines the interval between two checks (2000ms by default)
      */
     constructor(
         /**
@@ -479,7 +479,7 @@ export class SceneOptimizerOptions {
          */
         public targetFrameRate: number = 60,
         /**
-         * Defines the interval between two checkes (2000ms by default)
+         * Defines the interval between two checks (2000ms by default)
          */
         public trackerDuration: number = 2000) {
     }
@@ -739,7 +739,7 @@ export class SceneOptimizer implements IDisposable {
 
     /**
      * Start the optimizer. By default it will try to reach a specific framerate
-     * but if the optimizer is set with improvementMode === true then it will run all optimiatiation while frame rate is above the target frame rate
+     * but if the optimizer is set with improvementMode === true then it will run all optimization while frame rate is above the target frame rate
      */
     public start() {
         if (this._isRunning) {

+ 2 - 2
src/Misc/smartArray.ts

@@ -1,6 +1,6 @@
 /**
  * Defines an array and its length.
- * It can be helpfull to group result from both Arrays and smart arrays in one structure.
+ * It can be helpful to group result from both Arrays and smart arrays in one structure.
  */
 export interface ISmartArrayLike<T> {
     /**
@@ -178,7 +178,7 @@ export class SmartArrayNoDuplicate<T> extends SmartArray<T> {
 
     /**
      * Concats the active data with a given array.
-     * This ensures no dupplicate will be present in the result.
+     * This ensures no duplicate will be present in the result.
      * @param array defines the data to concatenate with.
      */
     public concatWithNoDuplicate(array: any): void {

+ 1 - 1
src/Misc/stringTools.ts

@@ -78,7 +78,7 @@ export class StringTools {
     }
 
     /**
-    * Converts a number to string and pads with preceeding zeroes until it is of specified length.
+    * Converts a number to string and pads with preceding zeroes until it is of specified length.
     * @param num the number to convert and pad
     * @param length the expected length of the string
     * @returns the padded string

+ 1 - 1
src/Misc/textureTools.ts

@@ -81,7 +81,7 @@ export class TextureTools {
      * @param internalTexture the texture to encode
      * @param scene the scene hosting the texture
      * @param type type of the output texture. If not provided, use the one from internalTexture
-     * @param samplingMode sampling moode to use to sample the source texture. If not provided, use the one from internalTexture
+     * @param samplingMode sampling mode to use to sample the source texture. If not provided, use the one from internalTexture
      * @param format format of the output texture. If not provided, use the one from internalTexture
      * @return a promise with the internalTexture having its texture replaced by the result of the processing
      */

+ 4 - 4
src/Misc/tools.ts

@@ -94,7 +94,7 @@ export class Tools {
 
     /**
      * Use this object to register external classes like custom textures or material
-     * to allow the laoders to instantiate them
+     * to allow the loaders to instantiate them
      */
     public static get RegisteredExternalClasses() {
         return InstantiationTools.RegisteredExternalClasses;
@@ -1120,7 +1120,7 @@ export class Tools {
     public static StartPerformanceCounter: (counterName: string, condition?: boolean) => void = Tools._StartPerformanceCounterDisabled;
 
     /**
-     * Ends a specific performance coutner
+     * Ends a specific performance counter
      */
     public static EndPerformanceCounter: (counterName: string, condition?: boolean) => void = Tools._EndPerformanceCounterDisabled;
 
@@ -1255,7 +1255,7 @@ export class AsyncLoop {
      * Constructor.
      * @param iterations the number of iterations.
      * @param func the function to run each iteration
-     * @param successCallback the callback that will be called upon succesful execution
+     * @param successCallback the callback that will be called upon successful execution
      * @param offset starting offset.
      */
     constructor(
@@ -1299,7 +1299,7 @@ export class AsyncLoop {
      * Create and run an async loop.
      * @param iterations the number of iterations.
      * @param fn the function to run each iteration
-     * @param successCallback the callback that will be called upon succesful execution
+     * @param successCallback the callback that will be called upon successful execution
      * @param offset starting offset.
      * @returns the created async loop object
      */

+ 1 - 1
src/Misc/trajectoryClassifier.ts

@@ -702,7 +702,7 @@ class TrajectoryClass {
      * TrajectoryDescriptor describes a Trajectory that is considered to be the same as
      * the class represented by this DescribedTrajectory.
      * @param descriptor the descriptor to be costed
-     * @returns cost of the match, which is a nonnegative similarity metric where larger values indicate dissimiliarity
+     * @returns cost of the match, which is a nonnegative similarity metric where larger values indicate dissimilarity
      */
     public getMatchCost(descriptor: TrajectoryDescriptor): number {
         return descriptor.distance(this._descriptors[this._centroidIdx]) / this._averageDistance;

+ 1 - 1
src/Misc/videoRecorder.ts

@@ -43,7 +43,7 @@ interface MediaRecorderConstructor {
 }
 
 /**
- * MediaRecoreder object available in some browsers.
+ * MediaRecorder object available in some browsers.
  */
 declare var MediaRecorder: MediaRecorderConstructor;
 

+ 1 - 1
src/Misc/virtualJoystick.ts

@@ -269,7 +269,7 @@ export class VirtualJoystick {
     }
 
     /**
-     * Defines joystick sensibility (ie. the ratio beteen a physical move and virtual joystick position change)
+     * Defines joystick sensibility (ie. the ratio between a physical move and virtual joystick position change)
      * @param newJoystickSensibility defines the new sensibility
      */
     public setJoystickSensibility(newJoystickSensibility: number) {