Quellcode durchsuchen

add missing docs

Trevor Baron vor 6 Jahren
Ursprung
Commit
741406886c
2 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen
  1. 3 1
      src/Materials/Textures/Loaders/basisTextureLoader.ts
  2. 5 5
      src/Misc/basis.ts

+ 3 - 1
src/Materials/Textures/Loaders/basisTextureLoader.ts

@@ -6,6 +6,9 @@ import { _TimeToken } from "../../../Instrumentation/timeToken";
 import { _DepthCullingState, _StencilState, _AlphaState } from "../../../States/index";
 import { BasisTools } from "../../../Misc/basis";
 
+/**
+ * Loader for .basis file format
+ */
 export class _BasisTextureLoader implements IInternalTextureLoader {
     /**
      * Defines wether the loader supports cascade loading the different faces.
@@ -22,7 +25,6 @@ export class _BasisTextureLoader implements IInternalTextureLoader {
      * @returns true if the loader can load the specified file
      */
     public canLoad(extension: string, textureFormatInUse: Nullable<string>, fallback: Nullable<InternalTexture>, isBase64: boolean, isBuffer: boolean): boolean {
-        console.log("basis try");
         return extension.indexOf(".basis") === 0;
     }
 

+ 5 - 5
src/Misc/basis.ts

@@ -196,11 +196,11 @@ export class BasisTools {
      * An unoptimized version of dxtToRgb565.  Also, the floating
      * point math used to compute the colors actually results in
      * slightly different colors compared to hardware DXT decoders.
-     * @param {Uint8Array} src
-     * @param {number} srcByteOffset
-     * @param {number} width
-     * @param {number} height
-     * @return {Uint16Array} dst
+     * @param src dxt src pixels
+     * @param srcByteOffset offset for the start of src
+     * @param  width aligned width of the image
+     * @param  height aligned height of the image
+     * @return the converted pixels
      */
     public static ConvertDxtToRgb565(src: Uint16Array, srcByteOffset: number, width: number, height: number): Uint16Array {
         var c = new Uint16Array(4);