Skip to content

Commit 39aca04

Browse files
committed
Examples: CurveModifier examples clean up.
1 parent 6d60606 commit 39aca04

7 files changed

+20
-18
lines changed

examples/files.json

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@
179179
"webgl_math_obb",
180180
"webgl_math_orientation_transform",
181181
"webgl_mirror",
182+
"webgl_modifier_curve",
183+
"webgl_modifier_curve_instanced",
182184
"webgl_modifier_edgesplit",
183185
"webgl_modifier_simplifier",
184186
"webgl_modifier_subdivision",
11.4 KB
Loading
Loading

examples/misc_curve_modifier.html renamed to examples/webgl_modifier_curve.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import * as THREE from "../build/three.module.js";
2222
import { TransformControls } from "./jsm/controls/TransformControls.js";
2323
import Stats from "./jsm/libs/stats.module.js";
24-
import { Flow } from "./jsm/misc/CurveModifier.js";
24+
import { Flow } from "./jsm/modifiers/CurveModifier.js";
2525

2626
const ACTION_SELECT = 1,
2727
ACTION_NONE = 0;
@@ -69,7 +69,7 @@
6969
handle.position.copy( handlePos );
7070
curveHandles.push( handle );
7171
scene.add( handle );
72-
72+
7373
}
7474

7575
const curve = new THREE.CatmullRomCurve3(
@@ -128,9 +128,9 @@
128128
flow = new Flow( objectToCurve );
129129
flow.updateCurve( 0, curve );
130130
scene.add( flow.object3D );
131-
131+
132132
} );
133-
133+
134134
//
135135

136136
renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -146,7 +146,7 @@
146146
action = ACTION_SELECT;
147147
mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
148148
mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
149-
149+
150150
},
151151
false
152152
);
@@ -162,7 +162,7 @@
162162
flow.updateCurve( 0, curve );
163163

164164
}
165-
165+
166166
} );
167167

168168
stats = new Stats();
@@ -197,15 +197,15 @@
197197
const target = intersects[ 0 ].object;
198198
control.attach( target );
199199
scene.add( control );
200-
200+
201201
}
202202

203203
}
204204

205205
if ( flow ) {
206206

207207
flow.moveAlongCurve( 0.001 );
208-
208+
209209
}
210210

211211
render();
@@ -219,7 +219,7 @@
219219
if ( mixer ) {
220220

221221
mixer.update( delta );
222-
222+
223223
}
224224

225225
renderer.render( scene, camera );

examples/misc_curve_modifier_instanced.html renamed to examples/webgl_modifier_curve_instanced.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import * as THREE from "../build/three.module.js";
2222
import { TransformControls } from "./jsm/controls/TransformControls.js";
2323
import Stats from "./jsm/libs/stats.module.js";
24-
import { InstancedFlow } from "./jsm/misc/CurveModifier.js";
24+
import { InstancedFlow } from "./jsm/modifiers/CurveModifier.js";
2525

2626
const ACTION_SELECT = 1,
2727
ACTION_NONE = 0;
@@ -96,7 +96,7 @@
9696
curve,
9797
line
9898
};
99-
99+
100100
} );
101101

102102

@@ -155,9 +155,9 @@
155155
flow.object3D.setColorAt( i, new THREE.Color( 0xffffff * Math.random() ) );
156156

157157
}
158-
158+
159159
} );
160-
160+
161161
//
162162

163163
renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -173,7 +173,7 @@
173173
action = ACTION_SELECT;
174174
mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
175175
mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
176-
176+
177177
},
178178
false
179179
);
@@ -193,7 +193,7 @@
193193
} );
194194

195195
}
196-
196+
197197
} );
198198

199199
stats = new Stats();
@@ -228,15 +228,15 @@
228228
const target = intersects[ 0 ].object;
229229
control.attach( target );
230230
scene.add( control );
231-
231+
232232
}
233233

234234
}
235235

236236
if ( flow ) {
237237

238238
flow.moveAlongCurve( 0.001 );
239-
239+
240240
}
241241

242242
render();
@@ -250,7 +250,7 @@
250250
if ( mixer ) {
251251

252252
mixer.update( delta );
253-
253+
254254
}
255255

256256
renderer.render( scene, camera );

0 commit comments

Comments
 (0)