@tomorrowevening/theatre-r3f 1.0.1
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/LICENSE +203 -0
- package/README.md +104 -0
- package/dist/drei/OrthographicCamera.d.ts +17 -0
- package/dist/drei/OrthographicCamera.d.ts.map +1 -0
- package/dist/drei/PerspectiveCamera.d.ts +17 -0
- package/dist/drei/PerspectiveCamera.d.ts.map +1 -0
- package/dist/drei/index.d.ts +3 -0
- package/dist/drei/index.d.ts.map +1 -0
- package/dist/extension/InfiniteGridHelper/index.d.ts +12 -0
- package/dist/extension/InfiniteGridHelper/index.d.ts.map +1 -0
- package/dist/extension/components/DragDetector.d.ts +8 -0
- package/dist/extension/components/DragDetector.d.ts.map +1 -0
- package/dist/extension/components/EditableProxy.d.ts +9 -0
- package/dist/extension/components/EditableProxy.d.ts.map +1 -0
- package/dist/extension/components/OrbitControls/OrbitControlsImpl.d.ts +65 -0
- package/dist/extension/components/OrbitControls/OrbitControlsImpl.d.ts.map +1 -0
- package/dist/extension/components/OrbitControls/index.d.ts +24 -0
- package/dist/extension/components/OrbitControls/index.d.ts.map +1 -0
- package/dist/extension/components/ProxyManager.d.ts +9 -0
- package/dist/extension/components/ProxyManager.d.ts.map +1 -0
- package/dist/extension/components/ReferenceWindow/ReferenceWindow.d.ts +10 -0
- package/dist/extension/components/ReferenceWindow/ReferenceWindow.d.ts.map +1 -0
- package/dist/extension/components/ReferenceWindow/noiseImage.d.ts +3 -0
- package/dist/extension/components/ReferenceWindow/noiseImage.d.ts.map +1 -0
- package/dist/extension/components/SnapshotEditor.d.ts +6 -0
- package/dist/extension/components/SnapshotEditor.d.ts.map +1 -0
- package/dist/extension/components/TransformControls.d.ts +19 -0
- package/dist/extension/components/TransformControls.d.ts.map +1 -0
- package/dist/extension/components/useRefAndState.d.ts +18 -0
- package/dist/extension/components/useRefAndState.d.ts.map +1 -0
- package/dist/extension/components/useSelected.d.ts +3 -0
- package/dist/extension/components/useSelected.d.ts.map +1 -0
- package/dist/extension/components/useSnapshotEditorCamera.d.ts +9 -0
- package/dist/extension/components/useSnapshotEditorCamera.d.ts.map +1 -0
- package/dist/extension/editorStuff.d.ts +19 -0
- package/dist/extension/editorStuff.d.ts.map +1 -0
- package/dist/extension/icons.d.ts +13 -0
- package/dist/extension/icons.d.ts.map +1 -0
- package/dist/extension/index.d.ts +4 -0
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.esm.js +22176 -0
- package/dist/extension/index.esm.js.map +7 -0
- package/dist/extension/index.js +22142 -0
- package/dist/extension/index.js.map +7 -0
- package/dist/extension/useExtensionStore.d.ts +3 -0
- package/dist/extension/useExtensionStore.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +780 -0
- package/dist/index.esm.js.map +7 -0
- package/dist/index.js +778 -0
- package/dist/index.js.map +7 -0
- package/dist/main/RafDriverProvider.d.ts +10 -0
- package/dist/main/RafDriverProvider.d.ts.map +1 -0
- package/dist/main/RefreshSnapshot.d.ts +19 -0
- package/dist/main/RefreshSnapshot.d.ts.map +1 -0
- package/dist/main/SheetProvider.d.ts +10 -0
- package/dist/main/SheetProvider.d.ts.map +1 -0
- package/dist/main/defaultEditableFactoryConfig.d.ts +579 -0
- package/dist/main/defaultEditableFactoryConfig.d.ts.map +1 -0
- package/dist/main/editable.d.ts +124 -0
- package/dist/main/editable.d.ts.map +1 -0
- package/dist/main/editableFactoryConfigUtils.d.ts +58 -0
- package/dist/main/editableFactoryConfigUtils.d.ts.map +1 -0
- package/dist/main/store.d.ts +46 -0
- package/dist/main/store.d.ts.map +1 -0
- package/dist/main/useInvalidate.d.ts +2 -0
- package/dist/main/useInvalidate.d.ts.map +1 -0
- package/dist/main/utils.d.ts +4 -0
- package/dist/main/utils.d.ts.map +1 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +87 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,778 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
38
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
39
|
+
};
|
|
40
|
+
var __export = (target, all) => {
|
|
41
|
+
for (var name in all)
|
|
42
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
43
|
+
};
|
|
44
|
+
var __copyProps = (to, from, except, desc) => {
|
|
45
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
46
|
+
for (let key of __getOwnPropNames(from))
|
|
47
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
48
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
49
|
+
}
|
|
50
|
+
return to;
|
|
51
|
+
};
|
|
52
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
53
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
54
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
55
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
56
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
57
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
58
|
+
mod
|
|
59
|
+
));
|
|
60
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
61
|
+
|
|
62
|
+
// ../../node_modules/zustand/vanilla.js
|
|
63
|
+
var require_vanilla = __commonJS({
|
|
64
|
+
"../../node_modules/zustand/vanilla.js"(exports) {
|
|
65
|
+
"use strict";
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
function create2(createState) {
|
|
68
|
+
var state;
|
|
69
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
70
|
+
var setState = function setState2(partial, replace) {
|
|
71
|
+
var nextState = typeof partial === "function" ? partial(state) : partial;
|
|
72
|
+
if (nextState !== state) {
|
|
73
|
+
var _previousState = state;
|
|
74
|
+
state = replace ? nextState : Object.assign({}, state, nextState);
|
|
75
|
+
listeners.forEach(function(listener) {
|
|
76
|
+
return listener(state, _previousState);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var getState = function getState2() {
|
|
81
|
+
return state;
|
|
82
|
+
};
|
|
83
|
+
var subscribeWithSelector = function subscribeWithSelector2(listener, selector, equalityFn) {
|
|
84
|
+
if (selector === void 0) {
|
|
85
|
+
selector = getState;
|
|
86
|
+
}
|
|
87
|
+
if (equalityFn === void 0) {
|
|
88
|
+
equalityFn = Object.is;
|
|
89
|
+
}
|
|
90
|
+
var currentSlice = selector(state);
|
|
91
|
+
function listenerToAdd() {
|
|
92
|
+
var nextSlice = selector(state);
|
|
93
|
+
if (!equalityFn(currentSlice, nextSlice)) {
|
|
94
|
+
var _previousSlice = currentSlice;
|
|
95
|
+
listener(currentSlice = nextSlice, _previousSlice);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
listeners.add(listenerToAdd);
|
|
99
|
+
return function() {
|
|
100
|
+
return listeners.delete(listenerToAdd);
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
var subscribe = function subscribe2(listener, selector, equalityFn) {
|
|
104
|
+
if (selector || equalityFn) {
|
|
105
|
+
return subscribeWithSelector(listener, selector, equalityFn);
|
|
106
|
+
}
|
|
107
|
+
listeners.add(listener);
|
|
108
|
+
return function() {
|
|
109
|
+
return listeners.delete(listener);
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
var destroy = function destroy2() {
|
|
113
|
+
return listeners.clear();
|
|
114
|
+
};
|
|
115
|
+
var api = {
|
|
116
|
+
setState,
|
|
117
|
+
getState,
|
|
118
|
+
subscribe,
|
|
119
|
+
destroy
|
|
120
|
+
};
|
|
121
|
+
state = createState(setState, getState, api);
|
|
122
|
+
return api;
|
|
123
|
+
}
|
|
124
|
+
exports.default = create2;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// src/index.ts
|
|
129
|
+
var src_exports = {};
|
|
130
|
+
__export(src_exports, {
|
|
131
|
+
OrthographicCamera: () => OrthographicCamera,
|
|
132
|
+
PerspectiveCamera: () => PerspectiveCamera,
|
|
133
|
+
RafDriverProvider: () => RafDriverProvider_default,
|
|
134
|
+
RefreshSnapshot: () => RefreshSnapshot_default,
|
|
135
|
+
SheetProvider: () => SheetProvider_default,
|
|
136
|
+
____private_editorStore: () => editorStore,
|
|
137
|
+
__private_allRegisteredObjects: () => allRegisteredObjects,
|
|
138
|
+
__private_makeStoreKey: () => makeStoreKey,
|
|
139
|
+
editable: () => editable_default,
|
|
140
|
+
refreshSnapshot: () => refreshSnapshot,
|
|
141
|
+
useCurrentRafDriver: () => useCurrentRafDriver,
|
|
142
|
+
useCurrentSheet: () => useCurrentSheet
|
|
143
|
+
});
|
|
144
|
+
module.exports = __toCommonJS(src_exports);
|
|
145
|
+
|
|
146
|
+
// src/main/editable.tsx
|
|
147
|
+
var import_react3 = require("react");
|
|
148
|
+
var import_react4 = __toESM(require("react"));
|
|
149
|
+
|
|
150
|
+
// src/main/store.ts
|
|
151
|
+
var import_vanilla = __toESM(require_vanilla());
|
|
152
|
+
var import_three = require("three");
|
|
153
|
+
var allRegisteredObjects = /* @__PURE__ */ new WeakSet();
|
|
154
|
+
var config = (set, get) => {
|
|
155
|
+
return {
|
|
156
|
+
sheet: null,
|
|
157
|
+
editorObject: null,
|
|
158
|
+
scene: null,
|
|
159
|
+
gl: null,
|
|
160
|
+
helpersRoot: new import_three.Group(),
|
|
161
|
+
editables: {},
|
|
162
|
+
canvasName: "default",
|
|
163
|
+
sceneSnapshot: null,
|
|
164
|
+
editablesSnapshot: null,
|
|
165
|
+
initialEditorCamera: {},
|
|
166
|
+
init: (scene, gl) => {
|
|
167
|
+
set({
|
|
168
|
+
scene,
|
|
169
|
+
gl
|
|
170
|
+
});
|
|
171
|
+
get().createSnapshot();
|
|
172
|
+
},
|
|
173
|
+
addEditable: (theatreKey, editable2) => {
|
|
174
|
+
set((state) => ({
|
|
175
|
+
editables: __spreadProps(__spreadValues({}, state.editables), {
|
|
176
|
+
[theatreKey]: editable2
|
|
177
|
+
})
|
|
178
|
+
}));
|
|
179
|
+
},
|
|
180
|
+
removeEditable: (theatreKey) => {
|
|
181
|
+
set((state) => {
|
|
182
|
+
const editables = __spreadValues({}, state.editables);
|
|
183
|
+
delete editables[theatreKey];
|
|
184
|
+
return {
|
|
185
|
+
editables
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
createSnapshot: () => {
|
|
190
|
+
set((state) => {
|
|
191
|
+
var _a, _b;
|
|
192
|
+
return {
|
|
193
|
+
sceneSnapshot: (_b = (_a = state.scene) == null ? void 0 : _a.clone()) != null ? _b : null,
|
|
194
|
+
editablesSnapshot: state.editables
|
|
195
|
+
};
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
setSnapshotProxyObject: (proxyObject, theatreKey) => {
|
|
199
|
+
set((state) => ({
|
|
200
|
+
editablesSnapshot: __spreadProps(__spreadValues({}, state.editablesSnapshot), {
|
|
201
|
+
[theatreKey]: __spreadProps(__spreadValues({}, state.editablesSnapshot[theatreKey]), {
|
|
202
|
+
proxyObject
|
|
203
|
+
})
|
|
204
|
+
})
|
|
205
|
+
}));
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
var editorStore = (0, import_vanilla.default)(config);
|
|
210
|
+
var bindToCanvas = ({ gl, scene }) => {
|
|
211
|
+
const init = editorStore.getState().init;
|
|
212
|
+
init(scene, gl);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// ../../node_modules/react-merge-refs/dist/index.mjs
|
|
216
|
+
function o(f) {
|
|
217
|
+
return (r) => {
|
|
218
|
+
f.forEach((n) => {
|
|
219
|
+
typeof n == "function" ? n(r) : n != null && (n.current = r);
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// src/main/useInvalidate.ts
|
|
225
|
+
var import_fiber = require("@react-three/fiber");
|
|
226
|
+
function useInvalidate() {
|
|
227
|
+
return (0, import_fiber.useThree)(({ invalidate }) => invalidate);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// src/main/SheetProvider.tsx
|
|
231
|
+
var import_react = __toESM(require("react"));
|
|
232
|
+
var import_fiber2 = require("@react-three/fiber");
|
|
233
|
+
var ctx = (0, import_react.createContext)(void 0);
|
|
234
|
+
var useWrapperContext = () => {
|
|
235
|
+
const val = (0, import_react.useContext)(ctx);
|
|
236
|
+
if (!val) {
|
|
237
|
+
throw new Error(
|
|
238
|
+
`No sheet found. You need to add a <SheetProvider> higher up in the tree. https://docs.theatrejs.com/r3f.html#sheetprovider`
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
return val;
|
|
242
|
+
};
|
|
243
|
+
var useCurrentSheet = () => {
|
|
244
|
+
return useWrapperContext().sheet;
|
|
245
|
+
};
|
|
246
|
+
var SheetProvider = ({ sheet, children }) => {
|
|
247
|
+
const { scene, gl } = (0, import_fiber2.useThree)((s) => ({ scene: s.scene, gl: s.gl }));
|
|
248
|
+
(0, import_react.useEffect)(() => {
|
|
249
|
+
if (!sheet || sheet.type !== "Theatre_Sheet_PublicAPI") {
|
|
250
|
+
throw new Error(`sheet in <Wrapper sheet={sheet}> has an invalid value`);
|
|
251
|
+
}
|
|
252
|
+
}, [sheet]);
|
|
253
|
+
(0, import_react.useLayoutEffect)(() => {
|
|
254
|
+
bindToCanvas({ gl, scene });
|
|
255
|
+
}, [scene, gl]);
|
|
256
|
+
return /* @__PURE__ */ import_react.default.createElement(ctx.Provider, { value: { sheet } }, children);
|
|
257
|
+
};
|
|
258
|
+
var SheetProvider_default = SheetProvider;
|
|
259
|
+
|
|
260
|
+
// src/main/editableFactoryConfigUtils.ts
|
|
261
|
+
var import_core = require("@theatre/core");
|
|
262
|
+
var import_core2 = require("@theatre/core");
|
|
263
|
+
var import_three2 = require("three");
|
|
264
|
+
function isNumber(value) {
|
|
265
|
+
return typeof value === "number" && isFinite(value);
|
|
266
|
+
}
|
|
267
|
+
function isVectorObject(value) {
|
|
268
|
+
return ["x", "y", "z"].every((axis) => isNumber(value[axis]));
|
|
269
|
+
}
|
|
270
|
+
var createVector = (components) => {
|
|
271
|
+
return components ? { x: components[0], y: components[1], z: components[2] } : {
|
|
272
|
+
x: 0,
|
|
273
|
+
y: 0,
|
|
274
|
+
z: 0
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
var createVectorPropConfig = (key, defaultValue = createVector(), { nudgeMultiplier = 0.01 } = {}) => ({
|
|
278
|
+
parse: (props) => {
|
|
279
|
+
const propValue = props[key];
|
|
280
|
+
const vector = !propValue ? defaultValue : (
|
|
281
|
+
// if prop is an array
|
|
282
|
+
Array.isArray(propValue) ? createVector(propValue) : (
|
|
283
|
+
// if prop is a scalar
|
|
284
|
+
isNumber(propValue) ? {
|
|
285
|
+
x: propValue,
|
|
286
|
+
y: propValue,
|
|
287
|
+
z: propValue
|
|
288
|
+
} : (
|
|
289
|
+
// if prop is a threejs Vector3
|
|
290
|
+
isVectorObject(propValue) ? {
|
|
291
|
+
x: propValue.x,
|
|
292
|
+
y: propValue.y,
|
|
293
|
+
z: propValue.z
|
|
294
|
+
} : (
|
|
295
|
+
// show a warning and return defaultValue
|
|
296
|
+
(import_core.notify.warning(
|
|
297
|
+
`Invalid value for vector prop "${key}"`,
|
|
298
|
+
`Couldn't make sense of \`${key}={${JSON.stringify(
|
|
299
|
+
propValue
|
|
300
|
+
)}}\`, falling back to \`${key}={${JSON.stringify([
|
|
301
|
+
defaultValue.x,
|
|
302
|
+
defaultValue.y,
|
|
303
|
+
defaultValue.z
|
|
304
|
+
])}}\`.
|
|
305
|
+
|
|
306
|
+
To fix this, make sure the prop is set to either a number, an array of numbers, or a three.js Vector3 object.`
|
|
307
|
+
), defaultValue)
|
|
308
|
+
)
|
|
309
|
+
)
|
|
310
|
+
)
|
|
311
|
+
);
|
|
312
|
+
["x", "y", "z"].forEach((axis) => {
|
|
313
|
+
if (props[`${key}-${axis}`])
|
|
314
|
+
vector[axis] = props[`${key}-${axis}`];
|
|
315
|
+
});
|
|
316
|
+
return vector;
|
|
317
|
+
},
|
|
318
|
+
apply: (value, object) => {
|
|
319
|
+
object[key].set(value.x, value.y, value.z);
|
|
320
|
+
},
|
|
321
|
+
type: {
|
|
322
|
+
[key]: {
|
|
323
|
+
x: import_core2.types.number(defaultValue.x, { nudgeMultiplier }),
|
|
324
|
+
y: import_core2.types.number(defaultValue.y, { nudgeMultiplier }),
|
|
325
|
+
z: import_core2.types.number(defaultValue.z, { nudgeMultiplier })
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
var createNumberPropConfig = (key, defaultValue = 0, { nudgeMultiplier = 0.01 } = {}) => ({
|
|
330
|
+
parse: (props) => {
|
|
331
|
+
var _a;
|
|
332
|
+
return (_a = props[key]) != null ? _a : defaultValue;
|
|
333
|
+
},
|
|
334
|
+
apply: (value, object) => {
|
|
335
|
+
object[key] = value;
|
|
336
|
+
},
|
|
337
|
+
type: {
|
|
338
|
+
[key]: import_core2.types.number(defaultValue, { nudgeMultiplier })
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
var createColorPropConfig = (key, defaultValue = new import_three2.Color(0, 0, 0)) => ({
|
|
342
|
+
parse: (props) => {
|
|
343
|
+
var _a;
|
|
344
|
+
return __spreadProps(__spreadValues({}, (_a = props[key]) != null ? _a : defaultValue), { a: 1 });
|
|
345
|
+
},
|
|
346
|
+
apply: (value, object) => {
|
|
347
|
+
object[key].setRGB(value.r, value.g, value.b);
|
|
348
|
+
},
|
|
349
|
+
type: {
|
|
350
|
+
[key]: import_core2.types.rgba(__spreadProps(__spreadValues({}, defaultValue), { a: 1 }))
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
var extendObjectProps = (objectConfig, extension) => __spreadProps(__spreadValues({}, objectConfig), {
|
|
354
|
+
props: __spreadValues(__spreadValues({}, objectConfig.props), extension)
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
// src/main/defaultEditableFactoryConfig.ts
|
|
358
|
+
var import_three3 = require("three");
|
|
359
|
+
var baseObjectConfig = {
|
|
360
|
+
props: {
|
|
361
|
+
position: createVectorPropConfig("position"),
|
|
362
|
+
rotation: createVectorPropConfig("rotation"),
|
|
363
|
+
scale: createVectorPropConfig("scale", createVector([1, 1, 1]))
|
|
364
|
+
},
|
|
365
|
+
useTransformControls: true,
|
|
366
|
+
icon: "cube",
|
|
367
|
+
createHelper: (object) => new import_three3.BoxHelper(object, selectionColor)
|
|
368
|
+
};
|
|
369
|
+
var baseLightConfig = __spreadProps(__spreadValues({}, extendObjectProps(baseObjectConfig, {
|
|
370
|
+
intensity: createNumberPropConfig("intensity", 1),
|
|
371
|
+
distance: createNumberPropConfig("distance"),
|
|
372
|
+
decay: createNumberPropConfig("decay"),
|
|
373
|
+
color: createColorPropConfig("color", new import_three3.Color("white"))
|
|
374
|
+
})), {
|
|
375
|
+
dimensionless: true
|
|
376
|
+
});
|
|
377
|
+
var baseCameraConfig = __spreadProps(__spreadValues({}, extendObjectProps(baseObjectConfig, {
|
|
378
|
+
near: createNumberPropConfig("near", 0.1, { nudgeMultiplier: 0.1 }),
|
|
379
|
+
far: createNumberPropConfig("far", 2e3, { nudgeMultiplier: 0.1 })
|
|
380
|
+
})), {
|
|
381
|
+
updateObject: (camera) => {
|
|
382
|
+
camera.updateProjectionMatrix();
|
|
383
|
+
},
|
|
384
|
+
icon: "camera",
|
|
385
|
+
dimensionless: true,
|
|
386
|
+
createHelper: (camera) => new import_three3.CameraHelper(camera)
|
|
387
|
+
});
|
|
388
|
+
var selectionColor = "#40AAA4";
|
|
389
|
+
var defaultEditableFactoryConfig = {
|
|
390
|
+
group: __spreadProps(__spreadValues({}, baseObjectConfig), {
|
|
391
|
+
icon: "collection",
|
|
392
|
+
createHelper: (object) => new import_three3.BoxHelper(object, selectionColor)
|
|
393
|
+
}),
|
|
394
|
+
mesh: __spreadProps(__spreadValues({}, baseObjectConfig), {
|
|
395
|
+
icon: "cube",
|
|
396
|
+
createHelper: (object) => new import_three3.BoxHelper(object, selectionColor)
|
|
397
|
+
}),
|
|
398
|
+
spotLight: __spreadProps(__spreadValues({}, extendObjectProps(baseLightConfig, {
|
|
399
|
+
angle: createNumberPropConfig("angle", 0, { nudgeMultiplier: 1e-3 }),
|
|
400
|
+
penumbra: createNumberPropConfig("penumbra", 0, { nudgeMultiplier: 1e-3 })
|
|
401
|
+
})), {
|
|
402
|
+
icon: "spotLight",
|
|
403
|
+
createHelper: (light) => new import_three3.SpotLightHelper(light, selectionColor)
|
|
404
|
+
}),
|
|
405
|
+
directionalLight: __spreadProps(__spreadValues({}, extendObjectProps(baseObjectConfig, {
|
|
406
|
+
intensity: createNumberPropConfig("intensity", 1),
|
|
407
|
+
color: createColorPropConfig("color", new import_three3.Color("white"))
|
|
408
|
+
})), {
|
|
409
|
+
icon: "sun",
|
|
410
|
+
dimensionless: true,
|
|
411
|
+
createHelper: (light) => new import_three3.DirectionalLightHelper(light, 1, selectionColor)
|
|
412
|
+
}),
|
|
413
|
+
pointLight: __spreadProps(__spreadValues({}, baseLightConfig), {
|
|
414
|
+
icon: "lightBulb",
|
|
415
|
+
createHelper: (light) => new import_three3.PointLightHelper(light, 1, selectionColor)
|
|
416
|
+
}),
|
|
417
|
+
ambientLight: {
|
|
418
|
+
props: {
|
|
419
|
+
intensity: createNumberPropConfig("intensity", 1),
|
|
420
|
+
color: createColorPropConfig("color", new import_three3.Color("white"))
|
|
421
|
+
},
|
|
422
|
+
useTransformControls: false,
|
|
423
|
+
icon: "lightBulb"
|
|
424
|
+
},
|
|
425
|
+
hemisphereLight: {
|
|
426
|
+
props: {
|
|
427
|
+
intensity: createNumberPropConfig("intensity", 1),
|
|
428
|
+
color: createColorPropConfig("color", new import_three3.Color("white")),
|
|
429
|
+
groundColor: createColorPropConfig("groundColor", new import_three3.Color("white"))
|
|
430
|
+
},
|
|
431
|
+
useTransformControls: false,
|
|
432
|
+
icon: "lightBulb"
|
|
433
|
+
},
|
|
434
|
+
perspectiveCamera: extendObjectProps(baseCameraConfig, {
|
|
435
|
+
fov: createNumberPropConfig("fov", 50, { nudgeMultiplier: 0.1 }),
|
|
436
|
+
zoom: createNumberPropConfig("zoom", 1)
|
|
437
|
+
}),
|
|
438
|
+
orthographicCamera: baseCameraConfig,
|
|
439
|
+
points: baseObjectConfig,
|
|
440
|
+
line: baseObjectConfig,
|
|
441
|
+
lineLoop: baseObjectConfig,
|
|
442
|
+
lineSegments: baseObjectConfig,
|
|
443
|
+
fog: {
|
|
444
|
+
props: {
|
|
445
|
+
color: createColorPropConfig("color"),
|
|
446
|
+
near: createNumberPropConfig("near", 1, { nudgeMultiplier: 0.1 }),
|
|
447
|
+
far: createNumberPropConfig("far", 1e3, { nudgeMultiplier: 0.1 })
|
|
448
|
+
},
|
|
449
|
+
useTransformControls: false,
|
|
450
|
+
icon: "cloud"
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
var defaultEditableFactoryConfig_default = defaultEditableFactoryConfig;
|
|
454
|
+
|
|
455
|
+
// src/main/utils.ts
|
|
456
|
+
var refreshSnapshot = editorStore.getState().createSnapshot;
|
|
457
|
+
var makeStoreKey = (sheetObjectAddress) => `${sheetObjectAddress.sheetId}:${sheetObjectAddress.sheetInstanceId}:${sheetObjectAddress.objectKey}`;
|
|
458
|
+
|
|
459
|
+
// src/main/editable.tsx
|
|
460
|
+
var import_core3 = require("@theatre/core");
|
|
461
|
+
|
|
462
|
+
// src/main/RafDriverProvider.tsx
|
|
463
|
+
var import_react2 = __toESM(require("react"));
|
|
464
|
+
var ctx2 = (0, import_react2.createContext)(void 0);
|
|
465
|
+
var useCurrentRafDriver = () => {
|
|
466
|
+
var _a;
|
|
467
|
+
return (_a = (0, import_react2.useContext)(ctx2)) == null ? void 0 : _a.rafDriver;
|
|
468
|
+
};
|
|
469
|
+
var RafDriverProvider = ({ driver, children }) => {
|
|
470
|
+
(0, import_react2.useEffect)(() => {
|
|
471
|
+
if (!driver || driver.type !== "Theatre_RafDriver_PublicAPI") {
|
|
472
|
+
throw new Error(
|
|
473
|
+
`driver in <RafDriverProvider deriver={driver}> has an invalid value`
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
}, [driver]);
|
|
477
|
+
return /* @__PURE__ */ import_react2.default.createElement(ctx2.Provider, { value: { rafDriver: driver } }, children);
|
|
478
|
+
};
|
|
479
|
+
var RafDriverProvider_default = RafDriverProvider;
|
|
480
|
+
|
|
481
|
+
// src/main/editable.tsx
|
|
482
|
+
var createEditable = (config2) => {
|
|
483
|
+
const editable2 = (Component, type) => {
|
|
484
|
+
if (Component !== "primitive" && !type) {
|
|
485
|
+
throw new Error(
|
|
486
|
+
`You must provide the type of the component you're creating an editable for. For example: editable(MyComponent, 'mesh').`
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
return (0, import_react4.forwardRef)(
|
|
490
|
+
(_a, ref) => {
|
|
491
|
+
var _b = _a, {
|
|
492
|
+
theatreKey,
|
|
493
|
+
visible,
|
|
494
|
+
editableType,
|
|
495
|
+
additionalProps,
|
|
496
|
+
objRef
|
|
497
|
+
} = _b, props = __objRest(_b, [
|
|
498
|
+
"theatreKey",
|
|
499
|
+
"visible",
|
|
500
|
+
"editableType",
|
|
501
|
+
"additionalProps",
|
|
502
|
+
"objRef"
|
|
503
|
+
]);
|
|
504
|
+
if (typeof theatreKey !== "string") {
|
|
505
|
+
throw new Error(
|
|
506
|
+
`No valid theatreKey was provided to the editable component. theatreKey must be a string. Received: ${theatreKey}`
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
if (Component === "primitive" && !editableType) {
|
|
510
|
+
throw new Error(
|
|
511
|
+
`When using the primitive component, you must provide the editableType prop. Received: ${editableType}`
|
|
512
|
+
);
|
|
513
|
+
}
|
|
514
|
+
const actualType = type != null ? type : editableType;
|
|
515
|
+
const objectRef = (0, import_react4.useRef)();
|
|
516
|
+
const sheet = useCurrentSheet();
|
|
517
|
+
const rafDriver = useCurrentRafDriver();
|
|
518
|
+
const [sheetObject, setSheetObject] = (0, import_react3.useState)(void 0);
|
|
519
|
+
const storeKey = (0, import_react3.useMemo)(
|
|
520
|
+
() => makeStoreKey(__spreadProps(__spreadValues({}, sheet.address), {
|
|
521
|
+
objectKey: theatreKey
|
|
522
|
+
})),
|
|
523
|
+
[sheet, theatreKey]
|
|
524
|
+
);
|
|
525
|
+
const invalidate = useInvalidate();
|
|
526
|
+
(0, import_react4.useEffect)(() => {
|
|
527
|
+
if (Component === "perspectiveCamera" || Component === "orthographicCamera") {
|
|
528
|
+
const dreiComponent = Component.charAt(0).toUpperCase() + Component.slice(1);
|
|
529
|
+
import_core3.notify.warning(
|
|
530
|
+
`Possibly incorrect use of <e.${Component} />`,
|
|
531
|
+
`You seem to have declared the camera "${theatreKey}" simply as \`<e.${Component} ... />\`. This alone won't make r3f use it for rendering.
|
|
532
|
+
|
|
533
|
+
The easiest way to create a custom animatable \`${dreiComponent}\` is to import it from \`@react-three/drei\`, and make it editable.
|
|
534
|
+
\`\`\`
|
|
535
|
+
import {${dreiComponent}} from '@react-three/drei'
|
|
536
|
+
|
|
537
|
+
const EditableCamera =
|
|
538
|
+
editable(${dreiComponent}, '${Component}')
|
|
539
|
+
\`\`\`
|
|
540
|
+
Then you can use it in your JSX like any other editable component. Note the makeDefault prop exposed by drei, which makes r3f use it for rendering.
|
|
541
|
+
\`\`\`
|
|
542
|
+
<EditableCamera
|
|
543
|
+
theatreKey="${theatreKey}"
|
|
544
|
+
makeDefault
|
|
545
|
+
>
|
|
546
|
+
\`\`\`
|
|
547
|
+
`
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
}, [Component, theatreKey]);
|
|
551
|
+
(0, import_react4.useLayoutEffect)(() => {
|
|
552
|
+
if (!sheet)
|
|
553
|
+
return;
|
|
554
|
+
if (sheetObject) {
|
|
555
|
+
sheet.object(
|
|
556
|
+
theatreKey,
|
|
557
|
+
Object.assign(
|
|
558
|
+
__spreadValues({}, additionalProps),
|
|
559
|
+
...Object.values(config2[actualType].props).map(
|
|
560
|
+
// @ts-ignore
|
|
561
|
+
(value) => value.type
|
|
562
|
+
)
|
|
563
|
+
),
|
|
564
|
+
{ reconfigure: true }
|
|
565
|
+
);
|
|
566
|
+
return;
|
|
567
|
+
} else {
|
|
568
|
+
const sheetObject2 = sheet.object(
|
|
569
|
+
theatreKey,
|
|
570
|
+
Object.assign(
|
|
571
|
+
__spreadValues({}, additionalProps),
|
|
572
|
+
...Object.values(config2[actualType].props).map(
|
|
573
|
+
// @ts-ignore
|
|
574
|
+
(value) => value.type
|
|
575
|
+
)
|
|
576
|
+
)
|
|
577
|
+
);
|
|
578
|
+
allRegisteredObjects.add(sheetObject2);
|
|
579
|
+
setSheetObject(sheetObject2);
|
|
580
|
+
if (objRef)
|
|
581
|
+
typeof objRef === "function" ? objRef(sheetObject2) : objRef.current = sheetObject2;
|
|
582
|
+
editorStore.getState().addEditable(storeKey, {
|
|
583
|
+
type: actualType,
|
|
584
|
+
sheetObject: sheetObject2,
|
|
585
|
+
visibleOnlyInEditor: visible === "editor",
|
|
586
|
+
// @ts-ignore
|
|
587
|
+
objectConfig: config2[actualType]
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
}, [sheet, storeKey, additionalProps]);
|
|
591
|
+
(0, import_react4.useLayoutEffect)(() => {
|
|
592
|
+
if (!sheetObject)
|
|
593
|
+
return;
|
|
594
|
+
sheetObject.initialValue = Object.fromEntries(
|
|
595
|
+
// @ts-ignore
|
|
596
|
+
Object.entries(config2[actualType].props).map(
|
|
597
|
+
// @ts-ignore
|
|
598
|
+
([key, value]) => [key, value.parse(props)]
|
|
599
|
+
)
|
|
600
|
+
);
|
|
601
|
+
}, [
|
|
602
|
+
sheetObject,
|
|
603
|
+
// @ts-ignore
|
|
604
|
+
...Object.keys(config2[actualType].props).map(
|
|
605
|
+
// @ts-ignore
|
|
606
|
+
(key) => props[key]
|
|
607
|
+
)
|
|
608
|
+
]);
|
|
609
|
+
(0, import_react4.useLayoutEffect)(() => {
|
|
610
|
+
if (!sheetObject)
|
|
611
|
+
return;
|
|
612
|
+
const object = objectRef.current;
|
|
613
|
+
const setFromTheatre = (newValues) => {
|
|
614
|
+
var _a2, _b2;
|
|
615
|
+
Object.entries(config2[actualType].props).forEach(
|
|
616
|
+
// @ts-ignore
|
|
617
|
+
([key, value]) => value.apply(newValues[key], object)
|
|
618
|
+
);
|
|
619
|
+
(_b2 = (_a2 = config2[actualType]).updateObject) == null ? void 0 : _b2.call(_a2, object);
|
|
620
|
+
invalidate();
|
|
621
|
+
};
|
|
622
|
+
setFromTheatre(sheetObject.value);
|
|
623
|
+
const unsubscribe = sheetObject.onValuesChange(
|
|
624
|
+
setFromTheatre,
|
|
625
|
+
rafDriver
|
|
626
|
+
);
|
|
627
|
+
return () => {
|
|
628
|
+
unsubscribe();
|
|
629
|
+
sheetObject.sheet.detachObject(theatreKey);
|
|
630
|
+
allRegisteredObjects.delete(sheetObject);
|
|
631
|
+
editorStore.getState().removeEditable(storeKey);
|
|
632
|
+
};
|
|
633
|
+
}, [sheetObject, rafDriver]);
|
|
634
|
+
return (
|
|
635
|
+
// @ts-ignore
|
|
636
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
|
637
|
+
Component,
|
|
638
|
+
__spreadProps(__spreadValues({
|
|
639
|
+
ref: o([objectRef, ref])
|
|
640
|
+
}, props), {
|
|
641
|
+
visible: visible !== "editor" && visible,
|
|
642
|
+
userData: {
|
|
643
|
+
__editable: true,
|
|
644
|
+
__storeKey: storeKey
|
|
645
|
+
}
|
|
646
|
+
})
|
|
647
|
+
)
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
};
|
|
652
|
+
const extensions = __spreadProps(__spreadValues({}, Object.fromEntries(
|
|
653
|
+
Object.keys(config2).map((key) => [
|
|
654
|
+
key,
|
|
655
|
+
// @ts-ignore
|
|
656
|
+
editable2(key, key)
|
|
657
|
+
])
|
|
658
|
+
)), {
|
|
659
|
+
primitive: editable2("primitive", null)
|
|
660
|
+
});
|
|
661
|
+
return Object.assign(editable2, extensions);
|
|
662
|
+
};
|
|
663
|
+
var editable = createEditable(
|
|
664
|
+
defaultEditableFactoryConfig_default
|
|
665
|
+
);
|
|
666
|
+
var editable_default = editable;
|
|
667
|
+
|
|
668
|
+
// src/main/RefreshSnapshot.tsx
|
|
669
|
+
var import_react5 = __toESM(require("react"));
|
|
670
|
+
var RefreshSnapshot = () => {
|
|
671
|
+
(0, import_react5.useEffect)(() => {
|
|
672
|
+
setTimeout(() => {
|
|
673
|
+
refreshSnapshot();
|
|
674
|
+
});
|
|
675
|
+
}, []);
|
|
676
|
+
return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null);
|
|
677
|
+
};
|
|
678
|
+
var RefreshSnapshot_default = RefreshSnapshot;
|
|
679
|
+
|
|
680
|
+
// src/drei/PerspectiveCamera.tsx
|
|
681
|
+
var React5 = __toESM(require("react"));
|
|
682
|
+
var import_fiber3 = require("@react-three/fiber");
|
|
683
|
+
var import_three4 = require("three");
|
|
684
|
+
var PerspectiveCamera = editable_default(
|
|
685
|
+
React5.forwardRef(
|
|
686
|
+
(_a, ref) => {
|
|
687
|
+
var _b = _a, { makeDefault, lookAt } = _b, props = __objRest(_b, ["makeDefault", "lookAt"]);
|
|
688
|
+
const set = (0, import_fiber3.useThree)(({ set: set2 }) => set2);
|
|
689
|
+
const camera = (0, import_fiber3.useThree)(({ camera: camera2 }) => camera2);
|
|
690
|
+
const size = (0, import_fiber3.useThree)(({ size: size2 }) => size2);
|
|
691
|
+
const cameraRef = React5.useRef(null);
|
|
692
|
+
React5.useLayoutEffect(() => {
|
|
693
|
+
if (!props.manual) {
|
|
694
|
+
cameraRef.current.aspect = size.width / size.height;
|
|
695
|
+
}
|
|
696
|
+
}, [size, props]);
|
|
697
|
+
React5.useLayoutEffect(() => {
|
|
698
|
+
cameraRef.current.updateProjectionMatrix();
|
|
699
|
+
});
|
|
700
|
+
React5.useLayoutEffect(() => {
|
|
701
|
+
if (makeDefault) {
|
|
702
|
+
const oldCam = camera;
|
|
703
|
+
set(() => ({ camera: cameraRef.current }));
|
|
704
|
+
return () => set(() => ({ camera: oldCam }));
|
|
705
|
+
}
|
|
706
|
+
}, [cameraRef, makeDefault, set]);
|
|
707
|
+
(0, import_fiber3.useFrame)(() => {
|
|
708
|
+
var _a2;
|
|
709
|
+
if (lookAt && cameraRef.current) {
|
|
710
|
+
cameraRef.current.lookAt(
|
|
711
|
+
Array.isArray(lookAt) ? new import_three4.Vector3(...lookAt) : lookAt.current ? lookAt.current.position : lookAt
|
|
712
|
+
);
|
|
713
|
+
const snapshot = editorStore.getState().editablesSnapshot;
|
|
714
|
+
if (snapshot) {
|
|
715
|
+
(_a2 = snapshot[cameraRef.current.userData.__storeKey].proxyObject) == null ? void 0 : _a2.rotation.copy(cameraRef.current.rotation);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
return /* @__PURE__ */ React5.createElement("perspectiveCamera", __spreadValues({ ref: o([cameraRef, ref]) }, props));
|
|
720
|
+
}
|
|
721
|
+
),
|
|
722
|
+
"perspectiveCamera"
|
|
723
|
+
);
|
|
724
|
+
|
|
725
|
+
// src/drei/OrthographicCamera.tsx
|
|
726
|
+
var React6 = __toESM(require("react"));
|
|
727
|
+
var import_fiber4 = require("@react-three/fiber");
|
|
728
|
+
var import_three5 = require("three");
|
|
729
|
+
var OrthographicCamera = editable_default(
|
|
730
|
+
React6.forwardRef(
|
|
731
|
+
(_a, ref) => {
|
|
732
|
+
var _b = _a, { makeDefault, lookAt } = _b, props = __objRest(_b, ["makeDefault", "lookAt"]);
|
|
733
|
+
const set = (0, import_fiber4.useThree)(({ set: set2 }) => set2);
|
|
734
|
+
const camera = (0, import_fiber4.useThree)(({ camera: camera2 }) => camera2);
|
|
735
|
+
const size = (0, import_fiber4.useThree)(({ size: size2 }) => size2);
|
|
736
|
+
const cameraRef = React6.useRef(null);
|
|
737
|
+
React6.useLayoutEffect(() => {
|
|
738
|
+
if (!props.manual) {
|
|
739
|
+
cameraRef.current.updateProjectionMatrix();
|
|
740
|
+
}
|
|
741
|
+
}, [size, props]);
|
|
742
|
+
React6.useLayoutEffect(() => {
|
|
743
|
+
cameraRef.current.updateProjectionMatrix();
|
|
744
|
+
});
|
|
745
|
+
React6.useLayoutEffect(() => {
|
|
746
|
+
if (makeDefault) {
|
|
747
|
+
const oldCam = camera;
|
|
748
|
+
set(() => ({ camera: cameraRef.current }));
|
|
749
|
+
return () => set(() => ({ camera: oldCam }));
|
|
750
|
+
}
|
|
751
|
+
}, [cameraRef, makeDefault, set]);
|
|
752
|
+
(0, import_fiber4.useFrame)(() => {
|
|
753
|
+
var _a2;
|
|
754
|
+
if (lookAt && cameraRef.current) {
|
|
755
|
+
cameraRef.current.lookAt(
|
|
756
|
+
Array.isArray(lookAt) ? new import_three5.Vector3(...lookAt) : lookAt.current ? lookAt.current.position : lookAt
|
|
757
|
+
);
|
|
758
|
+
const snapshot = editorStore.getState().editablesSnapshot;
|
|
759
|
+
if (snapshot) {
|
|
760
|
+
(_a2 = snapshot[cameraRef.current.userData.__storeKey].proxyObject) == null ? void 0 : _a2.rotation.copy(cameraRef.current.rotation);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
});
|
|
764
|
+
return /* @__PURE__ */ React6.createElement(
|
|
765
|
+
"orthographicCamera",
|
|
766
|
+
__spreadValues({
|
|
767
|
+
left: size.width / -2,
|
|
768
|
+
right: size.width / 2,
|
|
769
|
+
top: size.height / 2,
|
|
770
|
+
bottom: size.height / -2,
|
|
771
|
+
ref: o([cameraRef, ref])
|
|
772
|
+
}, props)
|
|
773
|
+
);
|
|
774
|
+
}
|
|
775
|
+
),
|
|
776
|
+
"orthographicCamera"
|
|
777
|
+
);
|
|
778
|
+
//# sourceMappingURL=index.js.map
|