update examples
This commit is contained in:
parent
4071263a59
commit
6441bca77c
40 changed files with 232 additions and 321 deletions
|
@ -1,7 +1,7 @@
|
|||
# python3 -m pip install pyglm
|
||||
|
||||
from math import sin, cos
|
||||
import glm
|
||||
import glm # type: ignore
|
||||
from raylib import rl, ffi
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ python3 flow-field
|
|||
"""
|
||||
|
||||
import sys, math, time, random
|
||||
import glm # Note package is PyGLM, not glm.
|
||||
import glm # type: ignore
|
||||
# Note package is PyGLM, not glm.
|
||||
from raylib import rl, ffi
|
||||
from raylib.colors import *
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ Mac:
|
|||
"""
|
||||
|
||||
import sys, time
|
||||
import glm
|
||||
import pytweening as tween
|
||||
import screeninfo
|
||||
import glm # type: ignore
|
||||
import pytweening as tween # type: ignore
|
||||
import screeninfo # type: ignore
|
||||
from raylib import rl, ffi
|
||||
from raylib.colors import *
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import cv2 as cv
|
||||
import cv2 as cv # type:ignore
|
||||
from pyray import *
|
||||
|
||||
opencv_image = cv.imread("resources/raylib_logo.jpg")
|
||||
|
@ -10,7 +10,7 @@ screenHeight = 450
|
|||
init_window(screenWidth, screenHeight, "example - image loading")
|
||||
|
||||
pointer_to_image_data = ffi.from_buffer(opencv_image.data)
|
||||
raylib_image = Image(pointer_to_image_data, 256, 256, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8)
|
||||
raylib_image = Image(pointer_to_image_data, 256, 256, 1, PixelFormat.PIXELFORMAT_UNCOMPRESSED_R8G8B8)
|
||||
texture = load_texture_from_image(raylib_image)
|
||||
unload_image(raylib_image)
|
||||
|
||||
|
|
Reference in a new issue