Skip to content

Commit

Permalink
docs(examples): improve existing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ruggero-visintin committed Dec 8, 2023
1 parent cd89cfe commit a2b4567
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/simpleShapeColored/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

const firstRect = new SparkEngine.ShapeComponent();
firstRect.transform.size = { width: 50, height: 25 };
firstRect.material.diffuseColor = 'orange';
firstRect.material.diffuseColor = new SparkEngine.Rgb(255, 100, 0);
renderSystem.registerComponent(firstRect);

const secondRect = new SparkEngine.ShapeComponent();
secondRect.transform.size = { width: 20, height: 20 };
secondRect.transform.depthIndex = 1;
secondRect.material.diffuseColor = 'green';
secondRect.material.diffuseColor = new SparkEngine.Rgb(0, 255, 0);
renderSystem.registerComponent(secondRect);

let pos = 0;
Expand Down
4 changes: 2 additions & 2 deletions examples/simpleShapeTransparent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

const firstRect = new SparkEngine.ShapeComponent();
firstRect.transform.size = { width: 50, height: 25 };
firstRect.material.diffuseColor = 'rgba(173, 123, 100, 0.75)';
firstRect.material.diffuseColor = new SparkEngine.Rgb(173, 123, 100);
firstRect.material.opacity = 75;
firstRect.transform.depthIndex = 0;
renderSystem.registerComponent(firstRect);

const secondRect = new SparkEngine.ShapeComponent();
secondRect.transform.size = { width: 20, height: 20 };
secondRect.transform.depthIndex = 1;
secondRect.material.diffuseColor = 'green';
secondRect.material.diffuseColor = new SparkEngine.Rgb(0, 255, 0);
renderSystem.registerComponent(secondRect);

let pos = 0;
Expand Down

0 comments on commit a2b4567

Please sign in to comment.