Skip to content

Commit 5932457

Browse files
committed
Add a config to merge keys into scene InjectionMap
This way the defaults of the scene injection map are kept and the user is able to merge with those defaults.
1 parent 3c5d3db commit 5932457

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/scene/Settings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
var CONST = require('./const');
88
var GetValue = require('../utils/object/GetValue');
9+
var Merge = require('../utils/object/Merge');
910
var InjectionMap = require('./InjectionMap');
1011

1112
// TODO 22/03/2018 Fix "plugins" type
@@ -87,7 +88,7 @@ var Settings = {
8788

8889
// Scene Property Injection Map
8990

90-
map: GetValue(config, 'map', InjectionMap),
91+
map: GetValue(config, 'map', Merge(InjectionMap, GetValue(config, 'mapAdd', {}))),
9192

9293
// Physics
9394

0 commit comments

Comments
 (0)