basilisk-engine 0.1.38__py3-none-any.whl → 0.1.39__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 (97) 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 +226 -226
  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 +53 -53
  18. basilisk/draw/draw.py +100 -100
  19. basilisk/draw/draw_handler.py +178 -178
  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 -82
  26. basilisk/generic/math.py +18 -7
  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/__init__.py +0 -0
  34. basilisk/input/mouse.py +62 -0
  35. basilisk/input/path.py +14 -0
  36. basilisk/input_output/IO_handler.py +91 -91
  37. basilisk/input_output/clock.py +49 -49
  38. basilisk/input_output/keys.py +43 -43
  39. basilisk/input_output/mouse.py +90 -90
  40. basilisk/input_output/path.py +14 -14
  41. basilisk/mesh/cube.py +33 -33
  42. basilisk/mesh/mesh.py +233 -233
  43. basilisk/mesh/mesh_from_data.py +150 -150
  44. basilisk/mesh/model.py +271 -271
  45. basilisk/mesh/narrow_aabb.py +89 -89
  46. basilisk/mesh/narrow_bvh.py +91 -91
  47. basilisk/mesh/narrow_primative.py +23 -23
  48. basilisk/nodes/helper.py +28 -28
  49. basilisk/nodes/node.py +709 -704
  50. basilisk/nodes/node_handler.py +97 -97
  51. basilisk/particles/particle_handler.py +64 -64
  52. basilisk/particles/particle_renderer.py +93 -93
  53. basilisk/physics/impulse.py +112 -112
  54. basilisk/physics/physics_body.py +43 -43
  55. basilisk/physics/physics_engine.py +35 -35
  56. basilisk/render/batch.py +103 -103
  57. basilisk/render/bloom.py +107 -107
  58. basilisk/render/camera.py +260 -260
  59. basilisk/render/chunk.py +108 -108
  60. basilisk/render/chunk_handler.py +167 -167
  61. basilisk/render/frame.py +110 -110
  62. basilisk/render/framebuffer.py +202 -202
  63. basilisk/render/image.py +120 -120
  64. basilisk/render/image_handler.py +120 -120
  65. basilisk/render/light.py +96 -96
  66. basilisk/render/light_handler.py +58 -58
  67. basilisk/render/material.py +232 -232
  68. basilisk/render/material_handler.py +133 -133
  69. basilisk/render/post_process.py +146 -146
  70. basilisk/render/shader.py +134 -134
  71. basilisk/render/shader_handler.py +85 -85
  72. basilisk/render/sky.py +120 -120
  73. basilisk/scene.py +290 -290
  74. basilisk/shaders/batch.frag +289 -289
  75. basilisk/shaders/batch.vert +117 -117
  76. basilisk/shaders/bloom_downsample.frag +42 -42
  77. basilisk/shaders/bloom_frame.frag +24 -24
  78. basilisk/shaders/bloom_upsample.frag +33 -33
  79. basilisk/shaders/crt.frag +31 -31
  80. basilisk/shaders/draw.frag +25 -25
  81. basilisk/shaders/draw.vert +25 -25
  82. basilisk/shaders/filter.frag +22 -22
  83. basilisk/shaders/frame.frag +12 -12
  84. basilisk/shaders/frame.vert +13 -13
  85. basilisk/shaders/geometry.frag +10 -10
  86. basilisk/shaders/geometry.vert +41 -41
  87. basilisk/shaders/normal.frag +62 -62
  88. basilisk/shaders/normal.vert +96 -96
  89. basilisk/shaders/particle.frag +76 -76
  90. basilisk/shaders/particle.vert +86 -86
  91. basilisk/shaders/sky.frag +23 -23
  92. basilisk/shaders/sky.vert +13 -13
  93. {basilisk_engine-0.1.38.dist-info → basilisk_engine-0.1.39.dist-info}/METADATA +89 -89
  94. basilisk_engine-0.1.39.dist-info/RECORD +114 -0
  95. {basilisk_engine-0.1.38.dist-info → basilisk_engine-0.1.39.dist-info}/WHEEL +1 -1
  96. basilisk_engine-0.1.38.dist-info/RECORD +0 -111
  97. {basilisk_engine-0.1.38.dist-info → basilisk_engine-0.1.39.dist-info}/top_level.txt +0 -0
