tidy examples

This commit is contained in:
Richard Smith 2024-02-21 12:21:32 +00:00
parent eb68dec2ad
commit 70b8d7c143
12 changed files with 120 additions and 6 deletions

View file

@ -1 +0,0 @@
pyglm

View file

@ -1,3 +1,5 @@
# python3 -m pip install pyglm
from math import sin, cos
import glm
from raylib import rl, ffi

View file

@ -2,7 +2,7 @@
RenderTexture example
Run with:
python3 -m pip install pyglm
python3 flow-field
flow-field bees
"""

View file

@ -1 +0,0 @@
pyglm

View file

@ -78,7 +78,7 @@ while not rl.WindowShouldClose(): #// Detect window close button or E
angle -= 0.002
camera.position.x = math.sin(angle) * 30.0
camera.position.z = math.cos(angle) * 30.0
rl.UpdateCamera(camera) #// Update camera
rl.UpdateCamera(camera, rl.CAMERA_PERSPECTIVE) #// Update camera
swirl.x = rl.GetMouseX()
swirl.y = screenHeight - rl.GetMouseY()

View file

@ -61,7 +61,7 @@ while not rl.WindowShouldClose():
a += 0.01
camera.position.x = math.sin(a) * 6
camera.position.z = math.cos(a) * 6
rl.UpdateCamera(camera)
rl.UpdateCamera(camera, rl.CAMERA_PERSPECTIVE)
lightSystem.update(camera.position)

View file

@ -4,7 +4,6 @@ raylib [texture] example - To image
"""
from pyray import *
from raylib.colors import *
# Initialization
screenWidth = 800