@@ -995,7 +995,7 @@ def close_audio_device() -> None:
995995 ...
996996@deprecated ("Raylib no longer recommends the use of Physac library" )
997997def close_physics () -> None :
998- """Close physics system and unload used memory ."""
998+ """Unitializes physics pointers and closes physics loop thread ."""
999999 ...
10001000def close_window () -> None :
10011001 """Close window and unload OpenGL context."""
@@ -1071,7 +1071,7 @@ def decompress_data(compData: str,compDataSize: int,dataSize: Any,) -> str:
10711071 ...
10721072@deprecated ("Raylib no longer recommends the use of Physac library" )
10731073def destroy_physics_body (body : Any | list | tuple ,) -> None :
1074- """Destroy a physics body."""
1074+ """Unitializes and destroy a physics body."""
10751075 ...
10761076def detach_audio_mixed_processor (processor : Any ,) -> None :
10771077 """Detach audio stream processor from the entire audio pipeline."""
@@ -2145,7 +2145,7 @@ def init_audio_device() -> None:
21452145 ...
21462146@deprecated ("Raylib no longer recommends the use of Physac library" )
21472147def init_physics () -> None :
2148- """Initializes physics system ."""
2148+ """Initializes physics values, pointers and creates physics loop thread ."""
21492149 ...
21502150def init_window (width : int ,height : int ,title : str ,) -> None :
21512151 """Initialize window and OpenGL context."""
@@ -2246,6 +2246,10 @@ def is_music_valid(music: Music|list|tuple,) -> bool:
22462246def is_path_file (path : str ,) -> bool :
22472247 """Check if a given path is a file or a directory."""
22482248 ...
2249+ @deprecated ("Raylib no longer recommends the use of Physac library" )
2250+ def is_physics_enabled () -> bool :
2251+ """Returns true if physics thread is currently enabled."""
2252+ ...
22492253def is_render_texture_valid (target : RenderTexture | list | tuple ,) -> bool :
22502254 """Check if a render texture is valid (loaded in GPU)."""
22512255 ...
@@ -2630,10 +2634,6 @@ def quaternion_transform(q: Vector4|list|tuple,mat: Matrix|list|tuple,) -> Vecto
26302634def remap (value : float ,inputStart : float ,inputEnd : float ,outputStart : float ,outputEnd : float ,) -> float :
26312635 """."""
26322636 ...
2633- @deprecated ("Raylib no longer recommends the use of Physac library" )
2634- def reset_physics () -> None :
2635- """Reset physics system (global variables)."""
2636- ...
26372637def restore_window () -> None :
26382638 """Set window state: not minimized/maximized."""
26392639 ...
@@ -2646,6 +2646,10 @@ def resume_music_stream(music: Music|list|tuple,) -> None:
26462646def resume_sound (sound : Sound | list | tuple ,) -> None :
26472647 """Resume a paused sound."""
26482648 ...
2649+ @deprecated ("Raylib no longer recommends the use of Physac library" )
2650+ def run_physics_step () -> None :
2651+ """Run physics step, to be used if PHYSICS_NO_THREADS is set in your main loop."""
2652+ ...
26492653def save_file_data (fileName : str ,data : Any ,dataSize : int ,) -> bool :
26502654 """Save data to file from byte array (write), returns true on success."""
26512655 ...
@@ -3021,10 +3025,6 @@ def update_model_animation_bones(model: Model|list|tuple,anim: ModelAnimation|li
30213025def update_music_stream (music : Music | list | tuple ,) -> None :
30223026 """Updates buffers for music streaming."""
30233027 ...
3024- @deprecated ("Raylib no longer recommends the use of Physac library" )
3025- def update_physics () -> None :
3026- """Update physics system."""
3027- ...
30283028def update_sound (sound : Sound | list | tuple ,data : Any ,sampleCount : int ,) -> None :
30293029 """Update sound buffer with new data."""
30303030 ...
@@ -4239,6 +4239,13 @@ class Image:
42394239 self .height :int = height # type: ignore
42404240 self .mipmaps :int = mipmaps # type: ignore
42414241 self .format :int = format # type: ignore
4242+ class Mat2 :
4243+ """Mat2 type (used for polygon shape rotation matrix)."""
4244+ def __init__ (self , m00 : float | None = None , m01 : float | None = None , m10 : float | None = None , m11 : float | None = None ):
4245+ self .m00 :float = m00 # type: ignore
4246+ self .m01 :float = m01 # type: ignore
4247+ self .m10 :float = m10 # type: ignore
4248+ self .m11 :float = m11 # type: ignore
42424249class Material :
42434250 """Material, includes shader and maps."""
42444251 def __init__ (self , shader : Shader | list | tuple | None = None , maps : Any | None = None , params : list | None = None ):
@@ -4270,13 +4277,6 @@ class Matrix:
42704277 self .m7 :float = m7 # type: ignore
42714278 self .m11 :float = m11 # type: ignore
42724279 self .m15 :float = m15 # type: ignore
4273- class Matrix2x2 :
4274- """Matrix2x2 type (used for polygon shape rotation matrix)."""
4275- def __init__ (self , m00 : float | None = None , m01 : float | None = None , m10 : float | None = None , m11 : float | None = None ):
4276- self .m00 :float = m00 # type: ignore
4277- self .m01 :float = m01 # type: ignore
4278- self .m10 :float = m10 # type: ignore
4279- self .m11 :float = m11 # type: ignore
42804280class Mesh :
42814281 """Mesh, vertex data and vao/vbo."""
42824282 def __init__ (self , vertexCount : int | None = None , triangleCount : int | None = None , vertices : Any | None = None , texcoords : Any | None = None , texcoords2 : Any | None = None , normals : Any | None = None , tangents : Any | None = None , colors : str | None = None , indices : Any | None = None , animVertices : Any | None = None , animNormals : Any | None = None , boneIds : str | None = None , boneWeights : Any | None = None , boneMatrices : Any | None = None , boneCount : int | None = None , vaoId : int | None = None , vboId : Any | None = None ):
@@ -4371,13 +4371,13 @@ class PhysicsManifoldData:
43714371 self .staticFriction :float = staticFriction # type: ignore
43724372class PhysicsShape :
43734373 """."""
4374- def __init__ (self , type : PhysicsShapeType | None = None , body : Any | None = None , vertexData : PhysicsVertexData | list | tuple | None = None , radius : float | None = None , transform : Matrix2x2 | list | tuple | None = None ):
4374+ def __init__ (self , type : PhysicsShapeType | None = None , body : Any | None = None , radius : float | None = None , transform : Mat2 | list | tuple | None = None , vertexData : PolygonData | list | tuple | None = None ):
43754375 self .type :PhysicsShapeType = type # type: ignore
43764376 self .body :Any = body # type: ignore
4377- self .vertexData :PhysicsVertexData = vertexData # type: ignore
43784377 self .radius :float = radius # type: ignore
4379- self .transform :Matrix2x2 = transform # type: ignore
4380- class PhysicsVertexData :
4378+ self .transform :Mat2 = transform # type: ignore
4379+ self .vertexData :PolygonData = vertexData # type: ignore
4380+ class PolygonData :
43814381 """."""
43824382 def __init__ (self , vertexCount : int | None = None , positions : list | None = None , normals : list | None = None ):
43834383 self .vertexCount :int = vertexCount # type: ignore
0 commit comments