@deriv-com/dds-marketing 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.llm/components/awards.md +209 -0
- package/.llm/components/background.md +420 -0
- package/.llm/components/bottomsheet.md +5 -0
- package/.llm/components/comparisoncards.md +257 -0
- package/.llm/components/comparisontable.md +231 -0
- package/.llm/components/ctabanner.md +22 -0
- package/.llm/components/ctabannerslider.md +36 -2
- package/.llm/components/datatable.md +273 -0
- package/.llm/components/downloadbanner.md +283 -0
- package/.llm/components/featurecards.md +41 -3
- package/.llm/components/featurecardscarousel.md +311 -0
- package/.llm/components/featuresplit.md +5 -0
- package/.llm/components/featurestack.md +227 -0
- package/.llm/components/illustrationcard.md +236 -0
- package/.llm/components/illustrationscene.md +229 -0
- package/.llm/components/imagebanner.md +278 -0
- package/.llm/components/landinghero.md +24 -0
- package/.llm/components/navbar.md +1 -1
- package/.llm/components/navbaritem.md +4 -0
- package/.llm/components/pageheader.md +22 -0
- package/.llm/components/paginationdots.md +6 -1
- package/.llm/components/producthero.md +35 -11
- package/.llm/components/resourcebanner.md +247 -0
- package/.llm/components/scenescroll.md +222 -0
- package/.llm/components/select.md +17 -0
- package/.llm/components/stats.md +219 -0
- package/.llm/components/steps.md +286 -0
- package/.llm/components/stickycards.md +251 -0
- package/.llm/components/tableheadercell.md +19 -0
- package/.llm/components/teamgrid.md +243 -0
- package/.llm/components/testimonialrow.md +5 -0
- package/.llm/components/testimonialslider.md +14 -1
- package/.llm/components/textarea.md +13 -0
- package/.llm/components/textinput.md +13 -0
- package/.llm/components/textscroll.md +187 -0
- package/.llm/components/tiers.md +227 -0
- package/.llm/digest/awards.md +45 -0
- package/.llm/digest/background.md +53 -0
- package/.llm/digest/bottomsheet.md +2 -0
- package/.llm/digest/comparisoncards.md +51 -0
- package/.llm/digest/comparisontable.md +53 -0
- package/.llm/digest/ctabanner.md +4 -0
- package/.llm/digest/ctabannerslider.md +7 -0
- package/.llm/digest/datatable.md +65 -0
- package/.llm/digest/downloadbanner.md +65 -0
- package/.llm/digest/featurecards.md +1 -1
- package/.llm/digest/featurecardscarousel.md +54 -0
- package/.llm/digest/featuresplit.md +1 -0
- package/.llm/digest/featurestack.md +48 -0
- package/.llm/digest/illustrationcard.md +46 -0
- package/.llm/digest/illustrationscene.md +50 -0
- package/.llm/digest/imagebanner.md +64 -0
- package/.llm/digest/landinghero.md +7 -0
- package/.llm/digest/navbaritem.md +1 -0
- package/.llm/digest/pageheader.md +4 -0
- package/.llm/digest/paginationdots.md +3 -1
- package/.llm/digest/producthero.md +4 -2
- package/.llm/digest/resourcebanner.md +53 -0
- package/.llm/digest/scenescroll.md +49 -0
- package/.llm/digest/select.md +5 -0
- package/.llm/digest/stats.md +46 -0
- package/.llm/digest/steps.md +55 -0
- package/.llm/digest/stickycards.md +52 -0
- package/.llm/digest/tableheadercell.md +4 -0
- package/.llm/digest/teamgrid.md +53 -0
- package/.llm/digest/testimonialrow.md +2 -0
- package/.llm/digest/testimonialslider.md +4 -0
- package/.llm/digest/textarea.md +4 -0
- package/.llm/digest/textinput.md +4 -0
- package/.llm/digest/textscroll.md +43 -0
- package/.llm/digest/tiers.md +50 -0
- package/.llm/index.md +25 -2
- package/.llm/tokens.md +37 -1
- package/AGENTS.md +20 -1
- package/dist/components/awards-data.d.ts +24 -0
- package/dist/components/awards-data.js +11 -0
- package/dist/components/block-image-data.d.ts +24 -0
- package/dist/components/block-image-data.js +9 -0
- package/dist/components/blocks/awards/Awards.css +134 -0
- package/dist/components/blocks/awards/Awards.d.ts +24 -0
- package/dist/components/blocks/awards/Awards.js +114 -0
- package/dist/components/blocks/awards/Awards.types.d.ts +31 -0
- package/dist/components/blocks/awards/Awards.types.js +16 -0
- package/dist/components/blocks/awards/awards-impl.css +222 -0
- package/dist/components/blocks/cards-of.d.ts +16 -0
- package/dist/components/blocks/cards-of.js +23 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.css +195 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.d.ts +24 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.js +75 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.types.d.ts +49 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.types.js +26 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +262 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.css +111 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.d.ts +25 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.js +100 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.types.d.ts +36 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.types.js +15 -0
- package/dist/components/blocks/comparison-table/comparison-table-impl.css +143 -0
- package/dist/components/blocks/cta-banner/CtaBanner.css +1 -0
- package/dist/components/blocks/cta-banner/CtaBanner.d.ts +1 -1
- package/dist/components/blocks/cta-banner/CtaBanner.js +3 -2
- package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +6 -0
- package/dist/components/blocks/cta-banner/CtaBanner.types.js +1 -1
- package/dist/components/blocks/cta-banner/cta-banner-impl.css +8 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.css +1 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +1 -1
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +10 -5
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +12 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +1 -1
- package/dist/components/blocks/cta-banner-slider/cta-banner-slider-impl.css +8 -0
- package/dist/components/blocks/data-table/DataTable.css +170 -0
- package/dist/components/blocks/data-table/DataTable.d.ts +29 -0
- package/dist/components/blocks/data-table/DataTable.js +84 -0
- package/dist/components/blocks/data-table/DataTable.types.d.ts +69 -0
- package/dist/components/blocks/data-table/DataTable.types.js +19 -0
- package/dist/components/blocks/data-table/data-table-impl.css +155 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +228 -0
- package/dist/components/blocks/download-banner/DownloadBanner.d.ts +28 -0
- package/dist/components/blocks/download-banner/DownloadBanner.js +75 -0
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +56 -0
- package/dist/components/blocks/download-banner/DownloadBanner.types.js +23 -0
- package/dist/components/blocks/download-banner/download-banner-impl.css +216 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.css +1 -0
- package/dist/components/blocks/faq-accordion/faq-accordion-impl.css +3 -7
- package/dist/components/blocks/feature-bullets/FeatureBullets.css +1 -0
- package/dist/components/blocks/feature-bullets/feature-bullets-impl.css +14 -1
- package/dist/components/blocks/feature-cards/FeatureCards.css +1 -0
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +4 -21
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +10 -9
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.css +115 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.d.ts +30 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.js +160 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +52 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.js +17 -0
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +207 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.css +1 -0
- package/dist/components/blocks/feature-split/FeatureSplit.css +1 -0
- package/dist/components/blocks/feature-split/feature-split-impl.css +14 -1
- package/dist/components/blocks/feature-stack/FeatureStack.css +86 -0
- package/dist/components/blocks/feature-stack/FeatureStack.d.ts +19 -0
- package/dist/components/blocks/feature-stack/FeatureStack.js +27 -0
- package/dist/components/blocks/feature-stack/FeatureStack.types.d.ts +34 -0
- package/dist/components/blocks/feature-stack/FeatureStack.types.js +14 -0
- package/dist/components/blocks/feature-stack/feature-stack-impl.css +87 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +133 -0
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +32 -0
- package/dist/components/blocks/image-banner/ImageBanner.js +41 -0
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +54 -0
- package/dist/components/blocks/image-banner/ImageBanner.types.js +14 -0
- package/dist/components/blocks/image-banner/image-banner-impl.css +281 -0
- package/dist/components/blocks/landing-hero/LandingHero.css +1 -0
- package/dist/components/blocks/landing-hero/LandingHero.d.ts +1 -1
- package/dist/components/blocks/landing-hero/LandingHero.js +4 -3
- package/dist/components/blocks/landing-hero/LandingHero.types.d.ts +7 -3
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -0
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -0
- package/dist/components/blocks/page-header/PageHeader.css +1 -0
- package/dist/components/blocks/page-header/PageHeader.d.ts +1 -1
- package/dist/components/blocks/page-header/PageHeader.js +3 -2
- package/dist/components/blocks/page-header/PageHeader.types.d.ts +6 -0
- package/dist/components/blocks/page-header/PageHeader.types.js +1 -1
- package/dist/components/blocks/page-header/page-header-impl.css +10 -0
- package/dist/components/blocks/product-hero/ProductHero.css +8 -3
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
- package/dist/components/blocks/product-hero/ProductHero.js +5 -2
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +5 -1
- package/dist/components/blocks/product-hero/ProductHero.types.js +1 -0
- package/dist/components/blocks/product-hero/product-hero-impl.css +43 -12
- package/dist/components/blocks/resource-banner/ResourceBanner.css +106 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.d.ts +32 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.js +51 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.types.d.ts +44 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.types.js +14 -0
- package/dist/components/blocks/resource-banner/resource-banner-impl.css +69 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.css +93 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +36 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.js +54 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +32 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +15 -0
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +275 -0
- package/dist/components/blocks/stats/Stats.css +139 -0
- package/dist/components/blocks/stats/Stats.d.ts +24 -0
- package/dist/components/blocks/stats/Stats.js +120 -0
- package/dist/components/blocks/stats/Stats.types.d.ts +36 -0
- package/dist/components/blocks/stats/Stats.types.js +19 -0
- package/dist/components/blocks/stats/stats-count.d.ts +34 -0
- package/dist/components/blocks/stats/stats-count.js +61 -0
- package/dist/components/blocks/stats/stats-impl.css +284 -0
- package/dist/components/blocks/stats/use-wheel.d.ts +37 -0
- package/dist/components/blocks/stats/use-wheel.js +126 -0
- package/dist/components/blocks/steps/Steps.css +202 -0
- package/dist/components/blocks/steps/Steps.d.ts +32 -0
- package/dist/components/blocks/steps/Steps.js +65 -0
- package/dist/components/blocks/steps/Steps.types.d.ts +48 -0
- package/dist/components/blocks/steps/Steps.types.js +21 -0
- package/dist/components/blocks/steps/steps-impl.css +216 -0
- package/dist/components/blocks/steps/use-turn.d.ts +33 -0
- package/dist/components/blocks/steps/use-turn.js +75 -0
- package/dist/components/blocks/sticky-cards/StickyCards.css +154 -0
- package/dist/components/blocks/sticky-cards/StickyCards.d.ts +35 -0
- package/dist/components/blocks/sticky-cards/StickyCards.js +153 -0
- package/dist/components/blocks/sticky-cards/StickyCards.types.d.ts +43 -0
- package/dist/components/blocks/sticky-cards/StickyCards.types.js +18 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +393 -0
- package/dist/components/blocks/team-grid/TeamGrid.css +159 -0
- package/dist/components/blocks/team-grid/TeamGrid.d.ts +28 -0
- package/dist/components/blocks/team-grid/TeamGrid.js +74 -0
- package/dist/components/blocks/team-grid/TeamGrid.types.d.ts +51 -0
- package/dist/components/blocks/team-grid/TeamGrid.types.js +20 -0
- package/dist/components/blocks/team-grid/team-grid-impl.css +129 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +4 -3
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +3 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.js +1 -1
- package/dist/components/blocks/testimonial-row/testimonial-row-impl.css +8 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.d.ts +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.js +2 -2
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +8 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.js +1 -1
- package/dist/components/blocks/text-scroll/TextScroll.css +53 -0
- package/dist/components/blocks/text-scroll/TextScroll.d.ts +5 -0
- package/dist/components/blocks/text-scroll/TextScroll.js +71 -0
- package/dist/components/blocks/text-scroll/TextScroll.types.d.ts +22 -0
- package/dist/components/blocks/text-scroll/TextScroll.types.js +10 -0
- package/dist/components/blocks/text-scroll/text-scroll-impl.css +115 -0
- package/dist/components/blocks/tiers/Tiers.css +233 -0
- package/dist/components/blocks/tiers/Tiers.d.ts +32 -0
- package/dist/components/blocks/tiers/Tiers.js +68 -0
- package/dist/components/blocks/tiers/Tiers.types.d.ts +45 -0
- package/dist/components/blocks/tiers/Tiers.types.js +25 -0
- package/dist/components/blocks/tiers/tiers-impl.css +185 -0
- package/dist/components/blocks/use-rotation.d.ts +12 -2
- package/dist/components/blocks/use-rotation.js +6 -28
- package/dist/components/comparison-cards-data.d.ts +59 -0
- package/dist/components/comparison-cards-data.js +12 -0
- package/dist/components/comparison-table-data.d.ts +39 -0
- package/dist/components/comparison-table-data.js +11 -0
- package/dist/components/core/accordion-item/AccordionItem.css +1 -5
- package/dist/components/core/background/Background.css +92 -0
- package/dist/components/core/background/Background.d.ts +27 -0
- package/dist/components/core/background/Background.js +45 -0
- package/dist/components/core/background/Background.types.d.ts +39 -0
- package/dist/components/core/background/Background.types.js +11 -0
- package/dist/components/core/background/background-impl.css +760 -0
- package/dist/components/core/background/halftone.d.ts +134 -0
- package/dist/components/core/background/halftone.js +722 -0
- package/dist/components/core/background/patterns.d.ts +66 -0
- package/dist/components/core/background/patterns.js +244 -0
- package/dist/components/core/background/shader.d.ts +44 -0
- package/dist/components/core/background/shader.js +307 -0
- package/dist/components/core/background/use-halftone.d.ts +15 -0
- package/dist/components/core/background/use-halftone.js +27 -0
- package/dist/components/core/background/use-offscreen.d.ts +10 -0
- package/dist/components/core/background/use-offscreen.js +30 -0
- package/dist/components/core/background/use-shader.d.ts +11 -0
- package/dist/components/core/background/use-shader.js +25 -0
- package/dist/components/core/background/use-spotlight.d.ts +14 -0
- package/dist/components/core/background/use-spotlight.js +73 -0
- package/dist/components/core/bottom-sheet/BottomSheet.js +2 -2
- package/dist/components/core/bottom-sheet/BottomSheet.types.d.ts +3 -1
- package/dist/components/core/breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/components/core/breadcrumb/Breadcrumb.js +1 -0
- package/dist/components/core/breadcrumb/breadcrumb-impl.css +11 -0
- package/dist/components/core/button/button-impl.css +14 -1
- package/dist/components/core/illustration-card/IllustrationCard.css +40 -0
- package/dist/components/core/illustration-card/IllustrationCard.d.ts +22 -0
- package/dist/components/core/illustration-card/IllustrationCard.js +82 -0
- package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +23 -0
- package/dist/components/core/illustration-card/IllustrationCard.types.js +8 -0
- package/dist/components/core/illustration-card/illustration-card-impl.css +47 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +41 -0
- package/dist/components/core/illustration-scene/IllustrationScene.d.ts +14 -0
- package/dist/components/core/illustration-scene/IllustrationScene.js +16 -0
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +32 -0
- package/dist/components/core/illustration-scene/IllustrationScene.types.js +8 -0
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +46 -0
- package/dist/components/core/link/Link.js +7 -3
- package/dist/components/core/link/link-impl.css +29 -2
- package/dist/components/core/navbar/Navbar.css +2 -2
- package/dist/components/core/navbar/Navbar.types.d.ts +1 -1
- package/dist/components/core/navbar-item/NavbarItem.d.ts +2 -1
- package/dist/components/core/navbar-item/NavbarItem.js +3 -10
- package/dist/components/core/navbar-item/NavbarItem.types.d.ts +4 -1
- package/dist/components/core/navbar-item/NavbarItem.types.js +1 -1
- package/dist/components/core/navbar-item/navbar-item-impl.css +10 -0
- package/dist/components/core/navbar-menu/navbar-menu-impl.css +9 -0
- package/dist/components/core/navbar-switcher/navbar-switcher-impl.css +19 -0
- package/dist/components/core/pagination/Pagination.js +1 -1
- package/dist/components/core/pagination/pagination-impl.css +9 -0
- package/dist/components/core/pagination-dots/PaginationDots.d.ts +1 -1
- package/dist/components/core/pagination-dots/PaginationDots.js +3 -3
- package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +3 -1
- package/dist/components/core/segmented-control/SegmentedControl.css +4 -3
- package/dist/components/core/segmented-control/SegmentedControl.js +17 -3
- package/dist/components/core/segmented-control-item/SegmentedControlItem.css +2 -1
- package/dist/components/core/select/Select.js +3 -3
- package/dist/components/core/select/Select.types.d.ts +11 -1
- package/dist/components/core/select/Select.types.js +1 -1
- package/dist/components/core/tab-list/TabList.js +9 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.d.ts +1 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.js +5 -2
- package/dist/components/core/table-header-cell/TableHeaderCell.types.d.ts +7 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.types.js +1 -1
- package/dist/components/core/text-area/TextArea.d.ts +1 -1
- package/dist/components/core/text-area/TextArea.js +2 -2
- package/dist/components/core/text-area/TextArea.types.d.ts +9 -1
- package/dist/components/core/text-area/TextArea.types.js +1 -1
- package/dist/components/core/text-input/TextInput.d.ts +1 -1
- package/dist/components/core/text-input/TextInput.js +2 -2
- package/dist/components/core/text-input/TextInput.types.d.ts +9 -1
- package/dist/components/core/text-input/TextInput.types.js +1 -1
- package/dist/components/data-table-data.d.ts +33 -0
- package/dist/components/data-table-data.js +12 -0
- package/dist/components/download-banner-data.d.ts +52 -0
- package/dist/components/download-banner-data.js +11 -0
- package/dist/components/index.d.ts +51 -0
- package/dist/components/index.js +38 -0
- package/dist/components/resource-banner-data.d.ts +34 -0
- package/dist/components/resource-banner-data.js +13 -0
- package/dist/components/scene-scroll-data.d.ts +24 -0
- package/dist/components/scene-scroll-data.js +9 -0
- package/dist/components/stats-data.d.ts +28 -0
- package/dist/components/stats-data.js +11 -0
- package/dist/components/steps-data.d.ts +38 -0
- package/dist/components/steps-data.js +13 -0
- package/dist/components/sticky-cards-data.d.ts +43 -0
- package/dist/components/sticky-cards-data.js +12 -0
- package/dist/components/team-grid-data.d.ts +38 -0
- package/dist/components/team-grid-data.js +11 -0
- package/dist/components/tiers-data.d.ts +47 -0
- package/dist/components/tiers-data.js +13 -0
- package/dist/marketing.css +101 -28
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fragment shaders behind the patterns the stylesheet can only approximate.
|
|
3
|
+
*
|
|
4
|
+
* Each is a function of where it is, the time and the light: no state, no texture, nothing to
|
|
5
|
+
* load. What they share — noise, a folded noise, the grain, the inks and measures read from the
|
|
6
|
+
* stylesheet — is in `shader.ts`. Every one ends in `grain`, which is the difference between a
|
|
7
|
+
* gradient and a surface: it gives the field a tooth, and dithers a long fade so it never bands.
|
|
8
|
+
*
|
|
9
|
+
* Inks arrive as `u_ink0` (the ground) to `u_ink5`, each pattern naming in the stylesheet what its
|
|
10
|
+
* own are, per tone. `u_strength` is how loudly it is painted on that tone.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The aurora: curtains of light rising from the band's foot.
|
|
14
|
+
*
|
|
15
|
+
* Sheets of noise stretched upright, swaying as a slower noise moves under them, with a ragged
|
|
16
|
+
* crest and fine rays running up through them — light falling through folds rather than pools of
|
|
17
|
+
* colour. The pointer bends the sheets towards it and brightens them where it is.
|
|
18
|
+
*/
|
|
19
|
+
export declare const AURORA = "\nvoid main() {\n \n vec2 frag = gl_FragCoord.xy / u_scale;\n vec2 px = vec2(frag.x, u_size.y - frag.y);\n vec2 uv = px / u_size;\n float aspect = u_size.x / u_size.y;\n // The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size\n // \u2014 measured against the band's proportions, a phone-width band got one fold stretched tall. It\n // grows a little with the band, so a full-width hero is not a field of small eddies.\n vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));\n vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));\n\n vec2 p = vec2(field.x, uv.y);\n float t = u_time * 0.06;\n\n vec2 toward = vec2(field.x - lamp0.x, uv.y - u_pointer.y);\n float near = exp(-dot(toward, toward) * 5.0) * u_hover;\n\n float sway = fbm(vec2(p.x * 0.8 + t, t * 0.7)) - 0.5;\n float x = p.x * 1.5 + sway * 1.6 - toward.x * near * 0.8;\n\n float folds = fbm(vec2(x * 2.2, p.y * 0.35 - t * 1.6));\n float curtain = smoothstep(0.3, 0.72, folds);\n float rays = 0.6 + 0.4 * noise(vec2(x * 26.0, p.y * 1.4 - t * 3.0));\n\n float crest = 0.08 + 0.38 * fbm(vec2(x * 1.2 + 4.0, t * 0.8));\n float rise = smoothstep(crest, 0.82, uv.y);\n float base = smoothstep(0.55, 1.0, uv.y);\n\n float light = (curtain * rays * rise + base * 0.3 + near * 0.45) * u_strength;\n\n vec3 tint = mix(u_ink1, u_ink2, smoothstep(0.3, 0.8, fbm(vec2(x * 1.1 - 3.0, p.y * 0.8 + t))));\n tint = mix(tint, u_ink3, pow(clamp(curtain * rise, 0.0, 1.0), 2.5) * 0.65);\n\n vec3 colour = mix(u_ink0, tint, clamp(light, 0.0, 1.0));\n gl_FragColor = vec4(grain(colour, gl_FragCoord.xy), 1.0);\n}\n";
|
|
20
|
+
/**
|
|
21
|
+
* The mesh: the design system's own front page — five soft pools of the brand's reds, run together.
|
|
22
|
+
*
|
|
23
|
+
* The same drawing as the front page's panel and as this pattern's stylesheet version: each pool
|
|
24
|
+
* in its place, its red, its size, drifting and stretching on loops of its own length, and leaning
|
|
25
|
+
* towards the pointer at its own depth, so the colours slide through one another rather than moving
|
|
26
|
+
* as one. Where the stylesheet blurs five shapes, this draws each as a soft-edged pool outright —
|
|
27
|
+
* an uneven round whose outline wobbles as it turns — and lays them over the ground in order.
|
|
28
|
+
*
|
|
29
|
+
* The first pool is the deepest red, held back by `u_shade` so the words keep a red to stand on.
|
|
30
|
+
*/
|
|
31
|
+
export declare const MESH = "\n// One pool: where it rests, in shares of the band; how big, in shares of its longer side; how far it leans after the\n// pointer; and its loops \u2014 the drift and the stretch \u2014 in seconds, offset by a phase of its own.\nfloat pool(vec2 px, vec2 at, float size, float depth, float drift, float morph, float phase) {\n // Sized by the band's longer side rather than its width: on a phone the band is tall and narrow,\n // and pools sized by its width came out small \u2014 the deepest a hard, dark blot in one corner and\n // the rest of the band flat. Measured against the longer side they cover a tall band as they do\n // a wide one.\n float w = max(u_size.x, u_size.y);\n float t = u_time;\n float tau = 6.2831853;\n\n // The drift: a slow wander and a swell, there and back.\n vec2 wander = vec2(\n 0.10 * sin(tau * t / drift + phase),\n 0.08 * sin(tau * t / (drift * 1.3) + phase * 1.7)\n ) * size * w;\n float swell = 1.0 + 0.1 * sin(tau * t / (drift * 0.8) + phase * 0.6);\n\n // Leaning after the pointer by its depth, a hundredth of the pool per step, as the front page's do.\n vec2 lean = (u_pointer - 0.5) * 2.0 * u_hover * depth * 0.01 * size * w;\n\n vec2 centre = at * u_size + wander + lean;\n vec2 d = px - centre;\n\n // The stretch: one way then the other, turning as it goes.\n float turn = 1.4 * sin(tau * t / (morph * 2.0) + phase);\n float c = cos(turn);\n float s = sin(turn);\n d = mat2(c, -s, s, c) * d;\n float stretch = sin(tau * t / morph + phase);\n d /= vec2(1.0 + 0.18 * stretch, 1.0 - 0.15 * stretch);\n\n // An uneven round, its outline wobbling as it turns.\n float angle = atan(d.y, d.x);\n float radius = size * w * 0.5 * swell * (1.0 + 0.1 * sin(3.0 * angle + phase) + 0.06 * sin(5.0 * angle - phase * 2.0));\n float r = length(d) / radius;\n // Soft all the way out: a blur's falloff rather than an edge.\n return exp(-r * r * 1.1);\n}\n\nvoid main() {\n \n vec2 frag = gl_FragCoord.xy / u_scale;\n vec2 px = vec2(frag.x, u_size.y - frag.y);\n vec2 uv = px / u_size;\n float aspect = u_size.x / u_size.y;\n // The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size\n // \u2014 measured against the band's proportions, a phone-width band got one fold stretched tall. It\n // grows a little with the band, so a full-width hero is not a field of small eddies.\n vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));\n vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));\n\n vec3 c = u_ink0;\n // The deepest red, off the near side low down \u2014 a shade under the words, held back.\n c = mix(c, u_ink1, pool(px, vec2(0.06, 0.82), 0.62, -8.0, 26.0, 13.0, 0.0) * u_shade * u_strength);\n // The pressed red, high in the far corner, the largest.\n c = mix(c, u_ink2, pool(px, vec2(0.92, -0.08), 0.85, 10.0, 31.0, 9.0, 1.7) * u_strength);\n // The hover red, through the middle.\n c = mix(c, u_ink3, pool(px, vec2(0.6, 0.5), 0.62, 16.0, 22.0, 7.0, 3.1) * u_strength);\n // The pressed red again, swelling up from the foot.\n c = mix(c, u_ink4, pool(px, vec2(0.5, 1.1), 0.75, -12.0, 35.0, 12.0, 4.4) * u_strength);\n // The coral itself, high in the far corner: the brightest the pools go.\n c = mix(c, u_ink5, pool(px, vec2(0.74, 0.06), 0.42, 20.0, 28.0, 8.0, 5.9) * u_strength);\n\n // A little more colour, as the front page's blur saturates its pools.\n float grey = dot(c, vec3(0.299, 0.587, 0.114));\n c = mix(vec3(grey), c, 1.15);\n\n gl_FragColor = vec4(grain(clamp(c, 0.0, 1.0), gl_FragCoord.xy), 1.0);\n}\n";
|
|
32
|
+
/**
|
|
33
|
+
* The grid: hairlines a pitch apart, rising from the foot as they did, now lit.
|
|
34
|
+
*
|
|
35
|
+
* A bloom at the foot they rise out of, a brighter point where two lines cross, and every few
|
|
36
|
+
* lines a short dash of light running along it — up a rule, across another — at a pace of its
|
|
37
|
+
* own, so the grid reads as carrying something. The pointer lights the lines around it.
|
|
38
|
+
*/
|
|
39
|
+
export declare const GRID = "\n\nfloat hairline(float distance) {\n float halfWidth = u_hairline * 0.5;\n float pixel = 1.0 / u_scale;\n return 1.0 - smoothstep(halfWidth, halfWidth + pixel, distance);\n}\n\n// A soft bloom at the middle of the band's foot \u2014 where the halftone's glow rests \u2014 so the lines\n// rise out of light rather than out of a flat ground.\nfloat bloom(vec2 uv) {\n vec2 d = vec2((uv.x - 0.5) * 1.5, (1.0 - uv.y) * 2.2);\n return exp(-dot(d, d));\n}\n\n// The pointer's light, a soft circle a pitch and a half across.\nfloat lamp(vec2 px) {\n vec2 d = px - u_pointer * u_size;\n float reach = u_pitch * 1.6;\n return exp(-dot(d, d) / (reach * reach)) * u_hover;\n}\n\n// A short bright dash running along a line, at a place along it, fading off behind.\nfloat dash(float along) {\n return smoothstep(0.0, 0.06, along) * (1.0 - smoothstep(0.06, 0.3, along));\n}\n\nvoid main() {\n \n vec2 frag = gl_FragCoord.xy / u_scale;\n vec2 px = vec2(frag.x, u_size.y - frag.y);\n vec2 uv = px / u_size;\n float aspect = u_size.x / u_size.y;\n // The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size\n // \u2014 measured against the band's proportions, a phone-width band got one fold stretched tall. It\n // grows a little with the band, so a full-width hero is not a field of small eddies.\n vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));\n vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));\n\n float pitch = u_pitch;\n float shift = mod(u_time / 10.0, 1.0) * pitch;\n vec2 g = vec2(px.x - u_size.x * 0.5 + pitch * 0.5, px.y + shift);\n vec2 d = abs(fract(g / pitch) - 0.5) * pitch;\n vec2 lines = vec2(hairline(pitch * 0.5 - d.x), hairline(pitch * 0.5 - d.y));\n float line = max(lines.x, lines.y);\n float meet = lines.x * lines.y;\n\n vec2 cell = floor(g / pitch);\n float upward = fract(px.y / (pitch * 7.0) + u_time * 0.07 + hash(vec2(cell.x, 3.1)));\n float across = fract(px.x / (pitch * 9.0) - u_time * 0.05 + hash(vec2(cell.y, 7.7)));\n float pulses =\n lines.x * dash(upward) * step(0.7, hash(vec2(cell.x, 9.7))) +\n lines.y * dash(across) * step(0.78, hash(vec2(cell.y, 4.2)));\n\n float fade = smoothstep(0.0, 1.0, uv.y);\n float glow = bloom(uv);\n float lit = lamp(px);\n\n vec3 c = mix(u_ink0, u_ink3, glow * 0.45 * u_strength);\n c = mix(c, u_ink1, line * fade * (0.55 + 0.45 * glow) * u_strength);\n c = mix(c, u_ink2, clamp(pulses * fade + line * lit + meet * fade * 0.35, 0.0, 1.0) * u_strength);\n\n gl_FragColor = vec4(grain(c, gl_FragCoord.xy), 1.0);\n}\n";
|
|
40
|
+
/**
|
|
41
|
+
* The rings: circles spreading from the middle of the band's foot, now lit.
|
|
42
|
+
*
|
|
43
|
+
* The same bloom at the foot, and on every ring a few arcs of light travelling round it, each ring
|
|
44
|
+
* its own way and pace, so the rings shimmer as they spread. The pointer lights the rings around it.
|
|
45
|
+
*/
|
|
46
|
+
export declare const RINGS = "\n\nfloat hairline(float distance) {\n float halfWidth = u_hairline * 0.5;\n float pixel = 1.0 / u_scale;\n return 1.0 - smoothstep(halfWidth, halfWidth + pixel, distance);\n}\n\n// A soft bloom at the middle of the band's foot \u2014 where the halftone's glow rests \u2014 so the lines\n// rise out of light rather than out of a flat ground.\nfloat bloom(vec2 uv) {\n vec2 d = vec2((uv.x - 0.5) * 1.5, (1.0 - uv.y) * 2.2);\n return exp(-dot(d, d));\n}\n\n// The pointer's light, a soft circle a pitch and a half across.\nfloat lamp(vec2 px) {\n vec2 d = px - u_pointer * u_size;\n float reach = u_pitch * 1.6;\n return exp(-dot(d, d) / (reach * reach)) * u_hover;\n}\n\n// A short bright dash running along a line, at a place along it, fading off behind.\nfloat dash(float along) {\n return smoothstep(0.0, 0.06, along) * (1.0 - smoothstep(0.06, 0.3, along));\n}\n\nvoid main() {\n \n vec2 frag = gl_FragCoord.xy / u_scale;\n vec2 px = vec2(frag.x, u_size.y - frag.y);\n vec2 uv = px / u_size;\n float aspect = u_size.x / u_size.y;\n // The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size\n // \u2014 measured against the band's proportions, a phone-width band got one fold stretched tall. It\n // grows a little with the band, so a full-width hero is not a field of small eddies.\n vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));\n vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));\n\n float pitch = u_pitch;\n vec2 centre = vec2(u_size.x * 0.5, u_size.y);\n vec2 from = px - centre;\n float radius = length(from);\n float shift = mod(u_time / 10.0, 1.0) * pitch;\n float place = (radius - shift) / pitch;\n float d = abs(fract(place) - 0.5) * pitch;\n float line = hairline(pitch * 0.5 - d);\n\n float ring = floor(place);\n float angle = atan(from.x, -from.y);\n float turn = (hash(vec2(ring, 1.7)) > 0.5 ? 1.0 : -1.0) * (0.15 + 0.25 * hash(vec2(ring, 5.3)));\n float arc = noise(vec2(angle * 3.0 + u_time * turn, ring * 3.1));\n float sparkle = line * smoothstep(0.62, 0.9, arc);\n\n float fade = smoothstep(0.0, 1.0, uv.y);\n float glow = bloom(uv);\n float lit = lamp(px);\n\n vec3 c = mix(u_ink0, u_ink3, glow * 0.45 * u_strength);\n c = mix(c, u_ink1, line * fade * (0.55 + 0.45 * glow) * u_strength);\n c = mix(c, u_ink2, clamp(sparkle * fade + line * lit, 0.0, 1.0) * u_strength);\n\n gl_FragColor = vec4(grain(c, gl_FragCoord.xy), 1.0);\n}\n";
|
|
47
|
+
/** Each pattern's shader and the highest density it draws at: soft fields need little, hairlines two. */
|
|
48
|
+
export declare const SHADERS: {
|
|
49
|
+
readonly aurora: {
|
|
50
|
+
readonly fragment: "\nvoid main() {\n \n vec2 frag = gl_FragCoord.xy / u_scale;\n vec2 px = vec2(frag.x, u_size.y - frag.y);\n vec2 uv = px / u_size;\n float aspect = u_size.x / u_size.y;\n // The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size\n // — measured against the band's proportions, a phone-width band got one fold stretched tall. It\n // grows a little with the band, so a full-width hero is not a field of small eddies.\n vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));\n vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));\n\n vec2 p = vec2(field.x, uv.y);\n float t = u_time * 0.06;\n\n vec2 toward = vec2(field.x - lamp0.x, uv.y - u_pointer.y);\n float near = exp(-dot(toward, toward) * 5.0) * u_hover;\n\n float sway = fbm(vec2(p.x * 0.8 + t, t * 0.7)) - 0.5;\n float x = p.x * 1.5 + sway * 1.6 - toward.x * near * 0.8;\n\n float folds = fbm(vec2(x * 2.2, p.y * 0.35 - t * 1.6));\n float curtain = smoothstep(0.3, 0.72, folds);\n float rays = 0.6 + 0.4 * noise(vec2(x * 26.0, p.y * 1.4 - t * 3.0));\n\n float crest = 0.08 + 0.38 * fbm(vec2(x * 1.2 + 4.0, t * 0.8));\n float rise = smoothstep(crest, 0.82, uv.y);\n float base = smoothstep(0.55, 1.0, uv.y);\n\n float light = (curtain * rays * rise + base * 0.3 + near * 0.45) * u_strength;\n\n vec3 tint = mix(u_ink1, u_ink2, smoothstep(0.3, 0.8, fbm(vec2(x * 1.1 - 3.0, p.y * 0.8 + t))));\n tint = mix(tint, u_ink3, pow(clamp(curtain * rise, 0.0, 1.0), 2.5) * 0.65);\n\n vec3 colour = mix(u_ink0, tint, clamp(light, 0.0, 1.0));\n gl_FragColor = vec4(grain(colour, gl_FragCoord.xy), 1.0);\n}\n";
|
|
51
|
+
readonly density: 0.5;
|
|
52
|
+
};
|
|
53
|
+
readonly mesh: {
|
|
54
|
+
readonly fragment: "\n// One pool: where it rests, in shares of the band; how big, in shares of its longer side; how far it leans after the\n// pointer; and its loops — the drift and the stretch — in seconds, offset by a phase of its own.\nfloat pool(vec2 px, vec2 at, float size, float depth, float drift, float morph, float phase) {\n // Sized by the band's longer side rather than its width: on a phone the band is tall and narrow,\n // and pools sized by its width came out small — the deepest a hard, dark blot in one corner and\n // the rest of the band flat. Measured against the longer side they cover a tall band as they do\n // a wide one.\n float w = max(u_size.x, u_size.y);\n float t = u_time;\n float tau = 6.2831853;\n\n // The drift: a slow wander and a swell, there and back.\n vec2 wander = vec2(\n 0.10 * sin(tau * t / drift + phase),\n 0.08 * sin(tau * t / (drift * 1.3) + phase * 1.7)\n ) * size * w;\n float swell = 1.0 + 0.1 * sin(tau * t / (drift * 0.8) + phase * 0.6);\n\n // Leaning after the pointer by its depth, a hundredth of the pool per step, as the front page's do.\n vec2 lean = (u_pointer - 0.5) * 2.0 * u_hover * depth * 0.01 * size * w;\n\n vec2 centre = at * u_size + wander + lean;\n vec2 d = px - centre;\n\n // The stretch: one way then the other, turning as it goes.\n float turn = 1.4 * sin(tau * t / (morph * 2.0) + phase);\n float c = cos(turn);\n float s = sin(turn);\n d = mat2(c, -s, s, c) * d;\n float stretch = sin(tau * t / morph + phase);\n d /= vec2(1.0 + 0.18 * stretch, 1.0 - 0.15 * stretch);\n\n // An uneven round, its outline wobbling as it turns.\n float angle = atan(d.y, d.x);\n float radius = size * w * 0.5 * swell * (1.0 + 0.1 * sin(3.0 * angle + phase) + 0.06 * sin(5.0 * angle - phase * 2.0));\n float r = length(d) / radius;\n // Soft all the way out: a blur's falloff rather than an edge.\n return exp(-r * r * 1.1);\n}\n\nvoid main() {\n \n vec2 frag = gl_FragCoord.xy / u_scale;\n vec2 px = vec2(frag.x, u_size.y - frag.y);\n vec2 uv = px / u_size;\n float aspect = u_size.x / u_size.y;\n // The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size\n // — measured against the band's proportions, a phone-width band got one fold stretched tall. It\n // grows a little with the band, so a full-width hero is not a field of small eddies.\n vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));\n vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));\n\n vec3 c = u_ink0;\n // The deepest red, off the near side low down — a shade under the words, held back.\n c = mix(c, u_ink1, pool(px, vec2(0.06, 0.82), 0.62, -8.0, 26.0, 13.0, 0.0) * u_shade * u_strength);\n // The pressed red, high in the far corner, the largest.\n c = mix(c, u_ink2, pool(px, vec2(0.92, -0.08), 0.85, 10.0, 31.0, 9.0, 1.7) * u_strength);\n // The hover red, through the middle.\n c = mix(c, u_ink3, pool(px, vec2(0.6, 0.5), 0.62, 16.0, 22.0, 7.0, 3.1) * u_strength);\n // The pressed red again, swelling up from the foot.\n c = mix(c, u_ink4, pool(px, vec2(0.5, 1.1), 0.75, -12.0, 35.0, 12.0, 4.4) * u_strength);\n // The coral itself, high in the far corner: the brightest the pools go.\n c = mix(c, u_ink5, pool(px, vec2(0.74, 0.06), 0.42, 20.0, 28.0, 8.0, 5.9) * u_strength);\n\n // A little more colour, as the front page's blur saturates its pools.\n float grey = dot(c, vec3(0.299, 0.587, 0.114));\n c = mix(vec3(grey), c, 1.15);\n\n gl_FragColor = vec4(grain(clamp(c, 0.0, 1.0), gl_FragCoord.xy), 1.0);\n}\n";
|
|
55
|
+
readonly density: 0.5;
|
|
56
|
+
};
|
|
57
|
+
readonly grid: {
|
|
58
|
+
readonly fragment: "\n\nfloat hairline(float distance) {\n float halfWidth = u_hairline * 0.5;\n float pixel = 1.0 / u_scale;\n return 1.0 - smoothstep(halfWidth, halfWidth + pixel, distance);\n}\n\n// A soft bloom at the middle of the band's foot — where the halftone's glow rests — so the lines\n// rise out of light rather than out of a flat ground.\nfloat bloom(vec2 uv) {\n vec2 d = vec2((uv.x - 0.5) * 1.5, (1.0 - uv.y) * 2.2);\n return exp(-dot(d, d));\n}\n\n// The pointer's light, a soft circle a pitch and a half across.\nfloat lamp(vec2 px) {\n vec2 d = px - u_pointer * u_size;\n float reach = u_pitch * 1.6;\n return exp(-dot(d, d) / (reach * reach)) * u_hover;\n}\n\n// A short bright dash running along a line, at a place along it, fading off behind.\nfloat dash(float along) {\n return smoothstep(0.0, 0.06, along) * (1.0 - smoothstep(0.06, 0.3, along));\n}\n\nvoid main() {\n \n vec2 frag = gl_FragCoord.xy / u_scale;\n vec2 px = vec2(frag.x, u_size.y - frag.y);\n vec2 uv = px / u_size;\n float aspect = u_size.x / u_size.y;\n // The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size\n // — measured against the band's proportions, a phone-width band got one fold stretched tall. It\n // grows a little with the band, so a full-width hero is not a field of small eddies.\n vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));\n vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));\n\n float pitch = u_pitch;\n float shift = mod(u_time / 10.0, 1.0) * pitch;\n vec2 g = vec2(px.x - u_size.x * 0.5 + pitch * 0.5, px.y + shift);\n vec2 d = abs(fract(g / pitch) - 0.5) * pitch;\n vec2 lines = vec2(hairline(pitch * 0.5 - d.x), hairline(pitch * 0.5 - d.y));\n float line = max(lines.x, lines.y);\n float meet = lines.x * lines.y;\n\n vec2 cell = floor(g / pitch);\n float upward = fract(px.y / (pitch * 7.0) + u_time * 0.07 + hash(vec2(cell.x, 3.1)));\n float across = fract(px.x / (pitch * 9.0) - u_time * 0.05 + hash(vec2(cell.y, 7.7)));\n float pulses =\n lines.x * dash(upward) * step(0.7, hash(vec2(cell.x, 9.7))) +\n lines.y * dash(across) * step(0.78, hash(vec2(cell.y, 4.2)));\n\n float fade = smoothstep(0.0, 1.0, uv.y);\n float glow = bloom(uv);\n float lit = lamp(px);\n\n vec3 c = mix(u_ink0, u_ink3, glow * 0.45 * u_strength);\n c = mix(c, u_ink1, line * fade * (0.55 + 0.45 * glow) * u_strength);\n c = mix(c, u_ink2, clamp(pulses * fade + line * lit + meet * fade * 0.35, 0.0, 1.0) * u_strength);\n\n gl_FragColor = vec4(grain(c, gl_FragCoord.xy), 1.0);\n}\n";
|
|
59
|
+
readonly density: 2;
|
|
60
|
+
};
|
|
61
|
+
readonly rings: {
|
|
62
|
+
readonly fragment: "\n\nfloat hairline(float distance) {\n float halfWidth = u_hairline * 0.5;\n float pixel = 1.0 / u_scale;\n return 1.0 - smoothstep(halfWidth, halfWidth + pixel, distance);\n}\n\n// A soft bloom at the middle of the band's foot — where the halftone's glow rests — so the lines\n// rise out of light rather than out of a flat ground.\nfloat bloom(vec2 uv) {\n vec2 d = vec2((uv.x - 0.5) * 1.5, (1.0 - uv.y) * 2.2);\n return exp(-dot(d, d));\n}\n\n// The pointer's light, a soft circle a pitch and a half across.\nfloat lamp(vec2 px) {\n vec2 d = px - u_pointer * u_size;\n float reach = u_pitch * 1.6;\n return exp(-dot(d, d) / (reach * reach)) * u_hover;\n}\n\n// A short bright dash running along a line, at a place along it, fading off behind.\nfloat dash(float along) {\n return smoothstep(0.0, 0.06, along) * (1.0 - smoothstep(0.06, 0.3, along));\n}\n\nvoid main() {\n \n vec2 frag = gl_FragCoord.xy / u_scale;\n vec2 px = vec2(frag.x, u_size.y - frag.y);\n vec2 uv = px / u_size;\n float aspect = u_size.x / u_size.y;\n // The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size\n // — measured against the band's proportions, a phone-width band got one fold stretched tall. It\n // grows a little with the band, so a full-width hero is not a field of small eddies.\n vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));\n vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));\n\n float pitch = u_pitch;\n vec2 centre = vec2(u_size.x * 0.5, u_size.y);\n vec2 from = px - centre;\n float radius = length(from);\n float shift = mod(u_time / 10.0, 1.0) * pitch;\n float place = (radius - shift) / pitch;\n float d = abs(fract(place) - 0.5) * pitch;\n float line = hairline(pitch * 0.5 - d);\n\n float ring = floor(place);\n float angle = atan(from.x, -from.y);\n float turn = (hash(vec2(ring, 1.7)) > 0.5 ? 1.0 : -1.0) * (0.15 + 0.25 * hash(vec2(ring, 5.3)));\n float arc = noise(vec2(angle * 3.0 + u_time * turn, ring * 3.1));\n float sparkle = line * smoothstep(0.62, 0.9, arc);\n\n float fade = smoothstep(0.0, 1.0, uv.y);\n float glow = bloom(uv);\n float lit = lamp(px);\n\n vec3 c = mix(u_ink0, u_ink3, glow * 0.45 * u_strength);\n c = mix(c, u_ink1, line * fade * (0.55 + 0.45 * glow) * u_strength);\n c = mix(c, u_ink2, clamp(sparkle * fade + line * lit, 0.0, 1.0) * u_strength);\n\n gl_FragColor = vec4(grain(c, gl_FragCoord.xy), 1.0);\n}\n";
|
|
63
|
+
readonly density: 2;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type ShadedPattern = keyof typeof SHADERS;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fragment shaders behind the patterns the stylesheet can only approximate.
|
|
3
|
+
*
|
|
4
|
+
* Each is a function of where it is, the time and the light: no state, no texture, nothing to
|
|
5
|
+
* load. What they share — noise, a folded noise, the grain, the inks and measures read from the
|
|
6
|
+
* stylesheet — is in `shader.ts`. Every one ends in `grain`, which is the difference between a
|
|
7
|
+
* gradient and a surface: it gives the field a tooth, and dithers a long fade so it never bands.
|
|
8
|
+
*
|
|
9
|
+
* Inks arrive as `u_ink0` (the ground) to `u_ink5`, each pattern naming in the stylesheet what its
|
|
10
|
+
* own are, per tone. `u_strength` is how loudly it is painted on that tone.
|
|
11
|
+
*/
|
|
12
|
+
/** The band's coordinates, set up the same way at the top of every pattern. */
|
|
13
|
+
const PLACE = `
|
|
14
|
+
vec2 frag = gl_FragCoord.xy / u_scale;
|
|
15
|
+
vec2 px = vec2(frag.x, u_size.y - frag.y);
|
|
16
|
+
vec2 uv = px / u_size;
|
|
17
|
+
float aspect = u_size.x / u_size.y;
|
|
18
|
+
// The field's own scale, in CSS pixels, so a narrow band and a wide one show folds of a like size
|
|
19
|
+
// — measured against the band's proportions, a phone-width band got one fold stretched tall. It
|
|
20
|
+
// grows a little with the band, so a full-width hero is not a field of small eddies.
|
|
21
|
+
vec2 field = px / (280.0 + 0.25 * max(u_size.x, u_size.y));
|
|
22
|
+
vec2 lamp0 = u_pointer * u_size / (280.0 + 0.25 * max(u_size.x, u_size.y));
|
|
23
|
+
`;
|
|
24
|
+
/**
|
|
25
|
+
* The aurora: curtains of light rising from the band's foot.
|
|
26
|
+
*
|
|
27
|
+
* Sheets of noise stretched upright, swaying as a slower noise moves under them, with a ragged
|
|
28
|
+
* crest and fine rays running up through them — light falling through folds rather than pools of
|
|
29
|
+
* colour. The pointer bends the sheets towards it and brightens them where it is.
|
|
30
|
+
*/
|
|
31
|
+
export const AURORA = `
|
|
32
|
+
void main() {
|
|
33
|
+
${PLACE}
|
|
34
|
+
vec2 p = vec2(field.x, uv.y);
|
|
35
|
+
float t = u_time * 0.06;
|
|
36
|
+
|
|
37
|
+
vec2 toward = vec2(field.x - lamp0.x, uv.y - u_pointer.y);
|
|
38
|
+
float near = exp(-dot(toward, toward) * 5.0) * u_hover;
|
|
39
|
+
|
|
40
|
+
float sway = fbm(vec2(p.x * 0.8 + t, t * 0.7)) - 0.5;
|
|
41
|
+
float x = p.x * 1.5 + sway * 1.6 - toward.x * near * 0.8;
|
|
42
|
+
|
|
43
|
+
float folds = fbm(vec2(x * 2.2, p.y * 0.35 - t * 1.6));
|
|
44
|
+
float curtain = smoothstep(0.3, 0.72, folds);
|
|
45
|
+
float rays = 0.6 + 0.4 * noise(vec2(x * 26.0, p.y * 1.4 - t * 3.0));
|
|
46
|
+
|
|
47
|
+
float crest = 0.08 + 0.38 * fbm(vec2(x * 1.2 + 4.0, t * 0.8));
|
|
48
|
+
float rise = smoothstep(crest, 0.82, uv.y);
|
|
49
|
+
float base = smoothstep(0.55, 1.0, uv.y);
|
|
50
|
+
|
|
51
|
+
float light = (curtain * rays * rise + base * 0.3 + near * 0.45) * u_strength;
|
|
52
|
+
|
|
53
|
+
vec3 tint = mix(u_ink1, u_ink2, smoothstep(0.3, 0.8, fbm(vec2(x * 1.1 - 3.0, p.y * 0.8 + t))));
|
|
54
|
+
tint = mix(tint, u_ink3, pow(clamp(curtain * rise, 0.0, 1.0), 2.5) * 0.65);
|
|
55
|
+
|
|
56
|
+
vec3 colour = mix(u_ink0, tint, clamp(light, 0.0, 1.0));
|
|
57
|
+
gl_FragColor = vec4(grain(colour, gl_FragCoord.xy), 1.0);
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
/**
|
|
61
|
+
* The mesh: the design system's own front page — five soft pools of the brand's reds, run together.
|
|
62
|
+
*
|
|
63
|
+
* The same drawing as the front page's panel and as this pattern's stylesheet version: each pool
|
|
64
|
+
* in its place, its red, its size, drifting and stretching on loops of its own length, and leaning
|
|
65
|
+
* towards the pointer at its own depth, so the colours slide through one another rather than moving
|
|
66
|
+
* as one. Where the stylesheet blurs five shapes, this draws each as a soft-edged pool outright —
|
|
67
|
+
* an uneven round whose outline wobbles as it turns — and lays them over the ground in order.
|
|
68
|
+
*
|
|
69
|
+
* The first pool is the deepest red, held back by `u_shade` so the words keep a red to stand on.
|
|
70
|
+
*/
|
|
71
|
+
export const MESH = `
|
|
72
|
+
// One pool: where it rests, in shares of the band; how big, in shares of its longer side; how far it leans after the
|
|
73
|
+
// pointer; and its loops — the drift and the stretch — in seconds, offset by a phase of its own.
|
|
74
|
+
float pool(vec2 px, vec2 at, float size, float depth, float drift, float morph, float phase) {
|
|
75
|
+
// Sized by the band's longer side rather than its width: on a phone the band is tall and narrow,
|
|
76
|
+
// and pools sized by its width came out small — the deepest a hard, dark blot in one corner and
|
|
77
|
+
// the rest of the band flat. Measured against the longer side they cover a tall band as they do
|
|
78
|
+
// a wide one.
|
|
79
|
+
float w = max(u_size.x, u_size.y);
|
|
80
|
+
float t = u_time;
|
|
81
|
+
float tau = 6.2831853;
|
|
82
|
+
|
|
83
|
+
// The drift: a slow wander and a swell, there and back.
|
|
84
|
+
vec2 wander = vec2(
|
|
85
|
+
0.10 * sin(tau * t / drift + phase),
|
|
86
|
+
0.08 * sin(tau * t / (drift * 1.3) + phase * 1.7)
|
|
87
|
+
) * size * w;
|
|
88
|
+
float swell = 1.0 + 0.1 * sin(tau * t / (drift * 0.8) + phase * 0.6);
|
|
89
|
+
|
|
90
|
+
// Leaning after the pointer by its depth, a hundredth of the pool per step, as the front page's do.
|
|
91
|
+
vec2 lean = (u_pointer - 0.5) * 2.0 * u_hover * depth * 0.01 * size * w;
|
|
92
|
+
|
|
93
|
+
vec2 centre = at * u_size + wander + lean;
|
|
94
|
+
vec2 d = px - centre;
|
|
95
|
+
|
|
96
|
+
// The stretch: one way then the other, turning as it goes.
|
|
97
|
+
float turn = 1.4 * sin(tau * t / (morph * 2.0) + phase);
|
|
98
|
+
float c = cos(turn);
|
|
99
|
+
float s = sin(turn);
|
|
100
|
+
d = mat2(c, -s, s, c) * d;
|
|
101
|
+
float stretch = sin(tau * t / morph + phase);
|
|
102
|
+
d /= vec2(1.0 + 0.18 * stretch, 1.0 - 0.15 * stretch);
|
|
103
|
+
|
|
104
|
+
// An uneven round, its outline wobbling as it turns.
|
|
105
|
+
float angle = atan(d.y, d.x);
|
|
106
|
+
float radius = size * w * 0.5 * swell * (1.0 + 0.1 * sin(3.0 * angle + phase) + 0.06 * sin(5.0 * angle - phase * 2.0));
|
|
107
|
+
float r = length(d) / radius;
|
|
108
|
+
// Soft all the way out: a blur's falloff rather than an edge.
|
|
109
|
+
return exp(-r * r * 1.1);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
void main() {
|
|
113
|
+
${PLACE}
|
|
114
|
+
vec3 c = u_ink0;
|
|
115
|
+
// The deepest red, off the near side low down — a shade under the words, held back.
|
|
116
|
+
c = mix(c, u_ink1, pool(px, vec2(0.06, 0.82), 0.62, -8.0, 26.0, 13.0, 0.0) * u_shade * u_strength);
|
|
117
|
+
// The pressed red, high in the far corner, the largest.
|
|
118
|
+
c = mix(c, u_ink2, pool(px, vec2(0.92, -0.08), 0.85, 10.0, 31.0, 9.0, 1.7) * u_strength);
|
|
119
|
+
// The hover red, through the middle.
|
|
120
|
+
c = mix(c, u_ink3, pool(px, vec2(0.6, 0.5), 0.62, 16.0, 22.0, 7.0, 3.1) * u_strength);
|
|
121
|
+
// The pressed red again, swelling up from the foot.
|
|
122
|
+
c = mix(c, u_ink4, pool(px, vec2(0.5, 1.1), 0.75, -12.0, 35.0, 12.0, 4.4) * u_strength);
|
|
123
|
+
// The coral itself, high in the far corner: the brightest the pools go.
|
|
124
|
+
c = mix(c, u_ink5, pool(px, vec2(0.74, 0.06), 0.42, 20.0, 28.0, 8.0, 5.9) * u_strength);
|
|
125
|
+
|
|
126
|
+
// A little more colour, as the front page's blur saturates its pools.
|
|
127
|
+
float grey = dot(c, vec3(0.299, 0.587, 0.114));
|
|
128
|
+
c = mix(vec3(grey), c, 1.15);
|
|
129
|
+
|
|
130
|
+
gl_FragColor = vec4(grain(clamp(c, 0.0, 1.0), gl_FragCoord.xy), 1.0);
|
|
131
|
+
}
|
|
132
|
+
`;
|
|
133
|
+
/**
|
|
134
|
+
* The lines the grid and the rings share: a hairline at an exact width, anti-aliased by its
|
|
135
|
+
* distance in device pixels rather than by a blur, so it stays a hairline at any density.
|
|
136
|
+
*/
|
|
137
|
+
const HAIRLINE = `
|
|
138
|
+
float hairline(float distance) {
|
|
139
|
+
float halfWidth = u_hairline * 0.5;
|
|
140
|
+
float pixel = 1.0 / u_scale;
|
|
141
|
+
return 1.0 - smoothstep(halfWidth, halfWidth + pixel, distance);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// A soft bloom at the middle of the band's foot — where the halftone's glow rests — so the lines
|
|
145
|
+
// rise out of light rather than out of a flat ground.
|
|
146
|
+
float bloom(vec2 uv) {
|
|
147
|
+
vec2 d = vec2((uv.x - 0.5) * 1.5, (1.0 - uv.y) * 2.2);
|
|
148
|
+
return exp(-dot(d, d));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// The pointer's light, a soft circle a pitch and a half across.
|
|
152
|
+
float lamp(vec2 px) {
|
|
153
|
+
vec2 d = px - u_pointer * u_size;
|
|
154
|
+
float reach = u_pitch * 1.6;
|
|
155
|
+
return exp(-dot(d, d) / (reach * reach)) * u_hover;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// A short bright dash running along a line, at a place along it, fading off behind.
|
|
159
|
+
float dash(float along) {
|
|
160
|
+
return smoothstep(0.0, 0.06, along) * (1.0 - smoothstep(0.06, 0.3, along));
|
|
161
|
+
}
|
|
162
|
+
`;
|
|
163
|
+
/**
|
|
164
|
+
* The grid: hairlines a pitch apart, rising from the foot as they did, now lit.
|
|
165
|
+
*
|
|
166
|
+
* A bloom at the foot they rise out of, a brighter point where two lines cross, and every few
|
|
167
|
+
* lines a short dash of light running along it — up a rule, across another — at a pace of its
|
|
168
|
+
* own, so the grid reads as carrying something. The pointer lights the lines around it.
|
|
169
|
+
*/
|
|
170
|
+
export const GRID = `
|
|
171
|
+
${HAIRLINE}
|
|
172
|
+
void main() {
|
|
173
|
+
${PLACE}
|
|
174
|
+
float pitch = u_pitch;
|
|
175
|
+
float shift = mod(u_time / 10.0, 1.0) * pitch;
|
|
176
|
+
vec2 g = vec2(px.x - u_size.x * 0.5 + pitch * 0.5, px.y + shift);
|
|
177
|
+
vec2 d = abs(fract(g / pitch) - 0.5) * pitch;
|
|
178
|
+
vec2 lines = vec2(hairline(pitch * 0.5 - d.x), hairline(pitch * 0.5 - d.y));
|
|
179
|
+
float line = max(lines.x, lines.y);
|
|
180
|
+
float meet = lines.x * lines.y;
|
|
181
|
+
|
|
182
|
+
vec2 cell = floor(g / pitch);
|
|
183
|
+
float upward = fract(px.y / (pitch * 7.0) + u_time * 0.07 + hash(vec2(cell.x, 3.1)));
|
|
184
|
+
float across = fract(px.x / (pitch * 9.0) - u_time * 0.05 + hash(vec2(cell.y, 7.7)));
|
|
185
|
+
float pulses =
|
|
186
|
+
lines.x * dash(upward) * step(0.7, hash(vec2(cell.x, 9.7))) +
|
|
187
|
+
lines.y * dash(across) * step(0.78, hash(vec2(cell.y, 4.2)));
|
|
188
|
+
|
|
189
|
+
float fade = smoothstep(0.0, 1.0, uv.y);
|
|
190
|
+
float glow = bloom(uv);
|
|
191
|
+
float lit = lamp(px);
|
|
192
|
+
|
|
193
|
+
vec3 c = mix(u_ink0, u_ink3, glow * 0.45 * u_strength);
|
|
194
|
+
c = mix(c, u_ink1, line * fade * (0.55 + 0.45 * glow) * u_strength);
|
|
195
|
+
c = mix(c, u_ink2, clamp(pulses * fade + line * lit + meet * fade * 0.35, 0.0, 1.0) * u_strength);
|
|
196
|
+
|
|
197
|
+
gl_FragColor = vec4(grain(c, gl_FragCoord.xy), 1.0);
|
|
198
|
+
}
|
|
199
|
+
`;
|
|
200
|
+
/**
|
|
201
|
+
* The rings: circles spreading from the middle of the band's foot, now lit.
|
|
202
|
+
*
|
|
203
|
+
* The same bloom at the foot, and on every ring a few arcs of light travelling round it, each ring
|
|
204
|
+
* its own way and pace, so the rings shimmer as they spread. The pointer lights the rings around it.
|
|
205
|
+
*/
|
|
206
|
+
export const RINGS = `
|
|
207
|
+
${HAIRLINE}
|
|
208
|
+
void main() {
|
|
209
|
+
${PLACE}
|
|
210
|
+
float pitch = u_pitch;
|
|
211
|
+
vec2 centre = vec2(u_size.x * 0.5, u_size.y);
|
|
212
|
+
vec2 from = px - centre;
|
|
213
|
+
float radius = length(from);
|
|
214
|
+
float shift = mod(u_time / 10.0, 1.0) * pitch;
|
|
215
|
+
float place = (radius - shift) / pitch;
|
|
216
|
+
float d = abs(fract(place) - 0.5) * pitch;
|
|
217
|
+
float line = hairline(pitch * 0.5 - d);
|
|
218
|
+
|
|
219
|
+
float ring = floor(place);
|
|
220
|
+
float angle = atan(from.x, -from.y);
|
|
221
|
+
float turn = (hash(vec2(ring, 1.7)) > 0.5 ? 1.0 : -1.0) * (0.15 + 0.25 * hash(vec2(ring, 5.3)));
|
|
222
|
+
float arc = noise(vec2(angle * 3.0 + u_time * turn, ring * 3.1));
|
|
223
|
+
float sparkle = line * smoothstep(0.62, 0.9, arc);
|
|
224
|
+
|
|
225
|
+
float fade = smoothstep(0.0, 1.0, uv.y);
|
|
226
|
+
float glow = bloom(uv);
|
|
227
|
+
float lit = lamp(px);
|
|
228
|
+
|
|
229
|
+
vec3 c = mix(u_ink0, u_ink3, glow * 0.45 * u_strength);
|
|
230
|
+
c = mix(c, u_ink1, line * fade * (0.55 + 0.45 * glow) * u_strength);
|
|
231
|
+
c = mix(c, u_ink2, clamp(sparkle * fade + line * lit, 0.0, 1.0) * u_strength);
|
|
232
|
+
|
|
233
|
+
gl_FragColor = vec4(grain(c, gl_FragCoord.xy), 1.0);
|
|
234
|
+
}
|
|
235
|
+
`;
|
|
236
|
+
/** Each pattern's shader and the highest density it draws at: soft fields need little, hairlines two. */
|
|
237
|
+
export const SHADERS = {
|
|
238
|
+
// The two heaviest, and the two softest: drawn at half the CSS density and scaled up by the
|
|
239
|
+
// browser, a quarter of the pixels for a field that has no edge for the scaling to soften.
|
|
240
|
+
aurora: { fragment: AURORA, density: 0.5 },
|
|
241
|
+
mesh: { fragment: MESH, density: 0.5 },
|
|
242
|
+
grid: { fragment: GRID, density: 2 },
|
|
243
|
+
rings: { fragment: RINGS, density: 2 },
|
|
244
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pattern drawn by a fragment shader, on a canvas, and only when it has to be.
|
|
3
|
+
*
|
|
4
|
+
* The aurora, the mesh, the grid and the rings are painted here when the browser can run
|
|
5
|
+
* WebGL — light with structure in it, noise folded into noise, a grain over all of it — and by the
|
|
6
|
+
* stylesheet when it cannot. The stylesheet's version is drawn first and stays until this has drawn
|
|
7
|
+
* a frame, so a band is finished from the first paint and the shader only ever replaces it: the root
|
|
8
|
+
* is marked `data-shaded` once a frame is on the canvas, and the stylesheet hides its own paint then.
|
|
9
|
+
*
|
|
10
|
+
* What it costs, and why it is written this way:
|
|
11
|
+
*
|
|
12
|
+
* - One full-band triangle and one fragment shader: the whole frame is a single draw call.
|
|
13
|
+
* - It draws while the band is on screen and something moves — the pattern at rest, or the light
|
|
14
|
+
* catching up with the pointer — and not otherwise. A band out of view draws nothing; a band
|
|
15
|
+
* asked to hold still draws one frame and stops.
|
|
16
|
+
* - The soft patterns are drawn at the CSS pixel density or below — the two heaviest at half of
|
|
17
|
+
* it, scaled up by the browser — which is all a field with no edge in it can use; the hairline
|
|
18
|
+
* patterns at up to twice it, which their lines need.
|
|
19
|
+
* - At rest it draws at half the display's rate. Under the pointer, at its full rate.
|
|
20
|
+
* - For a reader who asked for less motion it draws one frame and never moves.
|
|
21
|
+
* - A lost context puts the stylesheet's paint back and stops; the next mount draws afresh.
|
|
22
|
+
*
|
|
23
|
+
* Every colour comes from a token: the stylesheet names each pattern's inks as custom properties on
|
|
24
|
+
* the band, per tone, and they are read back as the browser resolved them.
|
|
25
|
+
*/
|
|
26
|
+
export interface ShaderOptions {
|
|
27
|
+
/** The fragment shader's body — see `PRELUDE` for what it may use. */
|
|
28
|
+
fragment: string;
|
|
29
|
+
/** The custom properties holding the pattern's inks, ground first. */
|
|
30
|
+
inks: readonly string[];
|
|
31
|
+
/** The highest pixel density to draw at. A soft field wants less than a hairline does. */
|
|
32
|
+
density: number;
|
|
33
|
+
/** Whether the pattern answers the pointer. Ignored for reduced motion. */
|
|
34
|
+
interactive: boolean;
|
|
35
|
+
/** Whether the pattern moves at rest. Ignored for reduced motion. */
|
|
36
|
+
animated: boolean;
|
|
37
|
+
/** Where the pointer is listened for, when that is not the band itself. */
|
|
38
|
+
host?: HTMLElement;
|
|
39
|
+
}
|
|
40
|
+
export interface Shader {
|
|
41
|
+
/** Stop listening, stop drawing, give back the context, and put the stylesheet's paint back. */
|
|
42
|
+
destroy: () => void;
|
|
43
|
+
}
|
|
44
|
+
export declare function shader(root: HTMLElement, canvas: HTMLCanvasElement, options: ShaderOptions): Shader;
|