public function setAnimation($animation)
    {
        if (!in_array($animation, [Animation::BOUNCE, Animation::DROP])) {
            throw new InvalidConfigException('Unknown animation');
        }
        $this->options['animation'] = new JsExpression($animation);
    }