basilisk-engine 0.1.34__py3-none-any.whl → 0.1.36__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of basilisk-engine might be problematic. Click here for more details.

Files changed (98) hide show
  1. basilisk/__init__.py +26 -26
  2. basilisk/audio/sound.py +27 -27
  3. basilisk/bsk_assets/cube.obj +48 -48
  4. basilisk/collisions/broad/broad_aabb.py +102 -102
  5. basilisk/collisions/broad/broad_bvh.py +137 -137
  6. basilisk/collisions/collider.py +95 -95
  7. basilisk/collisions/collider_handler.py +225 -224
  8. basilisk/collisions/narrow/contact_manifold.py +95 -95
  9. basilisk/collisions/narrow/dataclasses.py +34 -34
  10. basilisk/collisions/narrow/deprecated.py +46 -46
  11. basilisk/collisions/narrow/epa.py +91 -91
  12. basilisk/collisions/narrow/gjk.py +66 -66
  13. basilisk/collisions/narrow/graham_scan.py +24 -24
  14. basilisk/collisions/narrow/helper.py +29 -29
  15. basilisk/collisions/narrow/line_intersections.py +106 -106
  16. basilisk/collisions/narrow/sutherland_hodgman.py +75 -75
  17. basilisk/config.py +54 -4
  18. basilisk/draw/draw.py +100 -100
  19. basilisk/draw/draw_handler.py +175 -175
  20. basilisk/draw/font_renderer.py +28 -28
  21. basilisk/engine.py +165 -165
  22. basilisk/generic/abstract_bvh.py +15 -15
  23. basilisk/generic/abstract_custom.py +133 -133
  24. basilisk/generic/collisions.py +70 -70
  25. basilisk/generic/input_validation.py +82 -74
  26. basilisk/generic/math.py +6 -6
  27. basilisk/generic/matrices.py +35 -35
  28. basilisk/generic/meshes.py +72 -72
  29. basilisk/generic/quat.py +142 -142
  30. basilisk/generic/quat_methods.py +7 -7
  31. basilisk/generic/raycast_result.py +26 -26
  32. basilisk/generic/vec3.py +143 -143
  33. basilisk/input_output/IO_handler.py +91 -91
  34. basilisk/input_output/clock.py +49 -49
  35. basilisk/input_output/keys.py +43 -43
  36. basilisk/input_output/mouse.py +90 -89
  37. basilisk/input_output/path.py +14 -14
  38. basilisk/mesh/cube.py +33 -33
  39. basilisk/mesh/mesh.py +233 -233
  40. basilisk/mesh/mesh_from_data.py +150 -150
  41. basilisk/mesh/model.py +271 -271
  42. basilisk/mesh/narrow_aabb.py +89 -89
  43. basilisk/mesh/narrow_bvh.py +91 -91
  44. basilisk/mesh/narrow_primative.py +23 -23
  45. basilisk/nodes/helper.py +28 -28
  46. basilisk/nodes/node.py +704 -695
  47. basilisk/nodes/node_handler.py +97 -97
  48. basilisk/particles/particle_handler.py +64 -64
  49. basilisk/particles/particle_renderer.py +92 -92
  50. basilisk/physics/impulse.py +112 -112
  51. basilisk/physics/physics_body.py +43 -43
  52. basilisk/physics/physics_engine.py +35 -35
  53. basilisk/render/batch.py +103 -103
  54. basilisk/render/bloom.py +108 -0
  55. basilisk/render/camera.py +260 -260
  56. basilisk/render/chunk.py +108 -106
  57. basilisk/render/chunk_handler.py +167 -165
  58. basilisk/render/frame.py +107 -95
  59. basilisk/render/framebuffer.py +203 -192
  60. basilisk/render/image.py +120 -120
  61. basilisk/render/image_handler.py +120 -120
  62. basilisk/render/light.py +96 -96
  63. basilisk/render/light_handler.py +58 -58
  64. basilisk/render/material.py +232 -221
  65. basilisk/render/material_handler.py +133 -133
  66. basilisk/render/post_process.py +139 -139
  67. basilisk/render/shader.py +134 -134
  68. basilisk/render/shader_handler.py +85 -83
  69. basilisk/render/sky.py +120 -120
  70. basilisk/scene.py +289 -289
  71. basilisk/shaders/batch.frag +289 -276
  72. basilisk/shaders/batch.vert +117 -115
  73. basilisk/shaders/bloom_downsample.frag +43 -0
  74. basilisk/shaders/bloom_frame.frag +25 -0
  75. basilisk/shaders/bloom_upsample.frag +34 -0
  76. basilisk/shaders/crt.frag +31 -31
  77. basilisk/shaders/draw.frag +25 -22
  78. basilisk/shaders/draw.vert +25 -25
  79. basilisk/shaders/filter.frag +22 -22
  80. basilisk/shaders/frame.frag +12 -12
  81. basilisk/shaders/frame.vert +13 -13
  82. basilisk/shaders/geometry.frag +8 -8
  83. basilisk/shaders/geometry.vert +41 -41
  84. basilisk/shaders/normal.frag +59 -59
  85. basilisk/shaders/normal.vert +96 -96
  86. basilisk/shaders/particle.frag +71 -71
  87. basilisk/shaders/particle.vert +84 -84
  88. basilisk/shaders/sky.frag +23 -9
  89. basilisk/shaders/sky.vert +13 -13
  90. basilisk_engine-0.1.36.dist-info/METADATA +89 -0
  91. basilisk_engine-0.1.36.dist-info/RECORD +110 -0
  92. {basilisk_engine-0.1.34.dist-info → basilisk_engine-0.1.36.dist-info}/WHEEL +1 -1
  93. basilisk/input/__init__.py +0 -0
  94. basilisk/input/mouse.py +0 -62
  95. basilisk/input/path.py +0 -14
  96. basilisk_engine-0.1.34.dist-info/METADATA +0 -45
  97. basilisk_engine-0.1.34.dist-info/RECORD +0 -109
  98. {basilisk_engine-0.1.34.dist-info → basilisk_engine-0.1.36.dist-info}/top_level.txt +0 -0
