10000 Merge remote-tracking branch 'origin/main' · pmp-p/raylib-python-ctypes-wasm@ada9300 · GitHub
[go: up one dir, main page]

Skip to content

Commit ada9300

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents ee684ec + 6f9d666 commit ada9300

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

build/MANUAL_BUILD.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ make raylib_api.json FORMAT=JSON EXTENSION=json
5050
make raymath_api.json FORMAT=JSON EXTENSION=json
5151
make rlgl_api.json FORMAT=JSON EXTENSION=json
5252
make raygui_api.json FORMAT=JSON EXTENSION=json
53-
raylib_parser --input config.h --output config_api.json --format JSON
53+
./raylib_parser --input config.h --output config_api.json --format JSON
5454
cd ../..
5555
```
5656

examples/models/models_loading_gltf.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44
55
"""
66

7+
import ctypes
8+
79
from raypyc import *
810
from ctypes import *
911

10-
# Definitions
11-
# ------------------------------------------------------------------------------------
12-
MAX_BUILDINGS = 100
13-
14-
15-
# ------------------------------------------------------------------------------------
1612

1713
# ------------------------------------------------------------------------------------
1814
# Program main entry point
@@ -34,12 +30,12 @@ def main():
3430

3531
# Load gltf model
3632
model = load_model(b"resources/models/gltf/robot.glb")
37-
animsCount = c_uint()
38-
animIndex = int(0)
39-
animCurrentFrame = int(0)
40-
array = POINTER()
41-
modelAnimations = load_model_animations(b"resources/models/gltf/robot.glb", array)
42-
print(array)
33+
animsCount = c_uint(0)
34+
animIndex = 0
35+
animCurrentFrame = 0
36+
37+
modelAnimations = load_model_animations(b"resources/models/gltf/robot.glb", ctypes.pointer(animsCount))
38+
4339
position = Vector3(0.0, 0.0, 0.0) # Set model position
4440
set_camera_mode(camera, CameraMode.CAMERA_FREE) # Set free camera mode
4541

@@ -55,7 +51,7 @@ def main():
5551
if is_key_pressed(KeyboardKey.KEY_DOWN): animIndex = (animIndex + animsCount - 1) % animsCount
5652

5753
# Update model animation
58-
anim = modelAnimations[int(gg)]
54+
anim = modelAnimations[animIndex]
5955
animCurrentFrame = (animCurrentFrame + 1) % anim.frameCount
6056
update_model_animation(model, anim, animCurrentFrame)
6157

@@ -69,7 +65,7 @@ def main():
6965

7066
clear_background(RAYWHITE)
7167

72-
begin_mode_3d()
68+
begin_mode_3d(camera)
7369

7470
draw_model(model, position, 1.0, WHITE) # Draw animated model
7571
draw_grid(10, 1.0)

0 commit comments

Comments
 (0)
0