Skip to content

Commit

Permalink
feat: improve json color fields, add gamedata enums (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
francisdb authored Apr 24, 2024
1 parent daeeea0 commit f16663b
Show file tree
Hide file tree
Showing 11 changed files with 722 additions and 571 deletions.
6 changes: 3 additions & 3 deletions examples/create_basic_vpx_file.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::Path;
use vpin::vpx;
use vpin::vpx::color::ColorNoAlpha;
use vpin::vpx::color::Color;
use vpin::vpx::gameitem::bumper::Bumper;
use vpin::vpx::gameitem::flipper::Flipper;
use vpin::vpx::gameitem::GameItemEnum;
Expand All @@ -14,11 +14,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut material = Material::default();
material.name = "Playfield".to_string();
// material defaults to purple
material.base_color = ColorNoAlpha::from_rgb(0x966F33); // Wood
material.base_color = Color::from_rgb(0x966F33); // Wood
vpx.gamedata.materials = Some(vec![material]);

// black background (default is bluish gray)
vpx.gamedata.backdrop_color = ColorNoAlpha::from_rgb(0x060606); // Dark Gray
vpx.gamedata.backdrop_color = Color::from_rgb(0x060606); // Dark Gray
vpx.gamedata.playfield_material = "Playfield".to_string();

// add a plunger
Expand Down
Loading

0 comments on commit f16663b

Please sign in to comment.