@@ -1,85 +1,85 @@
1
- #version 330 core
2
-
3
- layout (location = 0) in vec3 in_position;
4
- layout (location = 1) in vec2 in_uv;
5
- layout (location = 2) in vec3 in_normal;
6
- layout (location = 3) in vec3 in_tangent;
7
- layout (location = 4) in vec3 in_bitangent;
8
-
9
-
10
- in vec3 in_instance_pos;
11
- in float in_instance_mtl;
12
- in float scale;
13
- in float life;
14
-
15
- out vec2 uv;
16
- out mat3 TBN;
17
-
18
- uniform mat4 projectionMatrix;
19
- uniform mat4 viewMatrix;
20
- uniform sampler2D materialsTexture;
21
-
22
- struct Material {
23
- vec3 color;
24
- float roughness;
25
- float subsurface;
26
- float sheen;
27
- float sheenTint;
28
- float anisotropic;
29
- float specular;
30
- float metallicness;
31
- float specularTint;
32
- float clearcoat;
33
- float clearcoatGloss;
34
-
35
- int hasAlbedoMap;
36
- vec2 albedoMap;
37
- int hasNormalMap;
38
- vec2 normalMap;
39
- int hasRoughnessMap;
40
- vec2 roughnessMap;
41
- int hasAoMap;
42
- vec2 aoMap;
43
- };
44
- flat out Material mtl;
45
-
46
- // Function to get the model matrix from node position, rotation, and scale
47
- mat4 getModelMatrix(vec3 pos, float scale) {
48
- mat4 translation = mat4(
49
- scale, 0 , 0 , 0,
50
- 0 , scale, 0 , 0,
51
- 0 , 0 , scale, 0,
52
- pos.x, pos.y, pos.z, 1
53
- );
54
- return translation;
55
- }
56
-
57
- // Function to get the TBN matrix for normal mapping
58
- mat3 getTBN(mat4 modelMatrix, vec3 normal, vec3 tangent, vec3 bitangent){
59
- vec3 T = normalize(vec3(modelMatrix * vec4(tangent, 0.0)));
60
- vec3 B = normalize(vec3(modelMatrix * vec4(bitangent, 0.0)));
61
- vec3 N = normalize(vec3(modelMatrix * vec4(normal, 0.0)));
62
- return mat3(T, B, N);
63
- }
64
-
65
- void main() {
66
- // Set the model matrix
67
- mat4 modelMatrix = getModelMatrix(in_instance_pos, scale * life);
68
-
69
- // Set out variables
70
- TBN = getTBN(modelMatrix, in_normal, in_tangent, in_bitangent);
71
- uv = in_uv;
72
-
73
- // Material Data
74
- int mtl_size = 25;
75
- int materialID = int(in_instance_mtl);
76
- mtl = Material(vec3(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, vec2(0), 0, vec2(0), 0, vec2(0), 0, vec2(0));
77
- mtl.color = vec3(texelFetch(materialsTexture, ivec2(0, 0 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 1 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 2 + materialID * mtl_size), 0).r);
78
- mtl.hasAlbedoMap = int(texelFetch(materialsTexture, ivec2(0, 13 + materialID * mtl_size), 0).r);
79
- mtl.albedoMap = vec2(texelFetch(materialsTexture, ivec2(0, 14 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 15 + materialID * mtl_size), 0).r);
80
- mtl.hasNormalMap = int(texelFetch(materialsTexture, ivec2(0, 16 + materialID * mtl_size), 0).r);
81
- mtl.normalMap = vec2(texelFetch(materialsTexture, ivec2(0, 17 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 18 + materialID * mtl_size), 0).r);
82
-
83
- // Send position to the frag
84
- gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(in_position, 1.0);
1
+ #version 330 core
2
+
3
+ layout (location = 0) in vec3 in_position;
4
+ layout (location = 1) in vec2 in_uv;
5
+ layout (location = 2) in vec3 in_normal;
6
+ layout (location = 3) in vec3 in_tangent;
7
+ layout (location = 4) in vec3 in_bitangent;
8
+
9
+
10
+ in vec3 in_instance_pos;
11
+ in float in_instance_mtl;
12
+ in float scale;
13
+ in float life;
14
+
15
+ out vec2 uv;
16
+ out mat3 TBN;
17
+
18
+ uniform mat4 projectionMatrix;
19
+ uniform mat4 viewMatrix;
20
+ uniform sampler2D materialsTexture;
21
+
22
+ struct Material {
23
+ vec3 color;
24
+ float roughness;
25
+ float subsurface;
26
+ float sheen;
27
+ float sheenTint;
28
+ float anisotropic;
29
+ float specular;
30
+ float metallicness;
31
+ float specularTint;
32
+ float clearcoat;
33
+ float clearcoatGloss;
34
+
35
+ int hasAlbedoMap;
36
+ vec2 albedoMap;
37
+ int hasNormalMap;
38
+ vec2 normalMap;
39
+ int hasRoughnessMap;
40
+ vec2 roughnessMap;
41
+ int hasAoMap;
42
+ vec2 aoMap;
43
+ };
44
+ flat out Material mtl;
45
+
46
+ // Function to get the model matrix from node position, rotation, and scale
47
+ mat4 getModelMatrix(vec3 pos, float scale) {
48
+ mat4 translation = mat4(
49
+ scale, 0 , 0 , 0,
50
+ 0 , scale, 0 , 0,
51
+ 0 , 0 , scale, 0,
52
+ pos.x, pos.y, pos.z, 1
53
+ );
54
+ return translation;
55
+ }
56
+
57
+ // Function to get the TBN matrix for normal mapping
58
+ mat3 getTBN(mat4 modelMatrix, vec3 normal, vec3 tangent, vec3 bitangent){
59
+ vec3 T = normalize(vec3(modelMatrix * vec4(tangent, 0.0)));
60
+ vec3 B = normalize(vec3(modelMatrix * vec4(bitangent, 0.0)));
61
+ vec3 N = normalize(vec3(modelMatrix * vec4(normal, 0.0)));
62
+ return mat3(T, B, N);
63
+ }
64
+
65
+ void main() {
66
+ // Set the model matrix
67
+ mat4 modelMatrix = getModelMatrix(in_instance_pos, scale * life);
68
+
69
+ // Set out variables
70
+ TBN = getTBN(modelMatrix, in_normal, in_tangent, in_bitangent);
71
+ uv = in_uv;
72
+
73
+ // Material Data
74
+ int mtl_size = 25;
75
+ int materialID = int(in_instance_mtl);
76
+ mtl = Material(vec3(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, vec2(0), 0, vec2(0), 0, vec2(0), 0, vec2(0));
77
+ mtl.color = vec3(texelFetch(materialsTexture, ivec2(0, 0 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 1 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 2 + materialID * mtl_size), 0).r);
78
+ mtl.hasAlbedoMap = int(texelFetch(materialsTexture, ivec2(0, 13 + materialID * mtl_size), 0).r);
79
+ mtl.albedoMap = vec2(texelFetch(materialsTexture, ivec2(0, 14 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 15 + materialID * mtl_size), 0).r);
80
+ mtl.hasNormalMap = int(texelFetch(materialsTexture, ivec2(0, 16 + materialID * mtl_size), 0).r);
81
+ mtl.normalMap = vec2(texelFetch(materialsTexture, ivec2(0, 17 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 18 + materialID * mtl_size), 0).r);
82
+
83
+ // Send position to the frag
84
+ gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(in_position, 1.0);
85
85
  }
basilisk/shaders/sky.frag CHANGED
@@ -1,10 +1,24 @@
1
- #version 330 core
2
- out vec4 fragColor;
3
-
4
- in vec3 texCubeCoords;
5
-
6
- uniform samplerCube skyboxTexture;
7
-
8
- void main() {
9
- fragColor = texture(skyboxTexture, texCubeCoords);
1
+ #version 330 core
2
+
3
+ layout (location = 0) out vec4 fragColor;
4
+ layout (location = 1) out vec4 bloomColor;
5
+
6
+ in vec3 texCubeCoords;
7
+
8
+ uniform samplerCube skyboxTexture;
9
+
10
+ void main() {
11
+ const float gamma = 2.2;
12
+ const float exposure = 1.0;
13
+ vec3 ldrColor = texture(skyboxTexture, texCubeCoords).rgb;
14
+
15
+ // Inverse gamma correction (sRGB to linear)
16
+ ldrColor = pow(ldrColor, vec3(gamma));
17
+
18
+ // Apply exposure (pseudo-HDR)
19
+ vec3 hdrColor = ldrColor * exposure;
20
+
21
+ fragColor = vec4(hdrColor, 1.0);
22
+
23
+ bloomColor = vec4(0.0, 0.0, 0.0, 1.0);
10
24
  }
basilisk/shaders/sky.vert CHANGED
@@ -1,14 +1,14 @@
1
- #version 330 core
2
- layout (location = 0) in vec3 in_position;
3
-
4
- out vec3 texCubeCoords;
5
-
6
- uniform mat4 projectionMatrix;
7
- uniform mat4 viewMatrix;
8
-
9
- void main() {
10
- texCubeCoords = in_position;
11
- vec4 pos = projectionMatrix * mat4(mat3(viewMatrix)) * vec4(in_position, 1.0);
12
- gl_Position = pos.xyww;
13
- gl_Position.z -= 0.0001;
1
+ #version 330 core
2
+ layout (location = 0) in vec3 in_position;
3
+
4
+ out vec3 texCubeCoords;
5
+
6
+ uniform mat4 projectionMatrix;
7
+ uniform mat4 viewMatrix;
8
+
9
+ void main() {
10
+ texCubeCoords = in_position;
11
+ vec4 pos = projectionMatrix * mat4(mat3(viewMatrix)) * vec4(in_position, 1.0);
12
+ gl_Position = pos.xyww;
13
+ gl_Position.z -= 0.0001;
14
14
  }
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.2
2
+ Name: basilisk-engine
3
+ Version: 0.1.36
4
+ Summary: Python 3D Framework
5
+ Home-page: https://basilisk-website.vercel.app/
6
+ Author: Name
7
+ Author-email: basiliskengine@gmail.com
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: numpy
10
+ Requires-Dist: pillow
11
+ Requires-Dist: pygame-ce
12
+ Requires-Dist: moderngl
13
+ Requires-Dist: PyGLM
14
+ Requires-Dist: numba
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: description
18
+ Dynamic: description-content-type
19
+ Dynamic: home-page
20
+ Dynamic: requires-dist
21
+ Dynamic: summary
22
+
23
+ # Basilisk Engine
24
+ ![image](https://github.com/user-attachments/assets/5e39445c-e0da-452c-9f18-e590cca948c4)
25
+ Basilisk is a 3D engine package for python that can create visualizations, simulations, and video games from the comfort and ease of Python. Basilisk is designed for quick and effortless development with a powerful backend engine that supports larger scaled projects. The engine automatically handles all graphics and physics for you, with the option to inject your own functionality if desired.
26
+
27
+ <p align="center">
28
+ <img src="images/mud.png" alt="mud" width="400"/>
29
+ <img src="images/foil.png" alt="foil" width="400"/>
30
+ <img src="images/cloth.png" alt="mud" width="400"/>
31
+ <img src="images/floor.png" alt="mud" width="400"/>
32
+ </p>
33
+
34
+ # Quick Start
35
+ ## Installation
36
+ To start, you will need to install Basilisk engine. To do so, simply run the following command from the terminal:
37
+
38
+ ```cmd
39
+ pip install basilisk-engine
40
+ ```
41
+
42
+ Now you will be able to import the package with `import basilisk`. Since Basilisk is fully open source, you also have the option to download the code from the [github](https://github.com/Loffelt/BasiliskEngine) if you prefer.
43
+
44
+ ## First Program
45
+ Every Basilisk prorgam has an [Engine]() that handles the high level functionality of Basilisk. Additionally, you will want a [Scene]() which will hold the application's objects.
46
+
47
+ ```py
48
+ # Import basilisk into the project. We use bsk as convention
49
+ import basilisk as bsk
50
+
51
+ # Initialize objects for the engine and the scene
52
+ engine = bsk.Engine()
53
+ scene = bsk.Scene(engine)
54
+ ```
55
+
56
+ Here we will introduce an important paradigm of Basilisk's design that will reoccur throughout this guide. Most things used in Basilisk are objects, such as the engine and the scene. You can use these objects wherever and whenever you want. In this instance, we pass the engine to the scene, so that Basilisk knows the scene is part of the engine. Now, we will set up the game loop. We use a while loop by convention.
57
+
58
+ ```py
59
+ while engine.running: # Check that the engine is still running
60
+ scene.update() # Update the scene and render to temporary frame
61
+ engine.update() # Update the engine and render to the screen
62
+ ```
63
+
64
+ The `engine.running` attribute is just a boolean flag that tells the user if the engine is running still and has not been stoped for any reason. The `scene.update()` function will render the scene and handle physics/object updates for the tick. The `engine.update()` function will tell the engine to handle all frame rendering and inputs.
65
+
66
+ With just these six lines of code, you can now run the python file, and you should see something like this. Note that you can free your mouse by pressing escape (this behavior can be changed if desired see input section in [Engine]() reference page):
67
+
68
+ <div align="center">
69
+ <img src="docs/images/0_boilerplate.png" alt="mud" width="400"/>
70
+ </div>
71
+
72
+ Congratulations you have finished your first Basilisk program!
73
+
74
+ ## Full Code
75
+ For clarity, here is the full code used in this tutorial.
76
+
77
+ ```py
78
+ import basilisk as bsk
79
+
80
+ engine = bsk.Engine()
81
+ scene = bsk.Scene(engine)
82
+
83
+ while engine.running:
84
+ scene.update()
85
+ engine.update()
86
+ ```
87
+
88
+ ## Learn more at the [Basilisk Engine Website](https://basilisk-website.vercel.app)
89
+ Webpage still under development.
@@ -0,0 +1,110 @@
1
+ basilisk/__init__.py,sha256=iek4GeDKFC1oFX6JHCzyB-6F1iqHY9fiQo6S-qiotsk,1160
2
+ basilisk/config.py,sha256=czvjhMD2QVOGfxrdVfxI-jOex54dRwwwYzBiACYuZ0s,1765
3
+ basilisk/engine.py,sha256=9cKvXoRn8BC6eV8u2kJly-lfmp-zb7xlI-MW2DLYIRg,5887
4
+ basilisk/scene.py,sha256=NJUySG4vk4D9DOfajB6gdy_EgWZi2-R0rm28SfL_CII,12486
5
+ basilisk/audio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ basilisk/audio/sound.py,sha256=BjqaPv_07iD_-NDRy1cc0TS4PJzAnQc4hfsW9ntNjGQ,719
7
+ basilisk/bsk_assets/Roboto-Regular.ttf,sha256=kqYnZjMRQMpbyLulIChCLSdgYa1XF8GsUIoRi2Gcauw,168260
8
+ basilisk/bsk_assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ basilisk/bsk_assets/basilisk.png,sha256=1xePD8qDycxlRQ7hjEmfuw900BRykhRyumJePi6hxi8,21299
10
+ basilisk/bsk_assets/cube.obj,sha256=rLm2nNcfj1zPZUx-VSF5CxqnToteHjzXQNxfRNq5iKU,1189
11
+ basilisk/bsk_assets/skybox.png,sha256=0C9MvWUwNzewyiMtWLKrZJzAcLC1Ce72T3-Lq4hJZu0,1206153
12
+ basilisk/collisions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ basilisk/collisions/collider.py,sha256=PTb14D2ppia3zdHRVlMvsXhRHBJJZyxUv5diLbQ59K8,4573
14
+ basilisk/collisions/collider_handler.py,sha256=_wLlX_NrOqx-E0uMQmWpp0tZNVXnSwjLeMMyD2axPpU,11446
15
+ basilisk/collisions/broad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ basilisk/collisions/broad/broad_aabb.py,sha256=cyBCFFFkMY0yNDqBUY0HZ711m3QSSzoW2Ao9f8cFshE,4708
17
+ basilisk/collisions/broad/broad_bvh.py,sha256=M7sMYRzxAwjIu_nkYKrL8HW3YxzBvfrSN1qKClNY568,5127
18
+ basilisk/collisions/narrow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ basilisk/collisions/narrow/contact_manifold.py,sha256=mHi6fhrVJcBE37aU4u08hb0OmeaTtIZE_TnnMSdngYA,4893
20
+ basilisk/collisions/narrow/dataclasses.py,sha256=aZVL6WEfapdhSp8WFhydTPf92Rb8fPvCEJB6TZMyTHM,950
21
+ basilisk/collisions/narrow/deprecated.py,sha256=yQh6VOoVcwYENU4TThk_pXPSmwT3EfxMKILVR43sEDI,2751
22
+ basilisk/collisions/narrow/epa.py,sha256=XY-SeBuYMlbI-OB5_3NBkIPSrK6wL20He8FmtaVqacY,4708
23
+ basilisk/collisions/narrow/gjk.py,sha256=2EfQZ9GCatbf5KFLCfTKTWpa4kQcRXCNnbdqSAWj-d0,3348
24
+ basilisk/collisions/narrow/graham_scan.py,sha256=4cpsK2qbvLPw09LGXZp779Z536B-bpQciF-atZ4ngEI,862
25
+ basilisk/collisions/narrow/helper.py,sha256=aUdLdHkbAimnMnh_TWIanCTOJi2ZTY-cXLMhzqZudsQ,1261
26
+ basilisk/collisions/narrow/line_intersections.py,sha256=CGtttZ6n51u4l8JtQXzkClgZ_uvgx9IyrrGqli6JDbI,4629
27
+ basilisk/collisions/narrow/sutherland_hodgman.py,sha256=SUjSU5y7AuzIDiljMcTXxlGuFHT5IwtrOJ_k5HS1S2Y,3140
28
+ basilisk/draw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
+ basilisk/draw/draw.py,sha256=j6vMAww5RqU_4VM4UcgxXl7FASBPbxy1Dqr-2eLx2pY,3620
30
+ basilisk/draw/draw_handler.py,sha256=O8PXvyDigDv_GBHARzLl7nbuu-gS18WP2-8vrg3a0Ds,6246
31
+ basilisk/draw/font_renderer.py,sha256=gyI59fW3DUswIcSg5VJLLcJti3OLTMdXNQrYJaw18dE,1092
32
+ basilisk/generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ basilisk/generic/abstract_bvh.py,sha256=iQ6HjcI8Msw34dZ3YuDAhWSqEc4NTBHAaGqAZZAoLL8,383
34
+ basilisk/generic/abstract_custom.py,sha256=1kDrMDfXFujBDGr3sbOzeVV5OKyLcpw5WmnfXVWFCqY,4539
35
+ basilisk/generic/collisions.py,sha256=qQ3Q-pJ-bchwfjCkLZXEqBO0YVu33CQQwbpfB9vkjco,2632
36
+ basilisk/generic/input_validation.py,sha256=YePW3qR3d4kdgUptya6n8gKMgvytZPM--zVaFv_hppk,4326
37
+ basilisk/generic/math.py,sha256=_MfMdu1t0JIdGplGnU9_Tj4ECuxhSNmauLg8zw1zcNs,176
38
+ basilisk/generic/matrices.py,sha256=QTKwujcIHzakil4MgbYJLObg7WqP-J9OesrqoSMZ5NU,1323
39
+ basilisk/generic/meshes.py,sha256=0Zq5EkWEtqz-2V-kEQt-R3JZvUS5RTqflih8Mj9vL4o,2639
40
+ basilisk/generic/quat.py,sha256=4uVMo_ZyB9a0yX89JCKrLUb7pqu2DbLn1cNByGb9Z-k,5244
41
+ basilisk/generic/quat_methods.py,sha256=FFqS2Iy1OLH6oJf1elhH9RbWiE_KMXe5eO95ayrEhbc,241
42
+ basilisk/generic/raycast_result.py,sha256=S0eRDWk8Qi0AW1xkqp9PzFJRUD8iJ365SOaldWi9xU4,809
43
+ basilisk/generic/vec3.py,sha256=n_OAVVFtzH-ctqU8Pqhs2426MQ0WOgBbq2Lfo3Nt498,5280
44
+ basilisk/input_output/IO_handler.py,sha256=jlBQTu7TlDICKcauJrTDtGrdY_U4yJUYSFu2WFGh6ys,2913
45
+ basilisk/input_output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
+ basilisk/input_output/clock.py,sha256=cFnWDBItD5pWw3Gu1xld771hYpYR_G6Z53DvJiZj5jg,1511
47
+ basilisk/input_output/keys.py,sha256=hTZqrR4EVLOXLq093yBBqBbpJJoasQV85BuBG5eW5aw,1411
48
+ basilisk/input_output/mouse.py,sha256=sTqr0Uh7Sy7bQyLvaObpDzERSeDaXN2_LdBgeMkf164,3066
49
+ basilisk/input_output/path.py,sha256=GiO1OS1UGujnl3KdIB7fGzI5BgIg7RHyI8LxsGWskcs,455
50
+ basilisk/mesh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
+ basilisk/mesh/cube.py,sha256=UAwjEmaoWfUdtSKjxATU6vUbksDYj7_bBIr1k1xDsYc,1077
52
+ basilisk/mesh/mesh.py,sha256=0Mxd7Dj-qCAHW-gzaKlqF0FByoHtGzuu-EmiLRy024s,9990
53
+ basilisk/mesh/mesh_from_data.py,sha256=QiWFFWUVbv9yhMkfo3yYpvK2a9gLUbSPYocdEQVgz-4,5138
54
+ basilisk/mesh/model.py,sha256=uVnYm_XYSoZslNWmOego59Ku-gqKxZHpta_dHi65X1s,11993
55
+ basilisk/mesh/narrow_aabb.py,sha256=0lc06JgdfhUbzxUnCz4dcbEYSB3xjAf7DY7ec2096is,3868
56
+ basilisk/mesh/narrow_bvh.py,sha256=jLQhmUNi6mFyU2wVwB_SOf4PIaOAygBTtcnQIyaMOGg,4351
57
+ basilisk/mesh/narrow_primative.py,sha256=vWpIeo8I9le-EAvcr9rFUQlbl9mi6eYroqCSMK-m9eY,953
58
+ basilisk/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
+ basilisk/nodes/helper.py,sha256=VdlGuEaMtLa992_8yNOB-QIgz4Izr5wNMSm8H6KftKE,2097
60
+ basilisk/nodes/node.py,sha256=Bfi2OquiuSl_AJtQyXhwzkrE5ZO8FlIOBxuwD8h4No0,33619
61
+ basilisk/nodes/node_handler.py,sha256=V8OYMuI7WkULuoprE8_mN2bCrkml_no8fJN2sNcXPGQ,4203
62
+ basilisk/particles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
+ basilisk/particles/particle_handler.py,sha256=fFvvwtT-dw-Tst7Y6xLyjl2ljiP9u6T0ccNPZo3xy-8,2992
64
+ basilisk/particles/particle_renderer.py,sha256=PEJ5qKCEPbPG__NSQcv2NKjTHtKviK5LqfCJS1vDbP8,3792
65
+ basilisk/physics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
+ basilisk/physics/impulse.py,sha256=zv6MoGTSlu8qVbsbe2QxERGeyQZYbtzR_WVSqVLsmhw,5873
67
+ basilisk/physics/physics_body.py,sha256=_mi-AVMgQqUsC3bQIca5tgk2xWXTIUw0D_uC4DcQqqs,1508
68
+ basilisk/physics/physics_engine.py,sha256=IPMshr4j5TII5JdcRqiULc6BfkeCLPxdICKqQeZGAtY,1735
69
+ basilisk/render/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
+ basilisk/render/batch.py,sha256=wLRhk7neeTCQ_c1WrL2zFc8m3sNTF6whnJC1SPoAj9I,3499
71
+ basilisk/render/bloom.py,sha256=VX-8k1ySGNX8OCo-29ph4MPWPXYZuSPLrKwa3seaK98,4184
72
+ basilisk/render/camera.py,sha256=Bzyqp1ESNqjTR03hZIhil7pU1In5JDz-7sCj1Pter-M,9909
73
+ basilisk/render/chunk.py,sha256=yFAflMaiOKH3Fl7cBIm4RGtOhXwYyVIFTO4_UgBX9x8,2866
74
+ basilisk/render/chunk_handler.py,sha256=zJPYv3vw6_mtYQ0fW46j87dGrZENMBcRuHFzFOxqY-Q,6572
75
+ basilisk/render/frame.py,sha256=l8NwJdqSvfKxzS7Eb6pUh269UJlvR3HFVn3Mp7XtnEM,3486
76
+ basilisk/render/framebuffer.py,sha256=3A7k9vhtInMNwrhY3l3DydjGhivLz9hH_DwNNFSpKOM,7209
77
+ basilisk/render/image.py,sha256=r-khPFJkZS8D0n_I4HeKk72lzbHeEYEM0Cp-KuR22Jk,4104
78
+ basilisk/render/image_handler.py,sha256=CJyel7POIserAoLQ8YCc3SY24zia2ry6P3wMNK0-Vms,4295
79
+ basilisk/render/light.py,sha256=hFqODv9iK4GEDZeDyBHxOWwwd4v8Pm089_xoScBMjVY,3879
80
+ basilisk/render/light_handler.py,sha256=baJ1p0ob_5OK2Dyd5zZYcldAGWUyVlF21dp_Yfopyd8,2162
81
+ basilisk/render/material.py,sha256=umGdE-wI8CEXTArPzZc5rmyHKendsQWkOkpb0l5B6m8,10304
82
+ basilisk/render/material_handler.py,sha256=dXdJeH4h9m6dJRrAsm-aGDtNzlvDcAtdX3pEgKg4wzA,4198
83
+ basilisk/render/post_process.py,sha256=w71zgvnc1VyQAK7xTAyEe1FsUBDzch_6TrkhxZ27MgA,5098
84
+ basilisk/render/shader.py,sha256=jgVuFe4TjV6IMtEnVknYQ78RdKq8ZybDIFP9usNjgeY,4954
85
+ basilisk/render/shader_handler.py,sha256=k3pbbBBUxDlgwD0c_dhtn2bOXQMMAKzeRiZxDvychgc,2931
86
+ basilisk/render/sky.py,sha256=tu4ldzQpGjhS8SgooGo9lQZFNbog6-M43ju7vV95iE8,4888
87
+ basilisk/shaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
+ basilisk/shaders/batch.frag,sha256=Iz0FugHCv8yjTZdTXBVTNqaSv1-YXB02Un2h1EMu2xA,9830
89
+ basilisk/shaders/batch.vert,sha256=xh-9DWRVi5ySMl23vqSEueGDdz1K_2RT9CKMtlY-xmA,5672
90
+ basilisk/shaders/bloom_downsample.frag,sha256=aDxj2X5VUhPq0-hUtSFz5YZAgoYvobiVpR3GQM-MAWQ,1566
91
+ basilisk/shaders/bloom_frame.frag,sha256=cNKVHwarmLfWCwyoq8vPsbS_44FNhI9iLUREVHANb3E,591
92
+ basilisk/shaders/bloom_upsample.frag,sha256=0xKkuTSfAxDco5NFqPOt9BtQ-ITGyQ3S0xH2szww19A,1189
93
+ basilisk/shaders/crt.frag,sha256=7o0SoHAzi3-PYMVO8DpwhfAzRP0-P-OG1LCKgBM2AOc,965
94
+ basilisk/shaders/draw.frag,sha256=QKEPCFmQnshgfq6Tck_1UYscywR-MWjCC3LkoYx15lM,553
95
+ basilisk/shaders/draw.vert,sha256=rMtpZFcF3Batup8xgAoJuxJhZ03c8DZ6uu7G5BdJe-A,621
96
+ basilisk/shaders/filter.frag,sha256=m_egR4yiFRmIHGwCCfpcdvGXQi1w1Ago_iABlbnX80c,584
97
+ basilisk/shaders/frame.frag,sha256=rs_AA1u7DL3CxtqpTqvhgQjYYthl_l_Dg7RXpU9_5Ks,160
98
+ basilisk/shaders/frame.vert,sha256=KPB-Q3-Rix9-JxSj5tBHbZOu7QCdFgCzHwiZKEYIbFc,227
99
+ basilisk/shaders/geometry.frag,sha256=Vh57G0r7Jj0uaTQEYuovZSgzOIJyZi-bzGvNsWZ--Oc,157
100
+ basilisk/shaders/geometry.vert,sha256=2yPpezklovRQczpuf2pUhi4mMv3-YaOjDQCbrzdcdpk,1473
101
+ basilisk/shaders/normal.frag,sha256=E6EwJUf76VCT8B_huuLfHRVRF7PkWxG1YGjdWh6sC44,1333
102
+ basilisk/shaders/normal.vert,sha256=4BlcNsIw3fQFsZlfF7VZr6EAV2Y-M-72tXhfaE0uReM,3320
103
+ basilisk/shaders/particle.frag,sha256=Cv8cWQpVVQvhZeWj3NqL0D5nLtSO3EWV0VzOU-ZVL4Y,1816
104
+ basilisk/shaders/particle.vert,sha256=ElXzT7ywiZ0SjrFcUistVDBi4wOobQ7_J5O7XVxrsVs,3027
105
+ basilisk/shaders/sky.frag,sha256=Fr9SQHPKPV9a1mgSeprSiOaFjPrQX9qqZu3Uc_fQT0c,579
106
+ basilisk/shaders/sky.vert,sha256=v_BSdnMiljSJGPqno-J_apAiom38IrBzbDoxM7pIgwI,345
107
+ basilisk_engine-0.1.36.dist-info/METADATA,sha256=sbqmClimB7n89iktI5jnAQwPiC-exqTsSeiqKWtuz50,3882
108
+ basilisk_engine-0.1.36.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
109
+ basilisk_engine-0.1.36.dist-info/top_level.txt,sha256=enlSYSf7CUyAly1jmUCNNGInTbaFUjGk4SKwyckZQkw,9
110
+ basilisk_engine-0.1.36.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (76.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
File without changes
basilisk/input/mouse.py DELETED
@@ -1,62 +0,0 @@
1
- import pygame as pg
2
-
3
-
4
- class Mouse():
5
- def __init__(self, grab=True):
6
- self.x, self.y = pg.mouse.get_pos()
7
- self.buttons = pg.mouse.get_pressed()
8
- self.previous_buttons = pg.mouse.get_pressed()
9
- self.grab = grab
10
-
11
- def update(self, events):
12
- """
13
- Updates all mouse state variables.
14
- Checks for mouse-related events.
15
- """
16
-
17
- self.x, self.y = pg.mouse.get_pos()
18
- self.previous_buttons = self.buttons
19
- self.buttons = pg.mouse.get_pressed()
20
-
21
- for event in events:
22
- if event.type == pg.KEYUP:
23
- if event.key == pg.K_ESCAPE and self.grab:
24
- # Unlock mouse
25
- pg.event.set_grab(False)
26
- pg.mouse.set_visible(True)
27
- if event.type == pg.MOUSEBUTTONUP and self.grab:
28
- # Lock mouse
29
- pg.event.set_grab(True)
30
- pg.mouse.set_visible(False)
31
-
32
- def set_pos(self, x, y):
33
- """Set the mouse position"""
34
- pg.mouse.set_pos(x, y)
35
-
36
- @property
37
- def click(self): return self.buttons[0] and not self.previous_buttons[0]
38
- @property
39
- def left_click(self): return self.buttons[0] and not self.previous_buttons[0]
40
- @property
41
- def middle_click(self): return self.buttons[1] and not self.previous_buttons[1]
42
- @property
43
- def right_click(self): return self.buttons[2] and not self.previous_buttons[2]
44
- @property
45
- def left_down(self): return self.buttons[0]
46
- @property
47
- def middle_down(self): return self.buttons[1]
48
- @property
49
- def right_down(self): return self.buttons[2]
50
-
51
- @property
52
- def grab(self): return self._grab
53
-
54
- @grab.setter
55
- def grab(self, value):
56
- self._grab = value
57
- if self._grab:
58
- pg.event.set_grab(True)
59
- pg.mouse.set_visible(False)
60
- else:
61
- pg.event.set_grab(False)
62
- pg.mouse.set_visible(True)
basilisk/input/path.py DELETED
@@ -1,14 +0,0 @@
1
- import os
2
- import sys
3
-
4
-
5
- # Credit for function: https://stackoverflow.com/questions/7674790/bundling-data-files-with-pyinstaller-onefile
6
- def get_root():
7
- """ Get absolute path to resource, works for dev and for PyInstaller """
8
- try:
9
- # PyInstaller creates a temp folder and stores path in _MEIPASS
10
- base_path = sys._MEIPASS
11
- except Exception:
12
- base_path = os.path.abspath(".")
13
-
14
- return base_path + '/basilisk'
@@ -1,45 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: basilisk-engine
3
- Version: 0.1.34
4
- Summary: Python 3D Framework
5
- Home-page: https://basilisk-website.vercel.app/
6
- Author: Name
7
- Author-email: basiliskengine@gmail.com
8
- Description-Content-Type: text/markdown
9
- Requires-Dist: numpy
10
- Requires-Dist: pillow
11
- Requires-Dist: pygame-ce
12
- Requires-Dist: moderngl
13
- Requires-Dist: PyGLM
14
- Requires-Dist: numba
15
- Dynamic: author
16
- Dynamic: author-email
17
- Dynamic: description
18
- Dynamic: description-content-type
19
- Dynamic: home-page
20
- Dynamic: requires-dist
21
- Dynamic: summary
22
-
23
- # Basilisk Engine
24
- ![image](https://github.com/user-attachments/assets/5e39445c-e0da-452c-9f18-e590cca948c4)
25
- Basilisk Engine is a Python package for effortless 3D rendering and simulation.
26
-
27
- ## Learn more at the [Basilisk Engine Website](https://basilisk-website.vercel.app)
28
-
29
- # Features
30
- ## Rendering
31
- Basilisk Engine uses a versatile and efficient physically based rendering pipeline, allowing for photorealistic and stylized rendering in real-time.
32
-
33
- <p align="center">
34
- <img src="images/mud.png" alt="mud" width="400"/>
35
- <img src="images/foil.png" alt="foil" width="400"/>
36
- <img src="images/cloth.png" alt="mud" width="400"/>
37
- <img src="images/floor.png" alt="mud" width="400"/>
38
- </p>
39
-
40
- ## Physics
41
-
42
- ## Performance
43
-
44
- # Getting Started
45
- ...