import streamlit as st def create_animation_app(): st.title("Bouncing Yellow Balls & Jellyfish in a Rotating Sphere") # We embed an HTML document that includes: # 1. p5.js (from a CDN) # 2. a container div for our canvas # 3. our p5.js sketch that simulates 100 bouncing yellow balls with collision detection # and one bouncing jellyfish (using a spiral drawing similar to your jellyfish code) # all inside a sphere (drawn as a circle) that slowly rotates. html_code = r"""
""" # The height is set to 800px; adjust if needed. st.components.v1.html(html_code, height=820, scrolling=False) if __name__ == "__main__": create_animation_app()