File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,30 @@ var GeometryModel = AutogenGeometryModel.extend({
40
40
41
41
} ,
42
42
43
+ onChange : function ( model , options ) {
44
+ if ( options !== 'pushFromThree' ) {
45
+ if ( this . hasChanged ( 'vertices' ) ) {
46
+ this . obj . verticesNeedUpdate = true ;
47
+ }
48
+ if ( this . hasChanged ( 'colors' ) ) {
49
+ this . obj . colorsNeedUpdate = true ;
50
+ }
51
+ if ( this . hasChanged ( 'faces' ) ) {
52
+ this . obj . elementsNeedUpdate = true ;
53
+ }
54
+ if ( this . hasChanged ( 'faceVertexUvs' ) ) {
55
+ this . obj . uvsNeedUpdate = true ;
56
+ }
57
+ if ( this . hasChanged ( 'normals' ) ) {
58
+ this . obj . normalsNeedUpdate = true ;
59
+ }
60
+ if ( this . hasChanged ( 'morphTargets' ) || this . hasChanged ( 'morphNormals' ) ) {
61
+ this . obj . morphTargetsNeedUpdate = true ;
62
+ }
63
+ }
64
+ AutogenGeometryModel . prototype . onChange . call ( this , model , options ) ;
65
+ }
66
+
43
67
} ) ;
44
68
45
69
module . exports = {
You can’t perform that action at this time.
0 commit comments