pixelcoda/content-gsap-animation 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pixelcoda/content-gsap-animation

Composer 安装命令:

composer require pixelcoda/content-gsap-animation

包简介

TYPO3 CMS extension for GSAP ScrollTrigger animations on content elements with editor presets, backend preview, Bootstrap Package support and headless-ready animation data.

README 文档

README

Content GSAP Animation icon

GSAP-powered scroll animations for TYPO3 content elements. Editors choose an animation in the content element form; the extension renders the required data-gsap-* attributes and initializes GSAP ScrollTrigger in the frontend.

TYPO3 backend animation settings flow

Highlights

  • TYPO3 12.4, 13.4 and 14.3+ compatible within the TYPO3 14 release line
  • Fluid Styled Content support
  • Bootstrap Package v13, v14 and v15 support
  • Fade, slide, zoom and flip animation presets
  • Backend preview with duration, delay and easing support
  • Full-width premium backend preview with readable dark-mode styling, GSAP GIF preset examples and automatic headless-output indicator
  • Extended settings for offset, anchor placement, once and mirror behavior
  • BITV-friendly behavior via prefers-reduced-motion
  • Headless-ready structured animation data for custom renderers and APIs
  • Local vendored GSAP and ScrollTrigger assets, no CDN dependency

Installation

composer require pixelcoda/content-gsap-animation

Then run TYPO3 extension setup:

vendor/bin/typo3 extension:setup

TYPO3 Setup

For TYPO3 13 and TYPO3 14 projects using Site Sets, add the Site Set dependency:

dependencies:
  - pixelcoda/content-gsap-animation

For classic TypoScript templates, include the matching setup for your rendering stack:

  • Content GSAP Animation: Fluid Styled Content
  • Content GSAP Animation: Bootstrap Package v13.x
  • Content GSAP Animation: Bootstrap Package v14.x
  • Content GSAP Animation: Bootstrap Package v15.x

The Bootstrap Package number refers to the Bootstrap Package major version, not the TYPO3 major version.

Editor Usage

Open a content element and use the Animation tab. Select an animation preset and adjust timing. If extended settings are enabled in the extension configuration, editors can also set offset, anchor placement, once and mirror behavior.

The backend preview shows the selected animation on a content-card mockup and displays GIF examples for common presets such as fade, slide, zoom and flip. This helps editors compare the animation possibilities without leaving the form.

Documentation media:

Lighthouse

Styled frontend demo

Lighthouse 100 report

Verified on the local TYPO3 test page with an animated content element and bundled GSAP assets:

  • Performance: 100
  • Accessibility: 100
  • Best Practices: 100
  • SEO: 100
  • FCP: 1.2 s
  • LCP: 1.7 s
  • TBT: 20 ms
  • CLS: 0

Accessibility

The frontend script respects prefers-reduced-motion: reduce. If the visitor has reduced motion enabled, animation attributes are ignored and elements remain visible without transform or opacity animation.

Headless Usage

Headless is not an editor setting and there is no toggle to enable it in the content element form. The extension always exposes structured animation data when the data processor is used by the selected TypoScript setup.

The data processor exposes both rendered HTML attributes and structured animation data:

  • animationSettings: raw HTML attribute string for Fluid layouts
  • gsapAnimationSettings: legacy raw HTML attribute string
  • animationSettingsData: structured array for headless/API usage
  • gsapAnimationSettingsData: legacy structured array alias

Example structured data:

{
  "animation": "fade-up",
  "duration": 800,
  "delay": 0,
  "easing": "power2.out",
  "offset": 120,
  "anchorPlacement": "top-center",
  "once": true,
  "mirror": false
}

Custom Fluid layouts can keep using:

{f:if(condition: animationSettings, then: '{animationSettings -> f:format.raw()}')}

Headless renderers should consume animationSettingsData and decide in the frontend application whether to use GSAP, native CSS, framework-native animation or no animation. Keep the reduced-motion decision in the frontend so API responses stay presentation-neutral.

In short: editors only choose the animation. Integrators consume animationSettingsData in custom Fluid layouts, JSON responses, API resources or headless frontend adapters.

Development

Install PHP dependencies:

composer update --prefer-dist

Build JavaScript bundles:

cd Resources/Public
yarn install
yarn build

Run checks:

composer test
composer test:functional

Functional tests require TYPO3 Testing Framework database credentials. With DDEV, use root credentials so the test runner can create temporary databases.

Documentation

Full documentation is shipped with the extension:

https://github.com/CasianBlanaru/pixelcoda-content-gsap-animation/tree/main/Documentation

The TYPO3 documentation URL can be enabled once docs.typo3.org has indexed the package.

pixelcoda/content-gsap-animation 适用场景与选型建议

pixelcoda/content-gsap-animation 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 408 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 05 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「headless」 「frontend」 「typo3」 「content-elements」 「gsap」 「bootstrap-package」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 pixelcoda/content-gsap-animation 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pixelcoda/content-gsap-animation 我们能提供哪些服务?
定制开发 / 二次开发

基于 pixelcoda/content-gsap-animation 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 408
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 22
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2025-05-07