Codels
2,4 mil tris0,45 × 0,98 × 1,67 m

Úsalo en código

Hacer remix en el editor
Módulo ES autónomo — solo depende de three. Llama a la función factory y añade el grupo a tu escena.
/**
 * Bicycle — Codels 3D model library
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 2,356 · Size (W × H × D): 0.45 × 0.98 × 1.67 m
 *
 * Usage:
 *   import { createBicycle } from './bicycle.js';
 *   
 *   const model = createBicycle();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

const deg = THREE.MathUtils.degToRad;

// Revolve a 2D profile [[radius, y], ...] around the Y axis.
function lathe(points, segments, phiStart = 0, phiLength = Math.PI * 2) {
  return new THREE.LatheGeometry(points.map(([x, y]) => new THREE.Vector2(x, y)), segments, phiStart, phiLength);
}

// Extrude a 2D outline along Z (centered). bevel = [thickness, size, segments].
function extrude(outline, depth, holes = [], bevel = null) {
  const shape = new THREE.Shape(outline.map(([x, y]) => new THREE.Vector2(x, y)));
  for (const hole of holes) shape.holes.push(new THREE.Path(hole.map(([x, y]) => new THREE.Vector2(x, y))));
  const options = bevel
    ? { depth, bevelEnabled: true, bevelThickness: bevel[0], bevelSize: bevel[1], bevelSegments: bevel[2] }
    : { depth, bevelEnabled: false };
  return new THREE.ExtrudeGeometry(shape, options).translate(0, 0, -depth / 2);
}

// Tube along a smooth curve through the given points.
function tube(path, radius, tubularSegments, radialSegments, closed = false) {
  const curve = new THREE.CatmullRomCurve3(path.map(([x, y, z]) => new THREE.Vector3(x, y, z)), closed);
  return new THREE.TubeGeometry(curve, tubularSegments, radius, radialSegments, closed);
}

export function createBicycle() {
  const root = new THREE.Group();
  root.name = 'Bicycle';

  // Materials
  const frameMat = new THREE.MeshStandardMaterial({ name: 'frame', color: 0x2a9d8f, roughness: 0.35, metalness: 0.3, flatShading: true });
  const tireMat = new THREE.MeshStandardMaterial({ name: 'tire', color: 0x222326, roughness: 0.85, flatShading: true });
  const darkMat = new THREE.MeshStandardMaterial({ name: 'dark', color: 0x3a3c41, roughness: 0.5, metalness: 0.5, flatShading: true });
  const metalMat = new THREE.MeshStandardMaterial({ name: 'metal', color: 0xc3c8ce, roughness: 0.3, metalness: 0.75, flatShading: true });
  const spokeMat = new THREE.MeshStandardMaterial({ name: 'spoke', color: 0xd2d6db, roughness: 0.3, metalness: 0.7, flatShading: true });
  const saddleMat = new THREE.MeshStandardMaterial({ name: 'saddle', color: 0x1f2023, roughness: 0.7, flatShading: true });

  // Shared geometries
  const cylinderGeo = new THREE.CylinderGeometry(0.008, 0.011, 0.3922, 5);
  const cylinderGeo2 = new THREE.CylinderGeometry(0.008, 0.009, 0.4882, 5);
  const cylinderGeo3 = new THREE.CylinderGeometry(0.01, 0.012, 0.1703, 4);
  const boxGeo = new THREE.BoxGeometry(0.085, 0.02, 0.06);
  const boxGeo2 = new THREE.BoxGeometry(0.03, 0.05, 0.05);
  const torusGeo = new THREE.TorusGeometry(0.323, 0.015, 5, 24);
  const latheGeo = lathe([[0.29, -0.011], [0.3155, -0.011], [0.3155, 0.011], [0.29, 0.011], [0.29, -0.011]], 24);
  const cylinderGeo4 = new THREE.CylinderGeometry(0.018, 0.018, 0.1, 8);
  const cylinderGeo5 = new THREE.CylinderGeometry(0.03, 0.03, 0.006, 8);
  const cylinderGeo6 = new THREE.CylinderGeometry(0.0028, 0.0028, 0.2681, 3, 1, true);

  // Parts
  const body = new THREE.Group();
  body.name = 'body';
  root.add(body);
  const headTube = new THREE.Mesh(new THREE.CylinderGeometry(0.022, 0.022, 0.1852, 8), frameMat);
  headTube.name = 'headTube';
  headTube.position.set(0, 0.7091, 0.3528);
  headTube.rotation.set(deg(-17.8636), 0, 0);
  body.add(headTube);
  const seatTube = new THREE.Mesh(new THREE.CylinderGeometry(0.016, 0.017, 0.5405, 6), frameMat);
  seatTube.name = 'seatTube';
  seatTube.position.set(0, 0.5291, -0.1668);
  seatTube.rotation.set(deg(-16.5191), 0, 0);
  body.add(seatTube);
  const topTube = new THREE.Mesh(new THREE.CylinderGeometry(0.017, 0.016, 0.5711, 6), frameMat);
  topTube.name = 'topTube';
  topTube.position.set(0, 0.76, 0.0495);
  topTube.rotation.set(deg(88.9967), 0, 0);
  body.add(topTube);
  const downTube = new THREE.Mesh(new THREE.CylinderGeometry(0.021, 0.02, 0.6031, 6), frameMat);
  downTube.name = 'downTube';
  downTube.position.set(0, 0.465, 0.14);
  downTube.rotation.set(deg(49.7079), 0, 0);
  body.add(downTube);
  const cylinder6 = new THREE.Mesh(cylinderGeo, frameMat);
  cylinder6.position.set(0.041, 0.304, -0.302);
  cylinder6.rotation.set(deg(-79.4044), deg(5.1259), deg(-6.1718));
  body.add(cylinder6);
  const cylinder7 = new THREE.Mesh(cylinderGeo2, frameMat);
  cylinder7.position.set(0.04, 0.5415, -0.361);
  cylinder7.rotation.set(deg(-145.2304), deg(17.1717), deg(-5.4128));
  body.add(cylinder7);
  const tube8 = new THREE.Mesh(tube([[0.032, 0.625, 0.381], [0.045, 0.48, 0.448], [0.05, 0.338, 0.5]], 0.011, 6, 5), frameMat);
  body.add(tube8);
  const cylinder9 = new THREE.Mesh(cylinderGeo, frameMat);
  cylinder9.position.set(-0.041, 0.304, -0.302);
  cylinder9.rotation.set(deg(-79.4044), deg(-5.1259), deg(6.1718));
  body.add(cylinder9);
  const cylinder10 = new THREE.Mesh(cylinderGeo2, frameMat);
  cylinder10.position.set(-0.04, 0.5415, -0.361);
  cylinder10.rotation.set(deg(-145.2304), deg(-17.1717), deg(5.4128));
  body.add(cylinder10);
  const tube11 = new THREE.Mesh(tube([[-0.032, 0.625, 0.381], [-0.045, 0.48, 0.448], [-0.05, 0.338, 0.5]], 0.011, 6, 5), frameMat);
  body.add(tube11);
  const forkCrown = new THREE.Mesh(new THREE.BoxGeometry(0.09, 0.03, 0.04), frameMat);
  forkCrown.name = 'forkCrown';
  forkCrown.position.set(0, 0.622, 0.381);
  forkCrown.rotation.set(deg(-18), 0, 0);
  body.add(forkCrown);
  const bottomBracket = new THREE.Mesh(new THREE.CylinderGeometry(0.022, 0.022, 0.08, 8), darkMat);
  bottomBracket.name = 'bottomBracket';
  bottomBracket.position.set(0, 0.27, -0.09);
  bottomBracket.rotation.set(0, 0, deg(90));
  body.add(bottomBracket);
  const chainring = new THREE.Mesh(new THREE.CylinderGeometry(0.1, 0.1, 0.006, 16), darkMat);
  chainring.name = 'chainring';
  chainring.position.set(-0.05, 0.27, -0.09);
  chainring.rotation.set(0, 0, deg(90));
  body.add(chainring);
  const cylinder15 = new THREE.Mesh(new THREE.CylinderGeometry(0.05, 0.05, 0.01, 5), metalMat);
  cylinder15.position.set(-0.054, 0.27, -0.09);
  cylinder15.rotation.set(0, 0, deg(90));
  body.add(cylinder15);
  const crankR = new THREE.Mesh(cylinderGeo3, metalMat);
  crankR.name = 'crankR';
  crankR.position.set(-0.07, 0.2409, -0.0101);
  crankR.rotation.set(deg(109.7171), deg(4.7981), deg(3.3783));
  body.add(crankR);
  const pedalR = new THREE.Mesh(boxGeo, darkMat);
  pedalR.name = 'pedalR';
  pedalR.position.set(-0.125, 0.2119, 0.0697);
  body.add(pedalR);
  const crankL = new THREE.Mesh(cylinderGeo3, metalMat);
  crankL.name = 'crankL';
  crankL.position.set(0.07, 0.2991, -0.1699);
  crankL.rotation.set(deg(-69.8615), deg(2.3535), deg(-3.3693));
  body.add(crankL);
  const pedalL = new THREE.Mesh(boxGeo, darkMat);
  pedalL.name = 'pedalL';
  pedalL.position.set(0.125, 0.3281, -0.2497);
  body.add(pedalL);
  const chainTop = new THREE.Mesh(new THREE.CylinderGeometry(0.004, 0.004, 0.4041, 3, 1, true), darkMat);
  chainTop.name = 'chainTop';
  chainTop.position.set(-0.05, 0.374, -0.292);
  chainTop.rotation.set(deg(-88.8656), 0, 0);
  body.add(chainTop);
  const chainBottom = new THREE.Mesh(new THREE.CylinderGeometry(0.004, 0.004, 0.4238, 3, 1, true), darkMat);
  chainBottom.name = 'chainBottom';
  chainBottom.position.set(-0.05, 0.234, -0.292);
  chainBottom.rotation.set(deg(-72.4201), 0, 0);
  body.add(chainBottom);
  const seatPost = new THREE.Mesh(new THREE.CylinderGeometry(0.013, 0.013, 0.17, 6), metalMat);
  seatPost.name = 'seatPost';
  seatPost.position.set(0, 0.8505, -0.2621);
  seatPost.rotation.set(deg(-16.4962), 0, 0);
  body.add(seatPost);
  const saddle = new THREE.Mesh(extrude([[-0.016, 0.14], [0.016, 0.14], [0.025, 0.05], [0.065, -0.07], [0.06, -0.12], [-0.06, -0.12], [-0.065, -0.07], [-0.025, 0.05]], 0.035, [], [0.01, 0.008, 1]), saddleMat);
  saddle.name = 'saddle';
  saddle.position.set(0, 0.957, -0.2763);
  saddle.rotation.set(deg(90), 0, 0);
  body.add(saddle);
  const stem = new THREE.Mesh(new THREE.CylinderGeometry(0.014, 0.014, 0.1118, 6), metalMat);
  stem.name = 'stem';
  stem.position.set(0, 0.8208, 0.3749);
  stem.rotation.set(deg(80.4922), 0, 0);
  body.add(stem);
  const handlebar = new THREE.Mesh(tube([[0.21, 0.7, 0.41], [0.21, 0.71, 0.48], [0.21, 0.77, 0.52], [0.21, 0.83, 0.49], [0.19, 0.83, 0.435], [0, 0.83, 0.43], [-0.19, 0.83, 0.435], [-0.21, 0.83, 0.49], [-0.21, 0.77, 0.52], [-0.21, 0.71, 0.48], [-0.21, 0.7, 0.41]], 0.012, 26, 4), tireMat);
  handlebar.name = 'handlebar';
  body.add(handlebar);
  const brakeHoodL = new THREE.Mesh(boxGeo2, tireMat);
  brakeHoodL.name = 'brakeHoodL';
  brakeHoodL.position.set(0.21, 0.855, 0.475);
  brakeHoodL.rotation.set(deg(20), 0, 0);
  body.add(brakeHoodL);
  const brakeHoodR = new THREE.Mesh(boxGeo2, tireMat);
  brakeHoodR.name = 'brakeHoodR';
  brakeHoodR.position.set(-0.21, 0.855, 0.475);
  brakeHoodR.rotation.set(deg(20), 0, 0);
  body.add(brakeHoodR);
  const bottle = new THREE.Mesh(new THREE.CylinderGeometry(0.034, 0.034, 0.2, 8), frameMat);
  bottle.name = 'bottle';
  bottle.position.set(0, 0.5, 0.1);
  bottle.rotation.set(deg(51.4908), 0, 0);
  body.add(bottle);
  const cylinder29 = new THREE.Mesh(new THREE.CylinderGeometry(0.02, 0.026, 0.03, 8), darkMat);
  cylinder29.position.set(0, 0.595, 0.18);
  cylinder29.rotation.set(deg(51.4908), 0, 0);
  body.add(cylinder29);
  const derailleur = new THREE.Mesh(new THREE.BoxGeometry(0.04, 0.05, 0.05), darkMat);
  derailleur.name = 'derailleur';
  derailleur.position.set(-0.04, 0.258, -0.474);
  body.add(derailleur);
  const wheels = new THREE.Group();
  wheels.name = 'wheels';
  root.add(wheels);
  const wheelF = new THREE.Group();
  wheelF.name = 'wheelF';
  wheelF.position.set(0, 0.338, 0.5);
  wheels.add(wheelF);
  const tire = new THREE.Mesh(torusGeo, tireMat);
  tire.name = 'tire';
  tire.rotation.set(0, deg(90), 0);
  wheelF.add(tire);
  const rim = new THREE.Mesh(latheGeo, metalMat);
  rim.name = 'rim';
  rim.rotation.set(0, 0, deg(90));
  wheelF.add(rim);
  const hub = new THREE.Mesh(cylinderGeo4, metalMat);
  hub.name = 'hub';
  hub.rotation.set(0, 0, deg(90));
  wheelF.add(hub);
  const cylinder36 = new THREE.Mesh(cylinderGeo5, metalMat);
  cylinder36.position.set(0.03, 0, 0);
  cylinder36.rotation.set(0, 0, deg(90));
  wheelF.add(cylinder36);
  const cylinder37 = new THREE.Mesh(cylinderGeo5, metalMat);
  cylinder37.position.set(-0.03, 0, 0);
  cylinder37.rotation.set(0, 0, deg(90));
  wheelF.add(cylinder37);
  const cylinder38 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder38.position.set(-0.015, -0.0261, 0.1566);
  cylinder38.rotation.set(deg(100.4325), deg(-7.7828), deg(-6.4837));
  wheelF.add(cylinder38);
  const cylinder39 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder39.position.set(0.015, 0.0841, 0.1347);
  cylinder39.rotation.set(deg(55.8014), deg(3.4099), deg(6.4351));
  wheelF.add(cylinder39);
  const cylinder40 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder40.position.set(-0.015, 0.0923, 0.1292);
  cylinder40.rotation.set(deg(55.9288), deg(-3.4191), deg(-6.4352));
  wheelF.add(cylinder40);
  const cylinder41 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder41.position.set(0.015, 0.1547, 0.0358);
  cylinder41.rotation.set(deg(11.1154), deg(0.6257), deg(6.4241));
  wheelF.add(cylinder41);
  const cylinder42 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder42.position.set(-0.015, 0.1566, 0.0261);
  cylinder42.rotation.set(deg(11.2429), deg(-0.633), deg(-6.4241));
  wheelF.add(cylinder42);
  const cylinder43 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder43.position.set(0.015, 0.1347, -0.0841);
  cylinder43.rotation.set(deg(-33.5954), deg(-1.9421), deg(6.4274));
  wheelF.add(cylinder43);
  const cylinder44 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder44.position.set(-0.015, 0.1292, -0.0923);
  cylinder44.rotation.set(deg(-33.468), deg(1.9343), deg(-6.4274));
  wheelF.add(cylinder44);
  const cylinder45 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder45.position.set(0.015, 0.0358, -0.1547);
  cylinder45.rotation.set(deg(-78.2218), deg(-5.2464), deg(6.4508));
  wheelF.add(cylinder45);
  const cylinder46 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder46.position.set(-0.015, 0.0261, -0.1566);
  cylinder46.rotation.set(deg(-78.0948), deg(5.2344), deg(-6.4507));
  wheelF.add(cylinder46);
  const cylinder47 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder47.position.set(0.015, -0.0841, -0.1347);
  cylinder47.rotation.set(deg(-122.4516), deg(-11.9262), deg(6.566));
  wheelF.add(cylinder47);
  const cylinder48 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder48.position.set(-0.015, -0.0923, -0.1292);
  cylinder48.rotation.set(deg(-122.327), deg(11.8943), deg(-6.5653));
  wheelF.add(cylinder48);
  const cylinder49 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder49.position.set(0.015, -0.1547, -0.0358);
  cylinder49.rotation.set(deg(-158.0053), deg(-59.0212), deg(12.5541));
  wheelF.add(cylinder49);
  const cylinder50 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder50.position.set(-0.015, -0.1566, -0.0261);
  cylinder50.rotation.set(deg(-158.1122), deg(58.4684), deg(-12.3529));
  wheelF.add(cylinder50);
  const cylinder51 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder51.position.set(0.015, -0.1347, 0.0841);
  cylinder51.rotation.set(deg(143.7369), deg(20.7827), deg(6.8729));
  wheelF.add(cylinder51);
  const cylinder52 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder52.position.set(-0.015, -0.1292, 0.0923);
  cylinder52.rotation.set(deg(143.8547), deg(-20.8647), deg(-6.8766));
  wheelF.add(cylinder52);
  const cylinder53 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder53.position.set(0.015, -0.0358, 0.1547);
  cylinder53.rotation.set(deg(100.3061), deg(7.7651), deg(6.4834));
  wheelF.add(cylinder53);
  const wheelR = new THREE.Group();
  wheelR.name = 'wheelR';
  wheelR.position.set(0, 0.338, -0.494);
  wheels.add(wheelR);
  const tire2 = new THREE.Mesh(torusGeo, tireMat);
  tire2.name = 'tire';
  tire2.rotation.set(0, deg(90), 0);
  wheelR.add(tire2);
  const rim2 = new THREE.Mesh(latheGeo, metalMat);
  rim2.name = 'rim';
  rim2.rotation.set(0, 0, deg(90));
  wheelR.add(rim2);
  const hub2 = new THREE.Mesh(cylinderGeo4, metalMat);
  hub2.name = 'hub';
  hub2.rotation.set(0, 0, deg(90));
  wheelR.add(hub2);
  const cylinder58 = new THREE.Mesh(cylinderGeo5, metalMat);
  cylinder58.position.set(0.03, 0, 0);
  cylinder58.rotation.set(0, 0, deg(90));
  wheelR.add(cylinder58);
  const cylinder59 = new THREE.Mesh(cylinderGeo5, metalMat);
  cylinder59.position.set(-0.03, 0, 0);
  cylinder59.rotation.set(0, 0, deg(90));
  wheelR.add(cylinder59);
  const cylinder60 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder60.position.set(-0.015, -0.0261, 0.1566);
  cylinder60.rotation.set(deg(100.4325), deg(-7.7828), deg(-6.4837));
  wheelR.add(cylinder60);
  const cylinder61 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder61.position.set(0.015, 0.0841, 0.1347);
  cylinder61.rotation.set(deg(55.8014), deg(3.4099), deg(6.4351));
  wheelR.add(cylinder61);
  const cylinder62 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder62.position.set(-0.015, 0.0923, 0.1292);
  cylinder62.rotation.set(deg(55.9288), deg(-3.4191), deg(-6.4352));
  wheelR.add(cylinder62);
  const cylinder63 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder63.position.set(0.015, 0.1547, 0.0358);
  cylinder63.rotation.set(deg(11.1154), deg(0.6257), deg(6.4241));
  wheelR.add(cylinder63);
  const cylinder64 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder64.position.set(-0.015, 0.1566, 0.0261);
  cylinder64.rotation.set(deg(11.2429), deg(-0.633), deg(-6.4241));
  wheelR.add(cylinder64);
  const cylinder65 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder65.position.set(0.015, 0.1347, -0.0841);
  cylinder65.rotation.set(deg(-33.5954), deg(-1.9421), deg(6.4274));
  wheelR.add(cylinder65);
  const cylinder66 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder66.position.set(-0.015, 0.1292, -0.0923);
  cylinder66.rotation.set(deg(-33.468), deg(1.9343), deg(-6.4274));
  wheelR.add(cylinder66);
  const cylinder67 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder67.position.set(0.015, 0.0358, -0.1547);
  cylinder67.rotation.set(deg(-78.2218), deg(-5.2464), deg(6.4508));
  wheelR.add(cylinder67);
  const cylinder68 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder68.position.set(-0.015, 0.0261, -0.1566);
  cylinder68.rotation.set(deg(-78.0948), deg(5.2344), deg(-6.4507));
  wheelR.add(cylinder68);
  const cylinder69 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder69.position.set(0.015, -0.0841, -0.1347);
  cylinder69.rotation.set(deg(-122.4516), deg(-11.9262), deg(6.566));
  wheelR.add(cylinder69);
  const cylinder70 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder70.position.set(-0.015, -0.0923, -0.1292);
  cylinder70.rotation.set(deg(-122.327), deg(11.8943), deg(-6.5653));
  wheelR.add(cylinder70);
  const cylinder71 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder71.position.set(0.015, -0.1547, -0.0358);
  cylinder71.rotation.set(deg(-158.0053), deg(-59.0212), deg(12.5541));
  wheelR.add(cylinder71);
  const cylinder72 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder72.position.set(-0.015, -0.1566, -0.0261);
  cylinder72.rotation.set(deg(-158.1122), deg(58.4684), deg(-12.3529));
  wheelR.add(cylinder72);
  const cylinder73 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder73.position.set(0.015, -0.1347, 0.0841);
  cylinder73.rotation.set(deg(143.7369), deg(20.7827), deg(6.8729));
  wheelR.add(cylinder73);
  const cylinder74 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder74.position.set(-0.015, -0.1292, 0.0923);
  cylinder74.rotation.set(deg(143.8547), deg(-20.8647), deg(-6.8766));
  wheelR.add(cylinder74);
  const cylinder75 = new THREE.Mesh(cylinderGeo6, spokeMat);
  cylinder75.position.set(0.015, -0.0358, 0.1547);
  cylinder75.rotation.set(deg(100.3061), deg(7.7651), deg(6.4834));
  wheelR.add(cylinder75);
  const cylinder76 = new THREE.Mesh(new THREE.CylinderGeometry(0.045, 0.045, 0.004, 12), darkMat);
  cylinder76.position.set(-0.036, 0, 0);
  cylinder76.rotation.set(0, 0, deg(90));
  wheelR.add(cylinder76);
  const cylinder77 = new THREE.Mesh(new THREE.CylinderGeometry(0.038, 0.038, 0.004, 12), darkMat);
  cylinder77.position.set(-0.042, 0, 0);
  cylinder77.rotation.set(0, 0, deg(90));
  wheelR.add(cylinder77);
  const cylinder78 = new THREE.Mesh(new THREE.CylinderGeometry(0.031, 0.031, 0.004, 12), darkMat);
  cylinder78.position.set(-0.048, 0, 0);
  cylinder78.rotation.set(0, 0, deg(90));
  wheelR.add(cylinder78);
  const cylinder79 = new THREE.Mesh(new THREE.CylinderGeometry(0.024, 0.024, 0.004, 12), darkMat);
  cylinder79.position.set(-0.054, 0, 0);
  cylinder79.rotation.set(0, 0, deg(90));
  wheelR.add(cylinder79);

  root.traverse((o) => {
    if (o.isMesh) {
      o.castShadow = true;
      o.receiveShadow = true;
    }
  });
  return root;
}

export default createBicycle;

Valoraciones y comentarios

—
Aún no hay valoraciones — sé el primero.
5
0
4
0
3
0
2
0
1
0

Inicia sesión para valorar y comentar.

0 comentarios

Aún no hay comentarios. Cuenta cómo usaste este modelo o qué se podría mejorar.

Modelos relacionados

Misma categoría o etiquetas similares