light.js 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.uiid173EffectList = exports.uiid137EffectList = exports.rbgLEDBulbLtypeMap = exports.rbgLEDBulbEffectList = exports.doubleColorBulbLtypeMap = exports.doubleColorBulbEffectList = exports.presetEffectMap = exports.rgbBulbEffectList = exports.fakeTempList = exports.effectList = void 0;
  4. exports.effectList = [
  5. '',
  6. 'Colorful',
  7. 'Colorful Gradient',
  8. 'Colorful Breath',
  9. 'DIY Gradient',
  10. 'DIY Pulse',
  11. 'DIY Breath',
  12. 'DIY Strobe',
  13. 'RGB Gradient',
  14. 'RGB Pulse',
  15. 'RGB Breath',
  16. 'RGB Strobe',
  17. 'Music Visualizer',
  18. ];
  19. exports.fakeTempList = [
  20. '214,225,255',
  21. '214,225,255',
  22. '217,225,255',
  23. '215,226,255',
  24. '218,226,255',
  25. '216,227,255',
  26. '219,226,255',
  27. '217,227,255',
  28. '220,227,255',
  29. '218,228,255',
  30. '221,228,255',
  31. '220,229,255',
  32. '223,229,255',
  33. '221,230,255',
  34. '224,230,255',
  35. '222,230,255',
  36. '225,231,255',
  37. '224,231,255',
  38. '227,232,255',
  39. '225,232,255',
  40. '228,233,255',
  41. '227,233,255',
  42. '229,233,255',
  43. '228,234,255',
  44. '231,234,255',
  45. '230,235,255',
  46. '233,236,255',
  47. '231,236,255',
  48. '234,237,255',
  49. '233,237,255',
  50. '236,238,255',
  51. '235,238,255',
  52. '238,239,255',
  53. '237,239,255',
  54. '239,240,255',
  55. '239,240,255',
  56. '241,241,255',
  57. '240,241,255',
  58. '243,243,255',
  59. '243,242,255',
  60. '245,244,255',
  61. '245,243,255',
  62. '247,245,255',
  63. '247,245,255',
  64. '250,247,255',
  65. '249,246,255',
  66. '252,248,255',
  67. '252,247,255',
  68. '254,250,255',
  69. '254,249,255',
  70. '255,249,253',
  71. '255,249,253',
  72. '255,249,251',
  73. '255,248,251',
  74. '255,248,248',
  75. '255,246,248',
  76. '255,247,245',
  77. '255,245,245',
  78. '255,246,243',
  79. '255,244,242',
  80. '255,245,240',
  81. '255,243,239',
  82. '255,244,237',
  83. '255,242,236',
  84. '255,243,234',
  85. '255,240,233',
  86. '255,241,231',
  87. '255,239,230',
  88. '255,240,228',
  89. '255,238,227',
  90. '255,239,225',
  91. '255,236,224',
  92. '255,238,222',
  93. '255,235,220',
  94. '255,237,218',
  95. '255,233,217',
  96. '255,235,215',
  97. '255,232,213',
  98. '255,234,211',
  99. '255,230,210',
  100. '255,232,208',
  101. '255,228,206',
  102. '255,231,204',
  103. '255,227,202',
  104. '255,229,200',
  105. '255,225,198',
  106. '255,228,196',
  107. '255,223,194',
  108. '255,226,192',
  109. '255,221,190',
  110. '255,225,188',
  111. '255,219,186',
  112. '255,223,184',
  113. '255,217,182',
  114. '255,221,180',
  115. '255,215,177',
  116. '255,219,175',
  117. '255,213,173',
  118. '255,217,171',
  119. '255,211,168',
  120. '255,215,166',
  121. '255,209,163',
  122. '255,213,161',
  123. '255,206,159',
  124. '255,211,156',
  125. '255,204,153',
  126. '255,208,151',
  127. '255,201,148',
  128. '255,206,146',
  129. '255,199,143',
  130. '255,203,141',
  131. '255,196,137',
  132. '255,201,135',
  133. '255,193,132',
  134. '255,198,130',
  135. '255,190,126',
  136. '255,195,124',
  137. '255,187,120',
  138. '255,192,118',
  139. '255,184,114',
  140. '255,189,111',
  141. '255,180,107',
  142. '255,185,105',
  143. '255,177,101',
  144. '255,182,98',
  145. '255,173,94',
  146. '255,178,91',
  147. '255,169,87',
  148. '255,174,84',
  149. '255,165,79',
  150. '255,170,77',
  151. '255,161,72',
  152. '255,166,69',
  153. '255,157,63',
  154. '255,162,60',
  155. '255,152,54',
  156. '255,157,51',
  157. '255,147,44',
  158. '255,152,41',
  159. '255,142,33',
  160. '255,146,29',
  161. '255,137,18',
  162. '255,141,11',
  163. ];
  164. exports.rgbBulbEffectList = ['', 'White', 'Color', 'Sleep', 'Reading', 'Party', 'Relax'];
  165. exports.presetEffectMap = new Map([
  166. [
  167. 'Sleep',
  168. {
  169. channel0: '0',
  170. channel1: '0',
  171. channel2: '189',
  172. channel3: '118',
  173. channel4: '0',
  174. zyx_mode: 3,
  175. type: 'middle',
  176. },
  177. ],
  178. [
  179. 'Reading',
  180. {
  181. channel0: '0',
  182. channel1: '0',
  183. channel2: '255',
  184. channel3: '255',
  185. channel4: '255',
  186. zyx_mode: 4,
  187. type: 'middle',
  188. },
  189. ],
  190. [
  191. 'Party',
  192. {
  193. channel0: '0',
  194. channel1: '0',
  195. channel2: '207',
  196. channel3: '56',
  197. channel4: '3',
  198. zyx_mode: 5,
  199. type: 'middle',
  200. },
  201. ],
  202. [
  203. 'Relax',
  204. {
  205. channel0: '0',
  206. channel1: '0',
  207. channel2: '56',
  208. channel3: '85',
  209. channel4: '179',
  210. zyx_mode: 6,
  211. type: 'middle',
  212. },
  213. ],
  214. ]);
  215. exports.doubleColorBulbEffectList = ['bright', 'read', 'computer', 'nightLight'];
  216. exports.doubleColorBulbLtypeMap = new Map([
  217. [
  218. 'bright',
  219. {
  220. ltype: 'bright',
  221. bright: {
  222. br: 100,
  223. ct: 255,
  224. },
  225. },
  226. ],
  227. [
  228. 'read',
  229. {
  230. ltype: 'read',
  231. read: {
  232. br: 50,
  233. ct: 0,
  234. },
  235. },
  236. ],
  237. [
  238. 'computer',
  239. {
  240. ltype: 'computer',
  241. computer: {
  242. br: 20,
  243. ct: 255,
  244. },
  245. },
  246. ],
  247. [
  248. 'nightLight',
  249. {
  250. ltype: 'nightLight',
  251. nightLight: {
  252. br: 5,
  253. ct: 0,
  254. },
  255. },
  256. ],
  257. ]);
  258. exports.rbgLEDBulbEffectList = ['bright', 'goodNight', 'read', 'nightLight', 'party', 'leisure', 'soft', 'colorful'];
  259. exports.rbgLEDBulbLtypeMap = new Map([
  260. [
  261. 'bright',
  262. {
  263. ltype: 'bright',
  264. bright: {
  265. r: 255,
  266. g: 255,
  267. b: 255,
  268. br: 100,
  269. },
  270. },
  271. ],
  272. [
  273. 'goodNight',
  274. {
  275. ltype: 'goodNight',
  276. goodNight: {
  277. r: 255,
  278. g: 254,
  279. b: 127,
  280. br: 25,
  281. },
  282. },
  283. ],
  284. [
  285. 'read',
  286. {
  287. ltype: 'read',
  288. read: {
  289. r: 255,
  290. g: 255,
  291. b: 255,
  292. br: 60,
  293. },
  294. },
  295. ],
  296. [
  297. 'nightLight',
  298. {
  299. ltype: 'nightLight',
  300. nightLight: {
  301. r: 255,
  302. g: 242,
  303. b: 226,
  304. br: 5,
  305. },
  306. },
  307. ],
  308. [
  309. 'party',
  310. {
  311. ltype: 'party',
  312. party: {
  313. r: 254,
  314. g: 132,
  315. b: 0,
  316. br: 45,
  317. tf: 1,
  318. sp: 1,
  319. },
  320. },
  321. ],
  322. [
  323. 'leisure',
  324. {
  325. ltype: 'leisure',
  326. leisure: {
  327. r: 0,
  328. g: 40,
  329. b: 254,
  330. br: 55,
  331. tf: 1,
  332. sp: 1,
  333. },
  334. },
  335. ],
  336. [
  337. 'soft',
  338. {
  339. ltype: 'soft',
  340. soft: {
  341. r: 38,
  342. g: 254,
  343. b: 0,
  344. br: 20,
  345. tf: 1,
  346. sp: 1,
  347. },
  348. },
  349. ],
  350. [
  351. 'colorful',
  352. {
  353. ltype: 'colorful',
  354. colorful: {
  355. r: 255,
  356. g: 0,
  357. b: 0,
  358. br: 100,
  359. tf: 1,
  360. sp: 1,
  361. },
  362. },
  363. ],
  364. ]);
  365. exports.uiid137EffectList = new Map([
  366. ['Reading', 7],
  367. ['Work', 18],
  368. ['Creek', 20],
  369. ['Ocean', 19],
  370. ['Candle', 13],
  371. ['Moonlight', 25],
  372. ['Goodnight', 14],
  373. ['Vibrant', 6],
  374. ['Leisure', 8],
  375. ['Sunrise', 9],
  376. ['Sunshine', 10],
  377. ['Radiant', 11],
  378. ['Dreamy', 12],
  379. ['Sunny', 15],
  380. ['Festive', 16],
  381. ['Gorgeous', 17],
  382. ['Gentle', 21],
  383. ['Passion', 22],
  384. ['Joy', 23],
  385. ['Rainbow', 24],
  386. ['Sunset', 26]
  387. ]);
  388. exports.uiid173EffectList = new Map([
  389. ['Magic Forward', 7],
  390. ['Magic Back', 8],
  391. ['7 Color Wave', 35],
  392. ['7 Color Wave Back', 36],
  393. ['Rgb Wave', 37],
  394. ['Rgb Wave Back', 38],
  395. ['Ycp Wave', 39],
  396. ['Ycp Wave Back', 40],
  397. ['7 Color Race', 29],
  398. ['7 Color Race Back', 30],
  399. ['Rgb Race', 31],
  400. ['Rgb Race Back', 32],
  401. ['Ycp Race', 33],
  402. ['Ycp Race Back', 34],
  403. ['7 Color Flush', 41],
  404. ['7 Color Flush Back', 42],
  405. ['Rgb Flush', 43],
  406. ['Rgb Flush Back', 44],
  407. ['Ycp Flush', 45],
  408. ['Ycp Flush Back', 46],
  409. ['7 Color Flush Close', 47],
  410. ['7 Color Flush Open', 48],
  411. ['Rgb Flush Close', 49],
  412. ['Rgb Flush Open', 50],
  413. ['Ycp Flush Close', 51],
  414. ['Ycp flush Open', 52],
  415. ['Red Marquee', 22],
  416. ['Green Marquee', 23],
  417. ['Blue Marquee', 24],
  418. ['Yellow Marquee', 25],
  419. ['Cyan Marquee', 26],
  420. ['Purple Marquee', 27],
  421. ['White Marquee', 28],
  422. ['7 Color Jump', 10],
  423. ['Rgb Jump', 11],
  424. ['Ycp Jump', 12],
  425. ['7 Color Gradual', 16],
  426. ['RY Gradual', 17],
  427. ['RP Gradual', 18],
  428. ['GC Gradual', 19],
  429. ['GY Gradual', 20],
  430. ['BP Gradual', 21],
  431. ['7 Color Strobe', 13],
  432. ['Rgb Strobe', 14],
  433. ['Ycp Strobe', 15],
  434. ]);