Animated interior
Sky gradients, atmosphere, light, core energy and glints live inside the masked element.
ARCHIVE 03 · DEV NOTE
The portal effect looked fine until the animation started leaking outside the opening. A normal circle or rounded rectangle was never going to match the actual stone frame.
The problem
The portal artwork has an irregular opening. The animated sky, glow and energy layers need to stay inside that opening, but the stone frame itself obviously must remain fully visible.
Trying to approximate the opening with border-radius or a generic oval leaves either visible leaks or cuts away parts of the artwork.
The setup
The site keeps two assets: a frame-only image and a separate exact mask of the open area. The animated layers sit inside .portal-inner, which receives the mask. The frame image is placed above it as a separate layer.
.portal-inner {
overflow: hidden;
background: none;
-webkit-mask-image: url("/assets/images/portal-mask.png");
mask-image: url("/assets/images/portal-mask.png");
-webkit-mask-size: contain;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
}
After that the animation can be as messy as it wants behind the mask. Anything outside the opening just never gets shown.
Layer order
Sky gradients, atmosphere, light, core energy and glints live inside the masked element.
The portal frame sits on top without the mask, so its irregular silhouette stays crisp and untouched.
Effects that are supposed to spill around the portal can remain outside the masked interior.
Artisans, Magic Crafters, Dream Weavers and the lost world can share the same frame/mask system while changing their internal colors and atmosphere.
Why I kept it
Once the clipping was exact, I could make the internal animation stronger on hover or give each Homeworld a different energy treatment without constantly checking whether the effect escaped through the frame.