sample/assets/js/babylon.max.js
function UniformBuffer(engine, data, dynamic) {
            this._engine = engine;
            this._noUBO = !engine.supportsUniformBuffers;
            this._dynamic = dynamic;
            this._data = data || [];
            this._uniformLocations = {};
            this._uniformSizes = {};
            this._uniformLocationPointer = 0;
            this._needSync = false;
            if (this._noUBO) {
                this.updateMatrix3x3 = this._updateMatrix3x3ForEffect;
                this.updateMatrix2x2 = this._updateMatrix2x2ForEffect;
                this.updateFloat = this._updateFloatForEffect;
                this.updateFloat2 = this._updateFloat2ForEffect;
                this.updateFloat3 = this._updateFloat3ForEffect;
                this.updateFloat4 = this._updateFloat4ForEffect;
                this.updateMatrix = this._updateMatrixForEffect;
                this.updateVector3 = this._updateVector3ForEffect;
                this.updateVector4 = this._updateVector4ForEffect;
                this.updateColor3 = this._updateColor3ForEffect;
                this.updateColor4 = this._updateColor4ForEffect;
            }
            else {
                this._engine._uniformBuffers.push(this);
                this.updateMatrix3x3 = this._updateMatrix3x3ForUniform;
                this.updateMatrix2x2 = this._updateMatrix2x2ForUniform;
                this.updateFloat = this._updateFloatForUniform;
                this.updateFloat2 = this._updateFloat2ForUniform;
                this.updateFloat3 = this._updateFloat3ForUniform;
                this.updateFloat4 = this._updateFloat4ForUniform;
                this.updateMatrix = this._updateMatrixForUniform;
                this.updateVector3 = this._updateVector3ForUniform;
                this.updateVector4 = this._updateVector4ForUniform;
                this.updateColor3 = this._updateColor3ForUniform;
                this.updateColor4 = this._updateColor4ForUniform;
            }
        }
function UniformBuffer(engine, data, dynamic) {
            this._engine = engine;
            this._noUBO = !engine.supportsUniformBuffers;
            this._dynamic = dynamic;
            this._data = data || [];
            this._uniformLocations = {};
            this._uniformSizes = {};
            this._uniformLocationPointer = 0;
            this._needSync = false;
            if (this._noUBO) {
                this.updateMatrix3x3 = this._updateMatrix3x3ForEffect;
                this.updateMatrix2x2 = this._updateMatrix2x2ForEffect;
                this.updateFloat = this._updateFloatForEffect;
                this.updateFloat2 = this._updateFloat2ForEffect;
                this.updateFloat3 = this._updateFloat3ForEffect;
                this.updateFloat4 = this._updateFloat4ForEffect;
                this.updateMatrix = this._updateMatrixForEffect;
                this.updateVector3 = this._updateVector3ForEffect;
                this.updateVector4 = this._updateVector4ForEffect;
                this.updateColor3 = this._updateColor3ForEffect;
                this.updateColor4 = this._updateColor4ForEffect;
            }
            else {
                this._engine._uniformBuffers.push(this);
                this.updateMatrix3x3 = this._updateMatrix3x3ForUniform;
                this.updateMatrix2x2 = this._updateMatrix2x2ForUniform;
                this.updateFloat = this._updateFloatForUniform;
                this.updateFloat2 = this._updateFloat2ForUniform;
                this.updateFloat3 = this._updateFloat3ForUniform;
                this.updateFloat4 = this._updateFloat4ForUniform;
                this.updateMatrix = this._updateMatrixForUniform;
                this.updateVector3 = this._updateVector3ForUniform;
                this.updateVector4 = this._updateVector4ForUniform;
                this.updateColor3 = this._updateColor3ForUniform;
                this.updateColor4 = this._updateColor4ForUniform;
            }
        }
function UniformBuffer ( engine , data , dynamic ) { this . _engine = engine ; this . _noUBO = ! engine . supportsUniformBuffers ; this . _dynamic = dynamic ; this . _data = data || [ ] ; this . _uniformLocations = { } ; this . _uniformSizes = { } ; this . _uniformLocationPointer = 0 ; this . _needSync = false ; if ( this . _noUBO ) { this . updateMatrix3x3 = this . _updateMatrix3x3ForEffect ; this . updateMatrix2x2 = this . _updateMatrix2x2ForEffect ; this . updateFloat = this . _updateFloatForEffect ; this . updateFloat2 = this . _updateFloat2ForEffect ; this . updateFloat3 = this . _updateFloat3ForEffect ; this . updateFloat4 = this . _updateFloat4ForEffect ; this . updateMatrix = this . _updateMatrixForEffect ; this . updateVector3 = this . _updateVector3ForEffect ; this . updateVector4 = this . _updateVector4ForEffect ; this . updateColor3 = this . _updateColor3ForEffect ; this . updateColor4 = this . _updateColor4ForEffect ; } else { this . _engine . _uniformBuffers . push ( this ) ; this . updateMatrix3x3 = this . _updateMatrix3x3ForUniform ; this . updateMatrix2x2 = this . _updateMatrix2x2ForUniform ; this . updateFloat = this . _updateFloatForUniform ; this . updateFloat2 = this . _updateFloat2ForUniform ; this . updateFloat3 = this . _updateFloat3ForUniform ; this . updateFloat4 = this . _updateFloat4ForUniform ; this . updateMatrix = this . _updateMatrixForUniform ; this . updateVector3 = this . _updateVector3ForUniform ; this . updateVector4 = this . _updateVector4ForUniform ; this . updateColor3 = this . _updateColor3ForUniform ; this . updateColor4 = this . _updateColor4ForUniform ; } }
Uniform buffer objects.

Handles blocks of uniform on the GPU.

If WebGL 2 is not available, this class falls back on traditionnal setUniformXXX calls.

For more information, please refer to :
https://www.khronos.org/opengl/wiki/Uniform_Buffer_Object
Uniform buffer objects .