Skip to content

Commit aa5659f

Browse files
update examples
1 parent 64e5995 commit aa5659f

10 files changed

+6
-8
lines changed
File renamed without changes.
File renamed without changes.

examples/models/models_billboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
camera.target = [ 0.0, 2.0, 0.0 ]
2828
camera.up = [ 0.0, 1.0, 0.0 ]
2929
camera.fovy = 45.0
30-
camera.type = CAMERA_PERSPECTIVE
30+
camera.projection = CAMERA_PERSPECTIVE
3131

3232

3333
bill = LoadTexture(b"resources/billboard.png") # Our texture billboard

examples/models/models_cubicmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
# NOTE: By default each cube is mapped to one part of texture atlas
3232
texture = LoadTexture(b"resources/cubicmap_atlas.png") # Load map texture
33-
model.materials[0].maps[MAP_DIFFUSE].texture = texture # Set map diffuse texture
33+
model.materials[0].maps[MATERIAL_MAP_DIFFUSE ].texture = texture # Set map diffuse texture
3434

3535
mapPosition = [ -16.0, 0.0, -8.0 ] # Set model position
3636

examples/models/models_geometric_shapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
camera.target = [ 0.0, 0.0, 0.0 ]
2727
camera.up = [ 0.0, 1.0, 0.0 ]
2828
camera.fovy = 45.0
29-
camera.type = CAMERA_PERSPECTIVE
29+
camera.projection = CAMERA_PERSPECTIVE
3030

3131
SetTargetFPS(60) # Set our game to run at 60 frames-per-second
3232
#--------------------------------------------------------------------------------------

examples/models/models_heightmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
mesh = GenMeshHeightmap(image, ( 16, 8, 16 )) # Generate heightmap mesh (RAM and VRAM)
2828
model = LoadModelFromMesh(mesh) # Load model from generated mesh
2929

30-
model.materials[0].maps[MAP_DIFFUSE].texture = texture # Set map diffuse texture
30+
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture # Set map diffuse texture
3131
mapPosition = ( -8.0, 0.0, -8.0 ) # Define model position
3232

3333
UnloadImage(image) # Unload heightmap image from RAM, already uploaded to VRAM

examples/models/models_obj_loading.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
camera.target = [ 0.0, 2.5, 0.0 ] # Camera looking at point
2525
camera.up = [ 0.0, 1.0, 0.0 ] # Camera up vector (rotation towards target)
2626
camera.fovy = 45.0 # Camera field-of-view Y
27-
camera.type = CAMERA_PERSPECTIVE # Camera mode type
27+
camera.projection = CAMERA_PERSPECTIVE # Camera mode type
2828

2929
rl.SetCameraMode(camera[0], rl.CAMERA_ORBITAL)
3030

3131
model = LoadModel(b"resources/models/house.obj") # Load OBJ model
3232
texture = LoadTexture(b"resources/models/house_diffuse.png") # Load model texture
33-
model.materials.maps[MAP_DIFFUSE].texture = texture # Set map diffuse texture
33+
model.materials.maps[MATERIAL_MAP_DIFFUSE].texture = texture # Set map diffuse texture
3434
position = [ 0.0, 0.0, 0.0 ] # Set model position
3535

3636
SetTargetFPS(60) # Set our game to run at 60 frames-per-second
@@ -55,8 +55,6 @@
5555

5656
DrawGrid(10, 1.0) # Draw a grid
5757

58-
DrawGizmo(position) # Draw gizmo
59-
6058
EndMode3D()
6159

6260
DrawText(b"(c) Castle 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY)

0 commit comments

Comments
 (0)