Skip to content

gregochan/gregochan.github.io

Repository files navigation

Lunar New Year Poster Generator
农历新年海报生成器

This project uses the p5.js library to create a generative poster for the Lunar New Year, celebrating the Year of the Dragon. With interactive controls, users can guide the dragon across the canvas and dynamically change text to personalize their festive poster.

该项目使用 p5.js 库为农历新年创建一个生成式海报,庆祝龙年。用户可以通过交互式控件引导龙在画布上移动,并动态更改文本以个性化他们的节日海报。

dragon

Features
特点

Mouse Interaction: Control the dragon's movement across the canvas with your mouse.
Dynamic Text: Use the arrow keys to cycle through different greetings and wishes for the new year.
Save Options:
Press 's' to save your creation as a PNG file.
Press 'g' to save it as an animated GIF, showing the dragon's path.

鼠标互动:用您的鼠标控制龙在画布上的移动。
动态文本:使用箭头键循环显示新年的不同问候语和祝福语。
保存选项:
按 's' 将您的创作保存为 PNG 文件。
按 'g' 将其保存为显示龙路径的动画 GIF。

Usage
使用方法

Move the Mouse: Direct the dragon around the screen.
Arrow Keys: Change the text displayed on the poster.
's' Key: Save the poster as a PNG image.
'g' Key: Save the poster as an animated GIF file.

移动鼠标:在屏幕上指引龙的方向。
箭头键:更改海报上显示的文本。
's' 键:将海报保存为 PNG 图像。
'g' 键:将海报保存为动画 GIF 文件。

Customization
自定义

You can customize the poster by modifying the text options in the sketch.js file. Add or remove entries from the text arrays to include your own new year greetings.

您可以通过修改 sketch.js 文件中的文本选项来自定义海报。添加或移除文本数组中的条目以包括您自己的新年问候语。

Technologies Used
使用的技术

p5.js: A JavaScript library that makes coding accessible for artists, designers, educators, and beginners.

p5.js: 一个使艺术家、设计师、教育工作者和初学者能够轻松进行编码的 JavaScript 库。

Acknowledgments
致谢

Special thanks to Atelier Anchor for creating the Smiley Sans font used in this project.

特别感谢 Atelier Anchor 创建了本项目中使用的 Smiley Sans字体。

Examples
例子

dragon

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published