literalMap to flatMap in Renderer part

This commit is contained in:
PP
2018-03-02 11:02:25 +08:00
parent d9a7e80246
commit 24cdfdbcb6
3 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -23,8 +23,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
var JS = require('../core/platform/js');
var JS = require('../core/platform/js');
var Audio = require('./CCAudio');
var instanceId = 0;
@@ -33,7 +33,7 @@ const gfx = renderEngine.gfx;
const SpriteMaterial = renderEngine.SpriteMaterial;
const RenderData = renderEngine.RenderData;
let _sharedMaterials = {};
let _sharedMaterials = js.createMap();
let _slotColor = cc.color(0, 0, 255, 255);
let _boneColor = cc.color(255, 0, 0, 255);
+6 -4
View File
@@ -5,6 +5,8 @@
* Released under the MIT License.
*/
var JS = cc.js;
module.exports = (function () {
'use strict';
@@ -7696,7 +7698,7 @@ module.exports = (function () {
* ])
*/
constructor(infos) {
this._attr2el = {};
this._attr2el = JS.createMap(true);
this._elements = [];
this._bytes = 0;
@@ -12736,7 +12738,7 @@ module.exports = (function () {
this._precision = `precision highp float;\n`;
// register templates
this._templates = {};
this._templates = JS.createMap();
for (let i = 0; i < templates.length; ++i) {
let tmpl = templates[i];
this.define(tmpl.name, tmpl.vert, tmpl.frag, tmpl.defines);
@@ -12746,7 +12748,7 @@ module.exports = (function () {
this._chunks = {};
Object.assign(this._chunks, chunks);
this._cache = {};
this._cache = JS.createMap(true);
}
/**
@@ -14224,7 +14226,7 @@ module.exports = (function () {
class MaterialUtil {
constructor () {
this._cache = {};
this._cache = JS.createMap(true);
}
get (key) {