Skip to content

Commit feeba1e

Browse files
committed
fix: make GSAP animations mandatory in creative mode prompt
LLM was ignoring optional animation instructions and only generating CSS. Changed from 'Nutze sie fuer...' to 'JEDE Section MUSS mindestens eine GSAP-Animation enthalten'. Also added DOMContentLoaded wrapping instruction for creative mode scripts.
1 parent b6a109e commit feeba1e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Classes/Service/ContentGeneratorService.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,11 +489,13 @@ private function buildCreativePrompt(Template $template, array $briefingAnswers,
489489

490490
if ($template->isAnimationEnabled()) {
491491
$scriptRule = <<<RULE
492-
JAVASCRIPT-ANIMATIONEN:
492+
JAVASCRIPT-ANIMATIONEN (PFLICHT):
493493
GSAP (gsap), ScrollTrigger und TextPlugin sind global verfuegbar.
494-
Nutze sie fuer Scroll-Animationen, Reveals, Typewriter-Effekte,
495-
Parallax und alles was die Seite lebendig macht.
494+
JEDE Section MUSS mindestens eine GSAP-Animation enthalten — Scroll-Reveals,
495+
Fade-Ins, Slide-Ins, Typewriter-Effekte, Parallax oder Stagger-Animationen.
496+
Eine Seite ohne Animationen ist unvollstaendig.
496497
- Jeder <script>-Block MUSS das Attribut data-creative tragen.
498+
- Wrapping: Alle gsap-Aufrufe in document.addEventListener('DOMContentLoaded', function() { ... });
497499
- Erlaubte APIs: gsap.*, ScrollTrigger.*, TextPlugin.*,
498500
document.querySelector/All, Standard-JS (const, let, =>, forEach).
499501
- VERBOTEN: fetch, XMLHttpRequest, eval, document.cookie,

0 commit comments

Comments
 (0)