Skip to content

Commit 498abcf

Browse files
committed
Ensure LightShadow.mapSize changes update map
1 parent 68bcd3b commit 498abcf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

js/src/lights/LightShadow.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var _ = require('underscore');
2+
var LightShadowAutogen = require('./LightShadow.autogen').LightShadowModel;
3+
4+
var LightShadowModel = LightShadowAutogen.extend({
5+
6+
syncToThreeObj: function(force) {
7+
if (force || this.hasChanged('mapSize')) {
8+
// The map needs to be recreated!
9+
this.obj.map = null;
10+
}
11+
LightShadowAutogen.prototype.syncToThreeObj.apply(this, arguments);
12+
}
13+
14+
});
15+
16+
module.exports = {
17+
LightShadowModel: LightShadowModel,
18+
};

0 commit comments

Comments
 (0)