This commit is contained in:
Benjamín 2021-09-13 20:21:11 +02:00
parent 1e3e7939b0
commit 5b86a84488
26 changed files with 34 additions and 40 deletions

2
.gitignore vendored

@ -129,4 +129,4 @@ dmypy.json
# Pyre type checker
.pyre/
UI/Render
GUI/Render

@ -2,7 +2,7 @@ import copy
import math
import pygame
from numpy import array as a
from UI.Objects.Scene import Scene
from GUI.Objects.Scene import Scene
class Multiscene(Scene):

@ -1,5 +1,5 @@
import pygame.transform
from UI.Objects.Screen import Screen
from GUI.Objects.Screen import Screen
from numpy import array as a
import numpy as np

@ -1,8 +1,8 @@
from UI.Objects.Multiscene import Multiscene
from UI.Scenes.Sample_Scenes.BasicScene import BasicScene
from GUI.Objects.Multiscene import Multiscene
from GUI.Sample_Scenes.BasicScene import BasicScene
from numpy import array as a
from UI.Objects.nr_objects.Line import Line
from GUI.Objects.nr_objects.Line import Line
class BasicMultiscene(Multiscene):

@ -1,13 +1,13 @@
from UI.Objects.Scene import Scene
from GUI.Objects.Scene import Scene
from numpy import array as a
from UI.Objects.nr_objects.Ellipse import Ellipse
from UI.Objects.nr_objects.Circle import Circle
from UI.Objects.nr_objects.EquilateralTriangle import EquilateralTriangle
from UI.Objects.nr_objects.Image import Image
from UI.Objects.nr_objects.Line import Line
from UI.Objects.nr_objects.Text import Text
from UI.Objects.r_objects.Rect import Rect
from GUI.Objects.nr_objects.Ellipse import Ellipse
from GUI.Objects.nr_objects.Circle import Circle
from GUI.Objects.nr_objects.EquilateralTriangle import EquilateralTriangle
from GUI.Objects.nr_objects.Image import Image
from GUI.Objects.nr_objects.Line import Line
from GUI.Objects.nr_objects.Text import Text
from GUI.Objects.r_objects.Rect import Rect
class BasicScene(Scene):
@ -27,7 +27,7 @@ class BasicScene(Scene):
t0 = Text(a([100, 50]), "hello world!", 26, (200, 200, 200), self)
i0 = Image(a([200, 0]), 0.8, "test.png", self)
i0 = Image(a([200, 0]), 0.8, "sample_image.png", self)
triangle0 = EquilateralTriangle(a([500, 300]), 30, 1, (250, 250, 150), self)

@ -1,9 +1,9 @@
from UI.Objects.Multiscene import Multiscene
from UI.Objects.nr_objects.light_objects.LuminousCircleEffect import LuminousCircleEffect
from UI.Scenes.Sample_Scenes.LuminousCircleEffectScene import LuminousCircleEffectScene
from GUI.Objects.Multiscene import Multiscene
from GUI.Objects.nr_objects.light_objects.LuminousCircleEffect import LuminousCircleEffect
from GUI.Sample_Scenes.LuminousCircleEffectScene import LuminousCircleEffectScene
from numpy import array as a
from UI.Objects.nr_objects.Line import Line
from GUI.Objects.nr_objects.Line import Line
class LuminousCircleEffectMultiscene(Multiscene):

@ -1,7 +1,7 @@
from UI.Objects.Scene import Scene
from GUI.Objects.Scene import Scene
from numpy import array as a
from UI.Objects.nr_objects.light_objects.LuminousCircleEffect import LuminousCircleEffect
from GUI.Objects.nr_objects.light_objects.LuminousCircleEffect import LuminousCircleEffect
class LuminousCircleEffectScene(Scene):

@ -1,8 +1,8 @@
from UI.Objects.Multiscene import Multiscene
from UI.Scenes.Sample_Scenes.BasicMultiscene import BasicMultiscene
from GUI.Objects.Multiscene import Multiscene
from GUI.Sample_Scenes.BasicMultiscene import BasicMultiscene
from numpy import array as a
from UI.Objects.nr_objects.Line import Line
from GUI.Objects.nr_objects.Line import Line
class MultisceneInMultiscene(Multiscene):

@ -1,8 +1,8 @@
from numpy import array as a
from UI.Objects.Multiscene import Multiscene
from UI.Objects.nr_objects.Line import Line
from UI.Scenes.Sample_Scenes.RopeScene import RopeScene
from GUI.Objects.Multiscene import Multiscene
from GUI.Objects.nr_objects.Line import Line
from GUI.Sample_Scenes.RopeScene import RopeScene
class RopeMultiscene(Multiscene):

@ -1,9 +1,9 @@
from UI.Objects.Scene import Scene
from GUI.Objects.Scene import Scene
from numpy import array as a
import pygame
from UI.Objects.nr_objects.dynamic_objects.Rope import Rope
from UI.Objects.nr_objects.controllable_objects.RopeInteractiveDot import RopeInteractiveDot
from GUI.Objects.nr_objects.dynamic_objects.Rope import Rope
from GUI.Objects.nr_objects.controllable_objects.RopeInteractiveDot import RopeInteractiveDot
class RopeScene(Scene):

@ -1,9 +1,7 @@
from numpy import array as a
import time
from UI.Scenes.Sample_Scenes.LuminousCircleEffectMultiscene import LuminousCircleEffectMultiscene
from UI.Scenes.Sample_Scenes.LuminousCircleEffectScene import LuminousCircleEffectScene
from GUI.Sample_Scenes.LuminousCircleEffectMultiscene import LuminousCircleEffectMultiscene
screen_size = a([1000, 800])
scene = LuminousCircleEffectMultiscene(screen_size)

@ -1,15 +1,12 @@
import pygame.mouse
from UI.Scenes.Sample_Scenes.BasicMultiscene import BasicMultiscene
from UI.Scenes.Sample_Scenes.BasicScene import BasicScene
from UI.Scenes.Sample_Scenes.LuminousCircleEffectMultiscene import LuminousCircleEffectMultiscene
from UI.Scenes.Sample_Scenes.LuminousCircleEffectScene import LuminousCircleEffectScene
from numpy import array as a
import time
from GUI.Sample_Scenes.BasicScene import BasicScene
screen_size = a([200, 500])
scene = LuminousCircleEffectMultiscene(screen_size)
scene = BasicScene(screen_size)
mouse_pos = [0, 0]
clicked = False
@ -19,7 +16,6 @@ for i in range(400):
scene.update()
scene.update_mouse_events(pygame.mouse.get_pos(), pygame.mouse.get_pressed(3)[0])
scene.progress()
#scene.save(f"Render/{i}.png", [800, 800])
if i < 150:
screen_size[0] += 3

BIN
GUI/sample_image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB