shop-components 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shop-components.mjs
CHANGED
|
@@ -10374,7 +10374,7 @@ class Ac extends Bt {
|
|
|
10374
10374
|
return Promise.reject(new Error(`Action "${e}" not found or mixer not initialized.`));
|
|
10375
10375
|
if (s.isRunning() && s === this._currentAction)
|
|
10376
10376
|
return Promise.resolve();
|
|
10377
|
-
const a = this._currentAction, n = a === s, c = n ? 0 :
|
|
10377
|
+
const a = this._currentAction, n = a === s, c = n ? 0 : t != null && t.fadeIn ? t == null ? void 0 : t.fadeIn : 0.5, u = a && !n && a.isRunning();
|
|
10378
10378
|
this._actionsMap.forEach((r) => {
|
|
10379
10379
|
r !== s && r !== a && (r.stopFading(), r.setEffectiveWeight(0), r.stop());
|
|
10380
10380
|
});
|
|
@@ -12734,8 +12734,11 @@ class nn extends k.ShaderMaterial {
|
|
|
12734
12734
|
vertexShader: (
|
|
12735
12735
|
/* glsl */
|
|
12736
12736
|
`
|
|
12737
|
+
#include <morphtarget_pars_vertex>
|
|
12737
12738
|
void main() {
|
|
12738
|
-
|
|
12739
|
+
vec3 transformed = position;
|
|
12740
|
+
#include <morphtarget_vertex>
|
|
12741
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4( transformed, 1.0 );
|
|
12739
12742
|
}
|
|
12740
12743
|
`
|
|
12741
12744
|
),
|
|
@@ -12748,7 +12751,7 @@ class nn extends k.ShaderMaterial {
|
|
|
12748
12751
|
}
|
|
12749
12752
|
`
|
|
12750
12753
|
)
|
|
12751
|
-
});
|
|
12754
|
+
}), this.morphTargets = !0;
|
|
12752
12755
|
}
|
|
12753
12756
|
}
|
|
12754
12757
|
class Fu extends k.ShaderMaterial {
|
|
@@ -12932,7 +12935,10 @@ class Bu {
|
|
|
12932
12935
|
inside: !1,
|
|
12933
12936
|
thickness: 30,
|
|
12934
12937
|
color: new k.Color("#e91e63")
|
|
12935
|
-
}, this._selectionLayer = 31, this._box = new k.Box3(), this._sphere = new k.Sphere(), this.renderer = e, this.scene = t, this.camera = i, (s == null ? void 0 : s.inside) !== void 0 && (this.params.inside = s.inside), (s == null ? void 0 : s.thickness) !== void 0 && (this.params.thickness = s.thickness), (s == null ? void 0 : s.color) !== void 0 && (this.params.color = new k.Color(s.color)), this.seedMaterial = new nn(), this.seedMaterial.side = k.DoubleSide, this.seedModelMaterial = new nn(), this.seedModelMaterial.side = k.DoubleSide, this.maskMaterial = new k.MeshBasicMaterial({
|
|
12938
|
+
}, this._selectionLayer = 31, this._box = new k.Box3(), this._sphere = new k.Sphere(), this.renderer = e, this.scene = t, this.camera = i, (s == null ? void 0 : s.inside) !== void 0 && (this.params.inside = s.inside), (s == null ? void 0 : s.thickness) !== void 0 && (this.params.thickness = s.thickness), (s == null ? void 0 : s.color) !== void 0 && (this.params.color = new k.Color(s.color)), this.seedMaterial = new nn(), this.seedMaterial.side = k.DoubleSide, this.seedModelMaterial = new nn(), this.seedModelMaterial.side = k.DoubleSide, this.maskMaterial = new k.MeshBasicMaterial({
|
|
12939
|
+
color: 16777215,
|
|
12940
|
+
side: k.DoubleSide
|
|
12941
|
+
}), this.maskMaterial.morphTargets = !0, this.targets = [
|
|
12936
12942
|
new k.WebGLRenderTarget(1, 1, {
|
|
12937
12943
|
format: k.RGBAFormat,
|
|
12938
12944
|
type: k.FloatType,
|
|
@@ -13336,20 +13342,22 @@ class Lh {
|
|
|
13336
13342
|
c.style.display = "flex", this.renderer.domElement.style.width = "100%", this.renderer.domElement.style.height = "100%", this.renderer.domElement.style.flexGrow = "1";
|
|
13337
13343
|
const u = c.clientWidth, f = c.clientHeight;
|
|
13338
13344
|
this.size.set(u, f), this.camera.aspect = u / f, this.camera.updateProjectionMatrix(), this._amrRender.setSize(u, f), this._updateCamera(), this.css2dRenderer.setSize(u, f), this.renderer.getPixelRatio(), (d = this.pathTracer) == null || d.updateCamera(), this.sampleCount = 0, this.renderer.setSize(u, f), (r = this._jumpFlood) == null || r.setSize(u, f);
|
|
13339
|
-
}, this.ticker = () => {
|
|
13345
|
+
}, this.ticker = (c) => {
|
|
13340
13346
|
if (!this._destroyed) {
|
|
13341
|
-
if (this.stats.begin(), this.renderer.domElement.dispatchEvent(new CustomEvent("ticker"
|
|
13347
|
+
if (this.stats.begin(), this.renderer.domElement.dispatchEvent(new CustomEvent("ticker", {
|
|
13348
|
+
detail: c
|
|
13349
|
+
})), this._rafId = requestAnimationFrame(this.ticker), this.renderer.clear(), this.usePathTracing) {
|
|
13342
13350
|
this.hideAmrUI(), this.sampleCount < this.maxSample ? this.sampleCount++ : this.pathTracer.pausePathTracing = !0, this.pathTracer.renderSample();
|
|
13343
|
-
const
|
|
13344
|
-
this.renderer.autoClear = !1, this.scene.overrideMaterial = Nu, this.renderer.clearDepth(), this.renderer.render(this.scene, this.mainCamera), this.scene.overrideMaterial = null, this.renderer.render(this.overlayScene, this.mainCamera), this.renderer.autoClear =
|
|
13351
|
+
const u = this.renderer.autoClear;
|
|
13352
|
+
this.renderer.autoClear = !1, this.scene.overrideMaterial = Nu, this.renderer.clearDepth(), this.renderer.render(this.scene, this.mainCamera), this.scene.overrideMaterial = null, this.renderer.render(this.overlayScene, this.mainCamera), this.renderer.autoClear = u;
|
|
13345
13353
|
} else {
|
|
13346
|
-
this._clock.getElapsedTime() - this._uiHiddenTime > 0.15 ? this.showControls && this.amr.controllers.forEach((
|
|
13347
|
-
const
|
|
13348
|
-
if (this.usePathTracing || (this._fpsCache.length > this._fpsCacheMax && this._fpsCache.shift(), this._fpsCache.push(
|
|
13349
|
-
this._dragging ?
|
|
13354
|
+
this._clock.getElapsedTime() - this._uiHiddenTime > 0.15 ? this.showControls && this.amr.controllers.forEach((d) => d.show()) : this.amr.controllers.forEach((d) => d.hide());
|
|
13355
|
+
const f = this.stats.fps();
|
|
13356
|
+
if (this.usePathTracing || (this._fpsCache.length > this._fpsCacheMax && this._fpsCache.shift(), this._fpsCache.push(f)), this.amr.slots.forEach((d) => {
|
|
13357
|
+
this._dragging ? d.getCanInstall() && d.render(this) : d.render(this);
|
|
13350
13358
|
}), Je.update(), this.controls.update(), this._progressShadow.update(this.mainCamera), this.css2dRenderer.render(this.scene, this.mainCamera), this.updatePosition(), this.scene.overrideMaterial = null, this.renderer.render(this.scene, this.mainCamera), this._jumpFlood && this._selectedForOutline.length > 0) {
|
|
13351
|
-
const
|
|
13352
|
-
this.scene.background = null, this._jumpFlood.render(this._selectedForOutline), this.scene.background =
|
|
13359
|
+
const d = this.scene.background;
|
|
13360
|
+
this.scene.background = null, this._jumpFlood.render(this._selectedForOutline), this.scene.background = d;
|
|
13353
13361
|
}
|
|
13354
13362
|
}
|
|
13355
13363
|
this.stats.end();
|
|
@@ -13806,7 +13814,7 @@ class Gu {
|
|
|
13806
13814
|
return this.canvas || (this.canvas = document.createElement("canvas")), (this.canvas.width !== e || this.canvas.height !== t) && (this.canvas.width = e, this.canvas.height = t), this.canvas;
|
|
13807
13815
|
}
|
|
13808
13816
|
}
|
|
13809
|
-
const qu = "shop-components", ju = "0.4.
|
|
13817
|
+
const qu = "shop-components", ju = "0.4.8", Qu = "Shop components", Yu = "dist/shop-components.umd.js", Zu = "dist/shop-components.mjs", Xu = "dist/main.d.ts", Ku = {
|
|
13810
13818
|
dts: "tsc --emitDeclarationOnly & tsc & storybook build -o dist",
|
|
13811
13819
|
dev: "vite dev",
|
|
13812
13820
|
build: "vite build",
|