redlib.
Feeds

MAIN FEEDS

Home Popular All

REDDIT FEEDS

10s accountsharing AlpineLinux analog AnalogCommunity AnalogRepair ankarsrum_mixers ApksApps BDFrancophone BIFLfails Broadcasting BudgetAudiophile BuyItForLife cassetteculture Cloudbox cloudgaming cloudmasterrace cloudygamer comicsfr commandline CrackWatch curtainOS DataHoarder DiWHY diyaudio formula1 FREEMEDIAHECKYEAH FUCKYOUINPARTICULAR funny GoodValue GrapheneOS hacking Hacking_Tutorials handtools IAmA ipod jellyfin linux linux_gaming Linuxfr linuxmasterrace linuxmemes LocalLLaMA MapPorn MiyooMini Modded_iPods musichoarder MVaveFM1 neogeo oddlysatisfying Oneplus5T OpenSignups patientgamers pedale Piracy PiratedGames Pixel4a PlexPosters powerwashingporn privacy privacytoolsIO ps4homebrew PS5_Jailbreak ps5homebrew PSP seedboxes selfhosted sideloaded SteamFrame steammachine suckless switch2hacks SwitchHacks SwitchHaxing SwitchPirates SwitchRom Sysadmin_Fr terminal_porn theocho theyknew thinkpad trimui tutanota Unexpected unixporn UpvoteBecauseButt UrbanHell UsabilityPorn UsenetInvites VIDEOENGINEERING WalkmanFrance WTF XboxHomebrew XboxSeriesS XboxSeriesXlS
reddit settings settings
Hot New Top Rising Controversial

r/processing • u/Muhammad-Essa • 15h ago

How to maintain a fixed 16:9 aspect ratio in p5.js across different screen sizes?

Post image
2 Upvotes
0 comments
Subreddit
Posts Wiki
Icon for r/processing

Processing

r/processing

“Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. There are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning and prototyping.”—from Processing.org

35k
2.7k
11
Sidebar
Formatting Code

To post properly-formatted code, use the Markdown Mode editor, and add four spaces to the start of each line.

You can do this automatically in Processing. Under the edit menu:

- Autoformat
- Select All
- Indent code
- Indent code

Now copy and paste this into the Markdown Mode of Reddit. The markdown editor also supports surround in backticks for code in the middle of the line. On a Mac, backtick is commonly found next to Z; on a Windows, it is often next to 1.

Be sure to use the Markdown Mode: the Fancy Pants editor will reformat your careful spacing and render your code an unreadable mess.

See this post for further details: https://www.reddit.com/r/processing/comments/lxou5/some_tips_on_pasting_code_in_rprocessing/

Subreddit Rules
1. Help with School Work and Assignments

Asking for help is OK, provided your course allows you to seek external assistance.

Asking for someone to do an assignment for you is not okay.

Responding to a request for help with hints, suggestions tools, functions, tutorials and reference links is OK.

Responding to a request for help with a complete solution is not okay.

In general, guide people towards a solution rather than completing the work.

2. Please format your code

Kind Reddit users will still respond if you don't format your code correctly, but you'll get a much better response if you take the time to present your request thoughtfully.

See the 'Formatting Code' sidebar for details.

3. Plagiarism

There are some great animations and other works out there, and great coding often builds on the works of others. Remake, rework, take inspiration from and pay homage to the works of others, but give them credit where credit is due.

Share: posting your own source code, or detailing your algorithms also helps others. Just as we learned from others, we can allow others to learn from us: it's how we roll here at r/processing

856c6e0 ⓘ View instance info