From aa5659f2720e84723b64c17e21e44763c17130db Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 28 Aug 2021 13:07:02 +0100 Subject: [PATCH] update examples --- examples/{ => extra}/camera.py | 0 examples/{ => extra}/camera.py.requirements.txt | 0 examples/{ => extra}/flow-field.py | 0 examples/{ => extra}/flow-field.py.requirements.txt | 0 examples/{ => extra}/transparent_undecorated_window.py | 0 examples/models/models_billboard.py | 2 +- examples/models/models_cubicmap.py | 2 +- examples/models/models_geometric_shapes.py | 2 +- examples/models/models_heightmap.py | 2 +- examples/models/models_obj_loading.py | 6 ++---- 10 files changed, 6 insertions(+), 8 deletions(-) rename examples/{ => extra}/camera.py (100%) rename examples/{ => extra}/camera.py.requirements.txt (100%) rename examples/{ => extra}/flow-field.py (100%) rename examples/{ => extra}/flow-field.py.requirements.txt (100%) rename examples/{ => extra}/transparent_undecorated_window.py (100%) diff --git a/examples/camera.py b/examples/extra/camera.py similarity index 100% rename from examples/camera.py rename to examples/extra/camera.py diff --git a/examples/camera.py.requirements.txt b/examples/extra/camera.py.requirements.txt similarity index 100% rename from examples/camera.py.requirements.txt rename to examples/extra/camera.py.requirements.txt diff --git a/examples/flow-field.py b/examples/extra/flow-field.py similarity index 100% rename from examples/flow-field.py rename to examples/extra/flow-field.py diff --git a/examples/flow-field.py.requirements.txt b/examples/extra/flow-field.py.requirements.txt similarity index 100% rename from examples/flow-field.py.requirements.txt rename to examples/extra/flow-field.py.requirements.txt diff --git a/examples/transparent_undecorated_window.py b/examples/extra/transparent_undecorated_window.py similarity index 100% rename from examples/transparent_undecorated_window.py rename to examples/extra/transparent_undecorated_window.py diff --git a/examples/models/models_billboard.py b/examples/models/models_billboard.py index a390044..ae97fc9 100644 --- a/examples/models/models_billboard.py +++ b/examples/models/models_billboard.py @@ -27,7 +27,7 @@ camera.position = [ 5.0, 4.0, 5.0 ] camera.target = [ 0.0, 2.0, 0.0 ] camera.up = [ 0.0, 1.0, 0.0 ] camera.fovy = 45.0 -camera.type = CAMERA_PERSPECTIVE +camera.projection = CAMERA_PERSPECTIVE bill = LoadTexture(b"resources/billboard.png") # Our texture billboard diff --git a/examples/models/models_cubicmap.py b/examples/models/models_cubicmap.py index dbff866..4af0353 100644 --- a/examples/models/models_cubicmap.py +++ b/examples/models/models_cubicmap.py @@ -30,7 +30,7 @@ model = LoadModelFromMesh(mesh) # NOTE: By default each cube is mapped to one part of texture atlas texture = LoadTexture(b"resources/cubicmap_atlas.png") # Load map texture -model.materials[0].maps[MAP_DIFFUSE].texture = texture # Set map diffuse texture +model.materials[0].maps[MATERIAL_MAP_DIFFUSE ].texture = texture # Set map diffuse texture mapPosition = [ -16.0, 0.0, -8.0 ] # Set model position diff --git a/examples/models/models_geometric_shapes.py b/examples/models/models_geometric_shapes.py index a9a6434..3b7146b 100644 --- a/examples/models/models_geometric_shapes.py +++ b/examples/models/models_geometric_shapes.py @@ -26,7 +26,7 @@ camera.position = [ 0.0, 10.0, 10.0 ] camera.target = [ 0.0, 0.0, 0.0 ] camera.up = [ 0.0, 1.0, 0.0 ] camera.fovy = 45.0 -camera.type = CAMERA_PERSPECTIVE +camera.projection = CAMERA_PERSPECTIVE SetTargetFPS(60) # Set our game to run at 60 frames-per-second #-------------------------------------------------------------------------------------- diff --git a/examples/models/models_heightmap.py b/examples/models/models_heightmap.py index 22e0f5c..beac1ad 100644 --- a/examples/models/models_heightmap.py +++ b/examples/models/models_heightmap.py @@ -27,7 +27,7 @@ texture = LoadTextureFromImage(image) # Convert image to texture mesh = GenMeshHeightmap(image, ( 16, 8, 16 )) # Generate heightmap mesh (RAM and VRAM) model = LoadModelFromMesh(mesh) # Load model from generated mesh -model.materials[0].maps[MAP_DIFFUSE].texture = texture # Set map diffuse texture +model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture # Set map diffuse texture mapPosition = ( -8.0, 0.0, -8.0 ) # Define model position UnloadImage(image) # Unload heightmap image from RAM, already uploaded to VRAM diff --git a/examples/models/models_obj_loading.py b/examples/models/models_obj_loading.py index 1c5dc1c..12de3c3 100644 --- a/examples/models/models_obj_loading.py +++ b/examples/models/models_obj_loading.py @@ -24,13 +24,13 @@ camera.position = [ 5.0, 5.0, 5.0 ] # Camera position camera.target = [ 0.0, 2.5, 0.0 ] # Camera looking at point camera.up = [ 0.0, 1.0, 0.0 ] # Camera up vector (rotation towards target) camera.fovy = 45.0 # Camera field-of-view Y -camera.type = CAMERA_PERSPECTIVE # Camera mode type +camera.projection = CAMERA_PERSPECTIVE # Camera mode type rl.SetCameraMode(camera[0], rl.CAMERA_ORBITAL) model = LoadModel(b"resources/models/house.obj") # Load OBJ model texture = LoadTexture(b"resources/models/house_diffuse.png") # Load model texture -model.materials.maps[MAP_DIFFUSE].texture = texture # Set map diffuse texture +model.materials.maps[MATERIAL_MAP_DIFFUSE].texture = texture # Set map diffuse texture position = [ 0.0, 0.0, 0.0 ] # Set model position SetTargetFPS(60) # Set our game to run at 60 frames-per-second @@ -55,8 +55,6 @@ while not WindowShouldClose(): # Detect window close button or ESC key DrawGrid(10, 1.0) # Draw a grid - DrawGizmo(position) # Draw gizmo - EndMode3D() DrawText(b"(c) Castle 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY)