From d4810f81871d3185455da5dc026ec190b5ba5b49 Mon Sep 17 00:00:00 2001 From: posidron <1614333+posidron@users.noreply.github.com> Date: Tue, 18 Sep 2018 04:26:11 +0200 Subject: [PATCH] Fix standard --- lib/make/webgl.js | 58 ++++++++++++++++++++++---------------------- lib/utils/objects.js | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/lib/make/webgl.js b/lib/make/webgl.js index 6a4cce0..76d56dd 100644 --- a/lib/make/webgl.js +++ b/lib/make/webgl.js @@ -8,35 +8,35 @@ const random = require('../random') class webgl extends make { static get internalFormat () { return { - 'RGB': {format: 'RGB', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_5_6_5']}, - 'RGBA': {format: 'RGBA', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_4_4_4_4', 'UNSIGNED_SHORT_5_5_5_1']}, - 'LUMINANCE_ALPHA': {format: 'LUMINANCE_ALPHA', type: ['UNSIGNED_BYTE']}, - 'LUMINANCE': {format: 'LUMINANCE', type: ['UNSIGNED_BYTE']}, - 'ALPHA': {format: 'ALPHA', type: ['UNSIGNED_BYTE']}, - 'R8': {format: 'RED', type: ['UNSIGNED_BYTE']}, - 'R16F': {format: 'RED', type: ['HALF_FLOAT', 'FLOAT']}, - 'R32F': {format: 'RED', type: ['FLOAT']}, - 'R8UI': {format: 'RED_INTEGER', type: ['UNSIGNED_BYTE']}, - 'RG8': {format: 'RG', type: ['UNSIGNED_BYTE']}, - 'RG16F': {format: 'RG', type: ['HALF_FLOAT', 'FLOAT']}, - 'RG32F': {format: 'RG', type: ['FLOAT']}, - 'RG8UI': {format: 'RG_INTEGER', type: ['UNSIGNED_BYTE']}, - 'RGB8': {format: 'RGB', type: ['UNSIGNED_BYTE']}, - 'SRGB8': {format: 'RGB', type: ['UNSIGNED_BYTE']}, - 'RGB565': {format: 'RGB', type: ['RGB', 'UNSIGNED_BYTE', 'UNSIGNED_SHORT_5_6_5']}, - 'R11F_G11F_B10F': {format: 'RGB', type: ['UNSIGNED_INT_10F_11F_11F_REV', 'HALF_FLOAT', 'FLOAT']}, - 'RGB9_E5': {format: 'RGB', type: ['HALF_FLOAT', 'FLOAT']}, - 'RGB16F': {format: 'RGB', type: ['HALF_FLOAT', 'FLOAT']}, - 'RGB32F': {format: 'RGB', type: ['FLOAT']}, - 'RGB8UI': {format: 'RGB_INTEGER', type: ['UNSIGNED_BYTE']}, - 'RGBA8': {format: 'RGBA', type: ['UNSIGNED_BYTE']}, - 'SRGB8_ALPHA8': {format: 'RGBA', type: ['UNSIGNED_BYTE']}, - 'RGB5_A1': {format: 'RGBA', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_5_5_5_1']}, - 'RGB10_A2': {format: 'RGBA', type: ['UNSIGNED_INT_2_10_10_10_REV']}, - 'RGBA4': {format: 'RGBA', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_4_4_4_4']}, - 'RGBA16F': {format: 'RGBA', type: ['HALF_FLOAT', 'FLOAT']}, - 'RGBA32F': {format: 'RGBA', type: ['FLOAT']}, - 'RGBA8UI': {format: 'RGBA_INTEGER', type: ['UNSIGNED_BYTE']} + 'RGB': { format: 'RGB', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_5_6_5'] }, + 'RGBA': { format: 'RGBA', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_4_4_4_4', 'UNSIGNED_SHORT_5_5_5_1'] }, + 'LUMINANCE_ALPHA': { format: 'LUMINANCE_ALPHA', type: ['UNSIGNED_BYTE'] }, + 'LUMINANCE': { format: 'LUMINANCE', type: ['UNSIGNED_BYTE'] }, + 'ALPHA': { format: 'ALPHA', type: ['UNSIGNED_BYTE'] }, + 'R8': { format: 'RED', type: ['UNSIGNED_BYTE'] }, + 'R16F': { format: 'RED', type: ['HALF_FLOAT', 'FLOAT'] }, + 'R32F': { format: 'RED', type: ['FLOAT'] }, + 'R8UI': { format: 'RED_INTEGER', type: ['UNSIGNED_BYTE'] }, + 'RG8': { format: 'RG', type: ['UNSIGNED_BYTE'] }, + 'RG16F': { format: 'RG', type: ['HALF_FLOAT', 'FLOAT'] }, + 'RG32F': { format: 'RG', type: ['FLOAT'] }, + 'RG8UI': { format: 'RG_INTEGER', type: ['UNSIGNED_BYTE'] }, + 'RGB8': { format: 'RGB', type: ['UNSIGNED_BYTE'] }, + 'SRGB8': { format: 'RGB', type: ['UNSIGNED_BYTE'] }, + 'RGB565': { format: 'RGB', type: ['RGB', 'UNSIGNED_BYTE', 'UNSIGNED_SHORT_5_6_5'] }, + 'R11F_G11F_B10F': { format: 'RGB', type: ['UNSIGNED_INT_10F_11F_11F_REV', 'HALF_FLOAT', 'FLOAT'] }, + 'RGB9_E5': { format: 'RGB', type: ['HALF_FLOAT', 'FLOAT'] }, + 'RGB16F': { format: 'RGB', type: ['HALF_FLOAT', 'FLOAT'] }, + 'RGB32F': { format: 'RGB', type: ['FLOAT'] }, + 'RGB8UI': { format: 'RGB_INTEGER', type: ['UNSIGNED_BYTE'] }, + 'RGBA8': { format: 'RGBA', type: ['UNSIGNED_BYTE'] }, + 'SRGB8_ALPHA8': { format: 'RGBA', type: ['UNSIGNED_BYTE'] }, + 'RGB5_A1': { format: 'RGBA', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_5_5_5_1'] }, + 'RGB10_A2': { format: 'RGBA', type: ['UNSIGNED_INT_2_10_10_10_REV'] }, + 'RGBA4': { format: 'RGBA', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_4_4_4_4'] }, + 'RGBA16F': { format: 'RGBA', type: ['HALF_FLOAT', 'FLOAT'] }, + 'RGBA32F': { format: 'RGBA', type: ['FLOAT'] }, + 'RGBA8UI': { format: 'RGBA_INTEGER', type: ['UNSIGNED_BYTE'] } } } diff --git a/lib/utils/objects.js b/lib/utils/objects.js index 698a671..29ecaf7 100644 --- a/lib/utils/objects.js +++ b/lib/utils/objects.js @@ -20,7 +20,7 @@ class Objects { if (!this.has(category)) { this.container[category] = [] } - this.container[category].push({type: category, name: member}) + this.container[category].push({ type: category, name: member }) ++this.counter return this.container[category].slice(-1)[0].name }