File tree 5 files changed +20
-10
lines changed
5 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 168
168
"style-loader" : " ^1.0.0" ,
169
169
"stylelint" : " ^11.0.0" ,
170
170
"stylelint-config-standard" : " ^19.0.0" ,
171
- "three" : " =0.108 .0" ,
171
+ "three" : " 0.109 .0" ,
172
172
"toastr" : " ^2.1.4" ,
173
173
"uglify-js" : " ^3.6.0" ,
174
174
"url-loader" : " ^2.1.0" ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import rollupPluginReplace from 'rollup-plugin-replace';
6
6
import rollupPluginNodeResolve from 'rollup-plugin-node-resolve' ;
7
7
import rollupPluginString from 'rollup-plugin-string' ;
8
8
9
+ import path from 'path' ;
9
10
import version from './tools/version' ;
10
11
import packageJson from './package.json' ;
11
12
@@ -51,11 +52,12 @@ export default {
51
52
rollupPluginBabel ( {
52
53
runtimeHelpers : true ,
53
54
exclude : [
54
- '. /node_modules/**' ,
55
+ / n o d e _ m o d u l e s [ \\ / ] (? ! t h r e e ) / ,
55
56
'./vendor/js/**' ,
56
57
'./src/utils/SelectionParser' ,
57
58
'./src/utils/MiewCLIParser.js' ,
58
59
] ,
60
+ extends : path . join ( __dirname , '/.babelrc' ) ,
59
61
} ) ,
60
62
61
63
] ,
Original file line number Diff line number Diff line change @@ -185,8 +185,11 @@ class Residue {
185
185
const vectorB = prevLeadPos . clone ( ) . sub ( prevWingPos ) ;
186
186
vectorB . crossVectors ( vectorA , vectorB ) ;
187
187
vectorB . crossVectors ( vectorA , vectorB ) . normalize ( ) ;
188
- if ( prevWing !== null && Math . abs ( prevWing . angleTo ( vectorB ) ) > Math . PI / 2 ) {
189
- vectorB . negate ( ) ;
188
+ if ( prevWing !== null && prevWing . length ( ) > 0.0001 ) {
189
+ const needToNegate = vectorB . length ( ) > 0.0001 && Math . abs ( prevWing . angleTo ( vectorB ) ) > Math . PI / 2 ;
190
+ if ( needToNegate ) {
191
+ vectorB . negate ( ) ;
192
+ }
190
193
}
191
194
return vectorB ;
192
195
}
Original file line number Diff line number Diff line change @@ -22,8 +22,13 @@ const configure = (prod) => ({
22
22
module : {
23
23
rules : [ {
24
24
test : / \. j s $ / ,
25
- exclude : / ( n o d e _ m o d u l e s | v e n d o r ) / ,
26
- use : [ 'babel-loader' ] ,
25
+ exclude : / ( n o d e _ m o d u l e s [ \\ / ] (? ! t h r e e ) ) | v e n d o r / ,
26
+ use : {
27
+ loader : 'babel-loader' ,
28
+ options : {
29
+ extends : path . join ( __dirname , '/.babelrc' ) ,
30
+ } ,
31
+ } ,
27
32
} , {
28
33
test : / \. [ s p ] ? c s s $ / ,
29
34
use : [
Original file line number Diff line number Diff line change @@ -8812,10 +8812,10 @@ text-table@^0.2.0:
8812
8812
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
8813
8813
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
8814
8814
8815
- three@=0.108 .0 :
8816
- version "0.108 .0"
8817
- resolved "https://registry.yarnpkg.com/three/-/three-0.108 .0.tgz#53d26597c7932f214bb43f4655e566d2058143b5 "
8818
- integrity sha512-d1ysIXwi8qTlbmMwrTxi5pYiiYIflEr0e48krP0LAY8ndS8c6fkLHn6NvRT+o76/Fs9PBLxFViuI62iGVWwwlg ==
8815
+ three@0.109 .0 :
8816
+ version "0.109 .0"
8817
+ resolved "https://registry.yarnpkg.com/three/-/three-0.109 .0.tgz#611c9ef860d10bd107695cead6c6abcd2422e5fd "
8818
+ integrity sha512-XT99T3Hvgh2CEvwPdHYEunNE+clLK6KiT1U8En7YOgIqTUw4MrLeIc8zxQAJ6wbP8hhJaY5+Cff3jwBPpBa0gA ==
8819
8819
8820
8820
through2@^2.0.0 :
8821
8821
version "2.0.5"
You can’t perform that action at this time.
0 commit comments