Pryme8 %!s(int64=5) %!d(string=hai) anos
pai
achega
7f04e5c98a

+ 3 - 0
src/Materials/Textures/Packer/frame.ts

@@ -53,6 +53,9 @@ export class TexturePackerFrame implements ITexturePackerFrame{
 
     /**
     * Initializes a texture package frame.
+    * @param id The numerical frame identifier
+    * @param scale Scalar Vector2 for UV frame
+    * @param offset Vector2 for the frame position in UV units.
     * @returns TexturePackerFrame
     */
     constructor(id: number, scale: Vector2, offset: Vector2) {

+ 2 - 2
src/Materials/Textures/Packer/packer.ts

@@ -147,7 +147,7 @@ export class TexturePacker{
         this.options.layout = this.options.layout || TexturePacker.LAYOUT_STRIP;
 
         if (this.options.layout === TexturePacker.LAYOUT_COLNUM) {
-            this.options.colcount = this.options.colcount || 4;
+            this.options.colcount = this.options.colcount || 8;
         }
 
         this.options.updateInputMeshes = this.options.updateInputMeshes || true;
@@ -207,7 +207,7 @@ export class TexturePacker{
                 for (let i = 0; i < this.meshes.length; i++) {
 
                     let mesh = this.meshes[i];
-                    let material: Nullable<Material> | Material = mesh.material;
+                    let material: Nullable<Material> = mesh.material;
 
                     if (!material) {
                         return new Error('Mesh has no Material assigned!');

+ 2 - 2
src/Sprites/spriteManager.ts

@@ -276,7 +276,7 @@ export class SpriteManager implements ISpriteManager {
             let xmlhttp = new XMLHttpRequest();
             xmlhttp.open("GET", jsonUrl, true);
             xmlhttp.onerror = () => {
-                Logger.Error("Unable to Load Sprite JSON Data. Spritesheet managed with constant cell size.");
+                Logger.Error("JSON ERROR: Unable to load JSON file.");
                 this._fromPacked = false;
                 this._packedAndReady = false;
             };
@@ -291,7 +291,7 @@ export class SpriteManager implements ISpriteManager {
                 catch (e) {
                     this._fromPacked = false;
                     this._packedAndReady = false;
-                    throw new Error("Invalid JSON from file. Spritesheet managed with constant cell size.");
+                    throw new Error("Invalid JSON format. Please check documentation for format specifications.");
                 }
             };
             xmlhttp.send();