Files

787 B
Raw Permalink Blame History

ezoicportal.js — drawPortal() (satır 103)

← ezoicportal.js · ← Master

function drawPortal(context, cx, cy, cz, yawRad, rx, ry, particleType) {
    var points = 35; // Detay seviyesi
    var world = context.getWorld();
    for (var i = 0; i < points; i++) {
        var angle = (i / points) * Math.PI * 2;
        var lx = Math.cos(angle) * rx;
        var ly = Math.sin(angle) * ry;
        
        var worldX = cx + lx * Math.cos(yawRad);
        var worldY = cy + ly;
        var worldZ = cz + lx * Math.sin(yawRad);

        // longDistance = true (ikinci parametre), böylece uzaktan da görünebilir
        world.spawnParticles(particleType, true, worldX, worldY, worldZ, 1, 0, 0, 0, 0);
    }
}