@revideo/2d 0.3.7-alpha.975 → 0.3.7-beta.987
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/editor/editor/tsconfig.build.tsbuildinfo +1 -1
- package/editor/index.css +1 -1
- package/editor/index.js +529 -245
- package/editor/index.js.map +1 -1
- package/lib/code/CodeCursor.d.ts +74 -74
- package/lib/code/CodeCursor.js +352 -286
- package/lib/code/CodeDiffer.d.ts +21 -16
- package/lib/code/CodeDiffer.js +39 -41
- package/lib/code/CodeFragment.d.ts +16 -8
- package/lib/code/CodeFragment.js +36 -36
- package/lib/code/CodeHighlighter.d.ts +59 -59
- package/lib/code/CodeHighlighter.js +1 -1
- package/lib/code/CodeMetrics.d.ts +12 -8
- package/lib/code/CodeMetrics.js +26 -24
- package/lib/code/CodeRange.d.ts +21 -5
- package/lib/code/CodeRange.js +131 -124
- package/lib/code/CodeScope.d.ts +18 -8
- package/lib/code/CodeScope.js +59 -61
- package/lib/code/CodeSelection.d.ts +9 -4
- package/lib/code/CodeSelection.js +8 -8
- package/lib/code/CodeSignal.d.ts +74 -47
- package/lib/code/CodeSignal.js +206 -189
- package/lib/code/CodeTokenizer.d.ts +1 -1
- package/lib/code/CodeTokenizer.js +41 -41
- package/lib/code/DefaultHighlightStyle.d.ts +2 -2
- package/lib/code/DefaultHighlightStyle.js +96 -96
- package/lib/code/LezerHighlighter.d.ts +21 -19
- package/lib/code/LezerHighlighter.js +101 -101
- package/lib/code/diff.d.ts +12 -9
- package/lib/code/diff.js +218 -205
- package/lib/code/extractRange.d.ts +7 -4
- package/lib/code/extractRange.js +79 -71
- package/lib/code/index.d.ts +1 -1
- package/lib/code/index.js +1 -1
- package/lib/components/Audio.d.ts +11 -11
- package/lib/components/Audio.js +120 -114
- package/lib/components/Bezier.d.ts +18 -18
- package/lib/components/Bezier.js +86 -75
- package/lib/components/Circle.d.ts +95 -90
- package/lib/components/Code.d.ts +244 -211
- package/lib/components/CubicBezier.d.ts +36 -36
- package/lib/components/Curve.d.ts +208 -198
- package/lib/components/Grid.d.ts +47 -42
- package/lib/components/Icon.d.ts +55 -50
- package/lib/components/Img.d.ts +86 -79
- package/lib/components/Knot.d.ts +97 -78
- package/lib/components/Latex.d.ts +12 -12
- package/lib/components/Layout.d.ts +455 -413
- package/lib/components/Line.d.ts +61 -49
- package/lib/components/Polygon.d.ts +60 -55
- package/lib/components/QuadBezier.d.ts +29 -29
- package/lib/components/Ray.d.ts +28 -28
- package/lib/components/Rect.d.ts +115 -108
- package/lib/components/Spline.d.ts +46 -40
- package/lib/components/Txt.d.ts +55 -44
- package/lib/components/TxtLeaf.d.ts +20 -16
- package/lib/components/Video.d.ts.map +1 -1
- package/lib/components/Video.js +3 -1
- package/lib/components/View2D.d.ts +22 -22
- package/lib/components/index.d.ts +1 -1
- package/lib/components/types.d.ts +22 -9
- package/lib/curves/ArcSegment.d.ts +36 -24
- package/lib/curves/CircleSegment.d.ts +26 -16
- package/lib/curves/CubicBezierSegment.d.ts +18 -13
- package/lib/curves/CurveDrawingInfo.d.ts +9 -9
- package/lib/curves/CurvePoint.d.ts +13 -13
- package/lib/curves/CurveProfile.d.ts +5 -5
- package/lib/curves/CurveProfile.js +1 -1
- package/lib/curves/KnotInfo.d.ts +8 -8
- package/lib/curves/LineSegment.d.ts +19 -14
- package/lib/curves/Polynomial.d.ts +110 -110
- package/lib/curves/Polynomial2D.d.ts +20 -20
- package/lib/curves/PolynomialSegment.d.ts +42 -37
- package/lib/curves/QuadBezierSegment.d.ts +12 -12
- package/lib/curves/Segment.d.ts +12 -7
- package/lib/curves/UniformPolynomialCurveSampler.d.ts +34 -34
- package/lib/curves/createCurveProfileLerp.d.ts +17 -6
- package/lib/curves/getBezierSplineProfile.d.ts +8 -4
- package/lib/curves/getCircleProfile.d.ts +10 -4
- package/lib/curves/getPathProfile.d.ts +2 -2
- package/lib/curves/getPointAtDistance.d.ts +7 -4
- package/lib/curves/getPolylineProfile.d.ts +8 -4
- package/lib/curves/getRectProfile.d.ts +9 -4
- package/lib/curves/index.d.ts +1 -1
- package/lib/curves/index.js +1 -1
- package/lib/decorators/canvasStyleSignal.d.ts +3 -3
- package/lib/decorators/colorSignal.d.ts +1 -1
- package/lib/decorators/compound.d.ts +4 -2
- package/lib/decorators/computed.d.ts +1 -1
- package/lib/decorators/defaultStyle.d.ts +5 -2
- package/lib/decorators/filtersSignal.d.ts +28 -8
- package/lib/decorators/index.d.ts +1 -1
- package/lib/decorators/index.js +1 -1
- package/lib/decorators/initializers.d.ts +5 -2
- package/lib/decorators/initializers.js +18 -19
- package/lib/decorators/nodeName.d.ts +1 -1
- package/lib/decorators/nodeName.js +4 -4
- package/lib/decorators/signal.d.ts +40 -20
- package/lib/decorators/spacingSignal.d.ts +1 -1
- package/lib/decorators/vector2Signal.d.ts +13 -7
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/jsx-dev-runtime.d.ts +3 -3
- package/lib/jsx-dev-runtime.js +3 -3
- package/lib/jsx-runtime.d.ts +19 -9
- package/lib/jsx-runtime.js +18 -18
- package/lib/partials/Filter.d.ts +24 -16
- package/lib/partials/Gradient.d.ts +30 -24
- package/lib/partials/Pattern.d.ts +14 -9
- package/lib/partials/ShaderConfig.d.ts +81 -74
- package/lib/partials/index.d.ts +1 -1
- package/lib/partials/index.js +1 -1
- package/lib/partials/types.d.ts +19 -6
- package/lib/scenes/Scene2D.d.ts +42 -23
- package/lib/scenes/index.d.ts +1 -1
- package/lib/scenes/index.js +1 -1
- package/lib/scenes/makeScene2D.d.ts +7 -5
- package/lib/scenes/useScene2D.d.ts +2 -2
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/utils/diff.d.ts +25 -18
- package/lib/utils/diff.js +84 -87
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/is.d.ts +4 -2
- package/lib/utils/is.js +2 -2
- package/lib/utils/makeSignalExtensions.d.ts +11 -4
- package/package.json +4 -4
- package/src/lib/components/Audio.ts +1 -1
- package/src/lib/components/Media.ts +24 -0
- package/src/lib/components/Video.ts +1 -1
- package/src/lib/scenes/Scene2D.ts +2 -2
package/editor/index.js
CHANGED
|
@@ -1,340 +1,624 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
signal,
|
|
4
|
+
useComputed,
|
|
5
|
+
useSignal,
|
|
6
|
+
useSignalEffect,
|
|
7
|
+
} from '@preact/signals';
|
|
8
|
+
import {NODE_NAME} from '@revideo/2d';
|
|
9
|
+
import {SceneRenderEvent, Vector2} from '@revideo/core';
|
|
10
|
+
import {
|
|
11
|
+
AccountTree,
|
|
12
|
+
AutoField,
|
|
13
|
+
Button,
|
|
14
|
+
Collapse,
|
|
15
|
+
Group,
|
|
16
|
+
Label,
|
|
17
|
+
MouseButton,
|
|
18
|
+
OverlayWrapper,
|
|
19
|
+
Pane,
|
|
20
|
+
Separator,
|
|
21
|
+
Tab,
|
|
22
|
+
Toggle,
|
|
23
|
+
UnknownField,
|
|
24
|
+
emphasize,
|
|
25
|
+
findAndOpenFirstUserFile,
|
|
26
|
+
makeEditorPlugin,
|
|
27
|
+
useApplication,
|
|
28
|
+
useCurrentScene,
|
|
29
|
+
usePanels,
|
|
30
|
+
useReducedMotion,
|
|
31
|
+
useViewportContext,
|
|
32
|
+
useViewportMatrix,
|
|
33
|
+
} from '@revideo/ui';
|
|
34
|
+
import {createContext} from 'preact';
|
|
35
|
+
import {useContext, useEffect, useMemo, useRef} from 'preact/hooks';
|
|
36
|
+
import {Fragment, jsx, jsxs} from 'preact/jsx-runtime';
|
|
1
37
|
import './index.css';
|
|
2
|
-
import { useApplication, useCurrentScene, Pane, Separator, Group, Label, Button, findAndOpenFirstUserFile, UnknownField, AutoField, useViewportContext, useViewportMatrix, OverlayWrapper, MouseButton, Toggle, Collapse, usePanels, useReducedMotion, emphasize, Tab, AccountTree, makeEditorPlugin } from '@revideo/ui';
|
|
3
|
-
import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
|
|
4
|
-
import { signal, computed, useSignalEffect, useComputed, useSignal } from '@preact/signals';
|
|
5
|
-
import { SceneRenderEvent, Vector2 } from '@revideo/core';
|
|
6
|
-
import { createContext } from 'preact';
|
|
7
|
-
import { useMemo, useContext, useRef, useEffect } from 'preact/hooks';
|
|
8
|
-
import { NODE_NAME } from '@revideo/2d';
|
|
9
38
|
|
|
10
39
|
const PluginContext = createContext(null);
|
|
11
40
|
const NodeInspectorKey = '@revideo/2d/node-inspector';
|
|
12
41
|
function usePluginState() {
|
|
13
|
-
|
|
42
|
+
return useContext(PluginContext);
|
|
14
43
|
}
|
|
15
|
-
function Provider({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return chain;
|
|
36
|
-
});
|
|
37
|
-
return {
|
|
38
|
-
selectedKey,
|
|
39
|
-
hoveredKey,
|
|
40
|
-
afterRender,
|
|
41
|
-
openNodes,
|
|
42
|
-
selectedChain,
|
|
43
|
-
scene,
|
|
44
|
-
};
|
|
45
|
-
}, []);
|
|
46
|
-
state.scene.value = currentScene;
|
|
47
|
-
useSignalEffect(() => state.scene.value?.onRenderLifecycle.subscribe(([event]) => {
|
|
48
|
-
if (event === SceneRenderEvent.AfterRender) {
|
|
49
|
-
state.afterRender.value++;
|
|
50
|
-
}
|
|
51
|
-
}));
|
|
52
|
-
useSignalEffect(() => {
|
|
53
|
-
const { key, payload } = inspection.value;
|
|
54
|
-
if (key === NodeInspectorKey) {
|
|
55
|
-
state.selectedKey.value = payload;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
useSignalEffect(() => {
|
|
59
|
-
const nodeKey = state.selectedKey.value;
|
|
60
|
-
const { key, payload } = inspection.peek();
|
|
61
|
-
if (key === NodeInspectorKey && !nodeKey) {
|
|
62
|
-
inspection.value = { key: '', payload: null };
|
|
63
|
-
}
|
|
64
|
-
else if (payload !== nodeKey) {
|
|
65
|
-
inspection.value = { key: NodeInspectorKey, payload: nodeKey };
|
|
44
|
+
function Provider({children}) {
|
|
45
|
+
const {inspection} = useApplication();
|
|
46
|
+
const currentScene = useCurrentScene();
|
|
47
|
+
const state = useMemo(() => {
|
|
48
|
+
const scene = signal(currentScene);
|
|
49
|
+
const selectedKey = signal(null);
|
|
50
|
+
const afterRender = signal(0);
|
|
51
|
+
const hoveredKey = signal(null);
|
|
52
|
+
const openNodes = new Map();
|
|
53
|
+
const selectedChain = computed(() => {
|
|
54
|
+
const chain = new Set();
|
|
55
|
+
const key = selectedKey.value;
|
|
56
|
+
const selectedNode = scene.value?.getNode(key);
|
|
57
|
+
if (selectedNode) {
|
|
58
|
+
let node = selectedNode.parent() ?? null;
|
|
59
|
+
while (node) {
|
|
60
|
+
chain.add(node.key);
|
|
61
|
+
node = node.parent();
|
|
66
62
|
}
|
|
63
|
+
}
|
|
64
|
+
return chain;
|
|
67
65
|
});
|
|
68
|
-
return
|
|
66
|
+
return {
|
|
67
|
+
selectedKey,
|
|
68
|
+
hoveredKey,
|
|
69
|
+
afterRender,
|
|
70
|
+
openNodes,
|
|
71
|
+
selectedChain,
|
|
72
|
+
scene,
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
state.scene.value = currentScene;
|
|
76
|
+
useSignalEffect(() =>
|
|
77
|
+
state.scene.value?.onRenderLifecycle.subscribe(([event]) => {
|
|
78
|
+
if (event === SceneRenderEvent.AfterRender) {
|
|
79
|
+
state.afterRender.value++;
|
|
80
|
+
}
|
|
81
|
+
}),
|
|
82
|
+
);
|
|
83
|
+
useSignalEffect(() => {
|
|
84
|
+
const {key, payload} = inspection.value;
|
|
85
|
+
if (key === NodeInspectorKey) {
|
|
86
|
+
state.selectedKey.value = payload;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
useSignalEffect(() => {
|
|
90
|
+
const nodeKey = state.selectedKey.value;
|
|
91
|
+
const {key, payload} = inspection.peek();
|
|
92
|
+
if (key === NodeInspectorKey && !nodeKey) {
|
|
93
|
+
inspection.value = {key: '', payload: null};
|
|
94
|
+
} else if (payload !== nodeKey) {
|
|
95
|
+
inspection.value = {key: NodeInspectorKey, payload: nodeKey};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
return jsx(PluginContext.Provider, {value: state, children: children});
|
|
69
99
|
}
|
|
70
100
|
|
|
71
101
|
function Component$1() {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
const {inspection} = useApplication();
|
|
103
|
+
const {scene, afterRender} = usePluginState();
|
|
104
|
+
const node = useComputed(() => {
|
|
105
|
+
afterRender.value;
|
|
106
|
+
const {payload} = inspection.value;
|
|
107
|
+
return scene.value?.getNode(payload);
|
|
108
|
+
});
|
|
109
|
+
const attributes = useComputed(() => {
|
|
110
|
+
afterRender.value;
|
|
111
|
+
const currentNode = node.value;
|
|
112
|
+
const attributes = [];
|
|
113
|
+
if (currentNode) {
|
|
114
|
+
for (const {key, meta, signal} of currentNode) {
|
|
115
|
+
if (!meta.inspectable) continue;
|
|
116
|
+
attributes.push([key, signal()]);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return attributes;
|
|
120
|
+
});
|
|
121
|
+
const stack = node.value?.creationStack;
|
|
122
|
+
return jsxs(Pane, {
|
|
123
|
+
title: 'Node Inspector',
|
|
124
|
+
id: 'node-inspector-pane',
|
|
125
|
+
children: [
|
|
126
|
+
jsx(Separator, {size: 1}),
|
|
127
|
+
stack &&
|
|
128
|
+
jsxs(Group, {
|
|
129
|
+
children: [
|
|
130
|
+
jsx(Label, {}),
|
|
131
|
+
jsx(Button, {
|
|
132
|
+
onClick: () => findAndOpenFirstUserFile(stack),
|
|
133
|
+
main: true,
|
|
134
|
+
children: 'GO TO SOURCE',
|
|
135
|
+
}),
|
|
136
|
+
],
|
|
137
|
+
}),
|
|
138
|
+
jsxs(Group, {
|
|
139
|
+
children: [
|
|
140
|
+
jsx(Label, {children: 'key'}),
|
|
141
|
+
jsx(UnknownField, {value: inspection.value.payload}),
|
|
142
|
+
],
|
|
143
|
+
}),
|
|
144
|
+
!node.value &&
|
|
145
|
+
jsxs(Group, {
|
|
146
|
+
children: [
|
|
147
|
+
jsx(Label, {}),
|
|
148
|
+
"Couldn't find the node. It may have been deleted or doesn't exist yet.",
|
|
149
|
+
],
|
|
150
|
+
}),
|
|
151
|
+
attributes.value.map(([key, value]) =>
|
|
152
|
+
jsxs(
|
|
153
|
+
Group,
|
|
154
|
+
{
|
|
155
|
+
children: [
|
|
156
|
+
jsx(Label, {children: key}),
|
|
157
|
+
jsx(AutoField, {value: value}),
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
key,
|
|
161
|
+
),
|
|
162
|
+
),
|
|
163
|
+
],
|
|
164
|
+
});
|
|
94
165
|
}
|
|
95
166
|
const NodeInspectorConfig = {
|
|
96
|
-
|
|
97
|
-
|
|
167
|
+
key: NodeInspectorKey,
|
|
168
|
+
component: Component$1,
|
|
98
169
|
};
|
|
99
170
|
|
|
100
|
-
function Component({
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
171
|
+
function Component({children}) {
|
|
172
|
+
const state = useViewportContext();
|
|
173
|
+
const {scene, selectedKey} = usePluginState();
|
|
174
|
+
const matrix = useViewportMatrix();
|
|
175
|
+
return jsx(OverlayWrapper, {
|
|
176
|
+
onPointerDown: event => {
|
|
177
|
+
if (event.button !== MouseButton.Left || event.shiftKey) return;
|
|
178
|
+
if (!scene.value) return;
|
|
179
|
+
event.stopPropagation();
|
|
180
|
+
const position = new Vector2(
|
|
181
|
+
event.x - state.rect.x,
|
|
182
|
+
event.y - state.rect.y,
|
|
183
|
+
).transformAsPoint(matrix.inverse());
|
|
184
|
+
selectedKey.value = scene.value.inspectPosition(position.x, position.y);
|
|
185
|
+
},
|
|
186
|
+
children: children,
|
|
187
|
+
});
|
|
113
188
|
}
|
|
114
189
|
function drawHook() {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
};
|
|
190
|
+
const {selectedKey, hoveredKey, afterRender, scene} = usePluginState();
|
|
191
|
+
selectedKey.value;
|
|
192
|
+
hoveredKey.value;
|
|
193
|
+
afterRender.value;
|
|
194
|
+
return (ctx, matrix) => {
|
|
195
|
+
const currentScene = scene.peek();
|
|
196
|
+
if (!currentScene) return;
|
|
197
|
+
let node = currentScene.getNode(selectedKey.value);
|
|
198
|
+
if (node) {
|
|
199
|
+
currentScene.drawOverlay(node.key, matrix, ctx);
|
|
200
|
+
}
|
|
201
|
+
node = currentScene.getNode(hoveredKey.value);
|
|
202
|
+
if (node && hoveredKey.value !== selectedKey.value) {
|
|
203
|
+
ctx.globalAlpha = 0.5;
|
|
204
|
+
currentScene.drawOverlay(hoveredKey.value, matrix, ctx);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
133
207
|
}
|
|
134
208
|
const PreviewOverlayConfig = {
|
|
135
|
-
|
|
136
|
-
|
|
209
|
+
drawHook,
|
|
210
|
+
component: Component,
|
|
137
211
|
};
|
|
138
212
|
|
|
139
213
|
function CircleIcon() {
|
|
140
|
-
|
|
214
|
+
return jsx('svg', {
|
|
215
|
+
viewBox: '0 0 20 20',
|
|
216
|
+
fill: 'currentColor',
|
|
217
|
+
children: jsx('path', {
|
|
218
|
+
d: 'M10,5C12.76,5 15,7.24 15,10C15,12.76 12.76,15 10,15C7.24,15 5,12.76 5,10C5,7.24 7.24,5 10,5ZM10,7C8.344,7 7,8.344 7,10C7,11.656 8.344,13 10,13C11.656,13 13,11.656 13,10C13,8.344 11.656,7 10,7Z',
|
|
219
|
+
}),
|
|
220
|
+
});
|
|
141
221
|
}
|
|
142
222
|
|
|
143
223
|
function CodeBlockIcon() {
|
|
144
|
-
|
|
224
|
+
return jsxs('svg', {
|
|
225
|
+
viewBox: '0 0 20 20',
|
|
226
|
+
fill: 'currentColor',
|
|
227
|
+
children: [
|
|
228
|
+
jsx('path', {
|
|
229
|
+
d: 'M5,9L5,6.999C5,6.469 5.211,5.96 5.585,5.586C5.96,5.211 6.469,5 6.999,5L9,5L9,7L6.999,7L7,9L7,11L7,13L8.985,13L9,15L7,15C5.895,15 5,14.105 5,13L5,11L4,11L4,9L5,9Z',
|
|
230
|
+
}),
|
|
231
|
+
jsx('path', {
|
|
232
|
+
d: 'M15,11L15,13.001C15,13.531 14.789,14.04 14.415,14.414C14.04,14.789 13.531,15 13.001,15L11,15L11,13L13,13L13,11L13,9L13,7L11.015,7L11,5L13,5C14.105,5 15,5.895 15,7L15,9L16,9L16,11L15,11Z',
|
|
233
|
+
}),
|
|
234
|
+
],
|
|
235
|
+
});
|
|
145
236
|
}
|
|
146
237
|
|
|
147
238
|
function CurveIcon() {
|
|
148
|
-
|
|
239
|
+
return jsx('svg', {
|
|
240
|
+
viewBox: '0 0 20 20',
|
|
241
|
+
fill: 'currentColor',
|
|
242
|
+
children: jsx('path', {
|
|
243
|
+
d: 'M12.19,6.47L13.595,5.047C15.519,6.947 15.187,8.932 14.229,9.951C13.675,10.541 12.879,10.861 12.016,10.767C11.261,10.685 10.426,10.278 9.708,9.348C9.292,8.809 8.878,8.441 8.471,8.249C8.217,8.13 7.979,8.084 7.77,8.154C7.565,8.222 7.409,8.394 7.287,8.621C7.097,8.975 7.001,9.444 7,10.003C6.996,11.584 7.848,12.746 8.91,12.946C9.535,13.064 10.185,12.783 10.687,12.082L12.313,13.247C11,15.079 9.118,15.344 7.581,14.591C6.161,13.896 4.994,12.246 5,9.997C5.005,7.945 5.963,6.649 7.136,6.257C8.281,5.874 9.866,6.278 11.292,8.126C11.81,8.799 12.421,8.954 12.772,8.581C13.196,8.13 13.042,7.312 12.19,6.47Z',
|
|
244
|
+
}),
|
|
245
|
+
});
|
|
149
246
|
}
|
|
150
247
|
|
|
151
248
|
function GridIcon() {
|
|
152
|
-
|
|
249
|
+
return jsx('svg', {
|
|
250
|
+
viewBox: '0 0 20 20',
|
|
251
|
+
fill: 'currentColor',
|
|
252
|
+
children: jsx('path', {
|
|
253
|
+
d: 'M6,8L4,8L4,6L6,6L6,4L8,4L8,6L12,6L12,4L14,4L14,6L16,6L16,8L14,8L14,12L16,12L16,14L14,14L14,16L12,16L12,14L8,14L8,16L6,16L6,14L4,14L4,12L6,12L6,8ZM8,12L12,12L12,8L8,8L8,12Z',
|
|
254
|
+
}),
|
|
255
|
+
});
|
|
153
256
|
}
|
|
154
257
|
|
|
155
258
|
function ImgIcon() {
|
|
156
|
-
|
|
259
|
+
return jsxs('svg', {
|
|
260
|
+
viewBox: '0 0 20 20',
|
|
261
|
+
fill: 'currentColor',
|
|
262
|
+
children: [
|
|
263
|
+
jsx('path', {d: 'M5,15L15,15L15,10L13,8L8,13L5,10L5,15Z'}),
|
|
264
|
+
jsx('circle', {cx: '8', cy: '7', r: '2'}),
|
|
265
|
+
],
|
|
266
|
+
});
|
|
157
267
|
}
|
|
158
268
|
|
|
159
269
|
function LayoutIcon() {
|
|
160
|
-
|
|
270
|
+
return jsxs('svg', {
|
|
271
|
+
viewBox: '0 0 20 20',
|
|
272
|
+
fill: 'currentColor',
|
|
273
|
+
children: [
|
|
274
|
+
jsx('path', {
|
|
275
|
+
d: 'M14,5C14.552,5 15,5.448 15,6C15,7.916 15,12.084 15,14C15,14.552 14.552,15 14,15C12.815,15 11,15 11,15L11,5L14,5Z',
|
|
276
|
+
}),
|
|
277
|
+
jsx('path', {d: 'M9,5L9,9L5,9L5,6C5,5.448 5.448,5 6,5L9,5Z'}),
|
|
278
|
+
jsx('path', {d: 'M9,11L9,15L6,15C5.448,15 5,14.552 5,14L5,11L9,11Z'}),
|
|
279
|
+
],
|
|
280
|
+
});
|
|
161
281
|
}
|
|
162
282
|
|
|
163
283
|
function LineIcon() {
|
|
164
|
-
|
|
284
|
+
return jsx('svg', {
|
|
285
|
+
viewBox: '0 0 20 20',
|
|
286
|
+
fill: 'currentColor',
|
|
287
|
+
children: jsx('path', {
|
|
288
|
+
d: 'M9.906,4.589L11.411,5.906L8.529,9.2L13.859,8.439C14.273,8.379 14.68,8.584 14.879,8.952C15.078,9.319 15.028,9.772 14.753,10.087L10.094,15.411L8.589,14.094L11.471,10.8L6.141,11.561C5.727,11.621 5.32,11.416 5.121,11.048C4.922,10.681 4.972,10.228 5.247,9.913L9.906,4.589Z',
|
|
289
|
+
}),
|
|
290
|
+
});
|
|
165
291
|
}
|
|
166
292
|
|
|
167
293
|
function NodeIcon() {
|
|
168
|
-
|
|
294
|
+
return jsx('svg', {
|
|
295
|
+
viewBox: '0 0 20 20',
|
|
296
|
+
fill: 'currentColor',
|
|
297
|
+
children: jsx('path', {
|
|
298
|
+
d: 'M7,9L5,9L5,7L7,7L7,5L9,5L9,7L12,7L12,5L15,8L12,11L12,9L9,9L9,12L11,12L8,15L5,12L7,12L7,9Z',
|
|
299
|
+
}),
|
|
300
|
+
});
|
|
169
301
|
}
|
|
170
302
|
|
|
171
303
|
function RayIcon() {
|
|
172
|
-
|
|
304
|
+
return jsx('svg', {
|
|
305
|
+
viewBox: '0 0 20 20',
|
|
306
|
+
fill: 'currentColor',
|
|
307
|
+
children: jsx('path', {
|
|
308
|
+
d: 'M12,9.414L6.707,14.707L5.293,13.293L10.586,8L8,8L8,6L13,6C13.552,6 14,6.448 14,7L14,12L12,12L12,9.414Z',
|
|
309
|
+
}),
|
|
310
|
+
});
|
|
173
311
|
}
|
|
174
312
|
|
|
175
313
|
function RectIcon() {
|
|
176
|
-
|
|
314
|
+
return jsx('svg', {
|
|
315
|
+
viewBox: '0 0 20 20',
|
|
316
|
+
fill: 'currentColor',
|
|
317
|
+
children: jsx('path', {
|
|
318
|
+
d: 'M15,6L15,14C15,14.552 14.552,15 14,15L6,15C5.448,15 5,14.552 5,14L5,6C5,5.448 5.448,5 6,5L14,5C14.552,5 15,5.448 15,6ZM13,7L7,7L7,13L13,13L13,7Z',
|
|
319
|
+
}),
|
|
320
|
+
});
|
|
177
321
|
}
|
|
178
322
|
|
|
179
323
|
function ShapeIcon() {
|
|
180
|
-
|
|
324
|
+
return jsx('svg', {
|
|
325
|
+
viewBox: '0 0 20 20',
|
|
326
|
+
fill: 'currentColor',
|
|
327
|
+
children: jsx('path', {
|
|
328
|
+
d: 'M11.746,10.93C12.637,12.664 11.973,14.504 10.611,15.244C9.692,15.743 8.385,15.804 6.94,14.829C5.555,13.893 4.689,12.16 4.544,10.388C4.395,8.572 5,6.752 6.399,5.701C8.069,4.445 10.793,4.271 12.765,4.921C14.324,5.436 15.374,6.473 15.495,7.691C15.651,9.262 14.613,10.061 13.26,10.5C12.847,10.634 12.41,10.735 12.02,10.841C11.936,10.864 11.838,10.897 11.746,10.93ZM7.601,7.299C6.737,7.949 6.445,9.103 6.537,10.224C6.633,11.389 7.149,12.556 8.06,13.171C8.696,13.601 9.251,13.706 9.656,13.486C10.207,13.187 10.315,12.395 9.886,11.701C9.48,11.044 9.513,10.523 9.68,10.122C9.835,9.75 10.164,9.417 10.678,9.187C11.243,8.935 12.157,8.8 12.908,8.503C13.216,8.381 13.542,8.264 13.505,7.888C13.485,7.691 13.359,7.53 13.197,7.384C12.928,7.143 12.558,6.959 12.138,6.821C10.736,6.358 8.789,6.406 7.601,7.299Z',
|
|
329
|
+
}),
|
|
330
|
+
});
|
|
181
331
|
}
|
|
182
332
|
|
|
183
333
|
function TxtIcon() {
|
|
184
|
-
|
|
334
|
+
return jsxs('svg', {
|
|
335
|
+
viewBox: '0 0 20 20',
|
|
336
|
+
fill: 'currentColor',
|
|
337
|
+
children: [
|
|
338
|
+
jsx('path', {d: 'M9,13L9,6L11,6L11,13L12,13L12,15L8,15L8,13L9,13Z'}),
|
|
339
|
+
jsx('path', {
|
|
340
|
+
d: 'M7,8L5,8L5,6C5,5.448 5.448,5 6,5L14,5C14.552,5 15,5.448 15,6L15,8L13,8L13,7L7,7L7,8Z',
|
|
341
|
+
}),
|
|
342
|
+
],
|
|
343
|
+
});
|
|
185
344
|
}
|
|
186
345
|
|
|
187
346
|
function VideoIcon() {
|
|
188
|
-
|
|
347
|
+
return jsx('svg', {
|
|
348
|
+
viewBox: '0 0 20 20',
|
|
349
|
+
fill: 'currentColor',
|
|
350
|
+
children: jsx('path', {
|
|
351
|
+
d: 'M14,10.866L7.25,14.763C6.941,14.942 6.559,14.942 6.25,14.763C5.941,14.585 5.75,14.254 5.75,13.897L5.75,6.103C5.75,5.746 5.941,5.415 6.25,5.237C6.559,5.058 6.941,5.058 7.25,5.237L14,9.134C14.309,9.313 14.5,9.643 14.5,10C14.5,10.357 14.309,10.687 14,10.866ZM11.5,10L7.75,7.835L7.75,12.165L11.5,10Z',
|
|
352
|
+
}),
|
|
353
|
+
});
|
|
189
354
|
}
|
|
190
355
|
|
|
191
356
|
function View2DIcon() {
|
|
192
|
-
|
|
357
|
+
return jsxs('svg', {
|
|
358
|
+
viewBox: '0 0 20 20',
|
|
359
|
+
fill: 'currentColor',
|
|
360
|
+
children: [
|
|
361
|
+
jsx('path', {d: 'M9,5L9,7L7,7L7,9L5,9L5,6C5,5.448 5.448,5 6,5L9,5Z'}),
|
|
362
|
+
jsx('path', {
|
|
363
|
+
d: 'M5,11L7,11L7,13L9,13L9,15L6,15C5.448,15 5,14.552 5,14L5,11Z',
|
|
364
|
+
}),
|
|
365
|
+
jsx('path', {
|
|
366
|
+
d: 'M11,15L11,13L13,13L13,11L15,11L15,14C15,14.552 14.552,15 14,15L11,15Z',
|
|
367
|
+
}),
|
|
368
|
+
jsx('path', {
|
|
369
|
+
d: 'M15,9L13,9L13,7L11,7L11,5L14,5C14.552,5 15,5.448 15,6L15,9Z',
|
|
370
|
+
}),
|
|
371
|
+
],
|
|
372
|
+
});
|
|
193
373
|
}
|
|
194
374
|
|
|
195
375
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
196
376
|
const IconMap = {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
377
|
+
Circle: CircleIcon,
|
|
378
|
+
CodeBlock: CodeBlockIcon,
|
|
379
|
+
Curve: CurveIcon,
|
|
380
|
+
Grid: GridIcon,
|
|
381
|
+
Img: ImgIcon,
|
|
382
|
+
Layout: LayoutIcon,
|
|
383
|
+
Line: LineIcon,
|
|
384
|
+
Node: NodeIcon,
|
|
385
|
+
Ray: RayIcon,
|
|
386
|
+
Rect: RectIcon,
|
|
387
|
+
Shape: ShapeIcon,
|
|
388
|
+
Txt: TxtIcon,
|
|
389
|
+
TxtLeaf: TxtIcon,
|
|
390
|
+
Video: VideoIcon,
|
|
391
|
+
View2D: View2DIcon,
|
|
212
392
|
};
|
|
213
393
|
|
|
214
|
-
function r(e)
|
|
394
|
+
function r(e) {
|
|
395
|
+
var t,
|
|
396
|
+
f,
|
|
397
|
+
n = '';
|
|
398
|
+
if ('string' == typeof e || 'number' == typeof e) n += e;
|
|
399
|
+
else if ('object' == typeof e)
|
|
400
|
+
if (Array.isArray(e)) {
|
|
401
|
+
var o = e.length;
|
|
402
|
+
for (t = 0; t < o; t++)
|
|
403
|
+
e[t] && (f = r(e[t])) && (n && (n += ' '), (n += f));
|
|
404
|
+
} else for (f in e) e[f] && (n && (n += ' '), (n += f));
|
|
405
|
+
return n;
|
|
406
|
+
}
|
|
407
|
+
function clsx() {
|
|
408
|
+
for (var e, t, f = 0, n = '', o = arguments.length; f < o; f++)
|
|
409
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += ' '), (n += t));
|
|
410
|
+
return n;
|
|
411
|
+
}
|
|
215
412
|
|
|
216
|
-
var styles = {
|
|
413
|
+
var styles = {
|
|
414
|
+
root: 'index-module_root__omEd0',
|
|
415
|
+
label: 'index-module_label__9BJvW',
|
|
416
|
+
active: 'index-module_active__KevXv',
|
|
417
|
+
parent: 'index-module_parent__5nc9I',
|
|
418
|
+
};
|
|
217
419
|
|
|
218
420
|
const DEPTH_VAR = '--depth';
|
|
219
|
-
function TreeElement({
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
421
|
+
function TreeElement({
|
|
422
|
+
label,
|
|
423
|
+
children,
|
|
424
|
+
selected,
|
|
425
|
+
depth = 0,
|
|
426
|
+
open,
|
|
427
|
+
icon,
|
|
428
|
+
forwardRef,
|
|
429
|
+
...props
|
|
430
|
+
}) {
|
|
431
|
+
const hasChildren = !!children;
|
|
432
|
+
return jsxs(Fragment, {
|
|
433
|
+
children: [
|
|
434
|
+
jsxs('div', {
|
|
435
|
+
ref: forwardRef,
|
|
436
|
+
className: clsx(
|
|
437
|
+
styles.label,
|
|
438
|
+
selected && styles.active,
|
|
439
|
+
hasChildren && styles.parent,
|
|
440
|
+
),
|
|
441
|
+
onDblClick: () => {
|
|
442
|
+
if (hasChildren) {
|
|
443
|
+
open.value = !open.value;
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
...props,
|
|
447
|
+
style: {[DEPTH_VAR]: `${depth}`},
|
|
448
|
+
children: [
|
|
449
|
+
hasChildren &&
|
|
450
|
+
jsx(Toggle, {
|
|
451
|
+
animated: false,
|
|
452
|
+
open: open.value,
|
|
453
|
+
onToggle: value => {
|
|
454
|
+
open.value = value;
|
|
455
|
+
},
|
|
456
|
+
onDblClick: e => {
|
|
457
|
+
e.stopPropagation();
|
|
458
|
+
},
|
|
459
|
+
}),
|
|
460
|
+
icon,
|
|
461
|
+
label,
|
|
462
|
+
],
|
|
463
|
+
}),
|
|
464
|
+
hasChildren &&
|
|
465
|
+
jsx(Collapse, {open: open.value, animated: false, children: children}),
|
|
466
|
+
],
|
|
467
|
+
});
|
|
230
468
|
}
|
|
231
469
|
|
|
232
|
-
function NodeElement({
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
470
|
+
function NodeElement({node, depth = 0}) {
|
|
471
|
+
const {selectedKey, hoveredKey, openNodes, selectedChain, afterRender} =
|
|
472
|
+
usePluginState();
|
|
473
|
+
const ref = useRef(null);
|
|
474
|
+
const open = useSignal(
|
|
475
|
+
selectedChain.peek().has(node.key) || (openNodes.get(node.key) ?? false),
|
|
476
|
+
);
|
|
477
|
+
const nodeSignal = useSignal(node);
|
|
478
|
+
nodeSignal.value = node;
|
|
479
|
+
const children = useComputed(() => {
|
|
480
|
+
afterRender.value;
|
|
481
|
+
return nodeSignal.value.peekChildren();
|
|
482
|
+
});
|
|
483
|
+
useSignalEffect(() => {
|
|
484
|
+
open.value = openNodes.get(nodeSignal.value.key) ?? false;
|
|
485
|
+
});
|
|
486
|
+
useSignalEffect(() => {
|
|
487
|
+
const chain = selectedChain.value;
|
|
488
|
+
if (chain.has(nodeSignal.value.key)) {
|
|
489
|
+
open.value = true;
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
useSignalEffect(() => {
|
|
493
|
+
openNodes.set(nodeSignal.value.key, open.value);
|
|
494
|
+
});
|
|
495
|
+
useSignalEffect(() => {
|
|
496
|
+
const key = selectedKey.value;
|
|
497
|
+
if (node.key === key) {
|
|
498
|
+
ref.current?.scrollIntoView({block: 'nearest', behavior: 'instant'});
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
const Icon = IconMap[node[NODE_NAME]] ?? IconMap.Node;
|
|
502
|
+
return jsx(TreeElement, {
|
|
503
|
+
forwardRef: ref,
|
|
504
|
+
open: open,
|
|
505
|
+
depth: depth,
|
|
506
|
+
icon: jsx(Icon, {}),
|
|
507
|
+
label: node.key,
|
|
508
|
+
selected: selectedKey.value === node.key,
|
|
509
|
+
onClick: event => {
|
|
510
|
+
selectedKey.value = node.key;
|
|
511
|
+
event.stopPropagation();
|
|
512
|
+
},
|
|
513
|
+
onPointerEnter: () => (hoveredKey.value = node.key),
|
|
514
|
+
onPointerLeave: () => (hoveredKey.value = null),
|
|
515
|
+
children:
|
|
516
|
+
children.value.length > 0 &&
|
|
517
|
+
children.value.map(child =>
|
|
518
|
+
jsx(NodeElement, {node: child, depth: depth + 1}),
|
|
519
|
+
),
|
|
520
|
+
});
|
|
266
521
|
}
|
|
267
522
|
|
|
268
|
-
function TreeRoot({
|
|
269
|
-
|
|
523
|
+
function TreeRoot({className, ...props}) {
|
|
524
|
+
return jsx('div', {className: clsx(styles.root, className), ...props});
|
|
270
525
|
}
|
|
271
526
|
|
|
272
527
|
function DetachedRoot() {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
528
|
+
const {afterRender, scene} = usePluginState();
|
|
529
|
+
const open = useSignal(false);
|
|
530
|
+
const currentScene = scene.value;
|
|
531
|
+
const children = currentScene ? [...currentScene.getDetachedNodes()] : [];
|
|
532
|
+
afterRender.value;
|
|
533
|
+
return children.length > 0
|
|
534
|
+
? jsx(TreeRoot, {
|
|
535
|
+
children: jsx(TreeElement, {
|
|
536
|
+
open: open,
|
|
537
|
+
label: 'Detached nodes',
|
|
538
|
+
children: children.map(child =>
|
|
539
|
+
jsx(NodeElement, {node: child, depth: 1}),
|
|
540
|
+
),
|
|
541
|
+
}),
|
|
542
|
+
})
|
|
543
|
+
: null;
|
|
279
544
|
}
|
|
280
545
|
|
|
281
546
|
function ViewRoot() {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
});
|
|
547
|
+
const {scene} = usePluginState();
|
|
548
|
+
const view = useSignal(scene.value?.getView());
|
|
549
|
+
useSignalEffect(() => {
|
|
550
|
+
view.value = scene.value?.getView();
|
|
551
|
+
return scene.value?.onReset.subscribe(() => {
|
|
552
|
+
view.value = scene.value?.getView();
|
|
289
553
|
});
|
|
290
|
-
|
|
554
|
+
});
|
|
555
|
+
return view.value
|
|
556
|
+
? jsx(TreeRoot, {children: jsx(NodeElement, {node: view.value})})
|
|
557
|
+
: null;
|
|
291
558
|
}
|
|
292
559
|
|
|
293
|
-
function TabComponent({
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
560
|
+
function TabComponent({tab}) {
|
|
561
|
+
const {sidebar} = usePanels();
|
|
562
|
+
const inspectorTab = useRef(null);
|
|
563
|
+
const reducedMotion = useReducedMotion();
|
|
564
|
+
const {selectedKey} = usePluginState();
|
|
565
|
+
const {logger} = useApplication();
|
|
566
|
+
useEffect(
|
|
567
|
+
() =>
|
|
568
|
+
logger.onInspected.subscribe(key => {
|
|
300
569
|
sidebar.set(tab);
|
|
301
570
|
selectedKey.value = key;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
571
|
+
}),
|
|
572
|
+
[tab],
|
|
573
|
+
);
|
|
574
|
+
useSignalEffect(() => {
|
|
575
|
+
if (
|
|
576
|
+
selectedKey.value &&
|
|
577
|
+
sidebar.current.peek() !== tab &&
|
|
578
|
+
!reducedMotion &&
|
|
579
|
+
inspectorTab.current &&
|
|
580
|
+
inspectorTab.current.getAnimations().length < 2
|
|
581
|
+
) {
|
|
582
|
+
inspectorTab.current.animate(emphasize(), {duration: 400});
|
|
583
|
+
inspectorTab.current.animate([{color: 'white'}, {color: ''}], {
|
|
584
|
+
duration: 800,
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
return jsx(Tab, {
|
|
589
|
+
forwardRef: inspectorTab,
|
|
590
|
+
title: 'Scene Graph',
|
|
591
|
+
id: 'scene-graph-tab',
|
|
592
|
+
tab: tab,
|
|
593
|
+
children: jsx(AccountTree, {}),
|
|
594
|
+
});
|
|
316
595
|
}
|
|
317
596
|
function PaneComponent() {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
597
|
+
const {selectedKey} = usePluginState();
|
|
598
|
+
return jsxs(Pane, {
|
|
599
|
+
title: 'Scene Graph',
|
|
600
|
+
id: 'scene-graph-pane',
|
|
601
|
+
onClick: () => {
|
|
602
|
+
selectedKey.value = null;
|
|
603
|
+
},
|
|
604
|
+
children: [jsx(ViewRoot, {}), jsx(DetachedRoot, {})],
|
|
605
|
+
});
|
|
322
606
|
}
|
|
323
607
|
const SceneGraphTabConfig = {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
608
|
+
name: 'scene-graph',
|
|
609
|
+
tabComponent: TabComponent,
|
|
610
|
+
paneComponent: PaneComponent,
|
|
327
611
|
};
|
|
328
612
|
|
|
329
613
|
var index = makeEditorPlugin(() => {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
614
|
+
return {
|
|
615
|
+
name: '@revideo/2d',
|
|
616
|
+
provider: Provider,
|
|
617
|
+
previewOverlay: PreviewOverlayConfig,
|
|
618
|
+
tabs: [SceneGraphTabConfig],
|
|
619
|
+
inspectors: [NodeInspectorConfig],
|
|
620
|
+
};
|
|
337
621
|
});
|
|
338
622
|
|
|
339
|
-
export {
|
|
623
|
+
export {index as default};
|
|
340
624
|
//# sourceMappingURL=index.js.map
|