example/entity/index.js
/**
 * Applies color from arguments to component DOM element.
 * ColorfulDOMElementPureComponent({domElement, color}, next) -> void
 */
Applies color from arguments to component DOM element.
ColorfulDOMElementPureComponent({domElement, color}, next) -> void
Applies color from arguments to component DOM element . ColorfulDOMElementPureComponent ( { domElement color } next ) - > void
function ColorfulDOMElementPureComponent({domElement, color}, next) {
  const currentColor = parseRgb(domElement.style.color)
  if (currentColor) { lerp(color, currentColor, color, 0.000001) }
  requestAnimationFrame(() => html.update(domElement, template(color)))
  return next()
}
function ColorfulDOMElementPureComponent ( { domElement , color } , next ) { const currentColor = parseRgb ( domElement . style . color ) if ( currentColor ) { lerp ( color , currentColor , color , 0.000001 ) } requestAnimationFrame ( ( ) => html . update ( domElement , template ( color ) ) ) return next ( ) }
Applies color from arguments to component DOM element.
Applies color from arguments to component DOM element .