examples: Fix Clutter example
I noticed it was broken while testing it with a new test.jpg image.
Philip Chimento
3 years ago
1 | 1 | |
2 | 2 | Clutter.init(null); |
3 | 3 | |
4 | let stage = new Clutter.Stage(); | |
4 | const stage = new Clutter.Stage({visible: true}); | |
5 | 5 | |
6 | 6 | let texture = new Clutter.Texture({ |
7 | 7 | filename: 'test.jpg', |
13 | 13 | return Clutter.EVENT_STOP; |
14 | 14 | }); |
15 | 15 | |
16 | let color = new Clutter.Color(); | |
17 | color.from_string('Black'); | |
16 | const [, color] = Clutter.Color.from_string('Black'); | |
17 | stage.background_color = color; | |
18 | 18 | |
19 | stage.color = color; | |
20 | ||
21 | stage.add_actor(texture); | |
22 | stage.show(); | |
19 | stage.add_child(texture); | |
23 | 20 | |
24 | 21 | Clutter.main(); |