Files

23 lines
787 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ezoicportal.js — drawPortal() (satır 103)
[← ezoicportal.js](index.md) · [← Master](../../wiki.md)
```javascript
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);
}
}
```