@@ -1,87 +1,87 @@
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
- vec3 emissiveColor;
25
- float roughness;
26
- float subsurface;
27
- float sheen;
28
- float sheenTint;
29
- float anisotropic;
30
- float specular;
31
- float metallicness;
32
- float specularTint;
33
- float clearcoat;
34
- float clearcoatGloss;
35
-
36
- int hasAlbedoMap;
37
- vec2 albedoMap;
38
- int hasNormalMap;
39
- vec2 normalMap;
40
- int hasRoughnessMap;
41
- vec2 roughnessMap;
42
- int hasAoMap;
43
- vec2 aoMap;
44
- };
45
- flat out Material mtl;
46
-
47
- // Function to get the model matrix from node position, rotation, and scale
48
- mat4 getModelMatrix(vec3 pos, float scale) {
49
- mat4 translation = mat4(
50
- scale, 0 , 0 , 0,
51
- 0 , scale, 0 , 0,
52
- 0 , 0 , scale, 0,
53
- pos.x, pos.y, pos.z, 1
54
- );
55
- return translation;
56
- }
57
-
58
- // Function to get the TBN matrix for normal mapping
59
- mat3 getTBN(mat4 modelMatrix, vec3 normal, vec3 tangent, vec3 bitangent){
60
- vec3 T = normalize(vec3(modelMatrix * vec4(tangent, 0.0)));
61
- vec3 B = normalize(vec3(modelMatrix * vec4(bitangent, 0.0)));
62
- vec3 N = normalize(vec3(modelMatrix * vec4(normal, 0.0)));
63
- return mat3(T, B, N);
64
- }
65
-
66
- void main() {
67
- // Set the model matrix
68
- mat4 modelMatrix = getModelMatrix(in_instance_pos, scale * life);
69
-
70
- // Set out variables
71
- TBN = getTBN(modelMatrix, in_normal, in_tangent, in_bitangent);
72
- uv = in_uv;
73
-
74
- // Material Data
75
- int mtl_size = 28;
76
- int materialID = int(in_instance_mtl);
77
- mtl = Material(vec3(0), vec3(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, vec2(0), 0, vec2(0), 0, vec2(0), 0, vec2(0));
78
- 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);
79
- mtl.hasAlbedoMap = int(texelFetch(materialsTexture, ivec2(0, 13 + materialID * mtl_size), 0).r);
80
- mtl.albedoMap = vec2(texelFetch(materialsTexture, ivec2(0, 14 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 15 + materialID * mtl_size), 0).r);
81
- mtl.hasNormalMap = int(texelFetch(materialsTexture, ivec2(0, 16 + materialID * mtl_size), 0).r);
82
- mtl.normalMap = vec2(texelFetch(materialsTexture, ivec2(0, 17 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 18 + materialID * mtl_size), 0).r);
83
- mtl.emissiveColor = vec3(texelFetch(materialsTexture, ivec2(0, 25 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 26 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 27 + materialID * mtl_size), 0).r);
84
-
85
- // Send position to the frag
86
- 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
+ vec3 emissiveColor;
25
+ float roughness;
26
+ float subsurface;
27
+ float sheen;
28
+ float sheenTint;
29
+ float anisotropic;
30
+ float specular;
31
+ float metallicness;
32
+ float specularTint;
33
+ float clearcoat;
34
+ float clearcoatGloss;
35
+
36
+ int hasAlbedoMap;
37
+ vec2 albedoMap;
38
+ int hasNormalMap;
39
+ vec2 normalMap;
40
+ int hasRoughnessMap;
41
+ vec2 roughnessMap;
42
+ int hasAoMap;
43
+ vec2 aoMap;
44
+ };
45
+ flat out Material mtl;
46
+
47
+ // Function to get the model matrix from node position, rotation, and scale
48
+ mat4 getModelMatrix(vec3 pos, float scale) {
49
+ mat4 translation = mat4(
50
+ scale, 0 , 0 , 0,
51
+ 0 , scale, 0 , 0,
52
+ 0 , 0 , scale, 0,
53
+ pos.x, pos.y, pos.z, 1
54
+ );
55
+ return translation;
56
+ }
57
+
58
+ // Function to get the TBN matrix for normal mapping
59
+ mat3 getTBN(mat4 modelMatrix, vec3 normal, vec3 tangent, vec3 bitangent){
60
+ vec3 T = normalize(vec3(modelMatrix * vec4(tangent, 0.0)));
61
+ vec3 B = normalize(vec3(modelMatrix * vec4(bitangent, 0.0)));
62
+ vec3 N = normalize(vec3(modelMatrix * vec4(normal, 0.0)));
63
+ return mat3(T, B, N);
64
+ }
65
+
66
+ void main() {
67
+ // Set the model matrix
68
+ mat4 modelMatrix = getModelMatrix(in_instance_pos, scale * life);
69
+
70
+ // Set out variables
71
+ TBN = getTBN(modelMatrix, in_normal, in_tangent, in_bitangent);
72
+ uv = in_uv;
73
+
74
+ // Material Data
75
+ int mtl_size = 28;
76
+ int materialID = int(in_instance_mtl);
77
+ mtl = Material(vec3(0), vec3(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, vec2(0), 0, vec2(0), 0, vec2(0), 0, vec2(0));
78
+ 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);
79
+ mtl.hasAlbedoMap = int(texelFetch(materialsTexture, ivec2(0, 13 + materialID * mtl_size), 0).r);
80
+ mtl.albedoMap = vec2(texelFetch(materialsTexture, ivec2(0, 14 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 15 + materialID * mtl_size), 0).r);
81
+ mtl.hasNormalMap = int(texelFetch(materialsTexture, ivec2(0, 16 + materialID * mtl_size), 0).r);
82
+ mtl.normalMap = vec2(texelFetch(materialsTexture, ivec2(0, 17 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 18 + materialID * mtl_size), 0).r);
83
+ mtl.emissiveColor = vec3(texelFetch(materialsTexture, ivec2(0, 25 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 26 + materialID * mtl_size), 0).r, texelFetch(materialsTexture, ivec2(0, 27 + materialID * mtl_size), 0).r);
84
+
85
+ // Send position to the frag
86
+ gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(in_position, 1.0);
87
87
  }
