Posts

3D Cube Create With Python

Image
3D Cube Create With Python  🎥 Watch on YouTube: [Insert your YouTube video link here] 🧠 What You’ll Learn In this tutorial, we’ll use Python and Kivy to create a mesmerizing 3D cube animation — all while enjoying a calming ASMR coding experience . Whether you're a beginner or an experienced dev, this is a perfect mix of visual satisfaction and hands-on learning . 🔧 Technologies Used Python 3 Kivy Framework from kivy.app import App from kivy.uix.widget import Widget from kivy.clock import Clock from kivy.graphics import Ellipse, Color, Line import math class CubeWidget(Widget): def __init__(self, **kwargs): super().__init__(**kwargs) self.angle = 0 self.points3d = [] # 8 cube corners for x in (-1, 1): for y in (-1, 1): for z in (-1, 1): self.points3d.append((x, y, z)) # Define cube edges by index pairs self.edges = [ (0, 1), (1, 3), (...

Python Kivy Loading Ball Animation Full Tutorial (With Code)

  📘 Tutorial: How to Create a Custom Loading Animation in Python Kivy Want to give your Kivy app a sleek, professional feel? A custom loading animation can be a perfect touch! In this tutorial, I’ll walk you through creating a simple and stylish loading animation using Python and Kivy. 🚀 What You’ll Learn: How to use Kivy's Animation class Creating shapes and motion using Canvas Making reusable and customizable loading widgets 🧰 Requirements: Make sure you have Python and Kivy installed. pip install kivy , numpy , math  from kivy.app import App from kivy.uix.label import Label from kivy.uix.widget import Widget from kivy.clock import Clock from kivy.graphics import Rectangle,Line,Ellipse,Color,RoundedRectangle import math from kivy.animation import Animation class sample(Widget): def __init__(self, **kwargs): super().__init__(**kwargs) self.count = 0 with self.canvas : Color(1,1,1) self.lin...

Android WebView App Using Python Kivy

 🐍 Introduction In this tutorial, I'll show you how to create a simple WebView app using Python and Kivy. This app will display any website (like Google, YouTube, or your own) in an Android WebView. We’ll use: Python 💻 Kivy 🐍 Android (via Buildozer) 📱 Python Code (main.py) from kivy.app import App from jnius import autoclass from kivy.clock import Clock from android.runnable import run_on_ui_thread from kivy.uix.widget import Widget WebView = autoclass('android.webkit.WebView') WebViewClient = autoclass('android.webkit.WebViewClient') activity = autoclass('org.kivy.android.PythonActivity').mActivity @run_on_ui_thread def create_webview(*args): webview = WebView(activity) webview.getSettings().setJavaScriptEnabled(True) wvc = WebViewClient() webview.setWebViewClient(wvc) activity.setContentView(webview) webview.loadUrl('https://littleone7a.blogspot.com/') class Wv(Widget): def __init__(self, **kwargs): super().__init__(**kwargs) sel...

Pyhton Kivy Drag Control Button For Game

Image
How to Create a Draggable Button Control in Kivy for Your Game (Python Tutorial) If you're building a mobile game with Kivy , you'll definitely need smooth controls! 🎮 In this tutorial, we'll create a draggable button inside a circle, like a mini-joystick, using Python Kivy . This control is perfect for character movement , camera control , or any kind of input in your mobile games. Full Python Code for a Kivy Drag Control Button from kivy.app import App from kivy.uix.label import Label from kivy.uix.widget import Widget from kivy.uix.screenmanager import Screen, ScreenManager from kivy.graphics import Color, Rectangle, Line, Ellipse from kivy.clock import Clock from kivy.animation import Animation from kivy.core.window import Window import math # Get screen width and height w, h = Window.size class sample(Widget): def __init__(self, **kwargs): super().__init__(**kwargs) self.size = (w, h) self.radius = 100 self.c...