-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathavenger.js
More file actions
312 lines (273 loc) · 15.8 KB
/
Copy pathavenger.js
File metadata and controls
312 lines (273 loc) · 15.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
const scene = new THREE.Scene();
scene.background = new THREE.Color( 0xAAAAAA ); // Hexadecimal color (gray in this case)
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const textureLoader53 = new THREE.TextureLoader();
const metalnessMap2 = textureLoader53.load('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTdN_0FmrQiJUD33tP1M5HBiiSeGCdHT5yApWgtr8idiDTPWaWXLy6TN_CV&s=10');
const roughnessMap2 = textureLoader53.load('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS9RFNpYMVcpl0rWLwaPcBPERf-P5E-miwCES4MV43EqmbRdTmqSz6dRnM&s=10');
export const avenger = new THREE.Group();
// First torus (Front Wheel)
const geometry1 = new THREE.TorusGeometry(2, 0.5, 10, 200);
const textureLoader3 = new THREE.TextureLoader();
const texture = textureLoader3.load('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAKgBKwMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAAAgEDB//EACYQAQEBAAAFBAICAwAAAAAAAAABEQIhMfDxEkFhcTLhsdEicqH/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAQL/xAAWEQEBAQAAAAAAAAAAAAAAAAAAARH/2gAMAwEAAhEDEQA/APEgGkAAAAAAAAAAAaDGjcBg1qokUYCRTMBjFMRWDWAAAAAAAAAAAAAAAAAAAAAAANABuDYqBjW4ozGtxuAnDFYYCDFYYCLGYuxmIJrFVgMY1iKAAAAAAAAAAAAAAAAAAA0BsI2KjY2QkbIoSNkbIqQGYYrFekEYYvD0g54zHSxNgqLE46WJsERYyxVjKCBrEGAIoAAAAAAAAAAAAAAAA0aDY2MVFRsVGRUUbIuQkXIDM536Vjc536biKmQxedPpl6oIsTY62JsUcbE2Otn8IsVHOxNi6mgisqqmpRjK1iKAAAAAAAAAAAAAAAQGtjGxRUbGRUVFRfCmL4RVcLpE8K4yGc/C5OXgk539qk75gmTp+PQs5+Fz2+vllnfMEWcv7xF638XW9PKOL3/YOfEiutjlxLBzqaupqoipqqmgkbWMqwAAAAAAAAAAAAAAgQGtjGxUUqJioouL4URfCDpO+i530RFzp5ZVX+O36+Fzp4TLzv7VL3zBs9PLp/xl9O+Gz2+vllvfMGX05fv4Rev9Yu3l5Ret/YJvfRz4u+jpxOdWDnU1VTVRFTVVIMY2pZUAAAAAAAAAAAAAAIANbGNUVFREVFRcXwucVwg68NdI5SrlRV+/hcvfJz3nVagrf9Ten38J3p9M0G28vCeL3/FtqbQZXPiVaiqJqa2pqjE1tTRGAxlQAAAAAAAAAAAAAAABrGg1UTGyqi4qIlbKo6SrlcpWyg7arXHVTiRXSU1z9R6jBdqbU6m3qCrUaWptVCpLWWgyspWIDARQAAAAAAAAAAAAAAABrAGtjARcbKiNlUXK2VGt1R001Gt0F6ajTQVrNTpoNtTaVloFrLSsQYDEUAAAAAAAAAAAAAAAAAAAAawBrZWAKhrBUVrUa3QVokUaaxmpo3WWsAbawYit1gAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAFGAAAAAAAAAAAAAAAD//Z');
const material1 = new THREE.MeshStandardMaterial({ map:texture,metalnessMap:metalnessMap2,roughnessMap:roughnessMap2,emissive:0x000000});
export const torus1 = new THREE.Mesh(geometry1, material1);
torus1.position.set(-7, 0, 0);
torus1.scale.set(1,1,1.5);
torus1.castShadow = true;
avenger.add(torus1);
// Second torus (Rear Wheel)
const geometry2 = new THREE.TorusGeometry(2, 0.5,10, 200);
const material2 = new THREE.MeshStandardMaterial({ map:texture});
export const torus2 = new THREE.Mesh(geometry2, material1);
torus2.position.set(7, 0, 0);
torus2.scale.set(1,1,1.5);
torus2.castShadow = true;
avenger.add(torus2);
// Motorcycle body parts
const cylinderGeometry = new THREE.CylinderGeometry(0.5, 0.5, 2, 32);
const textureLoader = new THREE.TextureLoader();
const texture11 = textureLoader.load('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBw0NDQ0NDQ0NDQ0NDQ0HCA0NDQ8IDQcNFREWFhURExMYHSggGCYxGxMVITEhMSkrLi4uFx8zODMsNygtLisBCgoKDQ0NDg0NDisZFRkrLSs3LSsrKyst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oN8snOWQuWTXLID8oe4wryyc4wU5xhzmU5Q5zQMYEjGG4CVnTVZ0AWy3QzoDoIU6Qt0hvpC/SKE+kL7yb3AN5AnvIOob3kDeVALA7BtRiwA1NVQMov4gPPRrKIAuRsIiBjmZ5ogGuZnkiCnOZvkiAc5G+a0QMYbiICVmogBaA6IghfZfaIoX2BtEADYGkRcAtMVEAOqqICkRAf/2Q==');
const cylinderMaterial = new THREE.MeshStandardMaterial({ map: texture11,metalnessMap:metalnessMap2,roughnessMap:roughnessMap2,emissive:0x000000 });
// Frame parts
const frame1 = new THREE.Mesh(cylinderGeometry, cylinderMaterial);
frame1.position.set(-4,1,-1);
frame1.scale.set(0.3,4,0.3);
frame1.rotation.set(0,0,-Math.PI/3);
frame1.castShadow = true;
avenger.add(frame1);
const frame3 = new THREE.Mesh(cylinderGeometry, cylinderMaterial);
frame3.position.set(-4,1,-1);
frame3.scale.set(0.6,2.5,0.6);
frame3.rotation.set(0,0,-Math.PI/3);
frame3.castShadow = true;
avenger.add(frame3);
const frame2 = new THREE.Mesh(cylinderGeometry, cylinderMaterial);
frame2.position.set(-4,1,1);
frame2.scale.set(0.3,4,0.3);
frame2.rotation.set(0,0,-Math.PI/3);
frame2.castShadow = true;
avenger.add(frame2);
const frame4 = new THREE.Mesh(cylinderGeometry, cylinderMaterial);
frame4.position.set(-4,1,1);
frame4.scale.set(0.6,2.5,0.6);
frame4.rotation.set(0,0,-Math.PI/3);
frame4.castShadow = true;
avenger.add(frame4);
//inner tire
const geometry3 = new THREE.TorusGeometry(1.5, 0.1, 18, 200);
export const torus3 = new THREE.Mesh(geometry3, cylinderMaterial);
torus3.position.set(7, 0, 0);
torus3.scale.set(1,1,5);
torus3.castShadow = true;
avenger.add(torus3);
export const torus4 = new THREE.Mesh(geometry3, cylinderMaterial);
torus4.position.set(-7, 0, 0);
torus4.scale.set(1,1,5);
torus4.castShadow = true;
avenger.add(torus4);
// Handlebar
const handlebarGeometry = new THREE.CylinderGeometry(0.2, 0.2, 4, 32);
const handlebarMaterial = new THREE.MeshStandardMaterial({ map:texture11,metalnessMap:metalnessMap2,roughnessMap:roughnessMap2,emissive:0x000000});
const handlebar = new THREE.Mesh(handlebarGeometry, handlebarMaterial);
handlebar.position.set(-0.5, 3.2, 0);
handlebar.scale.set(1,0.5,3);
handlebar.rotation.set(Math.PI / 2,Math.PI/3,Math.PI);
handlebar.castShadow = true;
avenger.add(handlebar);
const handlebar5 = new THREE.Mesh(handlebarGeometry, handlebarMaterial);
handlebar5.position.set(0, 3.5, 1);
handlebar5.scale.set(1,0.5,1);
handlebar5.rotation.set(Math.PI,Math.PI,-Math.PI/2.5);
handlebar5.castShadow = true;
avenger.add(handlebar5);
const handlebar6 = new THREE.Mesh(handlebarGeometry, handlebarMaterial);
handlebar6.position.set(0, 3.5, -1);
handlebar6.scale.set(1,0.5,1);
handlebar6.rotation.set(Math.PI,Math.PI,-Math.PI/2.5);
handlebar6.castShadow = true;
avenger.add(handlebar6);
const handlebar7 = new THREE.Mesh(handlebarGeometry, material2);
handlebar7.position.set(1.2, 3.8, -1);
handlebar7.scale.set(1,0.3,1);
handlebar7.rotation.set(Math.PI,Math.PI,-Math.PI/2);
handlebar7.castShadow = true;
avenger.add(handlebar7);
const handlebar8 = new THREE.Mesh(handlebarGeometry, material2);
handlebar8.position.set(1.2, 3.8, 1);
handlebar8.scale.set(1,0.3,1);
handlebar8.rotation.set(Math.PI,Math.PI,-Math.PI/2);
handlebar8.castShadow = true;
avenger.add(handlebar8);
const handlebar2 = new THREE.Mesh(handlebarGeometry, handlebarMaterial);
handlebar2.position.set(-1.5, 2.5, 0);
handlebar2.scale.set(1,0.6,1);
handlebar2.rotation.set(Math.PI / 2,Math.PI/3,Math.PI);
handlebar2.castShadow = true;
avenger.add(handlebar2);
const handlebar3 = new THREE.Mesh(handlebarGeometry, handlebarMaterial);
handlebar3.position.set(-7.5, -1, 0);
handlebar3.scale.set(1,0.6,2);
handlebar3.rotation.set(Math.PI / 2,Math.PI/3,Math.PI);
handlebar3.castShadow = true;
avenger.add(handlebar3);
// Seat
const seatGeometry = new THREE.BoxGeometry(2.5, 1, 1);
const seatMaterial = new THREE.MeshStandardMaterial({ map:texture,metalnessMap:metalnessMap2,roughnessMap:roughnessMap2,emissive:0x000000});
const seat = new THREE.Mesh(seatGeometry, seatMaterial);
seat.position.set(3,2, 0);
seat.castShadow = true;
avenger.add(seat);
const textureLoader34 = new THREE.TextureLoader();
const redtexture = textureLoader34.load('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT2QT0Z5BW8SzFg8uI_AJXjgbcWy1CjqPmD0xpjUX-KAPXFIKbdovQn30U&s=10');
const metalnessMap1 = textureLoader34.load('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTdN_0FmrQiJUD33tP1M5HBiiSeGCdHT5yApWgtr8idiDTPWaWXLy6TN_CV&s=10');
const roughnessMap1 = textureLoader34.load('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS9RFNpYMVcpl0rWLwaPcBPERf-P5E-miwCES4MV43EqmbRdTmqSz6dRnM&s=10');
// Create a geometry for the hemisphere
const geometry45 = new THREE.SphereGeometry( 0.5, 32, 32 );
// Create a material for the hemisphere
const material45 = new THREE.MeshPhongMaterial( { map: texture11,emissive:0xffff00 } );
const lights = new THREE.Group();
// Create a mesh with the geometry and material
const headlight1 = new THREE.Mesh( geometry45, material45 );
lights.add( headlight1 );
headlight1.position.set(-1.5,2.7,0);
headlight1.scale.set(2,1,1);
headlight1.rotation.set(Math.PI,Math.PI,Math.PI);
avenger.add(lights);
const spotLight = new THREE.SpotLight( 0xffffff ,1,100);
spotLight.position.set( 1, -1, 0 );
// Rotate the spotlight 45 degrees on the y-axis
avenger.add( spotLight );
const redbase = new THREE.Group();
//seatbase
// Create a red sphere geometry
const geometry = new THREE.SphereGeometry( 1, 32, 16 );
// Create a red material
const material = new THREE.MeshStandardMaterial( { map : redtexture , metalnessMap:metalnessMap1,roughnessMap:roughnessMap1,emissive:0x000000} );
// Create a mesh with the red sphere geometry and material
const sphere = new THREE.Mesh( geometry, material);
// Add the red sphere to the scene
redbase.add( sphere );
sphere.position.set(0,2,0);
sphere.scale.set(2,1,0.8);
sphere.castShadow = true;
const seatb = new THREE.Mesh(seatGeometry, material);
seatb.position.set(2, -1, 0);
seatb.scale.set(2,0.6,1.5);
seatb.rotation.set(0,0,Math.PI);
seatb.castShadow = true;
redbase.add(seatb);
//engine
const eng = new THREE.Mesh(seatGeometry, cylinderMaterial);
eng.position.set(2, -0.5, 0);
eng.scale.set(1,1,1);
eng.rotation.set(0,0,Math.PI);
eng.castShadow = true;
avenger.add(eng);
const eng1 = new THREE.Mesh(cylinderGeometry, cylinderMaterial);
eng1.position.set(2, 0, 0);
eng1.scale.set(1,0.8,1);
eng1.rotation.set(0,0,Math.PI);
eng1.castShadow = true;
avenger.add(eng1);
const eng12 = new THREE.Mesh(cylinderGeometry, cylinderMaterial);
eng12.position.set(1, 0, 0);
eng12.scale.set(1,0.8,1);
eng12.rotation.set(0,0,Math.PI/6);
eng12.castShadow = true;
avenger.add(eng12);
const eng123 = new THREE.Mesh(cylinderGeometry, cylinderMaterial);
eng123.position.set(3, 0, 0);
eng123.scale.set(1,0.8,1);
eng123.rotation.set(0,0,-Math.PI/6);
eng123.castShadow = true;
avenger.add(eng123);
const seatb1 = new THREE.Mesh(seatGeometry, material);
seatb1.position.set(-1, 0.5, 0);
seatb1.scale.set(1.5,0.6,1.5);
seatb1.rotation.set(0,0,-Math.PI/3);
seatb.castShadow = true;
redbase.add(seatb1);
const spherel = new THREE.Mesh( geometry, material );
// Add the red sphere to the scene
avenger.add( spherel );
spherel.position.set(2,1.5,0);
spherel.scale.set(2,0.8,0.8);
spherel.rotation.set(0,0,-Math.PI/6);
spherel.castShadow = true;
const spher = new THREE.Mesh( geometry, material );
// Add the red sphere to the scene
redbase.add( spher );
spher.position.set(4,1.2,0);
spher.scale.set(1.5,0.9,0.8);
spher.rotation.set(0,0,Math.PI/6);
spher.castShadow = true;
// Create a cube geometry
const geometry33 = new THREE.BoxGeometry( 1, 1, 1 );
const material33 = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const cube1 = new THREE.Mesh( geometry33, material33 );
redbase.add( cube1 );
cube1.position.set(4.3,0.5,0);
cube1.scale.set(0.5,3,1);
const cube2 = new THREE.Mesh( geometry33, material33 );
avenger.add( cube2);
cube2.position.set(5,2,0);
cube2.scale.set(0.5,3,1);
cube2.rotation.set(Math.PI,Math.PI,-Math.PI/3);
const sphert = new THREE.Mesh( geometry, material );
// Add the red sphere to the scene
redbase.add( sphert );
sphert.position.set(4.3,0.3,0);
sphert.scale.set(1,1.8,0.8);
sphert.rotation.set(0,0,Math.PI);
const sphertt = new THREE.Mesh( geometry, material );
// Add the red sphere to the scene
redbase.add( sphertt );
sphertt.position.set(5,2,0);
sphertt.scale.set(2,0.8,1);
sphertt.rotation.set(0,0,Math.PI/6);
const sphert1 = new THREE.Mesh( geometry, material );
redbase.add( sphert1 );
sphert1.position.set(-4,0.3,0);
sphert1.scale.set(0.5,1.7,0.5);
sphert1.rotation.set(0,0,Math.PI);
const sphertt1 = new THREE.Mesh( geometry, material );
redbase.add( sphertt1 );
sphertt1.position.set(-5,2,0);
sphertt1.scale.set(1.7,0.6,1);
sphertt1.rotation.set(0,0,-Math.PI/6);
const sphertt2 = new THREE.Mesh( geometry, material );
redbase.add( sphertt2 );
sphertt2.position.set(6,-0.5,1);
sphertt2.scale.set(2,0.6,0.4);
sphertt2.rotation.set(0,0,-Math.PI/6);
const sphertt3 = new THREE.Mesh( geometry, material );
redbase.add( sphertt3 );
sphertt3.position.set(6,-0.5,-1);
sphertt3.scale.set(2,0.6,0.4);
sphertt3.rotation.set(0,0,-Math.PI/6);
const sphertt4 = new THREE.Mesh( geometry, material );
redbase.add( sphertt4 );
sphertt4.position.set(5.5,1,1);
sphertt4.scale.set(1.5,0.6,0.5);
sphertt4.rotation.set(0,0,Math.PI/6);
const sphertt5 = new THREE.Mesh( geometry, material );
redbase.add( sphertt5);
sphertt5.position.set(5.5,1,-1);
sphertt5.scale.set(1.5,0.6,0.5);
sphertt5.rotation.set(0,0,Math.PI/6);
// Lights
const headlightGeometry = new THREE.SphereGeometry(0.7, 32, 32);
const headlightMaterial = new THREE.MeshStandardMaterial({ color: 0xff0000 });
const headlight = new THREE.Mesh(headlightGeometry, headlightMaterial);
headlight.position.set(7, -1, 0);
headlight.castShadow = true;
redbase.add(headlight);
const taillightGeometry = new THREE.SphereGeometry(0.7, 32, 32);
const taillightMaterial = new THREE.MeshStandardMaterial({ color: 0xff0000 });
const taillight = new THREE.Mesh(taillightGeometry, taillightMaterial);
taillight.position.set(6.3, 0.6, 0);
taillight.castShadow = true;
redbase.add(taillight);
avenger.add(redbase);
scene.add(avenger);
export default avenger ;