Add the Prismatic Backdrop holographic effect for cutout artwork
The new mythic effect works on two levels. An opaque iridescent film is painted under the artwork and only shows through its transparent areas, while a light overlay makes the whole card shine. Both follow the card tilt without any running animation, like the Diffraction Sheen. Cards can declare cutout versions of their artwork with the __cutout suffix: cutoutImage for the standard format and fullCutoutImage for the full-art format. The catalog only accepts the format's own image name followed by __cutout. Prismatic Backdrop finishes use them when present and fall back to the opaque artwork otherwise. The Mythic Card Pull gets both cutout versions, and the admin visual lab previews the effect on them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
24992e5502
commit
bd1da42c7f
9 changed files with 76 additions and 7 deletions
|
|
@ -4,6 +4,8 @@ import { CollectionCardBack } from "./CollectionCardBack.jsx";
|
|||
import { MATCH_HOLO_PALETTE_ID, MATCH_HOLO_PALETTE_LABEL, resolveMythicOpeningStyle, resolveOpeningEffect } from "./openingEffects.js";
|
||||
|
||||
const STANDARD_CARD_LAYOUT = "standard";
|
||||
// Effets holographiques peints sous l'illustration, visibles seulement à travers ses zones transparentes.
|
||||
const UNDERLAY_EFFECTS = new Set(["prismatic-backdrop"]);
|
||||
|
||||
function useCardTilt() {
|
||||
const cardRef = useRef(null);
|
||||
|
|
@ -188,7 +190,9 @@ function CardFace({ entry, quantity, visual, size }) {
|
|||
// Pleine illustration : l'image remplit la carte et seul le nom reste, gravé par-dessus.
|
||||
const fullArt = visual.layout !== STANDARD_CARD_LAYOUT;
|
||||
const showDetails = size === "lg" && !fullArt;
|
||||
const image = (fullArt && card.fullImage) || card.image;
|
||||
// Les effets à sous-couche préfèrent l'illustration à zones vides (`__cutout`) : la sous-couche apparaît à travers ses vides.
|
||||
const cutout = UNDERLAY_EFFECTS.has(visual.effectPreset?.id) && (fullArt ? card.fullCutoutImage : card.cutoutImage);
|
||||
const image = cutout || (fullArt && card.fullImage) || card.image;
|
||||
return <div
|
||||
className="nebula-card-face"
|
||||
data-card-layout={visual.layout}
|
||||
|
|
@ -197,7 +201,11 @@ function CardFace({ entry, quantity, visual, size }) {
|
|||
data-holo-effect={visual.effectPreset?.id}
|
||||
data-holo-palette={visual.palette?.id}
|
||||
>
|
||||
<div className={`nebula-card-art ${image ? "has-image" : ""}`} aria-hidden="true">{image ? <img src={image} alt="" loading={size === "lg" ? "eager" : "lazy"} decoding="async" /> : <span className="nebula-card-placeholder-mark" />}</div>
|
||||
<div className={`nebula-card-art ${image ? "has-image" : ""}`} aria-hidden="true">
|
||||
{/* Sous-couche holographique : peinte sous l'illustration, elle n'apparaît qu'à travers ses zones transparentes. */}
|
||||
{UNDERLAY_EFFECTS.has(visual.effectPreset?.id) && <span className="nebula-card-holo-underlay" />}
|
||||
{image ? <img src={image} alt="" loading={size === "lg" ? "eager" : "lazy"} decoding="async" /> : <span className="nebula-card-placeholder-mark" />}
|
||||
</div>
|
||||
{showName && <h3><span>{card.name}</span></h3>}
|
||||
{showDetails && <div className="nebula-card-copy">
|
||||
<p>{card.description}</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue