diff examples/E04_input.nim @ 67:31ccaeee09c9

add: nicer keyboard demo
author Sam <sam@basx.dev>
date Sun, 05 Feb 2023 00:20:07 +0700
parents 44bae6c72834
children d830a1c0f86e
line wrap: on
line diff
--- a/examples/E04_input.nim	Sun Feb 05 00:15:48 2023 +0700
+++ b/examples/E04_input.nim	Sun Feb 05 00:20:07 2023 +0700
@@ -47,6 +47,7 @@
   )
   keyDimension = 50'f32
   keyGap = 10'f32
+  backgroundColor = Vec4([1'f32, 0.3'f32, 0.3'f32, 0'f32])
   baseColor = Vec4([1'f32, 0'f32, 0'f32, 0'f32])
   activeColor = Vec4([1'f32, 1'f32, 1'f32, 0'f32])
   keyIndices = [
@@ -190,10 +191,10 @@
       Vec3([0'f32, 1'f32, 0'f32]),
     ], useOnDeviceMemory: true),
     color: ColorAttribute[Vec4](data: @[
-      baseColor * 0.5'f32,
-      baseColor * 0.5'f32,
-      baseColor * 0.5'f32,
-      baseColor * 0.5'f32,
+      backgroundColor,
+      backgroundColor,
+      backgroundColor,
+      backgroundColor,
     ]),
     transform: ModelTransformAttribute(data: @[Unit44]),
   )