fogón

← Level pieces 23D assetfogon/nivel-portal-teletransporte

Portal teletransporte

by fogonCC09674 blocks
Portal teletransporteDrag to turn it
// «Portal teletransporte» · gpt-6-sol (medium)
// A teleporter pad: a round dark metal base radius 20, 4 tall, with a ring of glowing cyan lights around its edge, and above it a vertical ring portal (a torus standing upright facing -y, outer radius 18, 3 thick) of purple metal, filled with a swirling glowing magenta and violet energy disc.

// Low, round metal platform.
for (let x = 4; x <= 44; x++) {
  for (let y = 4; y <= 44; y++) {
    const r = Math.hypot(x - 24, y - 24);
    for (let z = 0; z <= 4; z++) {
      if (r > (z === 4 ? 19 : 20)) continue;
      let color = z === 0 ? "#20283c"
        : z === 3 ? "#58647d"
        : z === 4 ? "#66728c"
        : "#354158";
      if (r > 18.7 && z < 4) color = z === 3 ? "#8190aa" : "#273249";
      if (z === 4 && r < 16.8) color = "#404b68";
      set(x, y, z, color);
    }

    // Recessed cyan circuit around the top.
    if (r >= 17.5 && r <= 18.7) set(x, y, 4, "#25d9ed");
    if (r >= 16.9 && r < 17.5) set(x, y, 4, "#163f65");
  }
}

// Chunky individual lamps make the edge readable from a distance.
for (let i = 0; i < 24; i++) {
  const a = i * Math.PI / 12;
  const x = Math.round(24 + 19 * Math.cos(a));
  const y = Math.round(24 + 19 * Math.sin(a));
  set(x, y, 4, "#b6ffff");
  set(x, y, 3, "#43e9f5");
}

// Raised socket and clamps beneath the upright portal.
cylinder(24, 24, 4, 10, 2, "#273149");
cylinder(24, 24, 6, 8, 1, "#7581a4");
box(19, 21, 5, 29, 27, 8, "#352c68");
box(20, 20, 6, 28, 21, 8, "#7653b2");
box(22, 19, 6, 26, 19, 7, "#61e8f2");

// Upright purple-metal torus. Its outer radius is 18 blocks.
for (let x = 6; x <= 42; x++) {
  for (let z = 7; z <= 43; z++) {
    const radial = Math.hypot(x - 24, z - 25);
    for (let y = 21; y <= 27; y++) {
      const tube = Math.hypot(radial - 15.5, (y - 24) * 0.95);
      if (tube > 2.5) continue;
      let color = y >= 26 ? "#34245f"
        : y >= 24 ? "#59358e"
        : y === 23 ? "#8651bd"
        : "#ae72dc";
      if (radial > 17.1) color = y <= 23 ? "#a765d4" : "#482c77";
      if (radial < 14.3 && y <= 23) color = "#d28cf4";
      if (z < 12 && y >= 24) color = "#3e2b70";
      set(x, y, z, color);
    }
  }
}

// Bright inset arcs and evenly spaced fasteners on the front rim.
for (let i = 0; i < 16; i++) {
  const a = i * Math.PI / 8;
  const x = Math.round(24 + 16 * Math.cos(a));
  const z = Math.round(25 + 16 * Math.sin(a));
  set(x, 21, z, "#dfabff");
  if (i % 2 === 0) set(x, 20, z, "#f6d4ff");
}

// The energy is a separate, rotating disc within the ring.
part("energia", [24, 24, 24]);
for (let x = 11; x <= 37; x++) {
  for (let z = 12; z <= 38; z++) {
    const dx = x - 24, dz = z - 25;
    const r = Math.hypot(dx, dz);
    if (r > 13.15) continue;

    const angle = Math.atan2(dz, dx);
    const swirl = Math.sin(3 * angle + r * 0.87);
    const fine = Math.sin(5 * angle - r * 1.35);
    let color = swirl > 0.52 ? "#ff40d0"
      : swirl < -0.53 ? "#6040ff"
      : "#c040ff";
    if (r > 11.8) color = "#d45aff";
    if (fine > 0.78 && r < 11.5) color = "#f479fa";
    if (r < 3.2) color = "#f28bff";

    set(x, 24, z, color);
    if (r < 12.1 && (swirl > 0.28 || r < 4)) {
      set(x, 23, z, swirl > 0.7 ? "#ff8bea" : color);
    }
    if (r < 10.5 && fine > 0.89) set(x, 22, z, "#ffd1ff");
  }
}

animate("energia", { type: "spin", axis: "y", speed: 2 });
animate("energia", {
  type: "colors",
  palette: ["#c040ff", "#ff40d0", "#6040ff"],
  pattern: "wave",
  glow: 0.9
});