wuepgg3-track 1.2.3 → 1.2.5
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/{SharedSystems-BYFGb__N.mjs → SharedSystems-BC8_hIo_.mjs} +144 -142
- package/dist/{WebGLRenderer-CMl26whg.mjs → WebGLRenderer-CisogwE_.mjs} +8 -2
- package/dist/{WebGPURenderer-C0rLPjfN.mjs → WebGPURenderer-Cm9TAz3i.mjs} +13 -5
- package/dist/{browserAll-B__DvKEy.mjs → browserAll-CtS3GQa8.mjs} +153 -119
- package/dist/components/GenomeView/TrackComponents/3dmol/ArrowList.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/CategoryLegend.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/FrameListMenu.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/HoverInfo.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/Legend.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/ModelListMenu.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/OpacityThickness.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/ResolutionList.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/ShapeList.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/3dmol/StaticLegend.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/3dmol/ThreedmolContainer.d.ts +3 -7
- package/dist/components/GenomeView/TrackComponents/BamComponents/BamAnnotation.d.ts +3 -3
- package/dist/components/GenomeView/TrackComponents/CategoricalComponents/CategoricalAnnotation.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/DynseqComponents/DynseqTrackComponents.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/GenomeAlignComponents/AlignmentCoordinate.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/GenomeAlignComponents/GenomeAlignComponents.d.ts +4 -4
- package/dist/components/GenomeView/TrackComponents/GenomeAlignComponents/HorizontalFragment.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/GenomeAlignComponents/Sequence.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/InteractionComponents/ArcDisplay.d.ts +3 -3
- package/dist/components/GenomeView/TrackComponents/InteractionComponents/CubicCurveDisplay.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/InteractionComponents/Heatmap.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/InteractionComponents/InteractionTrackComponent.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/InteractionComponents/PixiArc.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/InteractionComponents/PixiHeatmap.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/InteractionComponents/SquareDisplay.d.ts +3 -3
- package/dist/components/GenomeView/TrackComponents/MethylcComponents/MethylCTrackComputation.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/QBedComponents/QBedTrackComponents.d.ts +3 -3
- package/dist/components/GenomeView/TrackComponents/RulerComponents/Ruler.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/RulerComponents/RulerComponent.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/TrackFactory.d.ts +1 -3
- package/dist/components/GenomeView/TrackComponents/VcfComponents/VcfAnnotation.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/VcfComponents/VcfDetail.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/VcfComponents/VcfTrack.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/bedComponents/BedAnnotation.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/bedComponents/FiberAnnotation.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/bedComponents/FiberTrackComponent.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/commonComponents/CopyToClipboard.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/HoverToolTips/HoverToolTip.d.ts +15 -36
- package/dist/components/GenomeView/TrackComponents/commonComponents/Resize.d.ts +1 -5
- package/dist/components/GenomeView/TrackComponents/commonComponents/TrackLegend.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/commonComponents/TrackMessage.d.ts +3 -3
- package/dist/components/GenomeView/TrackComponents/commonComponents/annotation/AnnotationTrack.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/annotation/FeatureDetail.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/annotation/FullDisplayMode.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/annotation/JasparDetail.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/annotation/PixiAnnotation.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/commonComponents/art/DesignRenderer.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/art/RulerDesigner.d.ts +4 -4
- package/dist/components/GenomeView/TrackComponents/commonComponents/chr-order/SortableItem.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/chr-order/SortableTrack.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/numerical/DynamicplotTrackComponent.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/numerical/MatplotTrackComponent.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/commonComponents/numerical/PixiScene.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/commonComponents/stats/BoxplotTrackComponents.d.ts +4 -4
- package/dist/components/GenomeView/TrackComponents/displayModeComponentMap.d.ts +6 -0
- package/dist/components/GenomeView/TrackComponents/geneAnnotationTrackComponents/BackgroundedText.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/geneAnnotationTrackComponents/TranslatableG.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/imageTrackComponents/OmeroHtmlVisualizer.d.ts +2 -2
- package/dist/components/GenomeView/TrackComponents/imageTrackComponents/OmeroSvgVisualizer.d.ts +1 -1
- package/dist/components/GenomeView/TrackComponents/imageTrackComponents/OmeroTrackComponents.d.ts +1 -1
- package/dist/components/GenomeView/TrackManager.d.ts +1 -23
- package/dist/components/GenomeView/genomeNavigator/Chromosomes.d.ts +2 -2
- package/dist/components/GenomeView/genomeNavigator/DragAcrossDiv.d.ts +1 -1
- package/dist/components/GenomeView/genomeNavigator/GeneSearchBox3D.d.ts +1 -1
- package/dist/components/GenomeView/genomeNavigator/GenomeNavigator.d.ts +1 -1
- package/dist/components/GenomeView/genomeNavigator/MainPane.d.ts +1 -1
- package/dist/components/GenomeView/genomeNavigator/Ruler.d.ts +1 -1
- package/dist/components/GenomeView/genomeNavigator/SelectableGenomeArea.d.ts +2 -2
- package/dist/components/GenomeView/genomeNavigator/SelectedRegionBox.d.ts +1 -1
- package/dist/{index-m89tAXbR.mjs → index-DQYg3_4W.mjs} +49972 -79399
- package/dist/index.es.js +61 -55
- package/dist/index.umd.js +255 -541
- package/dist/{init-BYOHd6xM.mjs → init-Cb9X_WNo.mjs} +691 -937
- package/dist/models/genomes/virus/nCoV2019.d.ts +3 -26
- package/dist/models/layoutUtils.d.ts +1 -1
- package/dist/track-container/index.d.ts +2 -2
- package/dist/trackConfigs/config-menu-components.tsx/AlwaysDrawLabelConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/ArrayAggregateConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/BothAnchorsInViewConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/CategoryColorConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/ClampHeightConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/ColorConfig.d.ts +13 -13
- package/dist/trackConfigs/config-menu-components.tsx/CombineStrandConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/DisplayModeConfig.d.ts +9 -9
- package/dist/trackConfigs/config-menu-components.tsx/EnsemblStyleConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/FetchViewWindowConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/HeightConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/HicDataConfig.d.ts +2 -2
- package/dist/trackConfigs/config-menu-components.tsx/HiddenPixelsConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/HideMinimalItemsConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/HorizontalLineValueConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/ItalicizeTextConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/LabelConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/LineWidthConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/LogScaleConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/MarkerSizeConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/MaxMethylAndDepthFilterConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/MaxRowsConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/MaxValueFilterConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/MethylColorConfig.d.ts +2 -2
- package/dist/trackConfigs/config-menu-components.tsx/MinValueFilterConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/NumberConfig.d.ts +2 -2
- package/dist/trackConfigs/config-menu-components.tsx/OmeroImageHeightConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/OpacitySilderConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/PixelsPaddingConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/PlayingConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/RowHeightConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/ScalePercentileConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/ScoreConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/ShowHorizontalLineConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/SliderConfig.d.ts +2 -2
- package/dist/trackConfigs/config-menu-components.tsx/SmoothConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/SortItemsConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/SpeedConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/TrackConfigMenu.d.ts +1 -3
- package/dist/trackConfigs/config-menu-components.tsx/TrackContextMenu.d.ts +6 -6
- package/dist/trackConfigs/config-menu-components.tsx/UseDynamicColorsConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/WindowSizeConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-components.tsx/YscaleConfig.d.ts +1 -1
- package/dist/trackConfigs/config-menu-models.tsx/AggregateConfig.d.ts +1 -1
- package/dist/webworkerAll-ta91YPCe.mjs +2 -0
- package/package.json +5 -8
- package/dist/components/index.d.ts +0 -40
- package/dist/models/util.d.ts +0 -102
- package/dist/webworkerAll-gw2l5CEb.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { q as Le, G as
|
|
2
|
-
import { S as fe, B as pe, c as
|
|
1
|
+
import { q as Le, G as ae, t as ne, u as He, k as ie, M as v, v as oe, E as u, e as O, x as S, y as ze, z as F, F as b, R as L, H as le, I as We, s as m, S as f, h as B, w as H, J, K as Ve, b as X, B as k, i as U, L as M, j as T, N as w, O as Ne, a as je, Q as ue, V as de, W as ce, X as he, C as P, Y as $e, Z as A, D as z, _ as qe, P as Ke, c as Ye, T as Q, $ as Z, a0 as Je, a1 as Xe, a2 as Qe } from "./index-DQYg3_4W.mjs";
|
|
2
|
+
import { S as fe, B as pe, c as Ze } from "./colorToUniform-zJcCVLeu.mjs";
|
|
3
3
|
const me = class I extends Le {
|
|
4
4
|
/**
|
|
5
5
|
* @param options - The optional parameters of this filter.
|
|
@@ -36,7 +36,7 @@ const me = class I extends Le {
|
|
|
36
36
|
static from(e) {
|
|
37
37
|
const { gpu: t, gl: r, ...s } = e;
|
|
38
38
|
let n, i;
|
|
39
|
-
return t && (n =
|
|
39
|
+
return t && (n = ae.from(t)), r && (i = ne.from(r)), new I({
|
|
40
40
|
gpuProgram: n,
|
|
41
41
|
glProgram: i,
|
|
42
42
|
...s
|
|
@@ -51,8 +51,8 @@ me.defaultOptions = {
|
|
|
51
51
|
blendRequired: !1,
|
|
52
52
|
clipToViewport: !0
|
|
53
53
|
};
|
|
54
|
-
let
|
|
55
|
-
var
|
|
54
|
+
let et = me;
|
|
55
|
+
var tt = `in vec2 vMaskCoord;
|
|
56
56
|
in vec2 vTextureCoord;
|
|
57
57
|
|
|
58
58
|
uniform sampler2D uTexture;
|
|
@@ -86,7 +86,7 @@ void main(void)
|
|
|
86
86
|
|
|
87
87
|
finalColor = original * a;
|
|
88
88
|
}
|
|
89
|
-
`,
|
|
89
|
+
`, rt = `in vec2 aPosition;
|
|
90
90
|
|
|
91
91
|
out vec2 vTextureCoord;
|
|
92
92
|
out vec2 vMaskCoord;
|
|
@@ -123,7 +123,7 @@ void main(void)
|
|
|
123
123
|
vTextureCoord = filterTextureCoord(aPosition);
|
|
124
124
|
vMaskCoord = getFilterCoord(aPosition);
|
|
125
125
|
}
|
|
126
|
-
`,
|
|
126
|
+
`, ee = `struct GlobalFilterUniforms {
|
|
127
127
|
uInputSize:vec4<f32>,
|
|
128
128
|
uInputPixel:vec4<f32>,
|
|
129
129
|
uInputClamp:vec4<f32>,
|
|
@@ -222,31 +222,32 @@ fn mainFragment(
|
|
|
222
222
|
return source * a;
|
|
223
223
|
}
|
|
224
224
|
`;
|
|
225
|
-
class
|
|
225
|
+
class st extends et {
|
|
226
226
|
constructor(e) {
|
|
227
|
-
const { sprite: t, ...r } = e, s = new He(t.texture), n = new
|
|
227
|
+
const { sprite: t, ...r } = e, s = new He(t.texture), n = new ie({
|
|
228
228
|
uFilterMatrix: { value: new v(), type: "mat3x3<f32>" },
|
|
229
229
|
uMaskClamp: { value: s.uClampFrame, type: "vec4<f32>" },
|
|
230
230
|
uAlpha: { value: 1, type: "f32" },
|
|
231
231
|
uInverse: { value: e.inverse ? 1 : 0, type: "f32" }
|
|
232
|
-
}), i =
|
|
232
|
+
}), i = ae.from({
|
|
233
233
|
vertex: {
|
|
234
|
-
source:
|
|
234
|
+
source: ee,
|
|
235
235
|
entryPoint: "mainVertex"
|
|
236
236
|
},
|
|
237
237
|
fragment: {
|
|
238
|
-
source:
|
|
238
|
+
source: ee,
|
|
239
239
|
entryPoint: "mainFragment"
|
|
240
240
|
}
|
|
241
|
-
}), o =
|
|
242
|
-
vertex:
|
|
243
|
-
fragment:
|
|
241
|
+
}), o = ne.from({
|
|
242
|
+
vertex: rt,
|
|
243
|
+
fragment: tt,
|
|
244
244
|
name: "mask-filter"
|
|
245
245
|
});
|
|
246
246
|
super({
|
|
247
247
|
...r,
|
|
248
248
|
gpuProgram: i,
|
|
249
249
|
glProgram: o,
|
|
250
|
+
clipToViewport: !1,
|
|
250
251
|
resources: {
|
|
251
252
|
filterUniforms: n,
|
|
252
253
|
uMaskTexture: t.texture.source
|
|
@@ -266,7 +267,7 @@ class rt extends Ze {
|
|
|
266
267
|
).prepend(this._textureMatrix.mapCoord), this.resources.uMaskTexture = this.sprite.texture.source, e.applyFilter(this, t, r, s);
|
|
267
268
|
}
|
|
268
269
|
}
|
|
269
|
-
const
|
|
270
|
+
const W = class ve {
|
|
270
271
|
constructor(e, t) {
|
|
271
272
|
var r, s;
|
|
272
273
|
this.state = fe.for2d(), this._batchersByInstructionSet = /* @__PURE__ */ Object.create(null), this._activeBatches = /* @__PURE__ */ Object.create(null), this.renderer = e, this._adaptor = t, (s = (r = this._adaptor).init) == null || s.call(r, this);
|
|
@@ -276,7 +277,7 @@ const z = class ve {
|
|
|
276
277
|
}
|
|
277
278
|
buildStart(e) {
|
|
278
279
|
let t = this._batchersByInstructionSet[e.uid];
|
|
279
|
-
t || (t = this._batchersByInstructionSet[e.uid] = /* @__PURE__ */ Object.create(null), t.default || (t.default = new
|
|
280
|
+
t || (t = this._batchersByInstructionSet[e.uid] = /* @__PURE__ */ Object.create(null), t.default || (t.default = new oe({
|
|
280
281
|
maxTextures: this.renderer.limits.maxBatchableTextures
|
|
281
282
|
}))), this._activeBatches = t, this._activeBatch = this._activeBatches.default;
|
|
282
283
|
for (const r in this._activeBatches)
|
|
@@ -322,7 +323,7 @@ const z = class ve {
|
|
|
322
323
|
this._activeBatches = null;
|
|
323
324
|
}
|
|
324
325
|
};
|
|
325
|
-
|
|
326
|
+
W.extension = {
|
|
326
327
|
type: [
|
|
327
328
|
u.WebGLPipes,
|
|
328
329
|
u.WebGPUPipes,
|
|
@@ -330,11 +331,11 @@ z.extension = {
|
|
|
330
331
|
],
|
|
331
332
|
name: "batch"
|
|
332
333
|
};
|
|
333
|
-
|
|
334
|
-
let ge =
|
|
334
|
+
W._availableBatchers = /* @__PURE__ */ Object.create(null);
|
|
335
|
+
let ge = W;
|
|
335
336
|
O.handleByMap(u.Batcher, ge._availableBatchers);
|
|
336
|
-
O.add(
|
|
337
|
-
const
|
|
337
|
+
O.add(oe);
|
|
338
|
+
const Ut = {
|
|
338
339
|
name: "texture-bit",
|
|
339
340
|
vertex: {
|
|
340
341
|
header: (
|
|
@@ -372,7 +373,7 @@ const Bt = {
|
|
|
372
373
|
`
|
|
373
374
|
)
|
|
374
375
|
}
|
|
375
|
-
},
|
|
376
|
+
}, At = {
|
|
376
377
|
name: "texture-bit",
|
|
377
378
|
vertex: {
|
|
378
379
|
header: (
|
|
@@ -404,10 +405,10 @@ const Bt = {
|
|
|
404
405
|
`
|
|
405
406
|
)
|
|
406
407
|
}
|
|
407
|
-
},
|
|
408
|
-
class
|
|
408
|
+
}, at = new F();
|
|
409
|
+
class nt extends le {
|
|
409
410
|
constructor() {
|
|
410
|
-
super(), this.filters = [new
|
|
411
|
+
super(), this.filters = [new st({
|
|
411
412
|
sprite: new We(m.EMPTY),
|
|
412
413
|
inverse: !1,
|
|
413
414
|
resolution: "inherit",
|
|
@@ -469,10 +470,10 @@ class xe {
|
|
|
469
470
|
execute(e) {
|
|
470
471
|
const t = this._renderer, r = e.mask.renderMaskToTexture;
|
|
471
472
|
if (e.action === "pushMaskBegin") {
|
|
472
|
-
const s = S.get(
|
|
473
|
+
const s = S.get(nt);
|
|
473
474
|
if (s.inverse = e.inverse, r) {
|
|
474
475
|
e.mask.mask.measurable = !0;
|
|
475
|
-
const n = ze(e.mask.mask, !0,
|
|
476
|
+
const n = ze(e.mask.mask, !0, at);
|
|
476
477
|
e.mask.mask.measurable = !1, n.ceil();
|
|
477
478
|
const i = t.renderTarget.renderTarget.colorTexture.source, o = b.getOptimalTexture(
|
|
478
479
|
n.width,
|
|
@@ -637,14 +638,14 @@ be.extension = {
|
|
|
637
638
|
],
|
|
638
639
|
name: "stencilMask"
|
|
639
640
|
};
|
|
640
|
-
function
|
|
641
|
+
function It(a, e) {
|
|
641
642
|
for (const t in a.attributes) {
|
|
642
643
|
const r = a.attributes[t], s = e[t];
|
|
643
644
|
s ? (r.format ?? (r.format = s.format), r.offset ?? (r.offset = s.offset), r.instance ?? (r.instance = s.instance)) : H(`Attribute ${t} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`);
|
|
644
645
|
}
|
|
645
|
-
|
|
646
|
+
it(a);
|
|
646
647
|
}
|
|
647
|
-
function
|
|
648
|
+
function it(a) {
|
|
648
649
|
const { buffers: e, attributes: t } = a, r = {}, s = {};
|
|
649
650
|
for (const n in e) {
|
|
650
651
|
const i = e[n];
|
|
@@ -652,11 +653,11 @@ function nt(a) {
|
|
|
652
653
|
}
|
|
653
654
|
for (const n in t) {
|
|
654
655
|
const i = t[n];
|
|
655
|
-
r[i.buffer.uid] +=
|
|
656
|
+
r[i.buffer.uid] += J(i.format).stride;
|
|
656
657
|
}
|
|
657
658
|
for (const n in t) {
|
|
658
659
|
const i = t[n];
|
|
659
|
-
i.stride ?? (i.stride = r[i.buffer.uid]), i.start ?? (i.start = s[i.buffer.uid]), s[i.buffer.uid] +=
|
|
660
|
+
i.stride ?? (i.stride = r[i.buffer.uid]), i.start ?? (i.start = s[i.buffer.uid]), s[i.buffer.uid] += J(i.format).stride;
|
|
660
661
|
}
|
|
661
662
|
}
|
|
662
663
|
const x = [];
|
|
@@ -707,7 +708,7 @@ x[f.INVERSE_MASK_ACTIVE] = {
|
|
|
707
708
|
passOp: "keep"
|
|
708
709
|
}
|
|
709
710
|
};
|
|
710
|
-
class
|
|
711
|
+
class Gt {
|
|
711
712
|
constructor(e) {
|
|
712
713
|
this._syncFunctionHash = /* @__PURE__ */ Object.create(null), this._adaptor = e, this._systemCheck();
|
|
713
714
|
}
|
|
@@ -722,7 +723,7 @@ class It {
|
|
|
722
723
|
}
|
|
723
724
|
ensureUniformGroup(e) {
|
|
724
725
|
const t = this.getUniformGroupData(e);
|
|
725
|
-
e.buffer || (e.buffer = new
|
|
726
|
+
e.buffer || (e.buffer = new X({
|
|
726
727
|
data: new Float32Array(t.layout.size / 4),
|
|
727
728
|
usage: k.UNIFORM | k.COPY_DST
|
|
728
729
|
}));
|
|
@@ -747,7 +748,7 @@ class It {
|
|
|
747
748
|
}
|
|
748
749
|
syncUniformGroup(e, t, r) {
|
|
749
750
|
const s = this.getUniformGroupData(e);
|
|
750
|
-
e.buffer || (e.buffer = new
|
|
751
|
+
e.buffer || (e.buffer = new X({
|
|
751
752
|
data: new Float32Array(s.layout.size / 4),
|
|
752
753
|
usage: k.UNIFORM | k.COPY_DST
|
|
753
754
|
}));
|
|
@@ -873,7 +874,7 @@ const C = [
|
|
|
873
874
|
`
|
|
874
875
|
}
|
|
875
876
|
];
|
|
876
|
-
function
|
|
877
|
+
function Dt(a, e, t, r) {
|
|
877
878
|
const s = [`
|
|
878
879
|
var v = null;
|
|
879
880
|
var v2 = null;
|
|
@@ -928,7 +929,7 @@ function g(a, e) {
|
|
|
928
929
|
}
|
|
929
930
|
`;
|
|
930
931
|
}
|
|
931
|
-
const
|
|
932
|
+
const ot = {
|
|
932
933
|
f32: `
|
|
933
934
|
data[offset] = v;`,
|
|
934
935
|
i32: `
|
|
@@ -982,8 +983,8 @@ const it = {
|
|
|
982
983
|
"mat4x3<f32>": g(4, 3),
|
|
983
984
|
"mat2x4<f32>": g(2, 4),
|
|
984
985
|
"mat3x4<f32>": g(3, 4)
|
|
985
|
-
},
|
|
986
|
-
...
|
|
986
|
+
}, Et = {
|
|
987
|
+
...ot,
|
|
987
988
|
"mat2x2<f32>": `
|
|
988
989
|
data[offset] = v[0];
|
|
989
990
|
data[offset + 1] = v[1];
|
|
@@ -991,7 +992,7 @@ const it = {
|
|
|
991
992
|
data[offset + 3] = v[3];
|
|
992
993
|
`
|
|
993
994
|
};
|
|
994
|
-
function
|
|
995
|
+
function lt(a, e, t, r, s, n) {
|
|
995
996
|
const i = n ? 1 : -1;
|
|
996
997
|
return a.identity(), a.a = 1 / r * 2, a.d = i * (1 / s * 2), a.tx = -1 - e * a.a, a.ty = -i - t * a.d, a;
|
|
997
998
|
}
|
|
@@ -1010,7 +1011,7 @@ function Te(a, e) {
|
|
|
1010
1011
|
}
|
|
1011
1012
|
return _.get(a);
|
|
1012
1013
|
}
|
|
1013
|
-
function
|
|
1014
|
+
function ut(a) {
|
|
1014
1015
|
const e = a.colorTexture.source.resource;
|
|
1015
1016
|
return globalThis.HTMLCanvasElement && e instanceof HTMLCanvasElement && document.body.contains(e);
|
|
1016
1017
|
}
|
|
@@ -1110,7 +1111,7 @@ ye.defaultOptions = {
|
|
|
1110
1111
|
isRoot: !1
|
|
1111
1112
|
};
|
|
1112
1113
|
let G = ye;
|
|
1113
|
-
class
|
|
1114
|
+
class Ot {
|
|
1114
1115
|
constructor(e) {
|
|
1115
1116
|
this.rootViewPort = new w(), this.viewport = new w(), this.onRenderTargetChange = new Ne("onRenderTargetChange"), this.projectionMatrix = new v(), this.defaultClearColor = [0, 0, 0, 0], this._renderSurfaceToRenderTargetHash = /* @__PURE__ */ new Map(), this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null), this._renderTargetStack = [], this._renderer = e, e.renderableGC.addManagedHash(this, "_gpuRenderTargetHash");
|
|
1116
1117
|
}
|
|
@@ -1138,7 +1139,7 @@ class Et {
|
|
|
1138
1139
|
t,
|
|
1139
1140
|
r,
|
|
1140
1141
|
s
|
|
1141
|
-
), this.rootViewPort.copyFrom(this.viewport), this.rootRenderTarget = this.renderTarget, this.renderingToScreen =
|
|
1142
|
+
), this.rootViewPort.copyFrom(this.viewport), this.rootRenderTarget = this.renderTarget, this.renderingToScreen = ut(this.rootRenderTarget), (i = (n = this.adaptor).prerender) == null || i.call(n, this.rootRenderTarget);
|
|
1142
1143
|
}
|
|
1143
1144
|
postrender() {
|
|
1144
1145
|
var e, t;
|
|
@@ -1167,7 +1168,7 @@ class Et {
|
|
|
1167
1168
|
d.x = s.x * p + 0.5 | 0, d.y = s.y * p + 0.5 | 0, d.width = s.width * p + 0.5 | 0, d.height = s.height * p + 0.5 | 0;
|
|
1168
1169
|
} else
|
|
1169
1170
|
d.x = 0, d.y = 0, d.width = c, d.height = h;
|
|
1170
|
-
return
|
|
1171
|
+
return lt(
|
|
1171
1172
|
this.projectionMatrix,
|
|
1172
1173
|
0,
|
|
1173
1174
|
0,
|
|
@@ -1297,7 +1298,7 @@ class Et {
|
|
|
1297
1298
|
this.renderTarget = null, this.renderSurface = null;
|
|
1298
1299
|
}
|
|
1299
1300
|
}
|
|
1300
|
-
class
|
|
1301
|
+
class Ft extends je {
|
|
1301
1302
|
/**
|
|
1302
1303
|
* Create a new Buffer Resource.
|
|
1303
1304
|
* @param options - The options for the buffer resource
|
|
@@ -1358,7 +1359,7 @@ function D(a, e) {
|
|
|
1358
1359
|
e[n.renderPipeId].execute(n);
|
|
1359
1360
|
}
|
|
1360
1361
|
}
|
|
1361
|
-
const
|
|
1362
|
+
const dt = new v();
|
|
1362
1363
|
class Me {
|
|
1363
1364
|
constructor(e) {
|
|
1364
1365
|
this._renderer = e;
|
|
@@ -1382,7 +1383,7 @@ class Me {
|
|
|
1382
1383
|
_executeCacheAsTexture(e) {
|
|
1383
1384
|
if (e.textureNeedsUpdate) {
|
|
1384
1385
|
e.textureNeedsUpdate = !1;
|
|
1385
|
-
const t =
|
|
1386
|
+
const t = dt.identity().translate(
|
|
1386
1387
|
-e._textureBounds.x,
|
|
1387
1388
|
-e._textureBounds.y
|
|
1388
1389
|
);
|
|
@@ -1413,9 +1414,9 @@ function E(a, e) {
|
|
|
1413
1414
|
for (let t = e; t < a.length && a[t]; t++)
|
|
1414
1415
|
a[t] = null;
|
|
1415
1416
|
}
|
|
1416
|
-
const
|
|
1417
|
+
const ct = new P(), te = de | ce | he;
|
|
1417
1418
|
function Se(a, e = !1) {
|
|
1418
|
-
|
|
1419
|
+
ht(a);
|
|
1419
1420
|
const t = a.childrenToUpdate, r = a.updateTick++;
|
|
1420
1421
|
for (const s in t) {
|
|
1421
1422
|
const n = Number(s), i = t[s], o = i.list, l = i.index;
|
|
@@ -1429,7 +1430,7 @@ function Se(a, e = !1) {
|
|
|
1429
1430
|
for (let s = 0; s < a.renderGroupChildren.length; s++)
|
|
1430
1431
|
Se(a.renderGroupChildren[s], e);
|
|
1431
1432
|
}
|
|
1432
|
-
function
|
|
1433
|
+
function ht(a) {
|
|
1433
1434
|
const e = a.root;
|
|
1434
1435
|
let t;
|
|
1435
1436
|
if (a.renderGroupParent) {
|
|
@@ -1437,7 +1438,7 @@ function ct(a) {
|
|
|
1437
1438
|
a.worldTransform.appendFrom(
|
|
1438
1439
|
e.relativeGroupTransform,
|
|
1439
1440
|
r.worldTransform
|
|
1440
|
-
), a.worldColor =
|
|
1441
|
+
), a.worldColor = ue(
|
|
1441
1442
|
e.groupColor,
|
|
1442
1443
|
r.worldColor
|
|
1443
1444
|
), t = e.groupAlpha * r.worldAlpha;
|
|
@@ -1455,7 +1456,7 @@ function we(a, e, t) {
|
|
|
1455
1456
|
if (s && !s.renderGroup ? (t |= a._updateFlags, a.relativeGroupTransform.appendFrom(
|
|
1456
1457
|
r,
|
|
1457
1458
|
s.relativeGroupTransform
|
|
1458
|
-
), t &
|
|
1459
|
+
), t & te && re(a, s, t)) : (t = a._updateFlags, a.relativeGroupTransform.copyFrom(r), t & te && re(a, ct, t)), !a.renderGroup) {
|
|
1459
1460
|
const n = a.children, i = n.length;
|
|
1460
1461
|
for (let d = 0; d < i; d++)
|
|
1461
1462
|
we(n[d], e, t);
|
|
@@ -1463,18 +1464,18 @@ function we(a, e, t) {
|
|
|
1463
1464
|
l.renderPipeId && !o.structureDidChange && o.updateRenderable(l);
|
|
1464
1465
|
}
|
|
1465
1466
|
}
|
|
1466
|
-
function
|
|
1467
|
-
if (t &
|
|
1468
|
-
a.groupColor =
|
|
1467
|
+
function re(a, e, t) {
|
|
1468
|
+
if (t & ce) {
|
|
1469
|
+
a.groupColor = ue(
|
|
1469
1470
|
a.localColor,
|
|
1470
1471
|
e.groupColor
|
|
1471
1472
|
);
|
|
1472
1473
|
let r = a.localAlpha * e.groupAlpha;
|
|
1473
1474
|
r = r < 0 ? 0 : r > 1 ? 1 : r, a.groupAlpha = r, a.groupColorAlpha = a.groupColor + ((r * 255 | 0) << 24);
|
|
1474
1475
|
}
|
|
1475
|
-
t &
|
|
1476
|
+
t & he && (a.groupBlendMode = a.localBlendMode === "inherit" ? e.groupBlendMode : a.localBlendMode), t & de && (a.globalDisplayStatus = a.localDisplayStatus & e.globalDisplayStatus), a._updateFlags = 0;
|
|
1476
1477
|
}
|
|
1477
|
-
function
|
|
1478
|
+
function ft(a, e) {
|
|
1478
1479
|
const { list: t, index: r } = a.childrenRenderablesToUpdate;
|
|
1479
1480
|
let s = !1;
|
|
1480
1481
|
for (let n = 0; n < r; n++) {
|
|
@@ -1484,7 +1485,7 @@ function ht(a, e) {
|
|
|
1484
1485
|
}
|
|
1485
1486
|
return a.structureDidChange = s, s;
|
|
1486
1487
|
}
|
|
1487
|
-
const
|
|
1488
|
+
const pt = new v();
|
|
1488
1489
|
class Pe {
|
|
1489
1490
|
constructor(e) {
|
|
1490
1491
|
this._renderer = e;
|
|
@@ -1493,7 +1494,7 @@ class Pe {
|
|
|
1493
1494
|
const r = e.parent, s = e.renderGroup.renderGroupParent;
|
|
1494
1495
|
e.parent = null, e.renderGroup.renderGroupParent = null;
|
|
1495
1496
|
const n = this._renderer;
|
|
1496
|
-
let i =
|
|
1497
|
+
let i = pt;
|
|
1497
1498
|
t && (i = i.copyFrom(e.renderGroup.localTransform), e.renderGroup.localTransform.copyFrom(t));
|
|
1498
1499
|
const o = n.renderPipes;
|
|
1499
1500
|
this._updateCachedRenderGroups(e.renderGroup, null), this._updateRenderGroups(e.renderGroup), n.globalUniforms.start({
|
|
@@ -1518,20 +1519,20 @@ class Pe {
|
|
|
1518
1519
|
const r = e.root.getLocalBounds();
|
|
1519
1520
|
r.ceil();
|
|
1520
1521
|
const s = e.texture;
|
|
1521
|
-
e.texture && b.returnTexture(e.texture);
|
|
1522
|
-
const n = this._renderer, i = e.textureOptions.resolution || n.view.resolution, o = e.textureOptions.antialias ?? n.view.antialias
|
|
1523
|
-
e.texture = b.getOptimalTexture(
|
|
1522
|
+
e.texture && b.returnTexture(e.texture, !0);
|
|
1523
|
+
const n = this._renderer, i = e.textureOptions.resolution || n.view.resolution, o = e.textureOptions.antialias ?? n.view.antialias, l = e.textureOptions.scaleMode ?? "linear", d = b.getOptimalTexture(
|
|
1524
1524
|
r.width,
|
|
1525
1525
|
r.height,
|
|
1526
1526
|
i,
|
|
1527
1527
|
o
|
|
1528
|
-
)
|
|
1528
|
+
);
|
|
1529
|
+
d._source.style = new $e({ scaleMode: l }), e.texture = d, e._textureBounds || (e._textureBounds = new F()), e._textureBounds.copyFrom(r), s !== e.texture && e.renderGroupParent && (e.renderGroupParent.structureDidChange = !0);
|
|
1529
1530
|
}
|
|
1530
|
-
} else e.texture && (b.returnTexture(e.texture), e.texture = null);
|
|
1531
|
+
} else e.texture && (b.returnTexture(e.texture, !0), e.texture = null);
|
|
1531
1532
|
}
|
|
1532
1533
|
_updateRenderGroups(e) {
|
|
1533
1534
|
const t = this._renderer, r = t.renderPipes;
|
|
1534
|
-
if (e.runOnRender(t), e.instructionSet.renderPipes = r, e.structureDidChange ? E(e.childrenRenderablesToUpdate.list, 0) :
|
|
1535
|
+
if (e.runOnRender(t), e.instructionSet.renderPipes = r, e.structureDidChange ? E(e.childrenRenderablesToUpdate.list, 0) : ft(e, r), Se(e), e.structureDidChange ? (e.structureDidChange = !1, this._buildInstructions(e, t)) : this._updateRenderables(e), e.childrenRenderablesToUpdate.index = 0, t.renderPipes.batch.upload(e.instructionSet), !(e.isCachedAsTexture && !e.textureNeedsUpdate))
|
|
1535
1536
|
for (let s = 0; s < e.renderGroupChildren.length; s++)
|
|
1536
1537
|
this._updateRenderGroups(e.renderGroupChildren[s]);
|
|
1537
1538
|
}
|
|
@@ -1599,7 +1600,7 @@ Re.extension = {
|
|
|
1599
1600
|
],
|
|
1600
1601
|
name: "sprite"
|
|
1601
1602
|
};
|
|
1602
|
-
const
|
|
1603
|
+
const V = class Be {
|
|
1603
1604
|
constructor() {
|
|
1604
1605
|
this.clearBeforeRender = !0, this._backgroundColor = new A(0), this.color = this._backgroundColor, this.alpha = 1;
|
|
1605
1606
|
}
|
|
@@ -1637,7 +1638,7 @@ const W = class Be {
|
|
|
1637
1638
|
destroy() {
|
|
1638
1639
|
}
|
|
1639
1640
|
};
|
|
1640
|
-
|
|
1641
|
+
V.extension = {
|
|
1641
1642
|
type: [
|
|
1642
1643
|
u.WebGLSystem,
|
|
1643
1644
|
u.WebGPUSystem,
|
|
@@ -1646,7 +1647,7 @@ W.extension = {
|
|
|
1646
1647
|
name: "background",
|
|
1647
1648
|
priority: 0
|
|
1648
1649
|
};
|
|
1649
|
-
|
|
1650
|
+
V.defaultOptions = {
|
|
1650
1651
|
/**
|
|
1651
1652
|
* {@link WebGLOptions.backgroundAlpha}
|
|
1652
1653
|
* @default 1
|
|
@@ -1663,7 +1664,7 @@ W.defaultOptions = {
|
|
|
1663
1664
|
*/
|
|
1664
1665
|
clearBeforeRender: !0
|
|
1665
1666
|
};
|
|
1666
|
-
let
|
|
1667
|
+
let mt = V;
|
|
1667
1668
|
const y = {};
|
|
1668
1669
|
O.handle(u.BlendMode, (a) => {
|
|
1669
1670
|
if (!a.name)
|
|
@@ -1700,7 +1701,7 @@ class Ue {
|
|
|
1700
1701
|
return;
|
|
1701
1702
|
}
|
|
1702
1703
|
let r = this._filterHash[t];
|
|
1703
|
-
r || (r = this._filterHash[t] = new
|
|
1704
|
+
r || (r = this._filterHash[t] = new le(), r.filters = [new y[t]()]);
|
|
1704
1705
|
const s = {
|
|
1705
1706
|
renderPipeId: "filter",
|
|
1706
1707
|
action: "pushFilter",
|
|
@@ -1753,7 +1754,7 @@ const R = {
|
|
|
1753
1754
|
png: "image/png",
|
|
1754
1755
|
jpg: "image/jpeg",
|
|
1755
1756
|
webp: "image/webp"
|
|
1756
|
-
},
|
|
1757
|
+
}, N = class Ae {
|
|
1757
1758
|
/** @param renderer - The renderer this System works for. */
|
|
1758
1759
|
constructor(e) {
|
|
1759
1760
|
this._renderer = e;
|
|
@@ -1768,9 +1769,9 @@ const R = {
|
|
|
1768
1769
|
};
|
|
1769
1770
|
}
|
|
1770
1771
|
/**
|
|
1771
|
-
* Creates an
|
|
1772
|
+
* Creates an IImage from a display object or texture.
|
|
1772
1773
|
* @param options - Options for creating the image, or the target to extract
|
|
1773
|
-
* @returns Promise that resolves with the generated
|
|
1774
|
+
* @returns Promise that resolves with the generated IImage
|
|
1774
1775
|
* @example
|
|
1775
1776
|
* ```ts
|
|
1776
1777
|
* // Basic usage with a sprite
|
|
@@ -1796,10 +1797,11 @@ const R = {
|
|
|
1796
1797
|
* @see {@link ExtractImageOptions} For detailed options
|
|
1797
1798
|
* @see {@link ExtractSystem.base64} For base64 string output
|
|
1798
1799
|
* @see {@link ExtractSystem.canvas} For canvas output
|
|
1800
|
+
* @see {@link ImageLike} For the image interface
|
|
1799
1801
|
* @category rendering
|
|
1800
1802
|
*/
|
|
1801
1803
|
async image(e) {
|
|
1802
|
-
const t =
|
|
1804
|
+
const t = z.get().createImage();
|
|
1803
1805
|
return t.src = await this.base64(e), t;
|
|
1804
1806
|
}
|
|
1805
1807
|
/**
|
|
@@ -2073,21 +2075,21 @@ const R = {
|
|
|
2073
2075
|
this._renderer = null;
|
|
2074
2076
|
}
|
|
2075
2077
|
};
|
|
2076
|
-
|
|
2078
|
+
N.extension = {
|
|
2077
2079
|
type: [
|
|
2078
2080
|
u.WebGLSystem,
|
|
2079
2081
|
u.WebGPUSystem
|
|
2080
2082
|
],
|
|
2081
2083
|
name: "extract"
|
|
2082
2084
|
};
|
|
2083
|
-
|
|
2085
|
+
N.defaultImageOptions = {
|
|
2084
2086
|
format: "png",
|
|
2085
2087
|
quality: 1
|
|
2086
2088
|
};
|
|
2087
|
-
let
|
|
2088
|
-
class
|
|
2089
|
+
let vt = N;
|
|
2090
|
+
class j extends m {
|
|
2089
2091
|
static create(e) {
|
|
2090
|
-
return new
|
|
2092
|
+
return new j({
|
|
2091
2093
|
source: new T(e)
|
|
2092
2094
|
});
|
|
2093
2095
|
}
|
|
@@ -2102,7 +2104,7 @@ class N extends m {
|
|
|
2102
2104
|
return this.source.resize(e, t, r), this;
|
|
2103
2105
|
}
|
|
2104
2106
|
}
|
|
2105
|
-
const
|
|
2107
|
+
const gt = new w(), xt = new F(), _t = [0, 0, 0, 0];
|
|
2106
2108
|
class Ie {
|
|
2107
2109
|
constructor(e) {
|
|
2108
2110
|
this._renderer = e;
|
|
@@ -2153,10 +2155,10 @@ class Ie {
|
|
|
2153
2155
|
});
|
|
2154
2156
|
const t = e.resolution || this._renderer.resolution, r = e.antialias || this._renderer.view.antialias, s = e.target;
|
|
2155
2157
|
let n = e.clearColor;
|
|
2156
|
-
n ? n = Array.isArray(n) && n.length === 4 ? n : A.shared.setValue(n).toArray() : n =
|
|
2157
|
-
const i = ((d = e.frame) == null ? void 0 : d.copyTo(
|
|
2158
|
+
n ? n = Array.isArray(n) && n.length === 4 ? n : A.shared.setValue(n).toArray() : n = _t;
|
|
2159
|
+
const i = ((d = e.frame) == null ? void 0 : d.copyTo(gt)) || qe(s, xt).rectangle;
|
|
2158
2160
|
i.width = Math.max(i.width, 1 / t) | 0, i.height = Math.max(i.height, 1 / t) | 0;
|
|
2159
|
-
const o =
|
|
2161
|
+
const o = j.create({
|
|
2160
2162
|
...e.textureSourceOptions,
|
|
2161
2163
|
width: i.width,
|
|
2162
2164
|
height: i.height,
|
|
@@ -2206,7 +2208,7 @@ class Ge {
|
|
|
2206
2208
|
const i = this._renderer.renderTarget.renderTarget, o = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {
|
|
2207
2209
|
worldTransformMatrix: new v(),
|
|
2208
2210
|
worldColor: 4294967295,
|
|
2209
|
-
offset: new
|
|
2211
|
+
offset: new Ke()
|
|
2210
2212
|
}, l = {
|
|
2211
2213
|
projectionMatrix: t || this._renderer.renderTarget.projectionMatrix,
|
|
2212
2214
|
resolution: e || i.size,
|
|
@@ -2217,13 +2219,13 @@ class Ge {
|
|
|
2217
2219
|
}, d = this._uniformsPool.pop() || this._createUniforms();
|
|
2218
2220
|
this._activeUniforms.push(d);
|
|
2219
2221
|
const c = d.uniforms;
|
|
2220
|
-
c.uProjectionMatrix = l.projectionMatrix, c.uResolution = l.resolution, c.uWorldTransformMatrix.copyFrom(l.worldTransformMatrix), c.uWorldTransformMatrix.tx -= l.offset.x, c.uWorldTransformMatrix.ty -= l.offset.y,
|
|
2222
|
+
c.uProjectionMatrix = l.projectionMatrix, c.uResolution = l.resolution, c.uWorldTransformMatrix.copyFrom(l.worldTransformMatrix), c.uWorldTransformMatrix.tx -= l.offset.x, c.uWorldTransformMatrix.ty -= l.offset.y, Ze(
|
|
2221
2223
|
l.worldColor,
|
|
2222
2224
|
c.uWorldColorAlpha,
|
|
2223
2225
|
0
|
|
2224
2226
|
), d.update();
|
|
2225
2227
|
let h;
|
|
2226
|
-
this._renderer.renderPipes.uniformBatch ? h = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d, !1) : (h = this._bindGroupPool.pop() || new
|
|
2228
|
+
this._renderer.renderPipes.uniformBatch ? h = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d, !1) : (h = this._bindGroupPool.pop() || new Ye(), this._activeBindGroups.push(h), h.setResource(d, 0)), l.bindGroup = h, this._currentGlobalUniformData = l;
|
|
2227
2229
|
}
|
|
2228
2230
|
push(e) {
|
|
2229
2231
|
this.bind(e), this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData;
|
|
@@ -2241,7 +2243,7 @@ class Ge {
|
|
|
2241
2243
|
return this._currentGlobalUniformData.bindGroup.resources[0];
|
|
2242
2244
|
}
|
|
2243
2245
|
_createUniforms() {
|
|
2244
|
-
return new
|
|
2246
|
+
return new ie({
|
|
2245
2247
|
uProjectionMatrix: { value: new v(), type: "mat3x3<f32>" },
|
|
2246
2248
|
uWorldTransformMatrix: { value: new v(), type: "mat3x3<f32>" },
|
|
2247
2249
|
// TODO - someone smart - set this to be a unorm8x4 rather than a vec4<f32>
|
|
@@ -2263,14 +2265,14 @@ Ge.extension = {
|
|
|
2263
2265
|
],
|
|
2264
2266
|
name: "globalUniforms"
|
|
2265
2267
|
};
|
|
2266
|
-
let
|
|
2268
|
+
let bt = 1;
|
|
2267
2269
|
class De {
|
|
2268
2270
|
constructor() {
|
|
2269
2271
|
this._tasks = [], this._offset = 0;
|
|
2270
2272
|
}
|
|
2271
2273
|
/** Initializes the scheduler system and starts the ticker. */
|
|
2272
2274
|
init() {
|
|
2273
|
-
|
|
2275
|
+
Q.system.add(this._update, this);
|
|
2274
2276
|
}
|
|
2275
2277
|
/**
|
|
2276
2278
|
* Schedules a repeating task.
|
|
@@ -2280,7 +2282,7 @@ class De {
|
|
|
2280
2282
|
* @returns The unique identifier for the scheduled task.
|
|
2281
2283
|
*/
|
|
2282
2284
|
repeat(e, t, r = !0) {
|
|
2283
|
-
const s =
|
|
2285
|
+
const s = bt++;
|
|
2284
2286
|
let n = 0;
|
|
2285
2287
|
return r && (this._offset += 1e3, n = this._offset), this._tasks.push({
|
|
2286
2288
|
func: e,
|
|
@@ -2322,7 +2324,7 @@ class De {
|
|
|
2322
2324
|
* @internal
|
|
2323
2325
|
*/
|
|
2324
2326
|
destroy() {
|
|
2325
|
-
|
|
2327
|
+
Q.system.remove(this._update, this), this._tasks.length = 0;
|
|
2326
2328
|
}
|
|
2327
2329
|
}
|
|
2328
2330
|
De.extension = {
|
|
@@ -2334,12 +2336,12 @@ De.extension = {
|
|
|
2334
2336
|
name: "scheduler",
|
|
2335
2337
|
priority: 0
|
|
2336
2338
|
};
|
|
2337
|
-
let
|
|
2338
|
-
function
|
|
2339
|
-
if (!
|
|
2340
|
-
if (
|
|
2339
|
+
let se = !1;
|
|
2340
|
+
function Tt(a) {
|
|
2341
|
+
if (!se) {
|
|
2342
|
+
if (z.get().getNavigator().userAgent.toLowerCase().indexOf("chrome") > -1) {
|
|
2341
2343
|
const e = [
|
|
2342
|
-
`%c %c %c %c %c PixiJS %c v${
|
|
2344
|
+
`%c %c %c %c %c PixiJS %c v${Z} (${a}) http://www.pixijs.com/
|
|
2343
2345
|
|
|
2344
2346
|
`,
|
|
2345
2347
|
"background: #E72264; padding:5px 0;",
|
|
@@ -2350,11 +2352,11 @@ function bt(a) {
|
|
|
2350
2352
|
"color: #E72264; background: #FFFFFF; padding:5px 0;"
|
|
2351
2353
|
];
|
|
2352
2354
|
globalThis.console.log(...e);
|
|
2353
|
-
} else globalThis.console && globalThis.console.log(`PixiJS ${
|
|
2354
|
-
|
|
2355
|
+
} else globalThis.console && globalThis.console.log(`PixiJS ${Z} - ${a} - http://www.pixijs.com/`);
|
|
2356
|
+
se = !0;
|
|
2355
2357
|
}
|
|
2356
2358
|
}
|
|
2357
|
-
class
|
|
2359
|
+
class $ {
|
|
2358
2360
|
constructor(e) {
|
|
2359
2361
|
this._renderer = e;
|
|
2360
2362
|
}
|
|
@@ -2365,11 +2367,11 @@ class j {
|
|
|
2365
2367
|
init(e) {
|
|
2366
2368
|
if (e.hello) {
|
|
2367
2369
|
let t = this._renderer.name;
|
|
2368
|
-
this._renderer.type === L.WEBGL && (t += ` ${this._renderer.context.webGLVersion}`),
|
|
2370
|
+
this._renderer.type === L.WEBGL && (t += ` ${this._renderer.context.webGLVersion}`), Tt(t);
|
|
2369
2371
|
}
|
|
2370
2372
|
}
|
|
2371
2373
|
}
|
|
2372
|
-
|
|
2374
|
+
$.extension = {
|
|
2373
2375
|
type: [
|
|
2374
2376
|
u.WebGLSystem,
|
|
2375
2377
|
u.WebGPUSystem,
|
|
@@ -2378,11 +2380,11 @@ j.extension = {
|
|
|
2378
2380
|
name: "hello",
|
|
2379
2381
|
priority: -2
|
|
2380
2382
|
};
|
|
2381
|
-
|
|
2383
|
+
$.defaultOptions = {
|
|
2382
2384
|
/** {@link WebGLOptions.hello} */
|
|
2383
2385
|
hello: !1
|
|
2384
2386
|
};
|
|
2385
|
-
function
|
|
2387
|
+
function yt(a) {
|
|
2386
2388
|
let e = !1;
|
|
2387
2389
|
for (const r in a)
|
|
2388
2390
|
if (a[r] == null) {
|
|
@@ -2398,14 +2400,14 @@ function Tt(a) {
|
|
|
2398
2400
|
}
|
|
2399
2401
|
return t;
|
|
2400
2402
|
}
|
|
2401
|
-
function
|
|
2403
|
+
function kt(a) {
|
|
2402
2404
|
let e = 0;
|
|
2403
2405
|
for (let t = 0; t < a.length; t++)
|
|
2404
2406
|
a[t] == null ? e++ : a[t - e] = a[t];
|
|
2405
2407
|
return a.length -= e, a;
|
|
2406
2408
|
}
|
|
2407
|
-
let
|
|
2408
|
-
const
|
|
2409
|
+
let Ct = 0;
|
|
2410
|
+
const q = class Ee {
|
|
2409
2411
|
/**
|
|
2410
2412
|
* Creates a new RenderableGCSystem instance.
|
|
2411
2413
|
* @param renderer - The renderer this garbage collection system works for
|
|
@@ -2440,13 +2442,13 @@ const $ = class Ee {
|
|
|
2440
2442
|
), this._hashHandler = this._renderer.scheduler.repeat(
|
|
2441
2443
|
() => {
|
|
2442
2444
|
for (const t of this._managedHashes)
|
|
2443
|
-
t.context[t.hash] =
|
|
2445
|
+
t.context[t.hash] = yt(t.context[t.hash]);
|
|
2444
2446
|
},
|
|
2445
2447
|
this._frequency
|
|
2446
2448
|
), this._arrayHandler = this._renderer.scheduler.repeat(
|
|
2447
2449
|
() => {
|
|
2448
2450
|
for (const t of this._managedArrays)
|
|
2449
|
-
|
|
2451
|
+
kt(t.context[t.hash]);
|
|
2450
2452
|
},
|
|
2451
2453
|
this._frequency
|
|
2452
2454
|
)) : (this._renderer.scheduler.cancel(this._handler), this._renderer.scheduler.cancel(this._hashHandler), this._renderer.scheduler.cancel(this._arrayHandler)));
|
|
@@ -2475,7 +2477,7 @@ const $ = class Ee {
|
|
|
2475
2477
|
prerender({
|
|
2476
2478
|
container: e
|
|
2477
2479
|
}) {
|
|
2478
|
-
this._now = performance.now(), e.renderGroup.gcTick =
|
|
2480
|
+
this._now = performance.now(), e.renderGroup.gcTick = Ct++, this._updateInstructionGCTick(e.renderGroup, e.renderGroup.gcTick);
|
|
2479
2481
|
}
|
|
2480
2482
|
/**
|
|
2481
2483
|
* Starts tracking a renderable for garbage collection.
|
|
@@ -2533,7 +2535,7 @@ const $ = class Ee {
|
|
|
2533
2535
|
this._updateInstructionGCTick(r, t);
|
|
2534
2536
|
}
|
|
2535
2537
|
};
|
|
2536
|
-
|
|
2538
|
+
q.extension = {
|
|
2537
2539
|
type: [
|
|
2538
2540
|
u.WebGLSystem,
|
|
2539
2541
|
u.WebGPUSystem
|
|
@@ -2541,7 +2543,7 @@ $.extension = {
|
|
|
2541
2543
|
name: "renderableGC",
|
|
2542
2544
|
priority: 0
|
|
2543
2545
|
};
|
|
2544
|
-
|
|
2546
|
+
q.defaultOptions = {
|
|
2545
2547
|
/** Enable/disable the garbage collector */
|
|
2546
2548
|
renderableGCActive: !0,
|
|
2547
2549
|
/** Time in ms before an unused resource is collected (default 1 minute) */
|
|
@@ -2549,8 +2551,8 @@ $.defaultOptions = {
|
|
|
2549
2551
|
/** How often to run garbage collection in ms (default 30 seconds) */
|
|
2550
2552
|
renderableGCFrequency: 3e4
|
|
2551
2553
|
};
|
|
2552
|
-
let
|
|
2553
|
-
const
|
|
2554
|
+
let Mt = q;
|
|
2555
|
+
const K = class Oe {
|
|
2554
2556
|
/** @param renderer - The renderer this System works for. */
|
|
2555
2557
|
constructor(e) {
|
|
2556
2558
|
this._renderer = e, this.count = 0, this.checkCount = 0;
|
|
@@ -2580,14 +2582,14 @@ const q = class Oe {
|
|
|
2580
2582
|
this._renderer = null;
|
|
2581
2583
|
}
|
|
2582
2584
|
};
|
|
2583
|
-
|
|
2585
|
+
K.extension = {
|
|
2584
2586
|
type: [
|
|
2585
2587
|
u.WebGLSystem,
|
|
2586
2588
|
u.WebGPUSystem
|
|
2587
2589
|
],
|
|
2588
2590
|
name: "textureGC"
|
|
2589
2591
|
};
|
|
2590
|
-
|
|
2592
|
+
K.defaultOptions = {
|
|
2591
2593
|
/**
|
|
2592
2594
|
* If set to true, this will enable the garbage collector on the GPU.
|
|
2593
2595
|
* @default true
|
|
@@ -2609,8 +2611,8 @@ q.defaultOptions = {
|
|
|
2609
2611
|
*/
|
|
2610
2612
|
textureGCCheckCountMax: 600
|
|
2611
2613
|
};
|
|
2612
|
-
let
|
|
2613
|
-
const
|
|
2614
|
+
let St = K;
|
|
2615
|
+
const Y = class Fe {
|
|
2614
2616
|
/**
|
|
2615
2617
|
* Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.
|
|
2616
2618
|
* This is only supported for HTMLCanvasElement and will be ignored if the canvas is an OffscreenCanvas.
|
|
@@ -2641,7 +2643,7 @@ const K = class Fe {
|
|
|
2641
2643
|
e = {
|
|
2642
2644
|
...Fe.defaultOptions,
|
|
2643
2645
|
...e
|
|
2644
|
-
}, e.view && (
|
|
2646
|
+
}, e.view && (Je(Xe, "ViewSystem.view has been renamed to ViewSystem.canvas"), e.canvas = e.view), this.screen = new w(0, 0, e.width, e.height), this.canvas = e.canvas || z.get().createCanvas(), this.antialias = !!e.antialias, this.texture = Te(this.canvas, e), this.renderTarget = new G({
|
|
2645
2647
|
colorTextures: [this.texture],
|
|
2646
2648
|
depth: !!e.depth,
|
|
2647
2649
|
isRoot: !0
|
|
@@ -2668,7 +2670,7 @@ const K = class Fe {
|
|
|
2668
2670
|
(typeof e == "boolean" ? e : !!(e != null && e.removeView)) && this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
|
|
2669
2671
|
}
|
|
2670
2672
|
};
|
|
2671
|
-
|
|
2673
|
+
Y.extension = {
|
|
2672
2674
|
type: [
|
|
2673
2675
|
u.WebGLSystem,
|
|
2674
2676
|
u.WebGPUSystem,
|
|
@@ -2677,7 +2679,7 @@ K.extension = {
|
|
|
2677
2679
|
name: "view",
|
|
2678
2680
|
priority: 0
|
|
2679
2681
|
};
|
|
2680
|
-
|
|
2682
|
+
Y.defaultOptions = {
|
|
2681
2683
|
/**
|
|
2682
2684
|
* {@link WebGLOptions.width}
|
|
2683
2685
|
* @default 800
|
|
@@ -2699,20 +2701,20 @@ K.defaultOptions = {
|
|
|
2699
2701
|
*/
|
|
2700
2702
|
antialias: !1
|
|
2701
2703
|
};
|
|
2702
|
-
let
|
|
2703
|
-
const
|
|
2704
|
-
|
|
2704
|
+
let wt = Y;
|
|
2705
|
+
const Lt = [
|
|
2706
|
+
mt,
|
|
2705
2707
|
Ge,
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
+
$,
|
|
2709
|
+
wt,
|
|
2708
2710
|
Pe,
|
|
2709
|
-
|
|
2711
|
+
St,
|
|
2710
2712
|
Ie,
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2713
|
+
vt,
|
|
2714
|
+
Qe,
|
|
2715
|
+
Mt,
|
|
2714
2716
|
De
|
|
2715
|
-
],
|
|
2717
|
+
], Ht = [
|
|
2716
2718
|
Ue,
|
|
2717
2719
|
ge,
|
|
2718
2720
|
Re,
|
|
@@ -2723,17 +2725,17 @@ const Ft = [
|
|
|
2723
2725
|
Ce
|
|
2724
2726
|
];
|
|
2725
2727
|
export {
|
|
2726
|
-
|
|
2728
|
+
Ft as B,
|
|
2727
2729
|
x as G,
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2730
|
+
Ot as R,
|
|
2731
|
+
Lt as S,
|
|
2732
|
+
Gt as U,
|
|
2733
|
+
Ht as a,
|
|
2734
|
+
ot as b,
|
|
2735
|
+
Dt as c,
|
|
2734
2736
|
C as d,
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2737
|
+
It as e,
|
|
2738
|
+
At as f,
|
|
2739
|
+
Ut as t,
|
|
2740
|
+
Et as u
|
|
2739
2741
|
};
|