angular-three-theatre 4.0.0-next.93

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/README.md ADDED
@@ -0,0 +1 @@
1
+ # `angular-three-theatre`
@@ -0,0 +1,696 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, effect, Component, ChangeDetectionStrategy, inject, DestroyRef, model, untracked, Directive, InjectionToken, booleanAttribute, TemplateRef, ViewContainerRef, linkedSignal, signal, viewChild, afterNextRender, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
+ import { getProject, val, onChange, types } from '@theatre/core';
4
+ import { omit, pick, injectStore, resolveRef, resolveInstanceKey, extend } from 'angular-three';
5
+ import { mergeInputs } from 'ngxtension/inject-inputs';
6
+ import * as THREE from 'three';
7
+ import { Group } from 'three';
8
+ import { NgtsTransformControls } from 'angular-three-soba/gizmos';
9
+ import Studio from '@theatre/studio';
10
+
11
+ class TheatreProject {
12
+ constructor() {
13
+ this.name = input('default-theatre-project');
14
+ this.config = input({});
15
+ this.project = computed(() => getProject(this.name(), this.config()));
16
+ this.sheets = {};
17
+ effect(() => {
18
+ const project = this.project();
19
+ project.ready.then();
20
+ });
21
+ }
22
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreProject, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: TheatreProject, isStandalone: true, selector: "theatre-project", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
24
+ <ng-content />
25
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreProject, decorators: [{
28
+ type: Component,
29
+ args: [{
30
+ selector: 'theatre-project',
31
+ template: `
32
+ <ng-content />
33
+ `,
34
+ changeDetection: ChangeDetectionStrategy.OnPush,
35
+ }]
36
+ }], ctorParameters: () => [] });
37
+
38
+ class TheatreSheet {
39
+ constructor() {
40
+ this.name = input('default-theatre-sheet');
41
+ this.project = inject(TheatreProject);
42
+ this.sheet = computed(() => {
43
+ const name = this.name();
44
+ const existing = this.project.sheets[name] || [];
45
+ if (existing[0]) {
46
+ existing[1]++;
47
+ return existing[0];
48
+ }
49
+ const sheet = this.project.project().sheet(name);
50
+ this.project.sheets[name] = [sheet, 1];
51
+ return sheet;
52
+ });
53
+ inject(DestroyRef).onDestroy(() => {
54
+ const existing = this.project.sheets[this.name()];
55
+ if (!existing)
56
+ return;
57
+ if (existing[1] >= 1) {
58
+ existing[1]--;
59
+ }
60
+ if (existing[1] === 0) {
61
+ delete this.project.sheets[this.name()];
62
+ }
63
+ });
64
+ }
65
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSheet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
66
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: TheatreSheet, isStandalone: true, selector: "theatre-sheet", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
67
+ <ng-content />
68
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSheet, decorators: [{
71
+ type: Component,
72
+ args: [{
73
+ selector: 'theatre-sheet',
74
+ template: `
75
+ <ng-content />
76
+ `,
77
+ changeDetection: ChangeDetectionStrategy.OnPush,
78
+ }]
79
+ }], ctorParameters: () => [] });
80
+
81
+ const defaultOptions = {
82
+ rate: 1,
83
+ autoplay: false,
84
+ autopause: false,
85
+ delay: 0,
86
+ };
87
+ class TheatreSequence {
88
+ constructor() {
89
+ this.options = input(defaultOptions, { alias: 'sequence', transform: mergeInputs(defaultOptions) });
90
+ this.audioOptions = input(undefined, { alias: 'sequenceAudio' });
91
+ this.position = model(0);
92
+ this.playing = model(false);
93
+ this.length = model(0);
94
+ this.playOptions = omit(this.options, ['autoplay', 'autopause', 'delay', 'autoreset']);
95
+ this.autoplay = pick(this.options, 'autoplay');
96
+ this.autopause = pick(this.options, 'autopause');
97
+ this.autoreset = pick(this.options, 'autoreset');
98
+ this.delay = pick(this.options, 'delay');
99
+ this.project = inject(TheatreProject);
100
+ this.sheet = inject(TheatreSheet, { host: true });
101
+ this.sequence = computed(() => this.sheet.sheet().sequence);
102
+ effect((onCleanup) => {
103
+ const autoplay = untracked(this.autoplay);
104
+ if (!autoplay)
105
+ return;
106
+ const delay = untracked(this.delay);
107
+ const id = setTimeout(() => {
108
+ untracked(() => this.play());
109
+ }, delay);
110
+ onCleanup(() => {
111
+ clearTimeout(id);
112
+ });
113
+ });
114
+ effect((onCleanup) => {
115
+ const autopause = untracked(this.autopause);
116
+ onCleanup(() => {
117
+ if (autopause) {
118
+ this.pause();
119
+ }
120
+ });
121
+ });
122
+ effect((onCleanup) => {
123
+ const autoreset = untracked(this.autoreset);
124
+ if (autoreset === 'init' || autoreset === 'always') {
125
+ untracked(() => this.reset());
126
+ }
127
+ onCleanup(() => {
128
+ if (autoreset === 'destroy' || autoreset === 'always') {
129
+ untracked(() => this.reset());
130
+ }
131
+ });
132
+ });
133
+ effect(() => {
134
+ const [audioOptions, sequence] = [this.audioOptions(), untracked(this.sequence)];
135
+ if (audioOptions)
136
+ sequence.attachAudio(audioOptions);
137
+ });
138
+ effect(() => {
139
+ const [playOptions, sequence] = [this.playOptions(), untracked(this.sequence)];
140
+ const isPlaying = val(sequence.pointer.playing);
141
+ if (isPlaying) {
142
+ this.pause();
143
+ this.play(playOptions);
144
+ }
145
+ });
146
+ effect((onCleanup) => {
147
+ const sequence = this.sequence();
148
+ const cleanups = [];
149
+ cleanups.push(onChange(sequence.pointer.position, (value) => this.position.set(value)), onChange(sequence.pointer.playing, (value) => this.playing.set(value)), onChange(sequence.pointer.length, (value) => this.length.set(value)));
150
+ onCleanup(() => {
151
+ cleanups.forEach((cleanup) => cleanup());
152
+ });
153
+ });
154
+ }
155
+ pause() {
156
+ const sequence = this.sequence();
157
+ sequence.pause();
158
+ }
159
+ play(options = {}) {
160
+ const sequence = this.sequence();
161
+ const project = this.project.project();
162
+ project.ready.then(() => {
163
+ sequence.play({ ...this.playOptions(), ...options });
164
+ });
165
+ }
166
+ reset() {
167
+ const sequence = this.sequence();
168
+ const isPlaying = val(sequence.pointer.playing);
169
+ sequence.position = 0;
170
+ if (isPlaying)
171
+ this.play();
172
+ }
173
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSequence, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
174
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: TheatreSequence, isStandalone: true, selector: "theatre-sheet[sequence]", inputs: { options: { classPropertyName: "options", publicName: "sequence", isSignal: true, isRequired: false, transformFunction: null }, audioOptions: { classPropertyName: "audioOptions", publicName: "sequenceAudio", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, playing: { classPropertyName: "playing", publicName: "playing", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { position: "positionChange", playing: "playingChange", length: "lengthChange" }, ngImport: i0 }); }
175
+ }
176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSequence, decorators: [{
177
+ type: Directive,
178
+ args: [{ selector: 'theatre-sheet[sequence]' }]
179
+ }], ctorParameters: () => [] });
180
+
181
+ const THEATRE_STUDIO = new InjectionToken('Theatre Studio');
182
+
183
+ let TheatreSheetObject$1 = class TheatreSheetObject {
184
+ constructor() {
185
+ this.key = input.required({ alias: 'sheetObject' });
186
+ this.props = input({});
187
+ this.detach = input(false, { transform: booleanAttribute });
188
+ this.selected = model(false);
189
+ this.templateRef = inject(TemplateRef);
190
+ this.vcr = inject(ViewContainerRef);
191
+ this.sheet = inject(TheatreSheet);
192
+ this.studio = inject(THEATRE_STUDIO, { optional: true });
193
+ this.store = injectStore();
194
+ this.originalSheetObject = computed(() => {
195
+ const sheet = this.sheet.sheet();
196
+ return sheet.object(this.key(), untracked(this.props), { reconfigure: true });
197
+ });
198
+ this.sheetObject = linkedSignal(this.originalSheetObject);
199
+ this.values = linkedSignal(() => this.sheetObject().value);
200
+ this.detached = false;
201
+ this.aggregatedProps = {};
202
+ effect(() => {
203
+ this.aggregatedProps = { ...this.aggregatedProps, ...this.props() };
204
+ });
205
+ effect((onCleanup) => {
206
+ const sheetObject = this.sheetObject();
207
+ const cleanup = sheetObject.onValuesChange((newValues) => {
208
+ this.values.set(newValues);
209
+ this.store.snapshot.invalidate();
210
+ });
211
+ onCleanup(cleanup);
212
+ });
213
+ effect((onCleanup) => {
214
+ const studio = this.studio?.();
215
+ if (!studio)
216
+ return;
217
+ const sheetObject = this.sheetObject();
218
+ const cleanup = studio.onSelectionChange((selection) => {
219
+ this.selected.set(selection.includes(sheetObject));
220
+ });
221
+ onCleanup(cleanup);
222
+ });
223
+ effect((onCleanup) => {
224
+ const view = this.vcr.createEmbeddedView(this.templateRef, {
225
+ select: this.select.bind(this),
226
+ deselect: this.deselect.bind(this),
227
+ sheetObject: this.sheetObject.asReadonly(),
228
+ values: this.values.asReadonly(),
229
+ });
230
+ view.detectChanges();
231
+ onCleanup(() => {
232
+ view.destroy();
233
+ });
234
+ });
235
+ inject(DestroyRef).onDestroy(() => {
236
+ if (this.detach()) {
237
+ this.detached = true;
238
+ this.sheet.sheet().detachObject(this.key());
239
+ }
240
+ });
241
+ }
242
+ update() {
243
+ if (this.detached)
244
+ return;
245
+ const [sheet, key] = [untracked(this.sheet.sheet), untracked(this.key)];
246
+ sheet.detachObject(key);
247
+ this.sheetObject.set(sheet.object(key, this.aggregatedProps, { reconfigure: true }));
248
+ }
249
+ addProps(props) {
250
+ this.aggregatedProps = { ...this.aggregatedProps, ...props };
251
+ this.update();
252
+ }
253
+ removeProps(props) {
254
+ const [detach, sheet, key] = [untracked(this.detach), untracked(this.sheet.sheet), untracked(this.key)];
255
+ // remove props from sheet object
256
+ props.forEach((prop) => {
257
+ delete this.aggregatedProps[prop];
258
+ });
259
+ // if there are no more props, detach sheet object
260
+ if (Object.keys(this.aggregatedProps).length === 0) {
261
+ // detach sheet object
262
+ if (detach) {
263
+ sheet.detachObject(key);
264
+ }
265
+ }
266
+ else {
267
+ // update sheet object (reconfigure)
268
+ this.update();
269
+ }
270
+ }
271
+ select() {
272
+ const studio = this.studio?.();
273
+ if (!studio)
274
+ return;
275
+ studio.setSelection([this.sheetObject()]);
276
+ }
277
+ deselect() {
278
+ const studio = this.studio?.();
279
+ if (!studio)
280
+ return;
281
+ if (studio.selection.includes(this.sheetObject())) {
282
+ studio.setSelection([]);
283
+ }
284
+ }
285
+ static ngTemplateContextGuard(_, ctx) {
286
+ return true;
287
+ }
288
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSheetObject, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
289
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: TheatreSheetObject, isStandalone: true, selector: "ng-template[sheetObject]", inputs: { key: { classPropertyName: "key", publicName: "sheetObject", isSignal: true, isRequired: true, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, detach: { classPropertyName: "detach", publicName: "detach", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, ngImport: i0 }); }
290
+ };
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSheetObject$1, decorators: [{
292
+ type: Directive,
293
+ args: [{ selector: 'ng-template[sheetObject]' }]
294
+ }], ctorParameters: () => [] });
295
+
296
+ function createTransformer(transformer) {
297
+ return transformer;
298
+ }
299
+
300
+ const _color = new THREE.Color();
301
+ const color = createTransformer({
302
+ transform(value) {
303
+ value.getRGB(_color, THREE.SRGBColorSpace);
304
+ return types.rgba({ r: _color.r, g: _color.g, b: _color.b, a: 1 });
305
+ },
306
+ apply(target, path, value) {
307
+ target[path].setRGB(value.r, value.g, value.b, THREE.SRGBColorSpace);
308
+ },
309
+ });
310
+
311
+ const degrees = createTransformer({
312
+ transform(target) {
313
+ return types.number(target * THREE.MathUtils.RAD2DEG);
314
+ },
315
+ apply(target, path, value) {
316
+ target[path] = value * THREE.MathUtils.DEG2RAD;
317
+ },
318
+ });
319
+
320
+ const euler = createTransformer({
321
+ transform(value) {
322
+ return types.compound({
323
+ x: value.x * THREE.MathUtils.RAD2DEG,
324
+ y: value.y * THREE.MathUtils.RAD2DEG,
325
+ z: value.z * THREE.MathUtils.RAD2DEG,
326
+ });
327
+ },
328
+ apply(target, path, value) {
329
+ target[path].x = value.x * THREE.MathUtils.DEG2RAD;
330
+ target[path].y = value.y * THREE.MathUtils.DEG2RAD;
331
+ target[path].z = value.z * THREE.MathUtils.DEG2RAD;
332
+ },
333
+ });
334
+
335
+ const generic = createTransformer({
336
+ transform(value) {
337
+ if (typeof value === 'number') {
338
+ return types.number(value === Infinity ? Number.MAX_VALUE : value);
339
+ }
340
+ else if (typeof value === 'string') {
341
+ return types.string(value);
342
+ }
343
+ else if (typeof value === 'boolean') {
344
+ return types.boolean(value);
345
+ }
346
+ return types.compound({ ...value });
347
+ },
348
+ apply(target, path, value) {
349
+ if (target[path] !== null && typeof target[path] === 'object') {
350
+ Object.assign(target[path], value);
351
+ }
352
+ else {
353
+ target[path] = value;
354
+ }
355
+ },
356
+ });
357
+
358
+ const normalized = createTransformer({
359
+ transform(value) {
360
+ return types.number(value, { range: [0, 1] });
361
+ },
362
+ apply(target, path, value) {
363
+ target[path] = value;
364
+ },
365
+ });
366
+
367
+ const side = createTransformer({
368
+ transform(value) {
369
+ // TODO: fix this type
370
+ return types.stringLiteral(value === THREE.FrontSide ? 'f' : value === THREE.BackSide ? 'b' : 'd', { f: 'Front', b: 'Back', d: 'Double' }, { as: 'switch' });
371
+ },
372
+ apply(target, path, value) {
373
+ target[path] = value === 'f' ? THREE.FrontSide : value === 'b' ? THREE.BackSide : THREE.DoubleSide;
374
+ },
375
+ });
376
+
377
+ function isFullOrEndingPattern(fullPropertyPath, pattern) {
378
+ return fullPropertyPath.endsWith(`.${pattern}`) || fullPropertyPath === pattern;
379
+ }
380
+ function getDefaultTransformer(target, path, fullPropertyPath) {
381
+ const property = target[path];
382
+ if (property.isEuler)
383
+ return euler;
384
+ if (property.isColor)
385
+ return color;
386
+ if (isFullOrEndingPattern(fullPropertyPath, 'rotation.x') ||
387
+ isFullOrEndingPattern(fullPropertyPath, 'rotation.y') ||
388
+ isFullOrEndingPattern(fullPropertyPath, 'rotation.z') ||
389
+ (target.isEuler && (fullPropertyPath === 'x' || fullPropertyPath === 'y' || fullPropertyPath === 'z'))) {
390
+ return degrees;
391
+ }
392
+ if (isFullOrEndingPattern(fullPropertyPath, 'r'))
393
+ return normalized;
394
+ if (isFullOrEndingPattern(fullPropertyPath, 'g'))
395
+ return normalized;
396
+ if (isFullOrEndingPattern(fullPropertyPath, 'b'))
397
+ return normalized;
398
+ if (isFullOrEndingPattern(fullPropertyPath, 'opacity'))
399
+ return normalized;
400
+ if (isFullOrEndingPattern(fullPropertyPath, 'roughness'))
401
+ return normalized;
402
+ if (isFullOrEndingPattern(fullPropertyPath, 'metalness'))
403
+ return normalized;
404
+ if (isFullOrEndingPattern(fullPropertyPath, 'transmission'))
405
+ return normalized;
406
+ if (isFullOrEndingPattern(fullPropertyPath, 'side'))
407
+ return side;
408
+ return generic;
409
+ }
410
+
411
+ const updateProjectionMatrixKeys = ['fov', 'near', 'far', 'zoom', 'left', 'right', 'top', 'bottom', 'aspect'];
412
+ class TheatreSheetObjectSync {
413
+ constructor() {
414
+ this.parent = input.required({
415
+ alias: 'sync',
416
+ });
417
+ this.props = input([], { alias: 'syncProps' });
418
+ this.sheetObject = inject(TheatreSheetObject$1);
419
+ this.studio = inject(THEATRE_STUDIO, { optional: true });
420
+ this.parentRef = computed(() => {
421
+ const parent = this.parent();
422
+ if (typeof parent === 'function')
423
+ return resolveRef(parent());
424
+ return resolveRef(parent);
425
+ });
426
+ this.resolvedProps = computed(() => {
427
+ const props = this.props();
428
+ return props.reduce((resolved, prop) => {
429
+ if (typeof prop === 'string') {
430
+ resolved.push([prop, { key: this.resolvePropertyPath(prop) }]);
431
+ }
432
+ else {
433
+ if (typeof prop[1] === 'string') {
434
+ resolved.push([prop[0], { key: prop[1] }]);
435
+ }
436
+ else {
437
+ resolved.push(prop);
438
+ }
439
+ }
440
+ return resolved;
441
+ }, []);
442
+ });
443
+ this.init = signal(false);
444
+ this.propsMapping = {};
445
+ effect(() => {
446
+ const parent = this.parentRef();
447
+ if (!parent)
448
+ return;
449
+ const propsToAdd = {};
450
+ const resolvedProps = this.resolvedProps();
451
+ resolvedProps.forEach(([propName, { key, label, transformer }]) => {
452
+ const { root, targetKey, targetProp } = resolveInstanceKey(parent, propName);
453
+ const rawValue = root[targetKey];
454
+ const valueTransformer = transformer ?? getDefaultTransformer(root, targetKey, propName);
455
+ const value = valueTransformer.transform(rawValue);
456
+ value.label = label ?? key;
457
+ this.propsMapping[key] = { path: propName, transformer: valueTransformer };
458
+ propsToAdd[key] = value;
459
+ });
460
+ this.sheetObject.addProps(propsToAdd);
461
+ this.init.set(true);
462
+ });
463
+ effect((onCleanup) => {
464
+ const parent = this.parentRef();
465
+ if (!parent)
466
+ return;
467
+ const init = this.init();
468
+ if (!init)
469
+ return;
470
+ const sheetObject = this.sheetObject.sheetObject();
471
+ const cleanup = sheetObject.onValuesChange((newValues) => {
472
+ Object.keys(newValues).forEach((key) => {
473
+ // first, check if the prop is mapped in this component
474
+ const propMapping = this.propsMapping[key];
475
+ if (!propMapping)
476
+ return;
477
+ // we're using the addedProps map to infer the target property name from the property name on values
478
+ const { root, targetProp, targetKey } = resolveInstanceKey(parent, propMapping.path);
479
+ // use a transformer to apply value
480
+ const transformer = propMapping.transformer;
481
+ transformer.apply(root, targetKey, newValues[key]);
482
+ if (updateProjectionMatrixKeys.includes(targetKey)) {
483
+ root.updateProjectionMatrix?.();
484
+ }
485
+ });
486
+ });
487
+ onCleanup(cleanup);
488
+ });
489
+ inject(DestroyRef).onDestroy(() => {
490
+ this.sheetObject.removeProps(Object.keys(this.propsMapping));
491
+ });
492
+ }
493
+ resolvePropertyPath(propPath) {
494
+ return (propPath
495
+ // make the label alphanumeric by first removing dots (fundamental feature for pierced props)
496
+ .replace(/\./g, '-')
497
+ // make the following characters uppercase
498
+ .replace(/-([a-z])/g, (g) => g[1].toUpperCase())
499
+ // convert to safe alphanumeric characters without dashes
500
+ .replace(/[^a-zA-Z0-9]/g, ''));
501
+ }
502
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSheetObjectSync, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
503
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: TheatreSheetObjectSync, isStandalone: true, selector: "[sync]", inputs: { parent: { classPropertyName: "parent", publicName: "sync", isSignal: true, isRequired: true, transformFunction: null }, props: { classPropertyName: "props", publicName: "syncProps", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
504
+ }
505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSheetObjectSync, decorators: [{
506
+ type: Directive,
507
+ args: [{ selector: '[sync]' }]
508
+ }], ctorParameters: () => [] });
509
+
510
+ class TheatreSheetObjectTransform {
511
+ onMouseDown() {
512
+ if (!this.studio)
513
+ return;
514
+ if (this.scrub)
515
+ return;
516
+ this.scrub = this.studio().scrub();
517
+ }
518
+ onMouseUp() {
519
+ if (!this.scrub)
520
+ return;
521
+ this.scrub.commit();
522
+ this.scrub = undefined;
523
+ }
524
+ onChange() {
525
+ if (!this.scrub)
526
+ return;
527
+ this.scrub.capture((api) => {
528
+ const sheetObject = this.sheetObject.sheetObject();
529
+ if (!sheetObject)
530
+ return;
531
+ const group = this.groupRef().nativeElement;
532
+ const key = this.key();
533
+ const baseTarget = key ? sheetObject.props[key] : sheetObject.props;
534
+ api.set(baseTarget['position'], { ...group.position });
535
+ api.set(baseTarget['rotation'], {
536
+ x: group.rotation.x * THREE.MathUtils.RAD2DEG,
537
+ y: group.rotation.y * THREE.MathUtils.RAD2DEG,
538
+ z: group.rotation.z * THREE.MathUtils.RAD2DEG,
539
+ });
540
+ api.set(baseTarget['scale'], { ...group.scale });
541
+ });
542
+ }
543
+ constructor() {
544
+ this.label = input();
545
+ this.key = input();
546
+ this.options = input({});
547
+ this.groupRef = viewChild.required('group');
548
+ this.sheetObject = inject(TheatreSheetObject$1);
549
+ this.studio = inject(THEATRE_STUDIO, { optional: true });
550
+ this.selected = this.sheetObject.selected.asReadonly();
551
+ this.positionTransformer = computed(() => getDefaultTransformer(this.groupRef().nativeElement, 'position', 'position'));
552
+ this.rotationTransformer = computed(() => getDefaultTransformer(this.groupRef().nativeElement, 'rotation', 'rotation'));
553
+ this.scaleTransformer = computed(() => getDefaultTransformer(this.groupRef().nativeElement, 'scale', 'scale'));
554
+ extend({ Group });
555
+ afterNextRender(() => {
556
+ this.init();
557
+ });
558
+ effect((onCleanup) => {
559
+ const [sheetObject, key, positionTransformer, rotationTransformer, scaleTransformer, group] = [
560
+ this.sheetObject.sheetObject(),
561
+ untracked(this.key),
562
+ untracked(this.positionTransformer),
563
+ untracked(this.rotationTransformer),
564
+ untracked(this.scaleTransformer),
565
+ untracked(this.groupRef).nativeElement,
566
+ ];
567
+ const cleanup = sheetObject.onValuesChange((newValues) => {
568
+ let object = newValues;
569
+ if (key) {
570
+ if (!newValues[key])
571
+ return;
572
+ object = newValues[key];
573
+ }
574
+ else {
575
+ if (!newValues['position'] || !newValues['rotation'] || !newValues['scale'])
576
+ return;
577
+ }
578
+ // sanity check
579
+ if (!object)
580
+ return;
581
+ positionTransformer.apply(group, 'position', object['position']);
582
+ rotationTransformer.apply(group, 'rotation', object['rotation']);
583
+ scaleTransformer.apply(group, 'scale', object['scale']);
584
+ });
585
+ onCleanup(cleanup);
586
+ });
587
+ inject(DestroyRef).onDestroy(() => {
588
+ const key = this.key();
589
+ this.sheetObject.removeProps(key ? [key] : ['position', 'rotation', 'scale']);
590
+ });
591
+ }
592
+ init() {
593
+ const [group, key, label, positionTransformer, rotationTransformer, scaleTransformer] = [
594
+ this.groupRef().nativeElement,
595
+ this.key(),
596
+ this.label(),
597
+ this.positionTransformer(),
598
+ this.rotationTransformer(),
599
+ this.scaleTransformer(),
600
+ ];
601
+ const position = positionTransformer.transform(group.position);
602
+ const rotation = rotationTransformer.transform(group.rotation);
603
+ const scale = scaleTransformer.transform(group.scale);
604
+ if (key) {
605
+ this.sheetObject.addProps({
606
+ [key]: types.compound({ position, rotation, scale }, { label: label ?? key }),
607
+ });
608
+ }
609
+ else {
610
+ this.sheetObject.addProps({ position, rotation, scale });
611
+ }
612
+ }
613
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSheetObjectTransform, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
614
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TheatreSheetObjectTransform, isStandalone: true, selector: "theatre-transform", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }], ngImport: i0, template: `
615
+ @if (selected()) {
616
+ <ngts-transform-controls
617
+ [object]="$any(group)"
618
+ [options]="options()"
619
+ (mouseDown)="onMouseDown()"
620
+ (mouseUp)="onMouseUp()"
621
+ (change)="onChange()"
622
+ />
623
+ }
624
+
625
+ <ngt-group #group>
626
+ <ng-content />
627
+ </ngt-group>
628
+ `, isInline: true, dependencies: [{ kind: "component", type: NgtsTransformControls, selector: "ngts-transform-controls", inputs: ["object", "options"], outputs: ["change", "mouseDown", "mouseUp", "objectChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
629
+ }
630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreSheetObjectTransform, decorators: [{
631
+ type: Component,
632
+ args: [{
633
+ selector: 'theatre-transform',
634
+ template: `
635
+ @if (selected()) {
636
+ <ngts-transform-controls
637
+ [object]="$any(group)"
638
+ [options]="options()"
639
+ (mouseDown)="onMouseDown()"
640
+ (mouseUp)="onMouseUp()"
641
+ (change)="onChange()"
642
+ />
643
+ }
644
+
645
+ <ngt-group #group>
646
+ <ng-content />
647
+ </ngt-group>
648
+ `,
649
+ imports: [NgtsTransformControls],
650
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
651
+ changeDetection: ChangeDetectionStrategy.OnPush,
652
+ }]
653
+ }], ctorParameters: () => [] });
654
+
655
+ const TheatreSheetObject = [TheatreSheetObject$1, TheatreSheetObjectTransform, TheatreSheetObjectSync];
656
+
657
+ class TheatreStudio {
658
+ constructor() {
659
+ this.enabled = input(true, { alias: 'studio', transform: booleanAttribute });
660
+ this.Studio = signal(Studio);
661
+ this.studio = this.Studio.asReadonly();
662
+ this.Studio().initialize();
663
+ effect((onCleanup) => {
664
+ const [enabled, studio] = [this.enabled(), this.Studio()];
665
+ if (enabled) {
666
+ studio.ui.restore();
667
+ }
668
+ else {
669
+ studio.ui.hide();
670
+ }
671
+ onCleanup(() => {
672
+ studio.ui.hide();
673
+ });
674
+ });
675
+ }
676
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreStudio, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
677
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: TheatreStudio, isStandalone: true, selector: "theatre-project[studio]", inputs: { enabled: { classPropertyName: "enabled", publicName: "studio", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
678
+ { provide: THEATRE_STUDIO, useFactory: (studio) => studio.studio, deps: [TheatreStudio] },
679
+ ], ngImport: i0 }); }
680
+ }
681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TheatreStudio, decorators: [{
682
+ type: Directive,
683
+ args: [{
684
+ selector: 'theatre-project[studio]',
685
+ providers: [
686
+ { provide: THEATRE_STUDIO, useFactory: (studio) => studio.studio, deps: [TheatreStudio] },
687
+ ],
688
+ }]
689
+ }], ctorParameters: () => [] });
690
+
691
+ /**
692
+ * Generated bundle index. Do not edit.
693
+ */
694
+
695
+ export { TheatreProject, TheatreSequence, TheatreSheet, TheatreSheetObject, TheatreSheetObject$1 as TheatreSheetObjectImpl, TheatreSheetObjectSync, TheatreSheetObjectTransform, TheatreStudio };
696
+ //# sourceMappingURL=angular-three-theatre.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"angular-three-theatre.mjs","sources":["../../../../libs/theatre/src/lib/project.ts","../../../../libs/theatre/src/lib/sheet.ts","../../../../libs/theatre/src/lib/sequence.ts","../../../../libs/theatre/src/lib/studio/studio-token.ts","../../../../libs/theatre/src/lib/sheet-object/sheet-object.ts","../../../../libs/theatre/src/lib/transformers/transformer.ts","../../../../libs/theatre/src/lib/transformers/color.ts","../../../../libs/theatre/src/lib/transformers/degrees.ts","../../../../libs/theatre/src/lib/transformers/euler.ts","../../../../libs/theatre/src/lib/transformers/generic.ts","../../../../libs/theatre/src/lib/transformers/normalized.ts","../../../../libs/theatre/src/lib/transformers/side.ts","../../../../libs/theatre/src/lib/transformers/default-transformer.ts","../../../../libs/theatre/src/lib/sheet-object/sync.ts","../../../../libs/theatre/src/lib/sheet-object/transform.ts","../../../../libs/theatre/src/lib/sheet-object/index.ts","../../../../libs/theatre/src/lib/studio/studio.ts","../../../../libs/theatre/src/angular-three-theatre.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, input } from '@angular/core';\nimport { getProject, type IProjectConfig, type ISheet } from '@theatre/core';\n\n@Component({\n\tselector: 'theatre-project',\n\ttemplate: `\n\t\t<ng-content />\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TheatreProject {\n\tname = input('default-theatre-project');\n\tconfig = input<IProjectConfig>({});\n\n\tproject = computed(() => getProject(this.name(), this.config()));\n\tsheets: Record<string, [sheet: ISheet, count: number]> = {};\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst project = this.project();\n\t\t\tproject.ready.then();\n\t\t});\n\t}\n}\n","import { ChangeDetectionStrategy, Component, computed, DestroyRef, inject, input } from '@angular/core';\nimport { TheatreProject } from './project';\n\n@Component({\n\tselector: 'theatre-sheet',\n\ttemplate: `\n\t\t<ng-content />\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TheatreSheet {\n\tname = input('default-theatre-sheet');\n\n\tprivate project = inject(TheatreProject);\n\n\tsheet = computed(() => {\n\t\tconst name = this.name();\n\t\tconst existing = this.project.sheets[name] || [];\n\n\t\tif (existing[0]) {\n\t\t\texisting[1]++;\n\t\t\treturn existing[0];\n\t\t}\n\n\t\tconst sheet = this.project.project().sheet(name);\n\t\tthis.project.sheets[name] = [sheet, 1];\n\t\treturn sheet;\n\t});\n\n\tconstructor() {\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tconst existing = this.project.sheets[this.name()];\n\t\t\tif (!existing) return;\n\n\t\t\tif (existing[1] >= 1) {\n\t\t\t\texisting[1]--;\n\t\t\t}\n\n\t\t\tif (existing[1] === 0) {\n\t\t\t\tdelete this.project.sheets[this.name()];\n\t\t\t}\n\t\t});\n\t}\n}\n","import { computed, Directive, effect, inject, input, model, untracked } from '@angular/core';\nimport { type ISequence, onChange, val } from '@theatre/core';\nimport { omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport { TheatreProject } from './project';\nimport { TheatreSheet } from './sheet';\n\nexport interface AttachAudioOptions {\n\t/**\n\t * Either a URL to the audio file (eg \"http://localhost:3000/audio.mp3\") or an instance of AudioBuffer\n\t */\n\tsource: string | AudioBuffer;\n\t/**\n\t * An optional AudioContext. If not provided, one will be created.\n\t */\n\taudioContext?: AudioContext;\n\t/**\n\t * An AudioNode to feed the audio into. Will use audioContext.destination if not provided.\n\t */\n\tdestinationNode?: AudioNode;\n}\n\nexport type TheatreSequenceOptions = Parameters<ISequence['play']>[0] & {\n\tautoplay: boolean;\n\tautopause: boolean;\n\tdelay: number;\n\tautoreset?: 'init' | 'destroy' | 'always';\n};\n\nconst defaultOptions: TheatreSequenceOptions = {\n\trate: 1,\n\tautoplay: false,\n\tautopause: false,\n\tdelay: 0,\n};\n\n@Directive({ selector: 'theatre-sheet[sequence]' })\nexport class TheatreSequence {\n\toptions = input(defaultOptions, { alias: 'sequence', transform: mergeInputs(defaultOptions) });\n\taudioOptions = input<AttachAudioOptions | undefined>(undefined, { alias: 'sequenceAudio' });\n\n\tposition = model<number>(0);\n\tplaying = model<boolean>(false);\n\tlength = model<number>(0);\n\n\tprivate playOptions = omit(this.options, ['autoplay', 'autopause', 'delay', 'autoreset']);\n\tprivate autoplay = pick(this.options, 'autoplay');\n\tprivate autopause = pick(this.options, 'autopause');\n\tprivate autoreset = pick(this.options, 'autoreset');\n\tprivate delay = pick(this.options, 'delay');\n\n\tprivate project = inject(TheatreProject);\n\tprivate sheet = inject(TheatreSheet, { host: true });\n\tsequence = computed(() => this.sheet.sheet().sequence);\n\n\tconstructor() {\n\t\teffect((onCleanup) => {\n\t\t\tconst autoplay = untracked(this.autoplay);\n\t\t\tif (!autoplay) return;\n\n\t\t\tconst delay = untracked(this.delay);\n\t\t\tconst id = setTimeout(() => {\n\t\t\t\tuntracked(() => this.play());\n\t\t\t}, delay);\n\n\t\t\tonCleanup(() => {\n\t\t\t\tclearTimeout(id);\n\t\t\t});\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst autopause = untracked(this.autopause);\n\t\t\tonCleanup(() => {\n\t\t\t\tif (autopause) {\n\t\t\t\t\tthis.pause();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst autoreset = untracked(this.autoreset);\n\t\t\tif (autoreset === 'init' || autoreset === 'always') {\n\t\t\t\tuntracked(() => this.reset());\n\t\t\t}\n\n\t\t\tonCleanup(() => {\n\t\t\t\tif (autoreset === 'destroy' || autoreset === 'always') {\n\t\t\t\t\tuntracked(() => this.reset());\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst [audioOptions, sequence] = [this.audioOptions(), untracked(this.sequence)];\n\t\t\tif (audioOptions) sequence.attachAudio(audioOptions);\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst [playOptions, sequence] = [this.playOptions(), untracked(this.sequence)];\n\t\t\tconst isPlaying = val(sequence.pointer.playing);\n\t\t\tif (isPlaying) {\n\t\t\t\tthis.pause();\n\t\t\t\tthis.play(playOptions);\n\t\t\t}\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst sequence = this.sequence();\n\n\t\t\tconst cleanups: Array<() => void> = [];\n\n\t\t\tcleanups.push(\n\t\t\t\tonChange(sequence.pointer.position, (value) => this.position.set(value)),\n\t\t\t\tonChange(sequence.pointer.playing, (value) => this.playing.set(value)),\n\t\t\t\tonChange(sequence.pointer.length, (value) => this.length.set(value)),\n\t\t\t);\n\n\t\t\tonCleanup(() => {\n\t\t\t\tcleanups.forEach((cleanup) => cleanup());\n\t\t\t});\n\t\t});\n\t}\n\n\tpause() {\n\t\tconst sequence = this.sequence();\n\t\tsequence.pause();\n\t}\n\n\tplay(options: Parameters<ISequence['play']>[0] = {}) {\n\t\tconst sequence = this.sequence();\n\t\tconst project = this.project.project();\n\n\t\tproject.ready.then(() => {\n\t\t\tsequence.play({ ...this.playOptions(), ...options });\n\t\t});\n\t}\n\n\treset() {\n\t\tconst sequence = this.sequence();\n\t\tconst isPlaying = val(sequence.pointer.playing);\n\t\tsequence.position = 0;\n\t\tif (isPlaying) this.play();\n\t}\n}\n","import { InjectionToken, Signal } from '@angular/core';\nimport type { IStudio } from '@theatre/studio';\n\nexport const THEATRE_STUDIO = new InjectionToken<Signal<IStudio>>('Theatre Studio');\n","import {\n\tbooleanAttribute,\n\tcomputed,\n\tDestroyRef,\n\tDirective,\n\teffect,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\tTemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { UnknownShorthandCompoundProps } from '@theatre/core';\nimport { injectStore } from 'angular-three';\nimport { TheatreSheet } from '../sheet';\nimport { THEATRE_STUDIO } from '../studio/studio-token';\n\n@Directive({ selector: 'ng-template[sheetObject]' })\nexport class TheatreSheetObject {\n\tkey = input.required<string>({ alias: 'sheetObject' });\n\tprops = input<UnknownShorthandCompoundProps>({});\n\tdetach = input(false, { transform: booleanAttribute });\n\tselected = model<boolean>(false);\n\n\tprivate templateRef = inject(TemplateRef);\n\tprivate vcr = inject(ViewContainerRef);\n\tprivate sheet = inject(TheatreSheet);\n\tprivate studio = inject(THEATRE_STUDIO, { optional: true });\n\tprivate store = injectStore();\n\n\tprivate originalSheetObject = computed(() => {\n\t\tconst sheet = this.sheet.sheet();\n\t\treturn sheet.object(this.key(), untracked(this.props), { reconfigure: true });\n\t});\n\tsheetObject = linkedSignal(this.originalSheetObject);\n\tvalues = linkedSignal(() => this.sheetObject().value);\n\n\tprivate detached = false;\n\tprivate aggregatedProps: UnknownShorthandCompoundProps = {};\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tthis.aggregatedProps = { ...this.aggregatedProps, ...this.props() };\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst sheetObject = this.sheetObject();\n\t\t\tconst cleanup = sheetObject.onValuesChange((newValues) => {\n\t\t\t\tthis.values.set(newValues);\n\t\t\t\tthis.store.snapshot.invalidate();\n\t\t\t});\n\t\t\tonCleanup(cleanup);\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst studio = this.studio?.();\n\t\t\tif (!studio) return;\n\n\t\t\tconst sheetObject = this.sheetObject();\n\t\t\tconst cleanup = studio.onSelectionChange((selection) => {\n\t\t\t\tthis.selected.set(selection.includes(sheetObject));\n\t\t\t});\n\t\t\tonCleanup(cleanup);\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst view = this.vcr.createEmbeddedView(this.templateRef, {\n\t\t\t\tselect: this.select.bind(this),\n\t\t\t\tdeselect: this.deselect.bind(this),\n\t\t\t\tsheetObject: this.sheetObject.asReadonly(),\n\t\t\t\tvalues: this.values.asReadonly(),\n\t\t\t});\n\t\t\tview.detectChanges();\n\t\t\tonCleanup(() => {\n\t\t\t\tview.destroy();\n\t\t\t});\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tif (this.detach()) {\n\t\t\t\tthis.detached = true;\n\t\t\t\tthis.sheet.sheet().detachObject(this.key());\n\t\t\t}\n\t\t});\n\t}\n\n\tupdate() {\n\t\tif (this.detached) return;\n\n\t\tconst [sheet, key] = [untracked(this.sheet.sheet), untracked(this.key)];\n\t\tsheet.detachObject(key);\n\t\tthis.sheetObject.set(sheet.object(key, this.aggregatedProps, { reconfigure: true }));\n\t}\n\n\taddProps(props: UnknownShorthandCompoundProps) {\n\t\tthis.aggregatedProps = { ...this.aggregatedProps, ...props };\n\t\tthis.update();\n\t}\n\n\tremoveProps(props: string[]) {\n\t\tconst [detach, sheet, key] = [untracked(this.detach), untracked(this.sheet.sheet), untracked(this.key)];\n\n\t\t// remove props from sheet object\n\t\tprops.forEach((prop) => {\n\t\t\tdelete this.aggregatedProps[prop];\n\t\t});\n\n\t\t// if there are no more props, detach sheet object\n\t\tif (Object.keys(this.aggregatedProps).length === 0) {\n\t\t\t// detach sheet object\n\t\t\tif (detach) {\n\t\t\t\tsheet.detachObject(key);\n\t\t\t}\n\t\t} else {\n\t\t\t// update sheet object (reconfigure)\n\t\t\tthis.update();\n\t\t}\n\t}\n\n\tselect() {\n\t\tconst studio = this.studio?.();\n\t\tif (!studio) return;\n\t\tstudio.setSelection([this.sheetObject()]);\n\t}\n\n\tdeselect() {\n\t\tconst studio = this.studio?.();\n\t\tif (!studio) return;\n\n\t\tif (studio.selection.includes(this.sheetObject())) {\n\t\t\tstudio.setSelection([]);\n\t\t}\n\t}\n\n\tstatic ngTemplateContextGuard(\n\t\t_: TheatreSheetObject,\n\t\tctx: unknown,\n\t): ctx is {\n\t\tselect: TheatreSheetObject['select'];\n\t\tdeselect: TheatreSheetObject['deselect'];\n\t\tsheetObject: ReturnType<TheatreSheetObject['sheetObject']['asReadonly']>;\n\t\tvalues: ReturnType<TheatreSheetObject['values']['asReadonly']>;\n\t} {\n\t\treturn true;\n\t}\n}\n","import type { types } from '@theatre/core';\n\n/**\n https://github.com/threlte/threlte/blob/main/packages/theatre/src/lib/sheetObject/transfomers/types.ts\n */\nexport type TheatreTransformer<Value = any, TransformedValue = any> = {\n\t/**\n\t * The `transform` function is used to transform the value of a certain\n\t * Three.js objects proerty to a property that Theatre.js can use in an\n\t * `ISheetObject`. To ensure compatibility with the rest of the package, the\n\t * return value must be any one of the functions available at Theatre.js'\n\t * `types`.\n\t */\n\ttransform: (value: Value) => ReturnType<(typeof types)[keyof typeof types]>;\n\t/**\n\t * The `apply` function is used to apply the value to the target. `target` is\n\t * the parent object of the property (usually a Three.js object), `path` is\n\t * the name of the property and `value` is the value to apply.\n\t */\n\tapply: (target: any, property: string, value: TransformedValue) => void;\n};\n\nexport function createTransformer(transformer: TheatreTransformer) {\n\treturn transformer;\n}\n","import { types } from '@theatre/core';\nimport * as THREE from 'three';\nimport { createTransformer } from './transformer';\n\nconst _color = new THREE.Color();\n\nexport const color = createTransformer({\n\ttransform(value) {\n\t\tvalue.getRGB(_color, THREE.SRGBColorSpace);\n\t\treturn types.rgba({ r: _color.r, g: _color.g, b: _color.b, a: 1 });\n\t},\n\tapply(target, path, value) {\n\t\ttarget[path].setRGB(value.r, value.g, value.b, THREE.SRGBColorSpace);\n\t},\n});\n","import { types } from '@theatre/core';\nimport * as THREE from 'three';\nimport { createTransformer } from './transformer';\n\nexport const degrees = createTransformer({\n\ttransform(target) {\n\t\treturn types.number(target * THREE.MathUtils.RAD2DEG);\n\t},\n\tapply(target, path, value) {\n\t\ttarget[path] = value * THREE.MathUtils.DEG2RAD;\n\t},\n});\n","import { types } from '@theatre/core';\nimport * as THREE from 'three';\nimport { createTransformer } from './transformer';\n\nexport const euler = createTransformer({\n\ttransform(value) {\n\t\treturn types.compound({\n\t\t\tx: value.x * THREE.MathUtils.RAD2DEG,\n\t\t\ty: value.y * THREE.MathUtils.RAD2DEG,\n\t\t\tz: value.z * THREE.MathUtils.RAD2DEG,\n\t\t});\n\t},\n\tapply(target, path, value) {\n\t\ttarget[path].x = value.x * THREE.MathUtils.DEG2RAD;\n\t\ttarget[path].y = value.y * THREE.MathUtils.DEG2RAD;\n\t\ttarget[path].z = value.z * THREE.MathUtils.DEG2RAD;\n\t},\n});\n","import { types } from '@theatre/core';\nimport { createTransformer } from './transformer';\n\nexport const generic = createTransformer({\n\ttransform(value) {\n\t\tif (typeof value === 'number') {\n\t\t\treturn types.number(value === Infinity ? Number.MAX_VALUE : value);\n\t\t} else if (typeof value === 'string') {\n\t\t\treturn types.string(value);\n\t\t} else if (typeof value === 'boolean') {\n\t\t\treturn types.boolean(value);\n\t\t}\n\t\treturn types.compound({ ...value });\n\t},\n\tapply(target, path, value) {\n\t\tif (target[path] !== null && typeof target[path] === 'object') {\n\t\t\tObject.assign(target[path], value);\n\t\t} else {\n\t\t\ttarget[path] = value;\n\t\t}\n\t},\n});\n","import { types } from '@theatre/core';\nimport { createTransformer } from './transformer';\n\nexport const normalized = createTransformer({\n\ttransform(value) {\n\t\treturn types.number(value, { range: [0, 1] });\n\t},\n\tapply(target, path, value) {\n\t\ttarget[path] = value;\n\t},\n});\n","import { types } from '@theatre/core';\nimport * as THREE from 'three';\nimport { createTransformer } from './transformer';\n\nexport const side = createTransformer({\n\ttransform(value) {\n\t\t// TODO: fix this type\n\t\treturn types.stringLiteral(\n\t\t\tvalue === THREE.FrontSide ? 'f' : value === THREE.BackSide ? 'b' : 'd',\n\t\t\t{ f: 'Front', b: 'Back', d: 'Double' },\n\t\t\t{ as: 'switch' },\n\t\t) as any;\n\t},\n\tapply(target, path, value) {\n\t\ttarget[path] = value === 'f' ? THREE.FrontSide : value === 'b' ? THREE.BackSide : THREE.DoubleSide;\n\t},\n});\n","import { color } from './color';\nimport { degrees } from './degrees';\nimport { euler } from './euler';\nimport { generic } from './generic';\nimport { normalized } from './normalized';\nimport { side } from './side';\n\nfunction isFullOrEndingPattern(fullPropertyPath: string, pattern: string) {\n\treturn fullPropertyPath.endsWith(`.${pattern}`) || fullPropertyPath === pattern;\n}\n\nexport function getDefaultTransformer(target: any, path: string, fullPropertyPath: string) {\n\tconst property = target[path];\n\n\tif (property.isEuler) return euler;\n\tif (property.isColor) return color;\n\n\tif (\n\t\tisFullOrEndingPattern(fullPropertyPath, 'rotation.x') ||\n\t\tisFullOrEndingPattern(fullPropertyPath, 'rotation.y') ||\n\t\tisFullOrEndingPattern(fullPropertyPath, 'rotation.z') ||\n\t\t(target.isEuler && (fullPropertyPath === 'x' || fullPropertyPath === 'y' || fullPropertyPath === 'z'))\n\t) {\n\t\treturn degrees;\n\t}\n\n\tif (isFullOrEndingPattern(fullPropertyPath, 'r')) return normalized;\n\tif (isFullOrEndingPattern(fullPropertyPath, 'g')) return normalized;\n\tif (isFullOrEndingPattern(fullPropertyPath, 'b')) return normalized;\n\n\tif (isFullOrEndingPattern(fullPropertyPath, 'opacity')) return normalized;\n\tif (isFullOrEndingPattern(fullPropertyPath, 'roughness')) return normalized;\n\tif (isFullOrEndingPattern(fullPropertyPath, 'metalness')) return normalized;\n\tif (isFullOrEndingPattern(fullPropertyPath, 'transmission')) return normalized;\n\n\tif (isFullOrEndingPattern(fullPropertyPath, 'side')) return side;\n\n\treturn generic;\n}\n","import { computed, DestroyRef, Directive, effect, ElementRef, inject, input, signal } from '@angular/core';\nimport { NgtAnyRecord, resolveInstanceKey, resolveRef } from 'angular-three';\nimport { THEATRE_STUDIO } from '../studio/studio-token';\nimport { getDefaultTransformer } from '../transformers/default-transformer';\nimport { TheatreTransformer } from '../transformers/transformer';\nimport { TheatreSheetObject } from './sheet-object';\n\nconst updateProjectionMatrixKeys = ['fov', 'near', 'far', 'zoom', 'left', 'right', 'top', 'bottom', 'aspect'];\n\n@Directive({ selector: '[sync]' })\nexport class TheatreSheetObjectSync<TObject extends object> {\n\tparent = input.required<TObject | ElementRef<TObject> | (() => TObject | ElementRef<TObject> | undefined | null)>({\n\t\talias: 'sync',\n\t});\n\tprops = input<\n\t\tArray<string | [string, string | { label?: string; key?: string; transformer?: TheatreTransformer }]>\n\t>([], { alias: 'syncProps' });\n\n\tprivate sheetObject = inject(TheatreSheetObject);\n\tprivate studio = inject(THEATRE_STUDIO, { optional: true });\n\n\tprivate parentRef = computed(() => {\n\t\tconst parent = this.parent();\n\t\tif (typeof parent === 'function') return resolveRef(parent());\n\t\treturn resolveRef(parent);\n\t});\n\tprivate resolvedProps = computed(() => {\n\t\tconst props = this.props();\n\t\treturn props.reduce(\n\t\t\t(resolved, prop) => {\n\t\t\t\tif (typeof prop === 'string') {\n\t\t\t\t\tresolved.push([prop, { key: this.resolvePropertyPath(prop) }]);\n\t\t\t\t} else {\n\t\t\t\t\tif (typeof prop[1] === 'string') {\n\t\t\t\t\t\tresolved.push([prop[0], { key: prop[1] }]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolved.push(\n\t\t\t\t\t\t\tprop as [string, { label?: string; key: string; transformer?: TheatreTransformer }],\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn resolved;\n\t\t\t},\n\t\t\t[] as Array<[string, { label?: string; key: string; transformer?: TheatreTransformer }]>,\n\t\t);\n\t});\n\n\tprivate init = signal(false);\n\tprivate propsMapping: Record<string, { path: string; transformer: TheatreTransformer }> = {};\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst parent = this.parentRef();\n\t\t\tif (!parent) return;\n\n\t\t\tconst propsToAdd: NgtAnyRecord = {};\n\t\t\tconst resolvedProps = this.resolvedProps();\n\t\t\tresolvedProps.forEach(([propName, { key, label, transformer }]) => {\n\t\t\t\tconst { root, targetKey, targetProp } = resolveInstanceKey(parent, propName);\n\t\t\t\tconst rawValue = root[targetKey];\n\t\t\t\tconst valueTransformer = transformer ?? getDefaultTransformer(root, targetKey, propName);\n\t\t\t\tconst value = valueTransformer.transform(rawValue);\n\n\t\t\t\tvalue.label = label ?? key;\n\n\t\t\t\tthis.propsMapping[key] = { path: propName, transformer: valueTransformer };\n\t\t\t\tpropsToAdd[key] = value;\n\t\t\t});\n\n\t\t\tthis.sheetObject.addProps(propsToAdd);\n\t\t\tthis.init.set(true);\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst parent = this.parentRef();\n\t\t\tif (!parent) return;\n\n\t\t\tconst init = this.init();\n\t\t\tif (!init) return;\n\n\t\t\tconst sheetObject = this.sheetObject.sheetObject();\n\t\t\tconst cleanup = sheetObject.onValuesChange((newValues) => {\n\t\t\t\tObject.keys(newValues).forEach((key) => {\n\t\t\t\t\t// first, check if the prop is mapped in this component\n\t\t\t\t\tconst propMapping = this.propsMapping[key];\n\t\t\t\t\tif (!propMapping) return;\n\n\t\t\t\t\t// we're using the addedProps map to infer the target property name from the property name on values\n\t\t\t\t\tconst { root, targetProp, targetKey } = resolveInstanceKey(parent, propMapping.path);\n\n\t\t\t\t\t// use a transformer to apply value\n\t\t\t\t\tconst transformer = propMapping.transformer;\n\t\t\t\t\ttransformer.apply(root, targetKey, newValues[key]);\n\n\t\t\t\t\tif (updateProjectionMatrixKeys.includes(targetKey)) {\n\t\t\t\t\t\troot.updateProjectionMatrix?.();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tonCleanup(cleanup);\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.sheetObject.removeProps(Object.keys(this.propsMapping));\n\t\t});\n\t}\n\n\tprivate resolvePropertyPath(propPath: string) {\n\t\treturn (\n\t\t\tpropPath\n\t\t\t\t// make the label alphanumeric by first removing dots (fundamental feature for pierced props)\n\t\t\t\t.replace(/\\./g, '-')\n\t\t\t\t// make the following characters uppercase\n\t\t\t\t.replace(/-([a-z])/g, (g) => g[1].toUpperCase())\n\t\t\t\t// convert to safe alphanumeric characters without dashes\n\t\t\t\t.replace(/[^a-zA-Z0-9]/g, '')\n\t\t);\n\t}\n}\n","import {\n\tafterNextRender,\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tDestroyRef,\n\teffect,\n\tElementRef,\n\tinject,\n\tinput,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { types } from '@theatre/core';\nimport { IScrub } from '@theatre/studio';\nimport { extend } from 'angular-three';\nimport { NgtsTransformControls, NgtsTransformControlsOptions } from 'angular-three-soba/gizmos';\nimport * as THREE from 'three';\nimport { Group } from 'three';\nimport { THEATRE_STUDIO } from '../studio/studio-token';\nimport { getDefaultTransformer } from '../transformers/default-transformer';\nimport { TheatreSheetObject } from './sheet-object';\n\n@Component({\n\tselector: 'theatre-transform',\n\ttemplate: `\n\t\t@if (selected()) {\n\t\t\t<ngts-transform-controls\n\t\t\t\t[object]=\"$any(group)\"\n\t\t\t\t[options]=\"options()\"\n\t\t\t\t(mouseDown)=\"onMouseDown()\"\n\t\t\t\t(mouseUp)=\"onMouseUp()\"\n\t\t\t\t(change)=\"onChange()\"\n\t\t\t/>\n\t\t}\n\n\t\t<ngt-group #group>\n\t\t\t<ng-content />\n\t\t</ngt-group>\n\t`,\n\timports: [NgtsTransformControls],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TheatreSheetObjectTransform<TLabel extends string | undefined> {\n\tlabel = input<TLabel>();\n\tkey = input<string>();\n\toptions = input(\n\t\t{} as Pick<NgtsTransformControlsOptions, 'mode' | 'translationSnap' | 'scaleSnap' | 'rotationSnap' | 'space'>,\n\t);\n\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\n\tprivate sheetObject = inject(TheatreSheetObject);\n\tprivate studio = inject(THEATRE_STUDIO, { optional: true });\n\n\tprotected selected = this.sheetObject.selected.asReadonly();\n\tprivate scrub?: IScrub;\n\n\tprivate positionTransformer = computed(() =>\n\t\tgetDefaultTransformer(this.groupRef().nativeElement, 'position', 'position'),\n\t);\n\tprivate rotationTransformer = computed(() =>\n\t\tgetDefaultTransformer(this.groupRef().nativeElement, 'rotation', 'rotation'),\n\t);\n\tprivate scaleTransformer = computed(() => getDefaultTransformer(this.groupRef().nativeElement, 'scale', 'scale'));\n\n\tprotected onMouseDown() {\n\t\tif (!this.studio) return;\n\t\tif (this.scrub) return;\n\t\tthis.scrub = this.studio().scrub();\n\t}\n\n\tprotected onMouseUp() {\n\t\tif (!this.scrub) return;\n\t\tthis.scrub.commit();\n\t\tthis.scrub = undefined;\n\t}\n\n\tprotected onChange() {\n\t\tif (!this.scrub) return;\n\n\t\tthis.scrub.capture((api) => {\n\t\t\tconst sheetObject = this.sheetObject.sheetObject();\n\t\t\tif (!sheetObject) return;\n\n\t\t\tconst group = this.groupRef().nativeElement;\n\n\t\t\tconst key = this.key();\n\t\t\tconst baseTarget = key ? sheetObject.props[key] : sheetObject.props;\n\n\t\t\tapi.set(baseTarget['position'], { ...group.position });\n\t\t\tapi.set(baseTarget['rotation'], {\n\t\t\t\tx: group.rotation.x * THREE.MathUtils.RAD2DEG,\n\t\t\t\ty: group.rotation.y * THREE.MathUtils.RAD2DEG,\n\t\t\t\tz: group.rotation.z * THREE.MathUtils.RAD2DEG,\n\t\t\t});\n\t\t\tapi.set(baseTarget['scale'], { ...group.scale });\n\t\t});\n\t}\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\tafterNextRender(() => {\n\t\t\tthis.init();\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst [sheetObject, key, positionTransformer, rotationTransformer, scaleTransformer, group] = [\n\t\t\t\tthis.sheetObject.sheetObject(),\n\t\t\t\tuntracked(this.key),\n\t\t\t\tuntracked(this.positionTransformer),\n\t\t\t\tuntracked(this.rotationTransformer),\n\t\t\t\tuntracked(this.scaleTransformer),\n\t\t\t\tuntracked(this.groupRef).nativeElement,\n\t\t\t];\n\n\t\t\tconst cleanup = sheetObject.onValuesChange((newValues) => {\n\t\t\t\tlet object = newValues;\n\n\t\t\t\tif (key) {\n\t\t\t\t\tif (!newValues[key]) return;\n\t\t\t\t\tobject = newValues[key];\n\t\t\t\t} else {\n\t\t\t\t\tif (!newValues['position'] || !newValues['rotation'] || !newValues['scale']) return;\n\t\t\t\t}\n\n\t\t\t\t// sanity check\n\t\t\t\tif (!object) return;\n\n\t\t\t\tpositionTransformer.apply(group, 'position', object['position']);\n\t\t\t\trotationTransformer.apply(group, 'rotation', object['rotation']);\n\t\t\t\tscaleTransformer.apply(group, 'scale', object['scale']);\n\t\t\t});\n\n\t\t\tonCleanup(cleanup);\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tconst key = this.key();\n\t\t\tthis.sheetObject.removeProps(key ? [key] : ['position', 'rotation', 'scale']);\n\t\t});\n\t}\n\n\tprivate init() {\n\t\tconst [group, key, label, positionTransformer, rotationTransformer, scaleTransformer] = [\n\t\t\tthis.groupRef().nativeElement,\n\t\t\tthis.key(),\n\t\t\tthis.label(),\n\t\t\tthis.positionTransformer(),\n\t\t\tthis.rotationTransformer(),\n\t\t\tthis.scaleTransformer(),\n\t\t];\n\n\t\tconst position = positionTransformer.transform(group.position);\n\t\tconst rotation = rotationTransformer.transform(group.rotation);\n\t\tconst scale = scaleTransformer.transform(group.scale);\n\n\t\tif (key) {\n\t\t\tthis.sheetObject.addProps({\n\t\t\t\t[key]: types.compound({ position, rotation, scale }, { label: label ?? key }),\n\t\t\t});\n\t\t} else {\n\t\t\tthis.sheetObject.addProps({ position, rotation, scale });\n\t\t}\n\t}\n}\n","import { TheatreSheetObject as Impl } from './sheet-object';\nimport { TheatreSheetObjectSync } from './sync';\nimport { TheatreSheetObjectTransform } from './transform';\n\nexport { TheatreSheetObject as TheatreSheetObjectImpl } from './sheet-object';\nexport * from './sync';\nexport * from './transform';\n\nexport const TheatreSheetObject = [Impl, TheatreSheetObjectTransform, TheatreSheetObjectSync];\n","import { booleanAttribute, Directive, effect, input, signal } from '@angular/core';\nimport Studio from '@theatre/studio';\nimport { THEATRE_STUDIO } from './studio-token';\n\n@Directive({\n\tselector: 'theatre-project[studio]',\n\tproviders: [\n\t\t{ provide: THEATRE_STUDIO, useFactory: (studio: TheatreStudio) => studio.studio, deps: [TheatreStudio] },\n\t],\n})\nexport class TheatreStudio {\n\tenabled = input(true, { alias: 'studio', transform: booleanAttribute });\n\n\tprivate Studio = signal(Studio);\n\tstudio = this.Studio.asReadonly();\n\n\tconstructor() {\n\t\tthis.Studio().initialize();\n\n\t\teffect((onCleanup) => {\n\t\t\tconst [enabled, studio] = [this.enabled(), this.Studio()];\n\t\t\tif (enabled) {\n\t\t\t\tstudio.ui.restore();\n\t\t\t} else {\n\t\t\t\tstudio.ui.hide();\n\t\t\t}\n\n\t\t\tonCleanup(() => {\n\t\t\t\tstudio.ui.hide();\n\t\t\t});\n\t\t});\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TheatreSheetObject","Impl"],"mappings":";;;;;;;;;;MAUa,cAAc,CAAA;AAO1B,IAAA,WAAA,GAAA;AANA,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,yBAAyB,CAAC;AACvC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAiB,EAAE,CAAC;AAElC,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAChE,IAAM,CAAA,MAAA,GAAmD,EAAE;QAG1D,MAAM,CAAC,MAAK;AACX,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,YAAA,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE;AACrB,SAAC,CAAC;;8GAXS,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,EALhB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAA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EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,EAJd,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAAA;YACV,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,MAAqB,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE;AACxG,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAEW,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,SAAS,EAAE;AACV,wBAAA,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,MAAqB,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE;AACxG,qBAAA;AACD,iBAAA;;;ACTD;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from './lib/project';
2
+ export * from './lib/sequence';
3
+ export * from './lib/sheet';
4
+ export * from './lib/sheet-object';
5
+ export * from './lib/studio/studio';
@@ -0,0 +1,11 @@
1
+ import { type IProjectConfig, type ISheet } from '@theatre/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TheatreProject {
4
+ name: import("@angular/core").InputSignal<string>;
5
+ config: import("@angular/core").InputSignal<IProjectConfig>;
6
+ project: import("@angular/core").Signal<import("@theatre/core").IProject>;
7
+ sheets: Record<string, [sheet: ISheet, count: number]>;
8
+ constructor();
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheatreProject, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<TheatreProject, "theatre-project", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
11
+ }
@@ -0,0 +1,65 @@
1
+ import { type ISequence } from '@theatre/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface AttachAudioOptions {
4
+ /**
5
+ * Either a URL to the audio file (eg "http://localhost:3000/audio.mp3") or an instance of AudioBuffer
6
+ */
7
+ source: string | AudioBuffer;
8
+ /**
9
+ * An optional AudioContext. If not provided, one will be created.
10
+ */
11
+ audioContext?: AudioContext;
12
+ /**
13
+ * An AudioNode to feed the audio into. Will use audioContext.destination if not provided.
14
+ */
15
+ destinationNode?: AudioNode;
16
+ }
17
+ export type TheatreSequenceOptions = Parameters<ISequence['play']>[0] & {
18
+ autoplay: boolean;
19
+ autopause: boolean;
20
+ delay: number;
21
+ autoreset?: 'init' | 'destroy' | 'always';
22
+ };
23
+ export declare class TheatreSequence {
24
+ options: import("@angular/core").InputSignalWithTransform<{
25
+ iterationCount?: number;
26
+ range?: [from: number, to: number];
27
+ rate?: number;
28
+ direction?: "normal" | "reverse" | "alternate" | "alternateReverse";
29
+ rafDriver?: import("@theatre/core").IRafDriver;
30
+ } & {
31
+ autoplay: boolean;
32
+ autopause: boolean;
33
+ delay: number;
34
+ autoreset?: "init" | "destroy" | "always";
35
+ }, "" | Partial<{
36
+ iterationCount?: number;
37
+ range?: [from: number, to: number];
38
+ rate?: number;
39
+ direction?: "normal" | "reverse" | "alternate" | "alternateReverse";
40
+ rafDriver?: import("@theatre/core").IRafDriver;
41
+ } & {
42
+ autoplay: boolean;
43
+ autopause: boolean;
44
+ delay: number;
45
+ autoreset?: "init" | "destroy" | "always";
46
+ }>>;
47
+ audioOptions: import("@angular/core").InputSignal<AttachAudioOptions | undefined>;
48
+ position: import("@angular/core").ModelSignal<number>;
49
+ playing: import("@angular/core").ModelSignal<boolean>;
50
+ length: import("@angular/core").ModelSignal<number>;
51
+ private playOptions;
52
+ private autoplay;
53
+ private autopause;
54
+ private autoreset;
55
+ private delay;
56
+ private project;
57
+ private sheet;
58
+ sequence: import("@angular/core").Signal<ISequence>;
59
+ constructor();
60
+ pause(): void;
61
+ play(options?: Parameters<ISequence['play']>[0]): void;
62
+ reset(): void;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheatreSequence, never>;
64
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TheatreSequence, "theatre-sheet[sequence]", never, { "options": { "alias": "sequence"; "required": false; "isSignal": true; }; "audioOptions": { "alias": "sequenceAudio"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "playing": { "alias": "playing"; "required": false; "isSignal": true; }; "length": { "alias": "length"; "required": false; "isSignal": true; }; }, { "position": "positionChange"; "playing": "playingChange"; "length": "lengthChange"; }, never, never, true, never>;
65
+ }
@@ -0,0 +1,7 @@
1
+ import { TheatreSheetObject as Impl } from './sheet-object';
2
+ import { TheatreSheetObjectSync } from './sync';
3
+ import { TheatreSheetObjectTransform } from './transform';
4
+ export { TheatreSheetObject as TheatreSheetObjectImpl } from './sheet-object';
5
+ export * from './sync';
6
+ export * from './transform';
7
+ export declare const TheatreSheetObject: (typeof Impl | typeof TheatreSheetObjectSync | typeof TheatreSheetObjectTransform)[];
@@ -0,0 +1,34 @@
1
+ import { UnknownShorthandCompoundProps } from '@theatre/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TheatreSheetObject {
4
+ key: import("@angular/core").InputSignal<string>;
5
+ props: import("@angular/core").InputSignal<UnknownShorthandCompoundProps>;
6
+ detach: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
7
+ selected: import("@angular/core").ModelSignal<boolean>;
8
+ private templateRef;
9
+ private vcr;
10
+ private sheet;
11
+ private studio;
12
+ private store;
13
+ private originalSheetObject;
14
+ sheetObject: import("@angular/core").WritableSignal<import("@theatre/core").ISheetObject<UnknownShorthandCompoundProps>>;
15
+ values: import("@angular/core").WritableSignal<{
16
+ [x: string]: any;
17
+ }>;
18
+ private detached;
19
+ private aggregatedProps;
20
+ constructor();
21
+ update(): void;
22
+ addProps(props: UnknownShorthandCompoundProps): void;
23
+ removeProps(props: string[]): void;
24
+ select(): void;
25
+ deselect(): void;
26
+ static ngTemplateContextGuard(_: TheatreSheetObject, ctx: unknown): ctx is {
27
+ select: TheatreSheetObject['select'];
28
+ deselect: TheatreSheetObject['deselect'];
29
+ sheetObject: ReturnType<TheatreSheetObject['sheetObject']['asReadonly']>;
30
+ values: ReturnType<TheatreSheetObject['values']['asReadonly']>;
31
+ };
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheatreSheetObject, never>;
33
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TheatreSheetObject, "ng-template[sheetObject]", never, { "key": { "alias": "sheetObject"; "required": true; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "detach": { "alias": "detach"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, never, never, true, never>;
34
+ }
@@ -0,0 +1,21 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { TheatreTransformer } from '../transformers/transformer';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TheatreSheetObjectSync<TObject extends object> {
5
+ parent: import("@angular/core").InputSignal<TObject | ElementRef<TObject> | (() => TObject | ElementRef<TObject> | undefined | null)>;
6
+ props: import("@angular/core").InputSignal<(string | [string, string | {
7
+ label?: string;
8
+ key?: string;
9
+ transformer?: TheatreTransformer;
10
+ }])[]>;
11
+ private sheetObject;
12
+ private studio;
13
+ private parentRef;
14
+ private resolvedProps;
15
+ private init;
16
+ private propsMapping;
17
+ constructor();
18
+ private resolvePropertyPath;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheatreSheetObjectSync<any>, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TheatreSheetObjectSync<any>, "[sync]", never, { "parent": { "alias": "sync"; "required": true; "isSignal": true; }; "props": { "alias": "syncProps"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
21
+ }
@@ -0,0 +1,24 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { NgtsTransformControlsOptions } from 'angular-three-soba/gizmos';
3
+ import * as THREE from 'three';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TheatreSheetObjectTransform<TLabel extends string | undefined> {
6
+ label: import("@angular/core").InputSignal<TLabel | undefined>;
7
+ key: import("@angular/core").InputSignal<string | undefined>;
8
+ options: import("@angular/core").InputSignal<Pick<NgtsTransformControlsOptions, "mode" | "translationSnap" | "scaleSnap" | "rotationSnap" | "space">>;
9
+ groupRef: import("@angular/core").Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
10
+ private sheetObject;
11
+ private studio;
12
+ protected selected: import("@angular/core").Signal<boolean>;
13
+ private scrub?;
14
+ private positionTransformer;
15
+ private rotationTransformer;
16
+ private scaleTransformer;
17
+ protected onMouseDown(): void;
18
+ protected onMouseUp(): void;
19
+ protected onChange(): void;
20
+ constructor();
21
+ private init;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheatreSheetObjectTransform<any>, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<TheatreSheetObjectTransform<any>, "theatre-transform", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
24
+ }
package/lib/sheet.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TheatreSheet {
3
+ name: import("@angular/core").InputSignal<string>;
4
+ private project;
5
+ sheet: import("@angular/core").Signal<import("@theatre/core").ISheet>;
6
+ constructor();
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheatreSheet, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<TheatreSheet, "theatre-sheet", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
9
+ }
@@ -0,0 +1,3 @@
1
+ import { InjectionToken, Signal } from '@angular/core';
2
+ import type { IStudio } from '@theatre/studio';
3
+ export declare const THEATRE_STUDIO: InjectionToken<Signal<IStudio>>;
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TheatreStudio {
3
+ enabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4
+ private Studio;
5
+ studio: import("@angular/core").Signal<import("@theatre/studio").IStudio>;
6
+ constructor();
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheatreStudio, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TheatreStudio, "theatre-project[studio]", never, { "enabled": { "alias": "studio"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1 @@
1
+ export declare const color: import("./transformer").TheatreTransformer<any, any>;
@@ -0,0 +1 @@
1
+ export declare function getDefaultTransformer(target: any, path: string, fullPropertyPath: string): import("./transformer").TheatreTransformer<any, any>;
@@ -0,0 +1 @@
1
+ export declare const degrees: import("./transformer").TheatreTransformer<any, any>;
@@ -0,0 +1 @@
1
+ export declare const euler: import("./transformer").TheatreTransformer<any, any>;
@@ -0,0 +1 @@
1
+ export declare const generic: import("./transformer").TheatreTransformer<any, any>;
@@ -0,0 +1 @@
1
+ export declare const normalized: import("./transformer").TheatreTransformer<any, any>;
@@ -0,0 +1 @@
1
+ export declare const side: import("./transformer").TheatreTransformer<any, any>;
@@ -0,0 +1,21 @@
1
+ import type { types } from '@theatre/core';
2
+ /**
3
+ https://github.com/threlte/threlte/blob/main/packages/theatre/src/lib/sheetObject/transfomers/types.ts
4
+ */
5
+ export type TheatreTransformer<Value = any, TransformedValue = any> = {
6
+ /**
7
+ * The `transform` function is used to transform the value of a certain
8
+ * Three.js objects proerty to a property that Theatre.js can use in an
9
+ * `ISheetObject`. To ensure compatibility with the rest of the package, the
10
+ * return value must be any one of the functions available at Theatre.js'
11
+ * `types`.
12
+ */
13
+ transform: (value: Value) => ReturnType<(typeof types)[keyof typeof types]>;
14
+ /**
15
+ * The `apply` function is used to apply the value to the target. `target` is
16
+ * the parent object of the property (usually a Three.js object), `path` is
17
+ * the name of the property and `value` is the value to apply.
18
+ */
19
+ apply: (target: any, property: string, value: TransformedValue) => void;
20
+ };
21
+ export declare function createTransformer(transformer: TheatreTransformer): TheatreTransformer<any, any>;
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "angular-three-theatre",
3
+ "version": "4.0.0-next.93",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "type": "module",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/angular-threejs/angular-three/tree/main/libs/theatre"
11
+ },
12
+ "author": {
13
+ "name": "Chau Tran",
14
+ "email": "nartc7789@gmail.com",
15
+ "url": "https://nartc.me"
16
+ },
17
+ "description": "TheatreJS for Angular Three",
18
+ "keywords": [
19
+ "angular",
20
+ "threejs",
21
+ "renderer",
22
+ "theatre"
23
+ ],
24
+ "license": "MIT",
25
+ "peerDependencies": {
26
+ "@angular/common": ">=19.0.0 <20.0.0",
27
+ "@angular/core": ">=19.0.0 <20.0.0",
28
+ "@theatre/core": ">=0.7.0 <0.8.0",
29
+ "@theatre/studio": ">=0.7.0 <0.8.0"
30
+ },
31
+ "dependencies": {
32
+ "tslib": "^2.7.0"
33
+ },
34
+ "module": "fesm2022/angular-three-theatre.mjs",
35
+ "typings": "index.d.ts",
36
+ "exports": {
37
+ "./package.json": {
38
+ "default": "./package.json"
39
+ },
40
+ ".": {
41
+ "types": "./index.d.ts",
42
+ "default": "./fesm2022/angular-three-theatre.mjs"
43
+ }
44
+ },
45
+ "sideEffects": false
46
+ }