This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.factory import Factory | |
KV = ''' | |
#:import A kivy.animation.Animation | |
<AutoScaleLabel@Label>: | |
scale: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""TODO: ctrl + left/right (move past word), ctrl + backspace/del (del word), shift + del (del line) | |
...: Smart movement through leading indentation. | |
...: Except for first line, up/down to work normally on multi-line console input. | |
""" | |
from code import InteractiveConsole | |
from collections import deque | |
from dataclasses import dataclass | |
from io import StringIO | |
from itertools import chain, takewhile | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""For this to work, WobblyEffect should be parent to WobblyScatter. | |
Try setting WobblyScatter `size_hint = (None, None)` or `size = self.parent.size` | |
if having size issues. | |
""" | |
from kivy.clock import Clock | |
from kivy.uix.effectwidget import AdvancedEffectBase, EffectWidget | |
from kivy.uix.scatter import Scatter | |
from kivy.uix.widget import Widget | |
from itertools import product |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# License: | |
# I hereby state this snippet is below "threshold of originality" where applicable (public domain). | |
# | |
# Otherwise, since initially posted on Stackoverflow, use as: | |
# CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl | |
# http://stackoverflow.com/a/31047259/2719194 | |
# http://stackoverflow.com/a/4858123/2719194 | |
import types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# License: | |
# I hereby state this snippet is below "threshold of originality" where applicable (public domain). | |
# | |
# Otherwise, since initially posted on Stackoverflow, use as: | |
# CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl | |
# http://stackoverflow.com/a/31047259/2719194 | |
# http://stackoverflow.com/a/4858123/2719194 | |
import types | |
import inspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from array import array | |
from kivy.uix.widget import Widget | |
from kivy.clock import Clock | |
from kivy import properties as P | |
from kivy.graphics import ( | |
RenderContext, BindTexture, Rectangle, Color | |
) | |
from kivy.graphics.texture import Texture | |
from kivy.core.window import Window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$HEADER$ | |
float PI = 3.1415926535; | |
uniform vec2 resolution; | |
uniform float time; | |
vec2 rotate(vec2 pos, float angle, vec2 center){ | |
pos -= center; | |
pos *= mat2(cos(angle), sin(-angle), sin(angle), cos(angle)); | |
pos += center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.clock import Clock | |
from kivy.app import App | |
from kivy.animation import Animation | |
from kivy.uix.widget import Widget | |
from kivy.uix.floatlayout import FloatLayout | |
from kivy.lang import Builder | |
from kivy.core.window import Window | |
from kivy.graphics import RenderContext | |
from kivy.uix.modalview import ModalView | |
from kivy.properties import ListProperty, NumericProperty, ObjectProperty, ColorProperty |