basilisk/shaders/sky.frag CHANGED
@@ -1,24 +1,24 @@
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);
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);
24
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
  }
@@ -1,89 +1,89 @@
1
- Metadata-Version: 2.2
2
- Name: basilisk-engine
3
- Version: 0.1.38
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.
1
+ Metadata-Version: 2.2
2
+ Name: basilisk-engine
3
+ Version: 0.1.39
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,114 @@
1
+ basilisk/__init__.py,sha256=23OM1kiXMU44J2TVp66efVSrbQAeiuTDmcdhNAftFfY,1134
2
+ basilisk/config.py,sha256=Ajm3BjCryuX5bmJglqRZDR1SjE0sDjTbulta5GZ67hA,1712
3
+ basilisk/engine.py,sha256=74ErjbThT7kGrAhayA6p3QxUOX1ff4rwsoYj8-A-2aE,5722
4
+ basilisk/scene.py,sha256=NSIpvYsZsvxKVkjZTeCHq6cL-wJQETEIjPu-d4xdzbc,12260
5
+ basilisk/audio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ basilisk/audio/sound.py,sha256=h2dQ3IKb_SRKNZqNuk-fdNg_Xfz0P7sqEXA33qiBXG4,692
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=r_pjU5ZT0QuemKPKeFxEsZjNps90iTXuHK7W5wk2Hig,1141
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=RoA-RnBmy5OiBj6qLFA4WBL27EdRuLYSaf8tHc_MvN4,4478
14
+ basilisk/collisions/collider_handler.py,sha256=iyFb4cQFrrYt9kRa8PZf3jih59-JgcB1MLZqMRELiYU,11231
15
+ basilisk/collisions/broad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ basilisk/collisions/broad/broad_aabb.py,sha256=gI4bq89WnJ0Za2k6U2VGedjJ9aWvKua9tCUwBFl5h1U,4606
17
+ basilisk/collisions/broad/broad_bvh.py,sha256=rG5VfUx2WDd5EXGdD_SBn--3cGUpPP6lvhVVRm2sSmI,4990
18
+ basilisk/collisions/narrow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ basilisk/collisions/narrow/contact_manifold.py,sha256=3s8tog-F0c1NJLA48sgsl_M3xQDk4M9eMnVDhdOWbzg,4798
20
+ basilisk/collisions/narrow/dataclasses.py,sha256=MuAcuiupxysPXflSxJLE-UX_Xgti9gRjcrUhNo2VfKQ,916
21
+ basilisk/collisions/narrow/deprecated.py,sha256=x5CM3c6ongHQM5oiiaGwQUJzWUo5yyCmYGloQBxnsBc,2705
22
+ basilisk/collisions/narrow/epa.py,sha256=sy4cAZ2vZd1IeEpoPCgl9rcbCLVLDgZpkZy1L21dCdM,4617
23
+ basilisk/collisions/narrow/gjk.py,sha256=MPaPKy-l8GBjXYUljnrzRz7D99hsgW4rmsobv_invgI,3282
24
+ basilisk/collisions/narrow/graham_scan.py,sha256=fx2K5vxzipCoBkIvgBscxtmH26HzMOthCZp7rmnS9uw,838
25
+ basilisk/collisions/narrow/helper.py,sha256=2UV6upLEcdvmV3IUBogc_YQFHLQFrCuObBiqYuRXKsg,1232
26
+ basilisk/collisions/narrow/line_intersections.py,sha256=hZCXAeAGbs9adGraa6tHUOlivGERo-WVdrNjmHFMjh4,4523
27
+ basilisk/collisions/narrow/sutherland_hodgman.py,sha256=8FOrqxCApsQTmw4n_meSaLIzc5s_dD4tMJTHahzaZ-A,3065
28
+ basilisk/draw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
+ basilisk/draw/draw.py,sha256=bbmx_q8GyDhWELDBTfy16e7Y-22amVyoTcf8orwveKw,3520
30
+ basilisk/draw/draw_handler.py,sha256=GzCKEkW7tUsufIF0ZaQYVrgY5LkZDBJD519_iduurgc,6105
31
+ basilisk/draw/font_renderer.py,sha256=esCaQ4rJ3kjeIZ0xr510k2JIE_K9bshO9_OkByYNo_0,1064
32
+ basilisk/generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ basilisk/generic/abstract_bvh.py,sha256=BZv9mgkUpNu3bcqmn9I60VqMZocebeyUOoER2Wdky3g,368
34
+ basilisk/generic/abstract_custom.py,sha256=wwtQUu7JkCKEt7zgGDrjBlsB5DdYHkMhq4yv3Wlpv9k,4406
35
+ basilisk/generic/collisions.py,sha256=lMhZJkbFuoQTXCF-sQmV5f7_3SaEn_nvhwXNU5YaecM,2562
36
+ basilisk/generic/input_validation.py,sha256=PZgV_RPJwe1S22MDSbGCd01IR-tm_UUzH2We8vMWeo8,4244
37
+ basilisk/generic/math.py,sha256=rNbYYVbzxKPwMAijD3aaPe2hnzqvsqgDV5KSD2xqAQ4,677
38
+ basilisk/generic/matrices.py,sha256=N21nL_B2jsZ2Oxsw9jpY03qIHaElAZcj_hnWs85K0t8,1288
39
+ basilisk/generic/meshes.py,sha256=Rijhvr1NWx0HU2WTaROsspWfyd9FZU27sdkpxGl9xvk,2567
40
+ basilisk/generic/quat.py,sha256=gEqvQvNwx5K7e0zqY0TFTAFtNFSkOatleoP9HQQ-xyk,5102
41
+ basilisk/generic/quat_methods.py,sha256=SO18ush7pfeGUmncPy4i5nsab1e_zkQkY6zT1bAsSDY,234
42
+ basilisk/generic/raycast_result.py,sha256=waVmS9fYhLoz_G_DU2Mj7896rF0Xy_59JVGALq-kD7g,783
43
+ basilisk/generic/vec3.py,sha256=AtPSz2S1ZqAm-sZUz4phB09hgFxMIsJnQdU1wmxiOBw,5137
44
+ basilisk/input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
+ basilisk/input/mouse.py,sha256=waXJLIyka4IVe3W2WH5SNNxiOQRouYo3NxafP3fg0qg,1937
46
+ basilisk/input/path.py,sha256=GpFYe3Uu6VZAuKh9Q2nQM1H8immiCp_snznLG9FKcvU,441
47
+ basilisk/input_output/IO_handler.py,sha256=DDQEjmIHzWo99rk1riT_QJKGQ5F8-lOilmchRXeQuYI,2822
48
+ basilisk/input_output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
+ basilisk/input_output/clock.py,sha256=GHTagpPyPlLjWyonaHV8M-nPCcdHcHL4JobbuUOxYf0,1462
50
+ basilisk/input_output/keys.py,sha256=rMTqYnp3yST6YKSGeP7WFzIlJAwDMhCoBqeWxoOocJw,1368
51
+ basilisk/input_output/mouse.py,sha256=SqkUtfYTW252DXXHS1dDaytFWChsuYGEQ238jUIfOWY,2976
52
+ basilisk/input_output/path.py,sha256=GpFYe3Uu6VZAuKh9Q2nQM1H8immiCp_snznLG9FKcvU,441
53
+ basilisk/mesh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
+ basilisk/mesh/cube.py,sha256=PN6JvW3T8LzPYRnaGo6wsisRK0QI-ZbvMYDT9xs7iN8,1044
55
+ basilisk/mesh/mesh.py,sha256=eEBCOSl8fn_VAHowojlkwzckZ7qAyDdneYSJHa2Lk48,9757
56
+ basilisk/mesh/mesh_from_data.py,sha256=puRa8ycBjX2LbQB-ZOjJiXuNHh16laWgSqbgjHdlhcQ,4988
57
+ basilisk/mesh/model.py,sha256=qm1lo23nBjkR-JxXvHzIO3DLa2bNWsMRX4Ilm_5uemY,11722
58
+ basilisk/mesh/narrow_aabb.py,sha256=oMB_djlWOxpLAsuxeA8_KQafSOcRkDMCu5okvPYuLMQ,3779
59
+ basilisk/mesh/narrow_bvh.py,sha256=29VLfEKa6BE6UDY1HJWlcM5TMR7ayg4loZ6S61PpLJM,4260
60
+ basilisk/mesh/narrow_primative.py,sha256=Dlw0jnFewPwAvT0Ap9IxAh05tgjZAdjAyuiRy1DXOm4,930
61
+ basilisk/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
+ basilisk/nodes/helper.py,sha256=GZ2-TY_4PDEfxBGp7ddktYoDDMOogPMbDeRPqsrPu1A,2069
63
+ basilisk/nodes/node.py,sha256=RHd8YXUHzEhNJJT019qlEDNPI2w7oKEj530FR4V0ul0,33070
64
+ basilisk/nodes/node_handler.py,sha256=IFEcEefVzlMbYR0O6OtM2qPcoZFrLYugiwAqEQMoTqo,4106
65
+ basilisk/particles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
+ basilisk/particles/particle_handler.py,sha256=NkQz3fJaURdF5DhKu4BJ8igZ-4yWvj6a7omblN9mCXg,2927
67
+ basilisk/particles/particle_renderer.py,sha256=z82gZj9lT6kUGzjN6ZZ9D9j_Qb8wmCRYWvsuuiezfyo,3701
68
+ basilisk/physics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
+ basilisk/physics/impulse.py,sha256=a_Ks-4LrjaN3siMmVwGp92_iyr9a-G1lb5Q-J7g6ipA,5761
70
+ basilisk/physics/physics_body.py,sha256=-iqo3YyCfMzpBVNA2I34JbfN7Z6phj5nnGHN-S8lBgs,1465
71
+ basilisk/physics/physics_engine.py,sha256=C30oGb8rODdXORJJWjOWBPwlScnTHrp6CTPHSNcbgp0,1700
72
+ basilisk/render/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
+ basilisk/render/batch.py,sha256=1ULXwzcs7v9ze1IDZDJXcaydRjwdgHH9TkyXxcadNiM,3396
74
+ basilisk/render/bloom.py,sha256=hE9JJJ8MIqJ7kXO9jaBmDcc0kSzwLyU578F65pjbMXI,4077
75
+ basilisk/render/camera.py,sha256=pOM5sVSHl_joHwsBLd8Y7CzLUL-16XBBQfgsnM8jc6Q,9649
76
+ basilisk/render/chunk.py,sha256=UPfldvGjIF--sg35Lst69ORZ2xTet-ejWg3kde9-ae8,2758
77
+ basilisk/render/chunk_handler.py,sha256=-Hozyus67mgJ8fTWx3fsLezFVt3W4d-I0I1ai29odWA,6405
78
+ basilisk/render/frame.py,sha256=9QfhbVitXXiL1ag_3qRcFuFR6zbc_4A1SLPs09KuPKc,3446
79
+ basilisk/render/framebuffer.py,sha256=_LdsUTOsOwfeQ3Z7vKURwmNZPwBOKQ50MbOB1fbZvNI,7007
80
+ basilisk/render/image.py,sha256=d-5RGr-TlsGqvI-GQ8_pV-FNdmTzD0mlk2K3K4XNuwQ,3984
81
+ basilisk/render/image_handler.py,sha256=DNb-AiouziLVQu3NkoG1F90YZTHHWyhFYhaWJ9uiUOU,4175
82
+ basilisk/render/light.py,sha256=SOOh5zAGUCgQdJjWb5MlJgtvdxkEV8AWqQ4P93bJj2g,3783
83
+ basilisk/render/light_handler.py,sha256=gvg4OhDMy8dZg5XNcOZB4_1G2uE1gBFRxlBeoG3l3vM,2104
84
+ basilisk/render/material.py,sha256=K2w2pdNI_ZKc0DZqhcGhlj0kQcpSLSlhbPTk-xaisU4,10072
85
+ basilisk/render/material_handler.py,sha256=b9mf35P54CUzSxBgCkteHEY7AMJ623Ct083Xu2fHBHI,4065
86
+ basilisk/render/post_process.py,sha256=ZDj03c23Zw8ewgz0uQN5UIRCOm-7rjbI6ta9ofYAieY,5261
87
+ basilisk/render/shader.py,sha256=3_jMKzlwLLWPsZiIjVG8bYLu4CddXrnmCk3ECTD6oZE,4820
88
+ basilisk/render/shader_handler.py,sha256=rj4zbhVOyYBdxcmB6BHE4pynSMk3VtIk4Qo2z_8JVf4,2846
89
+ basilisk/render/sky.py,sha256=orTtgkU35AHZTUGk9IevSXwVs6tktoDP52yEUM5Rg0E,4768
90
+ basilisk/render/tempCodeRunnerFile.py,sha256=ep1eVZzUd30SDCNE5l3OJsqp2fW2LEXrjYGW31AMWgw,10
91
+ basilisk/shaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
+ basilisk/shaders/batch.frag,sha256=zyKxzNlPOwAYYeRQCOl-mwGS_hZMesh5JkGcUJIVtf0,9541
93
+ basilisk/shaders/batch.vert,sha256=LYzcqcwCyCpnxF5V-ilx79HU2cYz66hylBmZChcVmos,5555
94
+ basilisk/shaders/bloom_downsample.frag,sha256=0ncVnEfiPYxKnQ95seLTnbm8NXjMSYUIIrDE8owLUKU,1524
95
+ basilisk/shaders/bloom_frame.frag,sha256=Y0m8DnQKz3G9FKq7VjCGrVXZw2vSigyGX7-tlxZN0lE,567
96
+ basilisk/shaders/bloom_upsample.frag,sha256=Pe1AupjM2OCMieW7oEYHoEx2LhbPtbpwcylruF5Ntm4,1156
97
+ basilisk/shaders/crt.frag,sha256=NsFtziQb5KnhjLcSI7UnxF2Jk7mLt2Fw2v4NDwhE_xE,934
98
+ basilisk/shaders/draw.frag,sha256=Beel4sjY-cwbUCUULRjT2BzXfVA-rr12Abz1HxG6inw,528
99
+ basilisk/shaders/draw.vert,sha256=Rpi6bDsLEiFmuLRCL3yMgmBOR_WWYHQ7LLUUA787cxs,596
100
+ basilisk/shaders/filter.frag,sha256=N4o6429d3azn1CoN0gsLD1v8bG51tdUcmxRTj8R5jg8,562
101
+ basilisk/shaders/frame.frag,sha256=efR8q-iLFVwXuYIpKHr6OKfbG7BwKvmhc-83w42elgY,148
102
+ basilisk/shaders/frame.vert,sha256=l2--IIGeRIbfuSyQksguVj3GHZKK-0tsQ6euQ83roUA,214
103
+ basilisk/shaders/geometry.frag,sha256=mTBMWqw7x9r65wNRqHMZeG4wBHmleOD8zAXYy2hcsU0,220
104
+ basilisk/shaders/geometry.vert,sha256=v1Vb7s-D7GDgroGCi-um7ITD7LBlJgGsTtbhwjSYGdI,1432
105
+ basilisk/shaders/normal.frag,sha256=RGI8wORa5x5ZI9YYB56qrZDgbp4qnEWKywHWRVhv_aM,1346
106
+ basilisk/shaders/normal.vert,sha256=Q3t9NjdLcyUggh72Jxi990QtM5Ud2egvOUIBdr9PWqI,3224
107
+ basilisk/shaders/particle.frag,sha256=dQ-TFurL7Dj5Xw_ySF3DpDXUegBnE4mf_vXl7dzbjpg,1884
108
+ basilisk/shaders/particle.vert,sha256=oiBz6S_2dzqioAhyzVYT1ZKOED4h4R6IoP-UJ8KRHhU,3227
109
+ basilisk/shaders/sky.frag,sha256=dJRdSbg16aZYYjxdoG1spVQRIVBGNVdyX0rqp4ER6v8,556
110
+ basilisk/shaders/sky.vert,sha256=oAnrknEgsd9MawE_zx8P0u9nUSFEBYBg5ykBmWpqZ_g,332
111
+ basilisk_engine-0.1.39.dist-info/METADATA,sha256=-PVPG2fHKQUgOvkPRizXwIenPgYfoAOMQ7aSfVYvzaU,3793
112
+ basilisk_engine-0.1.39.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
113
+ basilisk_engine-0.1.39.dist-info/top_level.txt,sha256=enlSYSf7CUyAly1jmUCNNGInTbaFUjGk4SKwyckZQkw,9
114
+ basilisk_engine-0.1.39.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5