Skip to content

Commit 98886c4

Browse files
committed
update python examples to use correct function signatures
1 parent 9927fc8 commit 98886c4

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

crates/processing_pyo3/examples/gltf_load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def draw():
3333
r = math.sin(t * 8.0) * 0.5 + 0.5
3434
g = math.sin(t * 8.0 + 2.0) * 0.5 + 0.5
3535
b = math.sin(t * 8.0 + 4.0) * 0.5 + 0.5
36-
duck_mat.set_float4("base_color", r, g, b, 1.0)
36+
duck_mat.set(base_color=[r, g, b, 1.0])
3737

3838
background(25)
3939
use_material(duck_mat)

crates/processing_pyo3/examples/materials.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ def setup():
1212
point_light.position(200.0, 200.0, 400.0)
1313

1414
mat = Material()
15-
mat.set_float("roughness", 0.3)
16-
mat.set_float("metallic", 0.8)
17-
mat.set_float4("base_color", 1.0, 0.85, 0.57, 1.0)
15+
mat.set(roughness=0.3)
16+
mat.set(metallic=0.8)
17+
mat.set(base_color=[1.0, 0.85, 0.57, 1.0])
1818

1919
def draw():
2020
camera_position(0.0, 0.0, 200.0)
2121
camera_look_at(0.0, 0.0, 0.0)
2222
background(12, 12, 18)
2323

2424
use_material(mat)
25-
draw_sphere(50.0)
25+
sphere(50.0)
2626

2727
run()

0 commit comments

Comments
 (0)