2023-03-25 12:34:02 +08:00
|
|
|
# -------------------------------
|
|
|
|
# Difficult Rocket
|
|
|
|
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
|
|
|
|
# All rights reserved
|
|
|
|
# -------------------------------
|
|
|
|
|
|
|
|
from .lib import *
|
|
|
|
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
from pyglet.event import EventDispatcher
|
|
|
|
|
2023-03-25 20:13:17 +08:00
|
|
|
def get_version_str() -> str: ...
|
|
|
|
|
|
|
|
|
2023-03-28 19:23:41 +08:00
|
|
|
class Sprite_rs(EventDispatcher): ...
|
|
|
|
|
|
|
|
class Vector2_rs: ...
|
|
|
|
class Vector3_rs: ...
|
|
|
|
class Vector4_rs: ...
|
|
|
|
|
|
|
|
class Matrix3_rs: ...
|
|
|
|
class Matrix4_rs: ...
|
2023-03-25 20:13:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
def patch_sprite():
|
|
|
|
from pyglet import sprite
|
|
|
|
sprite.Sprite = Sprite_rs
|
2023-03-28 19:23:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
def patch_vector():
|
|
|
|
from pyglet import math
|
|
|
|
math.Vector2 = Vector2_rs
|
|
|
|
math.Vector3 = Vector3_rs
|
|
|
|
math.Vector4 = Vector4_rs
|
|
|
|
|
|
|
|
|
|
|
|
def patch_matrix():
|
|
|
|
from pyglet import math
|
|
|
|
math.Matrix3 = Matrix3_rs
|
|
|
|
math.Matrix4 = Matrix4_rs
|
|
|
|
|
|
|
|
|
|
|
|
def patch_all():
|
|
|
|
patch_sprite()
|
|
|
|
patch_vector()
|
|
|
|
patch_matrix()
|