{
  "format_version": "1.10.0",
  "particle_effect": {
    "description": {
      "identifier": "minecraft:portal_north_south",
      "basic_render_parameters": {
        "material": "particles_blend",
        "texture": "textures/particle/portal_effect"  // Cambiar a la textura portal_effect
      }
    },
    "components": {
      "minecraft:emitter_rate_instant": {
        "num_particles": "variable.num_particles"
      },

      "minecraft:emitter_lifetime_expression": {
        "activation_expression": 1,
        "expiration_expression": 1
      },

      "minecraft:emitter_shape_point": {
        "direction": [0, -1, "variable.particle_random_2 < 0.5 ? math.random(-1.5, -0.5) : math.random(0.5, 1.5)"],
        "offset": ["math.random(-0.5f, 0.5f)", "math.random(-0.5f, 0.5f) + 1.25", "variable.particle_random_2 < 0.5 ? math.random(-2.5, -1.5) : math.random(1.5, 2.5)"]
      },

      "minecraft:particle_initialization": {
        "per_render_expression": "variable.alpha = variable.particle_age/variable.particle_lifetime; variable.size = (variable.particle_random_2 * 0.1 + 0.1) * (2*variable.alpha - variable.alpha*variable.alpha); variable.color_base = variable.particle_random_1 * 0.6 + 0.4;"
      },

      "minecraft:particle_initial_speed": "1",

      "minecraft:particle_lifetime_expression": {
        "max_lifetime": "Math.Random(2.0,2.45)"
      },

      "minecraft:particle_kill_plane": [0, 0, 1, 0],
    
      "minecraft:particle_motion_dynamic": {
          "linear_acceleration": [0, 0, "variable.particle_random_2 < 0.5 ? 1.5 : -1.5"]
      },

      "minecraft:particle_appearance_billboard": {
        "size": [
          "variable.size",
          "variable.size"
        ],
        "facing_camera_mode": "lookat_xyz",

        "uv": {
          "texture_width": 160,  // Cambiar a 160 para la textura portal_effect
          "texture_height": 20,  // Cambiar a 20 para la textura portal_effect
          "uv": [ "Math.round(variable.particle_random_3*8)*20", 0 ],  // Ajuste para seleccionar áreas de 20x20
          "uv_size": [ 20, 20 ]  // Cada área es de 20x20
        }
      },
      "minecraft:particle_appearance_tinting": {
        "color": [
          "math.lerp(1,v.color.r,v.particle_age)",
          "math.lerp(1,v.color.g,v.particle_age)",
          "math.lerp(1,v.color.b,v.particle_age)",
          "1-v.particle_age*0.5",
          1.0
        ]
      }
    }
  }
}