diff --git a/src/core/const.js b/src/core/const.js index efccde4..6d09378 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -1,5 +1,3 @@ -import canUploadSameBuffer from './utils/canUploadSameBuffer'; - /** * String of the current PIXI version. * @@ -298,16 +296,3 @@ LINEAR_VERTICAL: 0, LINEAR_HORIZONTAL: 1, }; - -// TODO: maybe change to SPRITE.BATCH_SIZE: 2000 -// TODO: maybe add PARTICLE.BATCH_SIZE: 15000 - -/** - * Can we upload the same buffer in a single frame? - * - * @static - * @constant - * @memberof PIXI - * @type {boolean} - */ -export const CAN_UPLOAD_SAME_BUFFER = canUploadSameBuffer(); diff --git a/src/core/const.js b/src/core/const.js index efccde4..6d09378 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -1,5 +1,3 @@ -import canUploadSameBuffer from './utils/canUploadSameBuffer'; - /** * String of the current PIXI version. * @@ -298,16 +296,3 @@ LINEAR_VERTICAL: 0, LINEAR_HORIZONTAL: 1, }; - -// TODO: maybe change to SPRITE.BATCH_SIZE: 2000 -// TODO: maybe add PARTICLE.BATCH_SIZE: 15000 - -/** - * Can we upload the same buffer in a single frame? - * - * @static - * @constant - * @memberof PIXI - * @type {boolean} - */ -export const CAN_UPLOAD_SAME_BUFFER = canUploadSameBuffer(); diff --git a/src/core/settings.js b/src/core/settings.js index 8cfab77..ac5df51 100644 --- a/src/core/settings.js +++ b/src/core/settings.js @@ -1,4 +1,5 @@ import maxRecommendedTextures from './utils/maxRecommendedTextures'; +import canUploadSameBuffer from './utils/canUploadSameBuffer'; /** * @namespace PIXI.settings @@ -56,6 +57,9 @@ */ SPRITE_MAX_TEXTURES: maxRecommendedTextures(32), + // TODO: maybe change to SPRITE.BATCH_SIZE: 2000 + // TODO: maybe add PARTICLE.BATCH_SIZE: 15000 + /** * The default sprite batch size. * @@ -180,4 +184,14 @@ */ PRECISION: 'mediump', + /** + * Can we upload the same buffer in a single frame? + * + * @static + * @constant + * @memberof PIXI + * @type {boolean} + */ + CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(), + }; diff --git a/src/core/const.js b/src/core/const.js index efccde4..6d09378 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -1,5 +1,3 @@ -import canUploadSameBuffer from './utils/canUploadSameBuffer'; - /** * String of the current PIXI version. * @@ -298,16 +296,3 @@ LINEAR_VERTICAL: 0, LINEAR_HORIZONTAL: 1, }; - -// TODO: maybe change to SPRITE.BATCH_SIZE: 2000 -// TODO: maybe add PARTICLE.BATCH_SIZE: 15000 - -/** - * Can we upload the same buffer in a single frame? - * - * @static - * @constant - * @memberof PIXI - * @type {boolean} - */ -export const CAN_UPLOAD_SAME_BUFFER = canUploadSameBuffer(); diff --git a/src/core/settings.js b/src/core/settings.js index 8cfab77..ac5df51 100644 --- a/src/core/settings.js +++ b/src/core/settings.js @@ -1,4 +1,5 @@ import maxRecommendedTextures from './utils/maxRecommendedTextures'; +import canUploadSameBuffer from './utils/canUploadSameBuffer'; /** * @namespace PIXI.settings @@ -56,6 +57,9 @@ */ SPRITE_MAX_TEXTURES: maxRecommendedTextures(32), + // TODO: maybe change to SPRITE.BATCH_SIZE: 2000 + // TODO: maybe add PARTICLE.BATCH_SIZE: 15000 + /** * The default sprite batch size. * @@ -180,4 +184,14 @@ */ PRECISION: 'mediump', + /** + * Can we upload the same buffer in a single frame? + * + * @static + * @constant + * @memberof PIXI + * @type {boolean} + */ + CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(), + }; diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index dd42d0a..c678301 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -4,12 +4,11 @@ import generateMultiTextureShader from './generateMultiTextureShader'; import checkMaxIfStatmentsInShader from '../../renderers/webgl/utils/checkMaxIfStatmentsInShader'; import Buffer from './BatchBuffer'; -import { CAN_UPLOAD_SAME_BUFFER } from '../../const'; import settings from '../../settings'; import glCore from 'pixi-gl-core'; import bitTwiddle from 'bit-twiddle'; -const { SPRITE_BATCH_SIZE, SPRITE_MAX_TEXTURES } = settings; +const { SPRITE_BATCH_SIZE, SPRITE_MAX_TEXTURES, CAN_UPLOAD_SAME_BUFFER } = settings; let TICK = 0; let TEXTURE_TICK = 0;