apca-introduction

The missing introduction to APCA  https://p.ce9e.org/apca-introduction/
git clone https://git.ce9e.org/apca-introduction.git

commit
79b3ad0f4b18e208d989b3a479b38adcf49bdd76
parent
fcadae0981dc4b83553402509f5b58364078c066
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-07-22 05:10
Fixup f0bae95: adapt examples to additional levels

Diffstat

M examples/examples.js 6 +++---

1 files changed, 3 insertions, 3 deletions


diff --git a/examples/examples.js b/examples/examples.js

@@ -20,12 +20,12 @@ var parseColor = function(c) {
   20    20 
   21    21 var getLevel = function(c, module) {
   22    22 	var a = module.abs(c);
   23    -1 	for (let i = 0; i < module.levels.length; i++) {
   24    -1 		if (a < module.levels[i]) {
   -1    23 	for (let i = 0; i < 3; i++) {
   -1    24 		if (a < module.levels[i + 2]) {
   25    25 			return i;
   26    26 		}
   27    27 	}
   28    -1 	return module.levels.length;
   -1    28 	return 3;
   29    29 };
   30    30 
   31    31 var template = document.querySelector('template');