Skip to content

Instantly share code, notes, and snippets.

View me2beats's full-sized avatar

Albert me2beats

  • Russia, Yekaterinburg
View GitHub Profile
@tito
tito / inspector3d.py
Last active June 7, 2022 22:23
Inspector 3d - WIP
__all__ = ('start', 'stop')
from kivy.uix.floatlayout import FloatLayout
from kivy.properties import BooleanProperty, ObjectProperty, \
NumericProperty
from kivy.graphics import Fbo, ClearColor, ClearBuffers, \
RenderContext, Callback, PushMatrix, PopMatrix, \
Color, Translate, Rotate, Mesh, UpdateNormalMatrix, \
Canvas, Line
"""Hoverable Behaviour (changing when the mouse is on the widget by O. Poyen.
License: LGPL
"""
__author__ = 'Olivier POYEN'
from kivy.properties import BooleanProperty, ObjectProperty
from kivy.core.window import Window
class HoverBehavior(object):
from kivy.app import App
from kivy.lang import Builder
from kivy.properties import ObjectProperty, OptionProperty, StringProperty, NumericProperty
from kivy.uix.effectwidget import AdvancedEffectBase, EffectWidget
from kivy.graphics import BindTexture
from kivy.clock import Clock
GLSL = '''
uniform sampler2D mask;
uniform vec2 mask_pos;
from kivy.uix.boxlayout import BoxLayout
from kivy.app import App
from kivy.uix.button import Button
from functools import partial
class DemoBox(BoxLayout):
def __init__(self, **kwargs):
super(DemoBox, self).__init__(**kwargs)
self.orientation = "vertical"
@joyrexus
joyrexus / README.md
Last active August 6, 2024 16:07
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@tshirtman
tshirtman / nodes.py
Last active April 14, 2023 18:02
A really simple example of free node manipulations in kivy with a bezier line in between.
from kivy.lang import Builder
from kivy.app import App
KV = '''
<Node@Scatter>:
# do_scale: False
# do_rotation: False
size_hint: None, None
size: 200, 100
color: [0, 0, 0, 1]
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.widget import Widget
from kivy.properties import ListProperty, NumericProperty
from kivy.metrics import dp
KV = '''
#:import chain itertools.chain
FloatLayout:
@tshirtman
tshirtman / test_anim.py
Last active April 5, 2019 02:45
A simple example of animating a graphical instruction of a widget from a keyboard event.
from kivy.app import App
from kivy.animation import Animation
from kivy.lang import Builder
from kivy.properties import NumericProperty
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
KV = '''
FloatLayout:
@tshirtman
tshirtman / recycled_checkboxes.py
Last active November 26, 2019 14:39
use CheckBox/RadioButton in kivy's RecycleView
from kivy.lang import Builder
from kivy.app import App
from kivy.properties import ListProperty, NumericProperty
KV = '''
#:import RGBA kivy.utils.rgba
<Row@BoxLayout>:
text: ''
rv_key: 0
from kivy.lang import Builder
from kivy.app import App
from kivy.properties import ListProperty, NumericProperty
KV = '''
#:import RGBA kivy.utils.rgba
<Row@BoxLayout>:
text: ''
rv_key: 0