Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

constants.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // @flow
  2. export const FACE_EXPRESSIONS_EMOJIS = {
  3. happy: '😊',
  4. neutral: '😐',
  5. sad: '🙁',
  6. surprised: '😮',
  7. angry: '😠',
  8. fearful: '😨'
  9. // disgusted: '🤢'
  10. };
  11. export const FACE_EXPRESSIONS = [ 'happy', 'neutral', 'sad', 'surprised', 'angry', 'fearful' ];
  12. /**
  13. * Time is ms used for sending expression.
  14. */
  15. export const WEBHOOK_SEND_TIME_INTERVAL = 15000;
  16. /**
  17. * Type of message sent from main thread to worker that contains init information:
  18. * such as models directory and window screen size.
  19. */
  20. export const INIT_WORKER = 'INIT_WORKER';
  21. /**
  22. * Type of event sent on the data channel.
  23. */
  24. export const FACE_BOX_EVENT_TYPE = 'face-box';
  25. /**
  26. * Miliseconds interval value for sending new image data to the worker.
  27. */
  28. export const SEND_IMAGE_INTERVAL_MS = 1000;
  29. /**
  30. * Type of message sent from main thread to worker that contain image data and
  31. * will trigger a response message from the worker containing the detected face(s) info.
  32. */
  33. export const DETECT_FACE = 'DETECT_FACE';
  34. /**
  35. * Available detection types.
  36. */
  37. export const DETECTION_TYPES = {
  38. FACE_BOX: 'face-box',
  39. FACE_EXPRESSIONS: 'face-expressions'
  40. };