-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f34a03
commit 73ee397
Showing
7 changed files
with
167 additions
and
20 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .hooman import Hooman | ||
from .formula import * | ||
|
||
version_info = (0, 7, 1) | ||
version_info = (0, 8, 0) | ||
__version__ = ".".join([str(v) for v in version_info]) |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
Author: Abdur-Rahmaan Janhangeer | ||
Github: https://github.com/Abdur-rahmaanJ | ||
""" | ||
|
||
from hooman import Hooman | ||
|
||
import pygame | ||
|
||
hapi = Hooman(500, 500) | ||
|
||
counter = 1 | ||
def handle_events(event): | ||
if event.type == pygame.QUIT: | ||
hapi.is_running = False | ||
|
||
|
||
hapi.handle_events = handle_events | ||
|
||
while hapi.is_running: | ||
hapi.background((255, 255, 255)) | ||
|
||
hapi.stroke_size(5) | ||
hapi.stroke((0, 255, 0)) | ||
|
||
for i in range(0, hapi.WIDTH, 20): | ||
hapi.line(i, 0, hapi.mouseX(), hapi.mouseY()) | ||
|
||
|
||
hapi.record() | ||
hapi.flip_display() | ||
hapi.event_loop() | ||
|
||
|
||
pygame.quit() | ||
|
||
hapi.save_record('mov.mp4') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
""" | ||
Author: Abdur-Rahmaan Janhangeer | ||
Github: https://github.com/Abdur-rahmaanJ | ||
""" | ||
|
||
from hooman import Hooman | ||
|
||
import pygame | ||
|
||
window_width, window_height = 500, 500 | ||
hapi = Hooman(window_width, window_height) | ||
|
||
hapi = Hooman(500, 500) | ||
|
||
counter = 1 | ||
def handle_events(event): | ||
if event.type == pygame.QUIT: | ||
hapi.is_running = False | ||
if event.type == pygame.KEYDOWN: | ||
if event.key == pygame.K_ESCAPE: | ||
hapi.is_running = False | ||
|
||
|
||
hapi.handle_events = handle_events | ||
|
||
clock = pygame.time.Clock() | ||
|
||
hapi.set_background(hapi.color["white"]) | ||
|
||
while hapi.is_running: | ||
hapi.background((255, 255, 255)) | ||
|
||
hapi.fill(100) | ||
hapi.stroke(0) | ||
hapi.stroke_size(4) | ||
hapi.regular_polygon(100, 200, 50, 50, hapi.mouseX() // 50) | ||
hapi.rotate(hapi.mouseY() // 2) | ||
hapi.stroke_size(5) | ||
hapi.stroke((0, 255, 0)) | ||
|
||
hapi.event_loop() | ||
for i in range(0, hapi.WIDTH, 20): | ||
hapi.line(i, 0, hapi.mouseX(), hapi.mouseY()) | ||
|
||
hapi.flip_display() | ||
|
||
clock.tick(60) | ||
hapi.record() | ||
hapi.flip_display() | ||
hapi.event_loop() | ||
|
||
|
||
pygame.quit() | ||
|
||
hapi.save_record('mov.mp4') |
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
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