Skip to documentation

Components

Aperture CRT

A curved retro display with pixel sampling, staggered RGB phosphor cells, scanlines, and a subtle brand glow.

  • pixi.js@^8.20.1

Preparing preview…

Installation

Choose your framework. The registry installs one component file and its PixiJS dependency.

Installation unavailable

This preview is not assigned to the free or paid catalog. Installation is unavailable.

The registry command writes the component to src/lib/components/ui/ApertureCrt.svelte and installs its dependencies.

The registry command writes the component to src/components/ui/ApertureCrt.tsx and installs its dependencies.

The registry command writes the component to src/components/ui/ApertureCrt.vue and installs its dependencies.

Overview

Aperture CRT downsamples the source once per display cell, then reconstructs it through staggered red, green, and blue phosphor slots.

Scanlines, tube curvature, tinted highlights, and deep screen black turn pixelation into a physical display illusion rather than a simple low-resolution filter.

Basic usage

The shader fills its parent. Your layout decides whether that parent is a card, hero, or viewport.

Hero.svelte
<script lang="ts">
	import ApertureCrt from '$lib/components/ui/ApertureCrt.svelte';
</script>

<section class="relative h-128 overflow-hidden">
	<ApertureCrt
		class="absolute inset-0"
		src="/images/your-image.jpg"
	/>

	<div class="relative z-10">Your content</div>
</section>
<script lang="ts">
	import ApertureCrt from '$lib/components/ui/ApertureCrt.svelte';
</script>

<section class="relative h-128 overflow-hidden">
	<ApertureCrt
		class="absolute inset-0"
		src="/images/your-image.jpg"
	/>

	<div class="relative z-10">Your content</div>
</section>
import { ApertureCrt } from '@/components/ui/ApertureCrt';

export function Hero() {
	return (
		<section className="relative h-128 overflow-hidden">
			<ApertureCrt
				className="absolute inset-0"
				src="/images/your-image.jpg"
			/>

			<div className="relative z-10">Your content</div>
		</section>
	);
}
import { ApertureCrt } from '@/components/ui/ApertureCrt';

export function Hero() {
	return (
		<section className="relative h-128 overflow-hidden">
			<ApertureCrt
				className="absolute inset-0"
				src="/images/your-image.jpg"
			/>

			<div className="relative z-10">Your content</div>
		</section>
	);
}
<script setup lang="ts">
import ApertureCrt from '@/components/ui/ApertureCrt.vue';
</script>

<template>
	<section class="relative h-128 overflow-hidden">
		<ApertureCrt
			class="absolute inset-0"
			src="/images/your-image.jpg"
		/>

		<div class="relative z-10">Your content</div>
	</section>
</template>
<script setup lang="ts">
import ApertureCrt from '@/components/ui/ApertureCrt.vue';
</script>

<template>
	<section class="relative h-128 overflow-hidden">
		<ApertureCrt
			class="absolute inset-0"
			src="/images/your-image.jpg"
		/>

		<div class="relative z-10">Your content</div>
	</section>
</template>
  • Raise Cell size when the component is viewed from farther away so the RGB subcells remain legible.
  • Curvature deliberately creates a dark screen edge; set it to zero for a flat-panel treatment.

Component API

Types below match the selected Svelte component.

Property Type Default Range / values
class
string
src
string Image URL or data URL
imageFit
"cover" | "fit" | "stretch" "cover" cover, fit, stretch
darkColor
string "#131315"
glowColor
string "#5867D3"
pixelSize
number 7 2–24
maskIntensity
number 0.55 0–1
scanlineIntensity
number 0.22 0–0.8
curvature
number 0.16 0–0.45
glow
number 0.12 0–0.5
contrast
number 1.08 0.5–2
paused
boolean false
interactive
boolean false
maxDpr
number 2 1–3
resolutionScale
number 1 0.25–1
onReady
(backend: ShaderBackend) => void webgpu, webgl
onRendererChange
(backend: ShaderBackend, reason: string) => void webgl
onError
(error: Error) => void
bind:this
Component public instance pause, resume, reset, resize, destroy

Types below match the selected React component.

Property Type Default Range / values
className
string
src
string Image URL or data URL
imageFit
"cover" | "fit" | "stretch" "cover" cover, fit, stretch
darkColor
string "#131315"
glowColor
string "#5867D3"
pixelSize
number 7 2–24
maskIntensity
number 0.55 0–1
scanlineIntensity
number 0.22 0–0.8
curvature
number 0.16 0–0.45
glow
number 0.12 0–0.5
contrast
number 1.08 0.5–2
paused
boolean false
interactive
boolean false
maxDpr
number 2 1–3
resolutionScale
number 1 0.25–1
onReady
(backend: ShaderBackend) => void webgpu, webgl
onRendererChange
(backend: ShaderBackend, reason: string) => void webgl
onError
(error: Error) => void
ref
ApertureCrtHandle pause, resume, reset, resize, destroy

Types below match the selected Vue component.

Property Type Default Range / values
class
string
src
string Image URL or data URL
imageFit
"cover" | "fit" | "stretch" "cover" cover, fit, stretch
darkColor
string "#131315"
glowColor
string "#5867D3"
pixelSize
number 7 2–24
maskIntensity
number 0.55 0–1
scanlineIntensity
number 0.22 0–0.8
curvature
number 0.16 0–0.45
glow
number 0.12 0–0.5
contrast
number 1.08 0.5–2
paused
boolean false
interactive
boolean false
maxDpr
number 2 1–3
resolutionScale
number 1 0.25–1
@ready
(backend: ShaderBackend) => void webgpu, webgl
@rendererchange
(backend: ShaderBackend, reason: string) => void webgl
@error
(error: Error) => void
ref
Component public instance pause, resume, reset, resize, destroy