14日間の返品・返金サービス
登録して75000円のクーポンを受け取る
1万円以上のご注文で送料無料
store.jp@creality.com
5つ星評価でギフトカードをプレゼント
-
-
360°ビジュアルデザイン、美学と多様性を組み合わせます
完全透明なカバーで、保護メガネの制約から完全に解放され、どの角度からでも処理を観察できます。 曲面と外部ボタンを備え、ユニークで便利です。 深紅の透明な素材は、光学的な保護を最適化するためにレーザー光を完璧に吸収します。
-
パイロットテクノロジー、正確な位置合わせのためのビジュアルアシスタンス
正確なアラインメントのための内蔵トップカメラで、フルフレームの機能を確実にします。 広々とした内部で、制限のないクリエイティビティ。
-
リアルタイムプレビュー、ワンクリックでの画像出力
いつでもどこでもあなたのインスピレーションの火花をサポートします。
-
高効率バッチ、ポケットに利益
小規模でバッチのプロジェクトに最適で、あなたの創造性とビジネスに最高のサービスを提供します。
-
小さな機械、大きな成果
広大な作業領域、400×415mm
制約から解放され、より多くのスペースを開放し、便利な配置を楽しんでください。
-
引き出しデザイン、デスクの整理の良い助手
金属製の引き出しデザインは、制作時に発生した残骸を収納できます。 引いて、流して、拭いて簡単に片付けることができます。 乱雑な心配をさようならして、制作の喜びを楽しんでください。
-
フェンスタイプの保護ストリップ、熱および煙の放散
特殊な酸化処理、視覚的に魅力的で耐摩耗性のある仕上げ。 フラットモードに切り替えて、小さな、柔軟な作品を作成できます。
-
多重セキュリティモニタリング、安心のクリエーション
トリプルインテリジェントモニタリング、火花および汚れのモニタリング。 5つの主要な安全保証、ワンボタンで停止。
-
統合エアアシスト
自動または手動で空気の流れを調整して、完璧なプロジェクトを作成します。
-
小さなスタジオに適しています
小部屋やスタジオに完璧にフィットします。 キャビネットの棚に置いて、簡単に保護カバーをスライドさせてアートワークを取り出すこともできます。
-
あなたの機械のワンストップソリューション
アクセサリーとの協力がより良い仕事を生み出す
-
const TAG = 'spz-custom-painter-button-animation';
const MAX_ITERATION_COUNT = 99999999;
const SITE = (window.C_SETTINGS && window.C_SETTINGS.routes && window.C_SETTINGS.routes.root) || '';
const ADD_TO_CART_ANIMATION_SETTING =
`${SITE}/api/marketing_atmosphere_app/add_to_cart_btn_animation/setting`;
class SpzCustomPainterButtonAnimation extends SPZ.BaseElement {
/**@override */
static deferredMount() {
return false;
}
/** @param {!SpzElement} element */
constructor(element) {
super(element);
/** @private {!../../src/service/xhr-impl.Xhr} */
this.xhr_ = SPZServices.xhrFor(this.win);
/** @private {Object} */
this.data_ = null;
/** @private {Element} */
this.addToCartButton_ = null;
/** @private {boolean} */
this.productAvailable_ = true;
/** @private {number} */
this.timerId_ = null;
/** @private {number} */
this.animationExecutionCount_ = 0;
/** @private {boolean} */
this.selectedVariantAvailable_ = true;
/** @private {number} */
this.delay_ = 5000;
/** @private {number} */
this.iterationCount_ = 5;
/** @private {string} */
this.animationClass_ = '';
}
/** @override */
isLayoutSupported(layout) {
return layout == SPZCore.Layout.LOGIC;
}
/** @override */
buildCallback() {
this.productAvailable_ = this.element.hasAttribute('product-available');
this.selectedVariantAvailable_ = this.element.hasAttribute('selected-variant-available');
}
/** @override */
mountCallback() {
this.render_();
}
/** @private */
render_() {
if (!this.productAvailable_) {
return;
}
this.fetch_().then((data) => {
if (!data) {
return;
}
this.data_ = data;
this.animationClass_ = `painter-${data.animation_name}-animation`;
this.iterationCount_ =
data.animation_iteration_count === 'infinite'
? MAX_ITERATION_COUNT
: data.animation_iteration_count;
const animationDuration = 1;
const animationDelay = data.animation_delay || 5;
this.delay_ = (animationDuration + animationDelay) * 1000;
this.handleButtonEffect_();
});
}
/**
* @param {JsonObject} data
* @return {(null|Object)}
* @private
*/
parseJson_(data) {
try {
return JSON.parse(data);
} catch (e) {
return null;
}
}
/**
* @return {Promise}
* @private
*/
fetch_() {
return this.xhr_.fetchJson(ADD_TO_CART_ANIMATION_SETTING).then((data) => {
if (!data || !data.enabled) {
return null;
}
return this.parseJson_(data.detail);
});
}
/** @private */
getAddToCartButton_() {
this.addToCartButton_ = SPZCore.Dom.scopedQuerySelector(
document.body,
'[data-section-type="product"] [role="addToCart"], [data-section-type="product_detail"] [role="addToCart"], [data-section-type="product_detail"] [data-click="addToCart"], [data-section-type="product"] [data-click="addToCart"]'
);
}
/** @private */
restartAnimation_() {
this.addToCartButton_.classList.remove(this.animationClass_);
this.addToCartButton_./* OK */ offsetWidth;
this.addToCartButton_.classList.add(this.animationClass_);
this.animationExecutionCount_++;
}
/** @private */
clearTimer_() {
this.win.clearInterval(this.timerId_);
this.timerId_ = null;
}
/** @private */
setupTimer_() {
this.timerId_ = this.win.setInterval(() => {
this.restartAnimation_();
if (this.animationExecutionCount_ >= this.iterationCount_) {
this.removeAnimationClass_();
this.clearTimer_();
}
}, this.delay_);
}
/** @private */
restartTimer_() {
if (this.animationExecutionCount_ >= this.iterationCount_) {
this.removeAnimationClass_();
return;
}
this.setupTimer_();
}
/** @private */
listenVariantChange_() {
SPZUtils.Event.listen(self.document, 'dj.variantChange', (e) => {
const selectedVariant = e.detail && e.detail.selected;
if (!selectedVariant) {
return;
}
const {available} = selectedVariant;
if (this.selectedVariantAvailable_ !== available) {
this.selectedVariantAvailable_ = available;
this.clearTimer_();
if (available) {
this.restartTimer_();
}
}
});
}
/** @private */
removeAnimationClass_() {
this.win.setTimeout(() => {
this.addToCartButton_.classList.remove(this.animationClass_);
}, 1000);
}
/** @private */
handleButtonEffect_() {
this.getAddToCartButton_();
if (!this.addToCartButton_) {
return;
}
if (this.selectedVariantAvailable_) {
++this.animationExecutionCount_;
this.addToCartButton_.classList.add(this.animationClass_);
if (this.iterationCount_ === 1) {
this.removeAnimationClass_();
return;
}
this.setupTimer_();
}
this.listenVariantChange_();
}
}
SPZ.defineElement(TAG, SpzCustomPainterButtonAnimation);