File tree 7 files changed +20
-18
lines changed
7 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 179
179
" webgl_math_obb" ,
180
180
" webgl_math_orientation_transform" ,
181
181
" webgl_mirror" ,
182
+ " webgl_modifier_curve" ,
183
+ " webgl_modifier_curve_instanced" ,
182
184
" webgl_modifier_edgesplit" ,
183
185
" webgl_modifier_simplifier" ,
184
186
" webgl_modifier_subdivision" ,
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 21
21
import * as THREE from "../build/three.module.js" ;
22
22
import { TransformControls } from "./jsm/controls/TransformControls.js" ;
23
23
import Stats from "./jsm/libs/stats.module.js" ;
24
- import { Flow } from "./jsm/misc /CurveModifier.js" ;
24
+ import { Flow } from "./jsm/modifiers /CurveModifier.js" ;
25
25
26
26
const ACTION_SELECT = 1 ,
27
27
ACTION_NONE = 0 ;
69
69
handle . position . copy ( handlePos ) ;
70
70
curveHandles . push ( handle ) ;
71
71
scene . add ( handle ) ;
72
-
72
+
73
73
}
74
74
75
75
const curve = new THREE . CatmullRomCurve3 (
128
128
flow = new Flow ( objectToCurve ) ;
129
129
flow . updateCurve ( 0 , curve ) ;
130
130
scene . add ( flow . object3D ) ;
131
-
131
+
132
132
} ) ;
133
-
133
+
134
134
//
135
135
136
136
renderer = new THREE . WebGLRenderer ( { antialias : true } ) ;
146
146
action = ACTION_SELECT ;
147
147
mouse . x = ( event . clientX / window . innerWidth ) * 2 - 1 ;
148
148
mouse . y = - ( event . clientY / window . innerHeight ) * 2 + 1 ;
149
-
149
+
150
150
} ,
151
151
false
152
152
) ;
162
162
flow . updateCurve ( 0 , curve ) ;
163
163
164
164
}
165
-
165
+
166
166
} ) ;
167
167
168
168
stats = new Stats ( ) ;
197
197
const target = intersects [ 0 ] . object ;
198
198
control . attach ( target ) ;
199
199
scene . add ( control ) ;
200
-
200
+
201
201
}
202
202
203
203
}
204
204
205
205
if ( flow ) {
206
206
207
207
flow . moveAlongCurve ( 0.001 ) ;
208
-
208
+
209
209
}
210
210
211
211
render ( ) ;
219
219
if ( mixer ) {
220
220
221
221
mixer . update ( delta ) ;
222
-
222
+
223
223
}
224
224
225
225
renderer . render ( scene , camera ) ;
Original file line number Diff line number Diff line change 21
21
import * as THREE from "../build/three.module.js" ;
22
22
import { TransformControls } from "./jsm/controls/TransformControls.js" ;
23
23
import Stats from "./jsm/libs/stats.module.js" ;
24
- import { InstancedFlow } from "./jsm/misc /CurveModifier.js" ;
24
+ import { InstancedFlow } from "./jsm/modifiers /CurveModifier.js" ;
25
25
26
26
const ACTION_SELECT = 1 ,
27
27
ACTION_NONE = 0 ;
96
96
curve,
97
97
line
98
98
} ;
99
-
99
+
100
100
} ) ;
101
101
102
102
155
155
flow . object3D . setColorAt ( i , new THREE . Color ( 0xffffff * Math . random ( ) ) ) ;
156
156
157
157
}
158
-
158
+
159
159
} ) ;
160
-
160
+
161
161
//
162
162
163
163
renderer = new THREE . WebGLRenderer ( { antialias : true } ) ;
173
173
action = ACTION_SELECT ;
174
174
mouse . x = ( event . clientX / window . innerWidth ) * 2 - 1 ;
175
175
mouse . y = - ( event . clientY / window . innerHeight ) * 2 + 1 ;
176
-
176
+
177
177
} ,
178
178
false
179
179
) ;
193
193
} ) ;
194
194
195
195
}
196
-
196
+
197
197
} ) ;
198
198
199
199
stats = new Stats ( ) ;
228
228
const target = intersects [ 0 ] . object ;
229
229
control . attach ( target ) ;
230
230
scene . add ( control ) ;
231
-
231
+
232
232
}
233
233
234
234
}
235
235
236
236
if ( flow ) {
237
237
238
238
flow . moveAlongCurve ( 0.001 ) ;
239
-
239
+
240
240
}
241
241
242
242
render ( ) ;
250
250
if ( mixer ) {
251
251
252
252
mixer . update ( delta ) ;
253
-
253
+
254
254
}
255
255
256
256
renderer . render ( scene , camera ) ;
You can’t perform that action at this time.
0 commit comments