From a2b45672454161228f94d1257b263cdde779aedc Mon Sep 17 00:00:00 2001 From: Ruggero Visintin Date: Fri, 8 Dec 2023 02:07:36 +0100 Subject: [PATCH] docs(examples): improve existing examples --- examples/simpleShapeColored/index.html | 4 ++-- examples/simpleShapeTransparent/index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/simpleShapeColored/index.html b/examples/simpleShapeColored/index.html index e40ad42e..95073bfc 100644 --- a/examples/simpleShapeColored/index.html +++ b/examples/simpleShapeColored/index.html @@ -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; diff --git a/examples/simpleShapeTransparent/index.html b/examples/simpleShapeTransparent/index.html index eb790d7b..77585199 100644 --- a/examples/simpleShapeTransparent/index.html +++ b/examples/simpleShapeTransparent/index.html @@ -12,7 +12,7 @@ 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); @@ -20,7 +20,7 @@ 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;