pixi-effects 0.40.0 → 0.41.0
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/CHANGELOG.md +8 -0
- package/README.md +5 -5
- package/ai/chat-template.html +3 -3
- package/ai/tools/check.mjs +19 -2
- package/dist/Composition-N6BOROJ2.cjs +16 -0
- package/dist/{Composition-C3UEVHQG.cjs.map → Composition-N6BOROJ2.cjs.map} +1 -1
- package/dist/Composition-YGBQX3HZ.js +7 -0
- package/dist/{Composition-KRWH72MA.js.map → Composition-YGBQX3HZ.js.map} +1 -1
- package/dist/Controller.d.cts +1 -1
- package/dist/Controller.d.ts +1 -1
- package/dist/{Movie-CG6Jy1tx.d.ts → Movie-CwqRLOzE.d.ts} +47 -1
- package/dist/{Movie-CMq4KFmc.d.cts → Movie-DWtxRiJ2.d.cts} +47 -1
- package/dist/{Spans-TWO4VN5H.js → Spans-6L2ZVECX.js} +4 -4
- package/dist/{Spans-TWO4VN5H.js.map → Spans-6L2ZVECX.js.map} +1 -1
- package/dist/{Spans-APNJHCYO.cjs → Spans-XTIWYSNO.cjs} +9 -9
- package/dist/{Spans-APNJHCYO.cjs.map → Spans-XTIWYSNO.cjs.map} +1 -1
- package/dist/{chunk-27PYJ4JY.cjs → chunk-3HZV3UHU.cjs} +67 -63
- package/dist/chunk-3HZV3UHU.cjs.map +1 -0
- package/dist/{chunk-LMWXR5OC.js → chunk-4QVQ5UJJ.js} +4 -4
- package/dist/{chunk-LMWXR5OC.js.map → chunk-4QVQ5UJJ.js.map} +1 -1
- package/dist/{chunk-26Z544SH.js → chunk-ICI6ACHY.js} +7 -3
- package/dist/chunk-ICI6ACHY.js.map +1 -0
- package/dist/{chunk-LEL7UNYQ.cjs → chunk-RN5FWGGM.cjs} +136 -39
- package/dist/chunk-RN5FWGGM.cjs.map +1 -0
- package/dist/{chunk-7EI2N7WO.cjs → chunk-X62H3RBG.cjs} +4 -4
- package/dist/{chunk-7EI2N7WO.cjs.map → chunk-X62H3RBG.cjs.map} +1 -1
- package/dist/{chunk-CT5CZVT5.js → chunk-Y2N6U3X5.js} +101 -4
- package/dist/chunk-Y2N6U3X5.js.map +1 -0
- package/dist/index.cjs +33 -33
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/loader.css +1 -1
- package/dist/present.cjs +3 -3
- package/dist/present.d.cts +1 -1
- package/dist/present.d.ts +1 -1
- package/dist/present.js +3 -3
- package/dist/three.cjs +52 -6
- package/dist/three.cjs.map +1 -1
- package/dist/three.d.cts +16 -1
- package/dist/three.d.ts +16 -1
- package/dist/three.js +49 -3
- package/dist/three.js.map +1 -1
- package/docs/api.md +17 -0
- package/docs/dsl.md +1 -1
- package/llms-full.txt +44 -3
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +2 -2
- package/skills/pixi-effects/reference/cheatsheet.md +1 -0
- package/skills/pixi-effects/reference/recipes.md +23 -0
- package/skills/pixi-effects/template.html +6 -6
- package/dist/Composition-C3UEVHQG.cjs +0 -16
- package/dist/Composition-KRWH72MA.js +0 -7
- package/dist/chunk-26Z544SH.js.map +0 -1
- package/dist/chunk-27PYJ4JY.cjs.map +0 -1
- package/dist/chunk-CT5CZVT5.js.map +0 -1
- package/dist/chunk-LEL7UNYQ.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
var
|
|
3
|
+
var chunkRN5FWGGM_cjs = require('./chunk-RN5FWGGM.cjs');
|
|
4
|
+
require('./chunk-3HZV3UHU.cjs');
|
|
5
|
+
var chunkX62H3RBG_cjs = require('./chunk-X62H3RBG.cjs');
|
|
6
6
|
var chunkLQDDDIC4_cjs = require('./chunk-LQDDDIC4.cjs');
|
|
7
7
|
require('./chunk-JN7JHNZR.cjs');
|
|
8
8
|
require('./chunk-3SAS3ZE5.cjs');
|
|
@@ -12,123 +12,123 @@ var chunkTWZNOUM7_cjs = require('./chunk-TWZNOUM7.cjs');
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, "Movie", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkRN5FWGGM_cjs.Movie; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "animateText", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkRN5FWGGM_cjs.animateText; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "audioEnvelope", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkRN5FWGGM_cjs.audioEnvelope; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "bpmEnvelope", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkRN5FWGGM_cjs.bpmEnvelope; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "cameraPath", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkRN5FWGGM_cjs.cameraPath; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "computeEnvelope", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkRN5FWGGM_cjs.computeEnvelope; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "dismissLoader", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkRN5FWGGM_cjs.dismissLoader; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "ease", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkRN5FWGGM_cjs.parseEase; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "failLoader", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkRN5FWGGM_cjs.failLoader; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "followPath", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkRN5FWGGM_cjs.followPath; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "kenBurns", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkRN5FWGGM_cjs.kenBurns; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "measureText", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkRN5FWGGM_cjs.measureText; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "musicBuffer", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkRN5FWGGM_cjs.musicBuffer; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "musicEnvelope", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkRN5FWGGM_cjs.musicEnvelope; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "musicEvents", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkRN5FWGGM_cjs.musicEvents; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "orbit", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkRN5FWGGM_cjs.orbit; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "particles", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkRN5FWGGM_cjs.particles; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "react", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkRN5FWGGM_cjs.react; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "resolveLoader", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkRN5FWGGM_cjs.resolveLoader; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "samplePath", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkRN5FWGGM_cjs.samplePath; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "splitText", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkRN5FWGGM_cjs.splitText; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "stagger", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkRN5FWGGM_cjs.stagger; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "wiggle", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkRN5FWGGM_cjs.wiggle; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "withFade", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkRN5FWGGM_cjs.withFade; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "Sequence", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkX62H3RBG_cjs.Sequence; }
|
|
112
112
|
});
|
|
113
113
|
Object.defineProperty(exports, "noise", {
|
|
114
114
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkX62H3RBG_cjs.noise; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "noise2", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkX62H3RBG_cjs.noise2; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "rand", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkX62H3RBG_cjs.rand; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "random", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkX62H3RBG_cjs.random; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "registerSequenceType", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkX62H3RBG_cjs.registerSequenceType; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "inspectSound", {
|
|
134
134
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ContactSheetOptions, F as FontReport, b as FrameEvent, I as InspectOptions, c as InspectReport, d as IssueGroup, L as LayerInfo, e as LoadProgressState, f as LoadStage, g as LoaderOption, h as LoopEvent, i as MotionBlurOptions, a as MotionBlurSpec, M as Movie, j as MovieErrorEvent, k as MovieOptions, O as OnionSkinOptions, P as ProgressEvent, R as RebuildOptions,
|
|
1
|
+
export { C as ContactSheetOptions, F as FontReport, b as FrameEvent, I as InspectOptions, c as InspectReport, d as IssueGroup, L as LayerInfo, e as LoadProgressState, f as LoadStage, g as LoaderOption, h as LoopEvent, i as MotionBlurOptions, a as MotionBlurSpec, M as Movie, j as MovieErrorEvent, k as MovieOptions, O as OnionSkinOptions, P as PickHit, l as PickOptions, m as ProgressEvent, R as RebuildOptions, n as RebuildReason, o as RebuildReport, p as RenderOptions, q as ReviewOptions, r as ReviewReport, S as SnapshotOptions, T as ThumbnailOptions, s as TimelineData, t as TimelineHtmlOptions, u as TimelineRow, v as TimelineSvgOptions, w as TimelineTransition, V as VolumeEvent, x as dismissLoader, y as failLoader, z as resolveLoader } from './Movie-DWtxRiJ2.cjs';
|
|
2
2
|
import { S as SequenceSpec, C as CompositionShape, I as ImageSequenceSpec, f as CameraSequenceSpec, K as Keyframe, g as TextSequenceSpec, M as MusicOptions, d as SequenceCommon } from './types-DIh93lFb.cjs';
|
|
3
3
|
export { h as ArcShapeSpec, A as AssetSpec, i as AudioAssetSpec, j as AudioMusicSpec, k as AudioSequenceSpec, l as AudioSfxSpec, B as BlendModeName, m as CanvasInfo, n as CanvasSequenceSpec, o as ChromaKeyFilterSpec, p as CircleShapeSpec, q as CompositionSequenceSpec, a as CompositionSpec, r as CrossfadeTransition, s as CustomFilterSpec, D as DipTransition, t as DissolveTransition, E as EllipseShapeSpec, u as Expr, F as FilterSpec, G as GradientSpec, v as IrisTransition, L as LightSequenceSpec, w as LineShapeSpec, x as LumaTransition, y as MaskRefSpec, z as MatteRefSpec, H as MusicDrum, J as MusicDrums, N as MusicInstrument, O as MusicLevel, Q as MusicTrack, R as NullSequenceSpec, U as PathShapeSpec, V as PolygonShapeSpec, e as PropValue, P as Props, W as RectShapeSpec, X as SfxKnobs, Y as SfxOptions, Z as SfxPreset, _ as SfxVoice, $ as ShaderSequenceSpec, a0 as ShapeSequenceSpec, a1 as SlideTransition, c as SpaceNow, b as Stop, a2 as StopSpec, a3 as TextSpan, a4 as TransitionCommon, T as TransitionSpec, a5 as VideoSequenceSpec, a6 as WipeTransition, a7 as ZoomTransition } from './types-DIh93lFb.cjs';
|
|
4
4
|
import { M as MusicEvents } from './soundEntry-DT13DNt8.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ContactSheetOptions, F as FontReport, b as FrameEvent, I as InspectOptions, c as InspectReport, d as IssueGroup, L as LayerInfo, e as LoadProgressState, f as LoadStage, g as LoaderOption, h as LoopEvent, i as MotionBlurOptions, a as MotionBlurSpec, M as Movie, j as MovieErrorEvent, k as MovieOptions, O as OnionSkinOptions, P as ProgressEvent, R as RebuildOptions,
|
|
1
|
+
export { C as ContactSheetOptions, F as FontReport, b as FrameEvent, I as InspectOptions, c as InspectReport, d as IssueGroup, L as LayerInfo, e as LoadProgressState, f as LoadStage, g as LoaderOption, h as LoopEvent, i as MotionBlurOptions, a as MotionBlurSpec, M as Movie, j as MovieErrorEvent, k as MovieOptions, O as OnionSkinOptions, P as PickHit, l as PickOptions, m as ProgressEvent, R as RebuildOptions, n as RebuildReason, o as RebuildReport, p as RenderOptions, q as ReviewOptions, r as ReviewReport, S as SnapshotOptions, T as ThumbnailOptions, s as TimelineData, t as TimelineHtmlOptions, u as TimelineRow, v as TimelineSvgOptions, w as TimelineTransition, V as VolumeEvent, x as dismissLoader, y as failLoader, z as resolveLoader } from './Movie-CwqRLOzE.js';
|
|
2
2
|
import { S as SequenceSpec, C as CompositionShape, I as ImageSequenceSpec, f as CameraSequenceSpec, K as Keyframe, g as TextSequenceSpec, M as MusicOptions, d as SequenceCommon } from './types-DIh93lFb.js';
|
|
3
3
|
export { h as ArcShapeSpec, A as AssetSpec, i as AudioAssetSpec, j as AudioMusicSpec, k as AudioSequenceSpec, l as AudioSfxSpec, B as BlendModeName, m as CanvasInfo, n as CanvasSequenceSpec, o as ChromaKeyFilterSpec, p as CircleShapeSpec, q as CompositionSequenceSpec, a as CompositionSpec, r as CrossfadeTransition, s as CustomFilterSpec, D as DipTransition, t as DissolveTransition, E as EllipseShapeSpec, u as Expr, F as FilterSpec, G as GradientSpec, v as IrisTransition, L as LightSequenceSpec, w as LineShapeSpec, x as LumaTransition, y as MaskRefSpec, z as MatteRefSpec, H as MusicDrum, J as MusicDrums, N as MusicInstrument, O as MusicLevel, Q as MusicTrack, R as NullSequenceSpec, U as PathShapeSpec, V as PolygonShapeSpec, e as PropValue, P as Props, W as RectShapeSpec, X as SfxKnobs, Y as SfxOptions, Z as SfxPreset, _ as SfxVoice, $ as ShaderSequenceSpec, a0 as ShapeSequenceSpec, a1 as SlideTransition, c as SpaceNow, b as Stop, a2 as StopSpec, a3 as TextSpan, a4 as TransitionCommon, T as TransitionSpec, a5 as VideoSequenceSpec, a6 as WipeTransition, a7 as ZoomTransition } from './types-DIh93lFb.js';
|
|
4
4
|
import { M as MusicEvents } from './soundEntry-DT13DNt8.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Movie, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, dismissLoader, parseEase as ease, failLoader, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, orbit, particles, react, resolveLoader, samplePath, splitText, stagger, wiggle, withFade } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
export { Sequence, noise, noise2, rand, random, registerSequenceType } from './chunk-
|
|
1
|
+
export { Movie, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, dismissLoader, parseEase as ease, failLoader, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, orbit, particles, react, resolveLoader, samplePath, splitText, stagger, wiggle, withFade } from './chunk-Y2N6U3X5.js';
|
|
2
|
+
import './chunk-ICI6ACHY.js';
|
|
3
|
+
export { Sequence, noise, noise2, rand, random, registerSequenceType } from './chunk-4QVQ5UJJ.js';
|
|
4
4
|
export { inspectSound } from './chunk-UHNSL2KJ.js';
|
|
5
5
|
import './chunk-VNP7QCJE.js';
|
|
6
6
|
import './chunk-32MMNDDN.js';
|
package/dist/loader.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* pixi-effects loader: one line of HTML on the page, a few lines of CSS, no JavaScript of your own.
|
|
3
3
|
*
|
|
4
|
-
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
4
|
+
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixi-effects@0.41.0/dist/loader.css">
|
|
5
5
|
* <div class="stage" style="position: relative"> <!-- any box the canvas sits in, with position: relative -->
|
|
6
6
|
* <canvas id="stage" width="1280" height="720"></canvas>
|
|
7
7
|
* <div class="pe-loader" data-label="LOADING"></div> <!-- or class="pe-loader pe-loader--bar" -->
|
package/dist/present.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('./chunk-
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
require('./chunk-RN5FWGGM.cjs');
|
|
4
|
+
require('./chunk-3HZV3UHU.cjs');
|
|
5
|
+
require('./chunk-X62H3RBG.cjs');
|
|
6
6
|
require('./chunk-LQDDDIC4.cjs');
|
|
7
7
|
require('./chunk-JN7JHNZR.cjs');
|
|
8
8
|
require('./chunk-3SAS3ZE5.cjs');
|
package/dist/present.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Movie, a as MotionBlurSpec } from './Movie-
|
|
1
|
+
import { M as Movie, a as MotionBlurSpec } from './Movie-DWtxRiJ2.cjs';
|
|
2
2
|
import { S as SequenceSpec, P as Props, K as Keyframe, T as TransitionSpec, a as CompositionSpec, b as Stop } from './types-DIh93lFb.cjs';
|
|
3
3
|
import 'pixi.js';
|
|
4
4
|
import './soundEntry-DT13DNt8.cjs';
|
package/dist/present.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Movie, a as MotionBlurSpec } from './Movie-
|
|
1
|
+
import { M as Movie, a as MotionBlurSpec } from './Movie-CwqRLOzE.js';
|
|
2
2
|
import { S as SequenceSpec, P as Props, K as Keyframe, T as TransitionSpec, a as CompositionSpec, b as Stop } from './types-DIh93lFb.js';
|
|
3
3
|
import 'pixi.js';
|
|
4
4
|
import './soundEntry-DT13DNt8.js';
|
package/dist/present.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import './chunk-Y2N6U3X5.js';
|
|
2
|
+
import './chunk-ICI6ACHY.js';
|
|
3
|
+
import './chunk-4QVQ5UJJ.js';
|
|
4
4
|
import './chunk-UHNSL2KJ.js';
|
|
5
5
|
import './chunk-VNP7QCJE.js';
|
|
6
6
|
import './chunk-32MMNDDN.js';
|
package/dist/three.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkX62H3RBG_cjs = require('./chunk-X62H3RBG.cjs');
|
|
4
4
|
require('./chunk-3SAS3ZE5.cjs');
|
|
5
5
|
require('./chunk-TWZNOUM7.cjs');
|
|
6
6
|
var pixi_js = require('pixi.js');
|
|
@@ -85,8 +85,10 @@ var LightMirror = class {
|
|
|
85
85
|
l.decay = 2;
|
|
86
86
|
intensity *= s.radius * s.radius;
|
|
87
87
|
} else if (s.falloff === "smooth") {
|
|
88
|
-
|
|
88
|
+
const reach = s.radius + Math.max(s.falloffDistance, 1e-3), p = s.radius / reach;
|
|
89
|
+
l.distance = reach * (0.8 + 0.45 * p);
|
|
89
90
|
l.decay = 0;
|
|
91
|
+
intensity *= 0.87 + 0.45 * p;
|
|
90
92
|
} else {
|
|
91
93
|
l.distance = 0;
|
|
92
94
|
l.decay = 0;
|
|
@@ -168,7 +170,7 @@ function releaseThree(kind) {
|
|
|
168
170
|
|
|
169
171
|
// src/three/ThreeSequence.ts
|
|
170
172
|
var NOT_PURE = /\bMath\s*\.\s*random\s*\(|\bDate\s*\.\s*now\s*\(|\bperformance\s*\.\s*now\s*\(|\bnew\s+Date\s*\(/;
|
|
171
|
-
var ThreeSequence = class extends
|
|
173
|
+
var ThreeSequence = class extends chunkX62H3RBG_cjs.Sequence {
|
|
172
174
|
_renderer = null;
|
|
173
175
|
/** The renderer this layer draws with (`'webgl'` or `'webgpu'`), once it is built. */
|
|
174
176
|
renderer = null;
|
|
@@ -201,7 +203,7 @@ var ThreeSequence = class extends chunk7EI2N7WO_cjs.Sequence {
|
|
|
201
203
|
if (typeof spec.update === "function" && NOT_PURE.test(spec.update.toString())) {
|
|
202
204
|
console.warn(`pixi-effects: three layer${spec.name ? ` "${spec.name}"` : ""}: update calls Math.random, Date.now, performance.now or new Date, so it is not deterministic: the same frame would draw differently in playback, in a seek and in an export. Derive the value from t`);
|
|
203
205
|
}
|
|
204
|
-
const scope =
|
|
206
|
+
const scope = chunkX62H3RBG_cjs.buildScope(this, this.parent, this.root);
|
|
205
207
|
const width = resolveDim(spec.width, scope) ?? this.parent?.width ?? this.root.width;
|
|
206
208
|
const height = resolveDim(spec.height, scope) ?? this.parent?.height ?? this.root.height;
|
|
207
209
|
const resolution = spec.resolution ?? 1;
|
|
@@ -308,6 +310,32 @@ var ThreeSequence = class extends chunk7EI2N7WO_cjs.Sequence {
|
|
|
308
310
|
this._draw(t);
|
|
309
311
|
this.target?.texture.source.update();
|
|
310
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* `movie.pick`: a ray through the point (u, v) of the layer's picture (0..1, v down) from the layer's camera, and what it meets first: the object's name (its own, or its nearest
|
|
315
|
+
* ancestor's that has one), where, and how far from the camera. Invisible objects and groups are not met. null when the ray meets nothing.
|
|
316
|
+
*/
|
|
317
|
+
pickAt(u, v) {
|
|
318
|
+
const scene = this._scene, camera = this._camera;
|
|
319
|
+
if (!scene || !camera) return null;
|
|
320
|
+
scene.updateMatrixWorld();
|
|
321
|
+
camera.updateMatrixWorld();
|
|
322
|
+
const ray = new three$1.Raycaster();
|
|
323
|
+
ray.setFromCamera(new three$1.Vector2(u * 2 - 1, -(v * 2 - 1)), camera);
|
|
324
|
+
const visibleChain = (o) => {
|
|
325
|
+
for (let n = o; n; n = n.parent) if (!n.visible) return false;
|
|
326
|
+
return true;
|
|
327
|
+
};
|
|
328
|
+
for (const hit of ray.intersectObjects(scene.children, true)) {
|
|
329
|
+
if (!visibleChain(hit.object)) continue;
|
|
330
|
+
let name = "";
|
|
331
|
+
for (let n = hit.object; n && n !== scene; n = n.parent) if (n.name) {
|
|
332
|
+
name = n.name;
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
return { object: name, point: hit.point.toArray(), distance: hit.distance, object3d: hit.object };
|
|
336
|
+
}
|
|
337
|
+
return null;
|
|
338
|
+
}
|
|
311
339
|
/**
|
|
312
340
|
* The determinism check (`check`, `movie.review()`): the scene drawn at a few moments in two orders, with one draw thrown away first, and the pictures compared, as the canvas layer
|
|
313
341
|
* does. A layer whose same frame is not the same picture (a clock, `Math.random`, a mixer advanced with `update(dt)`, any state that builds up from call to call) is reported.
|
|
@@ -399,6 +427,7 @@ var ThreeSequence = class extends chunk7EI2N7WO_cjs.Sequence {
|
|
|
399
427
|
if (spec.followLights) {
|
|
400
428
|
const mirror = this._lightMirror ??= new LightMirror(scene, Math.max(ctx.width, ctx.height) * 2);
|
|
401
429
|
mirror.update(space.lights);
|
|
430
|
+
if (!this._warnedSpace.has("inverseSquare")) this._checkInverseSquare(space.lights, scene, spec.name);
|
|
402
431
|
if (mirror.castsShadows && !ctx.renderer.shadowMap.enabled) ctx.renderer.shadowMap.enabled = true;
|
|
403
432
|
}
|
|
404
433
|
if (spec.followFog) {
|
|
@@ -406,6 +435,23 @@ var ThreeSequence = class extends chunk7EI2N7WO_cjs.Sequence {
|
|
|
406
435
|
(this._fogMirror ??= new FogMirror(scene)).update(space.fog);
|
|
407
436
|
}
|
|
408
437
|
}
|
|
438
|
+
/**
|
|
439
|
+
* An inverse-square light is held at full strength inside its `radius` by the composition; three's decay-2 light keeps rising (4x at half the radius, 11x at a third). When the scene has
|
|
440
|
+
* an object closer to such a light than 0.8 of its radius, say so once, with the way out. (The check is the scene's bounding box against the light's place: no object is measured.)
|
|
441
|
+
*/
|
|
442
|
+
_checkInverseSquare(lights, scene, name) {
|
|
443
|
+
const near = lights.filter((l) => l.falloff === "inverseSquare" && (l.kind === "point" || l.kind === "spot"));
|
|
444
|
+
if (!near.length) return;
|
|
445
|
+
const box = new three$1.Box3().setFromObject(scene);
|
|
446
|
+
if (box.isEmpty()) return;
|
|
447
|
+
for (const l of near) {
|
|
448
|
+
const d = box.distanceToPoint(new three$1.Vector3(l.x, -l.y, l.z));
|
|
449
|
+
if (d < 0.8 * l.radius) {
|
|
450
|
+
this._saidOnce("inverseSquare", `followLights: a light with falloff 'inverseSquare' and radius ${l.radius} is only ${Math.round(d)} px from the nearest part of the scene. The composition holds such a light at full strength inside its radius; three's inverse-square light keeps rising there (${Math.pow(l.radius / Math.max(d, 1), 2).toFixed(1)}x at that distance), so those parts come out much brighter. Make the radius smaller than that distance, or use falloff 'smooth' (it is fitted to the composition's curve)`, name);
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
409
455
|
/** followCamera shows the whole composition through the layer's picture: a layer of another shape would show it squeezed or cut. Said once at build. */
|
|
410
456
|
_checkFollowShape(width, height, name) {
|
|
411
457
|
const p = this.parent;
|
|
@@ -549,7 +595,7 @@ var ThreeSequence = class extends chunk7EI2N7WO_cjs.Sequence {
|
|
|
549
595
|
function resolveDim(v, scope) {
|
|
550
596
|
if (v === void 0) return void 0;
|
|
551
597
|
if (typeof v === "number") return v;
|
|
552
|
-
return
|
|
598
|
+
return chunkX62H3RBG_cjs.evaluateExpr(v, scope);
|
|
553
599
|
}
|
|
554
600
|
async function threeGltf(url, options = {}) {
|
|
555
601
|
const label = "pixi-effects: threeGltf";
|
|
@@ -641,7 +687,7 @@ function registerThree(options = {}) {
|
|
|
641
687
|
const kind = options.renderer ?? "webgl";
|
|
642
688
|
checkRendererKind(kind, "registerThree's renderer");
|
|
643
689
|
setPageRenderer(kind);
|
|
644
|
-
|
|
690
|
+
chunkX62H3RBG_cjs.registerSequenceType("three", ThreeSequence);
|
|
645
691
|
}
|
|
646
692
|
function three(spec) {
|
|
647
693
|
return spec;
|