angular-three-soba 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/abstractions/README.md +3 -0
  2. package/abstractions/index.d.ts +6 -0
  3. package/abstractions/lib/billboard/billboard.d.ts +14 -0
  4. package/abstractions/lib/gizmo-helper/gizmo-helper.d.ts +41 -0
  5. package/abstractions/lib/gizmo-helper/gizmo-viewcube/constants.d.ts +12 -0
  6. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.d.ts +16 -0
  7. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.d.ts +24 -0
  8. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.d.ts +14 -0
  9. package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube.d.ts +15 -0
  10. package/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.d.ts +28 -0
  11. package/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport.d.ts +21 -0
  12. package/abstractions/lib/text/text.d.ts +21 -0
  13. package/abstractions/lib/text-3d/text-3d.d.ts +39 -0
  14. package/esm2020/abstractions/angular-three-soba-abstractions.mjs +5 -0
  15. package/esm2020/abstractions/index.mjs +7 -0
  16. package/esm2020/abstractions/lib/billboard/billboard.mjs +73 -0
  17. package/esm2020/abstractions/lib/gizmo-helper/gizmo-helper.mjs +206 -0
  18. package/esm2020/abstractions/lib/gizmo-helper/gizmo-viewcube/constants.mjs +31 -0
  19. package/esm2020/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.mjs +91 -0
  20. package/esm2020/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.mjs +182 -0
  21. package/esm2020/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.mjs +45 -0
  22. package/esm2020/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube.mjs +133 -0
  23. package/esm2020/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.mjs +193 -0
  24. package/esm2020/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport.mjs +266 -0
  25. package/esm2020/abstractions/lib/text/text.mjs +110 -0
  26. package/esm2020/abstractions/lib/text-3d/text-3d.mjs +144 -0
  27. package/esm2020/cameras/lib/orthographic-camera/orthographic-camera.mjs +5 -5
  28. package/esm2020/staging/index.mjs +3 -1
  29. package/esm2020/staging/lib/camera-shake/camera-shake.mjs +121 -0
  30. package/esm2020/staging/lib/cloud/cloud.mjs +159 -0
  31. package/fesm2015/angular-three-soba-abstractions.mjs +1431 -0
  32. package/fesm2015/angular-three-soba-abstractions.mjs.map +1 -0
  33. package/fesm2015/angular-three-soba-cameras.mjs +4 -4
  34. package/fesm2015/angular-three-soba-cameras.mjs.map +1 -1
  35. package/fesm2015/angular-three-soba-staging.mjs +274 -4
  36. package/fesm2015/angular-three-soba-staging.mjs.map +1 -1
  37. package/fesm2020/angular-three-soba-abstractions.mjs +1428 -0
  38. package/fesm2020/angular-three-soba-abstractions.mjs.map +1 -0
  39. package/fesm2020/angular-three-soba-cameras.mjs +4 -4
  40. package/fesm2020/angular-three-soba-cameras.mjs.map +1 -1
  41. package/fesm2020/angular-three-soba-staging.mjs +274 -4
  42. package/fesm2020/angular-three-soba-staging.mjs.map +1 -1
  43. package/package.json +11 -3
  44. package/plugin/package.json +1 -1
  45. package/staging/index.d.ts +2 -0
  46. package/staging/lib/camera-shake/camera-shake.d.ts +28 -0
  47. package/staging/lib/cloud/cloud.d.ts +23 -0
@@ -0,0 +1,1431 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, CUSTOM_ELEMENTS_SCHEMA, Input, InjectionToken, inject, Directive, EventEmitter, TemplateRef, Output, ContentChild } from '@angular/core';
3
+ import { extend, NgtRxStore, injectNgtRef, NgtStore, NgtPortal, NgtPortalContent, NgtArgs, NgtRepeat, startWithUndefined, NgtPush } from 'angular-three';
4
+ import * as THREE from 'three';
5
+ import { Group, Vector3, Quaternion, Object3D, Matrix4, Mesh, BoxGeometry, MeshBasicMaterial, MeshLambertMaterial, CanvasTexture, AmbientLight, PointLight, Sprite, SpriteMaterial } from 'three';
6
+ import { NgTemplateOutlet, DOCUMENT, NgFor, NgIf } from '@angular/common';
7
+ import { selectSlice } from '@rx-angular/state';
8
+ import { NgtsOrthographicCamera } from 'angular-three-soba/cameras';
9
+ import { combineLatest, map, switchMap, of } from 'rxjs';
10
+ import { TextGeometry, FontLoader } from 'three-stdlib';
11
+ import { RxActionFactory } from '@rx-angular/state/actions';
12
+ import { Text, preloadFont } from 'troika-three-text';
13
+
14
+ extend({ Group });
15
+ class NgtsBillboard extends NgtRxStore {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.billboardRef = injectNgtRef();
19
+ }
20
+ set follow(follow) {
21
+ this.set({ follow });
22
+ }
23
+ set lockX(lockX) {
24
+ this.set({ lockX });
25
+ }
26
+ set lockY(lockY) {
27
+ this.set({ lockY });
28
+ }
29
+ set lockZ(lockZ) {
30
+ this.set({ lockZ });
31
+ }
32
+ initialize() {
33
+ super.initialize();
34
+ this.set({ follow: true, lockX: false, lockY: false, lockZ: false });
35
+ }
36
+ onBeforeRender(event) {
37
+ const { follow, lockX, lockY, lockZ } = this.get();
38
+ if (!follow)
39
+ return;
40
+ // save prev rotation in case we're locking axises
41
+ const prevRotation = event.object.rotation.clone();
42
+ // always face the camera
43
+ event.object.quaternion.copy(event.state.camera.quaternion);
44
+ // readjust any axis that is locked
45
+ if (lockX)
46
+ event.object.rotation.x = prevRotation.x;
47
+ if (lockY)
48
+ event.object.rotation.y = prevRotation.y;
49
+ if (lockZ)
50
+ event.object.rotation.z = prevRotation.z;
51
+ }
52
+ }
53
+ NgtsBillboard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsBillboard, deps: null, target: i0.ɵɵFactoryTarget.Component });
54
+ NgtsBillboard.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsBillboard, isStandalone: true, selector: "ngts-billboard", inputs: { billboardRef: "billboardRef", follow: "follow", lockX: "lockX", lockY: "lockY", lockZ: "lockZ" }, usesInheritance: true, ngImport: i0, template: `
55
+ <ngt-group ngtCompound [ref]="billboardRef" (beforeRender)="onBeforeRender($any($event))">
56
+ <ng-content />
57
+ </ngt-group>
58
+ `, isInline: true });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsBillboard, decorators: [{
60
+ type: Component,
61
+ args: [{
62
+ selector: 'ngts-billboard',
63
+ standalone: true,
64
+ template: `
65
+ <ngt-group ngtCompound [ref]="billboardRef" (beforeRender)="onBeforeRender($any($event))">
66
+ <ng-content />
67
+ </ngt-group>
68
+ `,
69
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
70
+ }]
71
+ }], propDecorators: { billboardRef: [{
72
+ type: Input
73
+ }], follow: [{
74
+ type: Input
75
+ }], lockX: [{
76
+ type: Input
77
+ }], lockY: [{
78
+ type: Input
79
+ }], lockZ: [{
80
+ type: Input
81
+ }] } });
82
+
83
+ const isOrbitControls = (controls) => {
84
+ return 'minPolarAngle' in controls;
85
+ };
86
+ const NGTS_GIZMO_HELPER_API = new InjectionToken('NgtsGizmoHelper API');
87
+ function gizmoHelperApiFactory(gizmo) {
88
+ const store = inject(NgtStore);
89
+ return {
90
+ tweenCamera: (direction) => {
91
+ const { controls, camera, invalidate } = store.get();
92
+ const defaultControls = controls;
93
+ gizmo.animating = true;
94
+ if (defaultControls)
95
+ gizmo.focusPoint = defaultControls.target;
96
+ gizmo.radius = camera.position.distanceTo(gizmo.target);
97
+ // rotate from current camera orientation
98
+ gizmo.q1.copy(camera.quaternion);
99
+ // to new current camera orientation
100
+ gizmo.targetPosition.copy(direction).multiplyScalar(gizmo.radius).add(gizmo.target);
101
+ gizmo.dummy.lookAt(gizmo.targetPosition);
102
+ gizmo.q2.copy(gizmo.dummy.quaternion);
103
+ invalidate();
104
+ },
105
+ };
106
+ }
107
+ extend({ Group });
108
+ class NgtsGizmoHelperContent {
109
+ }
110
+ NgtsGizmoHelperContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoHelperContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
111
+ NgtsGizmoHelperContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoHelperContent, isStandalone: true, selector: "ng-template[ngtsGizmoHelperContent]", ngImport: i0 });
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoHelperContent, decorators: [{
113
+ type: Directive,
114
+ args: [{
115
+ selector: 'ng-template[ngtsGizmoHelperContent]',
116
+ standalone: true,
117
+ }]
118
+ }] });
119
+ class NgtsGizmoHelper extends NgtRxStore {
120
+ constructor() {
121
+ super(...arguments);
122
+ this.store = inject(NgtStore);
123
+ this.gizmoRef = injectNgtRef();
124
+ this.virtualCameraRef = injectNgtRef();
125
+ this.animating = false;
126
+ this.radius = 0;
127
+ this.focusPoint = new Vector3(0, 0, 0);
128
+ this.q1 = new Quaternion();
129
+ this.q2 = new Quaternion();
130
+ this.target = new Vector3();
131
+ this.targetPosition = new Vector3();
132
+ this.dummy = new Object3D();
133
+ this.defaultUp = new Vector3(0, 0, 0);
134
+ this.turnRate = 2 * Math.PI; // turn rate in angles per sec
135
+ this.matrix = new Matrix4();
136
+ this.updated = new EventEmitter();
137
+ }
138
+ set alignment(alignment) {
139
+ this.set({ alignment });
140
+ }
141
+ set margin(margin) {
142
+ this.set({ margin });
143
+ }
144
+ set renderPriority(renderPriority) {
145
+ this.set({ renderPriority });
146
+ }
147
+ set autoClear(autoClear) {
148
+ this.set({ autoClear });
149
+ }
150
+ initialize() {
151
+ super.initialize();
152
+ this.set({ alignment: 'bottom-right', margin: [80, 80], renderPriority: 1 });
153
+ }
154
+ ngOnInit() {
155
+ this.updateDefaultUp();
156
+ this.setGizmoPosition();
157
+ }
158
+ onBeforeRender(delta) {
159
+ if (this.virtualCameraRef.nativeElement && this.gizmoRef.nativeElement) {
160
+ const { controls, camera: mainCamera, invalidate } = this.store.get();
161
+ const defaultControls = controls;
162
+ // Animate step
163
+ if (this.animating) {
164
+ if (this.q1.angleTo(this.q2) < 0.01) {
165
+ this.animating = false;
166
+ // Orbit controls uses UP vector as the orbit axes,
167
+ // so we need to reset it after the animation is done
168
+ // moving it around for the controls to work correctly
169
+ if (isOrbitControls(defaultControls)) {
170
+ mainCamera.up.copy(this.defaultUp);
171
+ }
172
+ }
173
+ else {
174
+ const step = delta * this.turnRate;
175
+ // animate position by doing a slerp and then scaling the position on the unit sphere
176
+ this.q1.rotateTowards(this.q2, step);
177
+ // animate orientation
178
+ mainCamera.position
179
+ .set(0, 0, 1)
180
+ .applyQuaternion(this.q1)
181
+ .multiplyScalar(this.radius)
182
+ .add(this.focusPoint);
183
+ mainCamera.up.set(0, 1, 0).applyQuaternion(this.q1).normalize();
184
+ mainCamera.quaternion.copy(this.q1);
185
+ if (this.updated.observed)
186
+ this.updated.emit();
187
+ else if (defaultControls) {
188
+ defaultControls.update();
189
+ }
190
+ invalidate();
191
+ }
192
+ }
193
+ // Sync Gizmo with main camera orientation
194
+ this.matrix.copy(mainCamera.matrix).invert();
195
+ this.gizmoRef.nativeElement.quaternion.setFromRotationMatrix(this.matrix);
196
+ }
197
+ }
198
+ setGizmoPosition() {
199
+ this.connect('gizmoPosition', combineLatest([this.store.select('size'), this.select(selectSlice(['alignment', 'margin']))]).pipe(map(([size, { alignment, margin }]) => {
200
+ const [marginX, marginY] = margin;
201
+ const x = alignment.endsWith('-center')
202
+ ? 0
203
+ : alignment.endsWith('-left')
204
+ ? -size.width / 2 + marginX
205
+ : size.width / 2 - marginX;
206
+ const y = alignment.startsWith('center-')
207
+ ? 0
208
+ : alignment.startsWith('top-')
209
+ ? size.height / 2 - marginY
210
+ : -size.height / 2 + marginY;
211
+ return [x, y, 0];
212
+ })));
213
+ }
214
+ updateDefaultUp() {
215
+ this.hold(this.store.select('camera'), (camera) => {
216
+ this.defaultUp.copy(camera.up);
217
+ });
218
+ }
219
+ }
220
+ NgtsGizmoHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoHelper, deps: null, target: i0.ɵɵFactoryTarget.Component });
221
+ NgtsGizmoHelper.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoHelper, isStandalone: true, selector: "ngts-gizmo-helper", inputs: { alignment: "alignment", margin: "margin", renderPriority: "renderPriority", autoClear: "autoClear" }, outputs: { updated: "updated" }, providers: [{ provide: NGTS_GIZMO_HELPER_API, useFactory: gizmoHelperApiFactory, deps: [NgtsGizmoHelper] }], queries: [{ propertyName: "gizmoHelperContent", first: true, predicate: NgtsGizmoHelperContent, descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: `
222
+ <ngt-portal [renderPriority]="get('renderPriority')">
223
+ <ng-template ngtPortalContent>
224
+ <ngts-orthographic-camera
225
+ [cameraRef]="virtualCameraRef"
226
+ [makeDefault]="true"
227
+ [position]="[0, 0, 200]"
228
+ />
229
+ <ngt-group
230
+ [ref]="gizmoRef"
231
+ [position]="get('gizmoPosition')"
232
+ (beforeRender)="onBeforeRender($any($event).state.delta)"
233
+ >
234
+ <ng-container *ngTemplateOutlet="gizmoHelperContent" />
235
+ </ngt-group>
236
+ </ng-template>
237
+ </ngt-portal>
238
+ `, isInline: true, dependencies: [{ kind: "component", type: NgtPortal, selector: "ngt-portal", inputs: ["container", "state", "autoRender", "autoRenderPriority"], outputs: ["beforeRender"] }, { kind: "directive", type: NgtPortalContent, selector: "ng-template[ngtPortalContent]" }, { kind: "component", type: NgtsOrthographicCamera, selector: "ngts-orthographic-camera", inputs: ["left", "right", "top", "bottom"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoHelper, decorators: [{
240
+ type: Component,
241
+ args: [{
242
+ selector: 'ngts-gizmo-helper',
243
+ standalone: true,
244
+ template: `
245
+ <ngt-portal [renderPriority]="get('renderPriority')">
246
+ <ng-template ngtPortalContent>
247
+ <ngts-orthographic-camera
248
+ [cameraRef]="virtualCameraRef"
249
+ [makeDefault]="true"
250
+ [position]="[0, 0, 200]"
251
+ />
252
+ <ngt-group
253
+ [ref]="gizmoRef"
254
+ [position]="get('gizmoPosition')"
255
+ (beforeRender)="onBeforeRender($any($event).state.delta)"
256
+ >
257
+ <ng-container *ngTemplateOutlet="gizmoHelperContent" />
258
+ </ngt-group>
259
+ </ng-template>
260
+ </ngt-portal>
261
+ `,
262
+ imports: [NgtPortal, NgtPortalContent, NgtsOrthographicCamera, NgTemplateOutlet],
263
+ providers: [{ provide: NGTS_GIZMO_HELPER_API, useFactory: gizmoHelperApiFactory, deps: [NgtsGizmoHelper] }],
264
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
265
+ }]
266
+ }], propDecorators: { alignment: [{
267
+ type: Input
268
+ }], margin: [{
269
+ type: Input
270
+ }], renderPriority: [{
271
+ type: Input
272
+ }], autoClear: [{
273
+ type: Input
274
+ }], updated: [{
275
+ type: Output
276
+ }], gizmoHelperContent: [{
277
+ type: ContentChild,
278
+ args: [NgtsGizmoHelperContent, { static: true, read: TemplateRef }]
279
+ }] } });
280
+
281
+ const colors = { bg: '#f0f0f0', hover: '#999', text: 'black', stroke: 'black' };
282
+ const defaultFaces = ['Right', 'Left', 'Top', 'Bottom', 'Front', 'Back'];
283
+ const makePositionVector = (xyz) => new THREE.Vector3(...xyz).multiplyScalar(0.38);
284
+ const corners = [
285
+ [1, 1, 1],
286
+ [1, 1, -1],
287
+ [1, -1, 1],
288
+ [1, -1, -1],
289
+ [-1, 1, 1],
290
+ [-1, 1, -1],
291
+ [-1, -1, 1],
292
+ [-1, -1, -1],
293
+ ].map(makePositionVector);
294
+ const cornerDimensions = [0.25, 0.25, 0.25];
295
+ const edges = [
296
+ [1, 1, 0],
297
+ [1, 0, 1],
298
+ [1, 0, -1],
299
+ [1, -1, 0],
300
+ [0, 1, 1],
301
+ [0, 1, -1],
302
+ [0, -1, 1],
303
+ [0, -1, -1],
304
+ [-1, 1, 0],
305
+ [-1, 0, 1],
306
+ [-1, 0, -1],
307
+ [-1, -1, 0],
308
+ ].map(makePositionVector);
309
+ const edgeDimensions = edges.map((edge) => edge.toArray().map((axis) => (axis == 0 ? 0.5 : 0.25)));
310
+
311
+ class NgtsGizmoViewcubeInputs extends NgtRxStore {
312
+ constructor() {
313
+ super(...arguments);
314
+ this.store = inject(NgtStore);
315
+ }
316
+ set opacity(opacity) {
317
+ this.set({ opacity });
318
+ }
319
+ set hoverColor(hoverColor) {
320
+ this.set({ hoverColor });
321
+ }
322
+ set textColor(textColor) {
323
+ this.set({ textColor });
324
+ }
325
+ set strokeColor(strokeColor) {
326
+ this.set({ strokeColor });
327
+ }
328
+ set faces(faces) {
329
+ this.set({ faces });
330
+ }
331
+ set clickEmitter(clickEmitter) {
332
+ this.set({ clickEmitter });
333
+ }
334
+ }
335
+ NgtsGizmoViewcubeInputs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcubeInputs, deps: null, target: i0.ɵɵFactoryTarget.Directive });
336
+ NgtsGizmoViewcubeInputs.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoViewcubeInputs, inputs: { opacity: "opacity", hoverColor: "hoverColor", textColor: "textColor", strokeColor: "strokeColor", faces: "faces", clickEmitter: "clickEmitter" }, usesInheritance: true, ngImport: i0 });
337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcubeInputs, decorators: [{
338
+ type: Directive
339
+ }], propDecorators: { opacity: [{
340
+ type: Input
341
+ }], hoverColor: [{
342
+ type: Input
343
+ }], textColor: [{
344
+ type: Input
345
+ }], strokeColor: [{
346
+ type: Input
347
+ }], faces: [{
348
+ type: Input
349
+ }], clickEmitter: [{
350
+ type: Input
351
+ }] } });
352
+
353
+ extend({ Mesh, BoxGeometry, MeshBasicMaterial });
354
+ class NgtsGizmoViewcubeEdgeCube extends NgtsGizmoViewcubeInputs {
355
+ constructor() {
356
+ super(...arguments);
357
+ this.gizmoHelperApi = inject(NGTS_GIZMO_HELPER_API);
358
+ this.hover = false;
359
+ }
360
+ set dimensions(dimensions) {
361
+ this.set({ dimensions });
362
+ }
363
+ set position(position) {
364
+ this.set({ position });
365
+ }
366
+ initialize() {
367
+ super.initialize();
368
+ this.set({ hoverColor: colors.hover });
369
+ }
370
+ onPointerMove(event) {
371
+ event.stopPropagation();
372
+ this.hover = true;
373
+ }
374
+ onPointerOut(event) {
375
+ event.stopPropagation();
376
+ this.hover = false;
377
+ }
378
+ onClick(event) {
379
+ var _a;
380
+ if ((_a = this.get('clickEmitter')) === null || _a === void 0 ? void 0 : _a.observed) {
381
+ this.get('clickEmitter').emit(event);
382
+ }
383
+ else {
384
+ event.stopPropagation();
385
+ this.gizmoHelperApi.tweenCamera(this.get('position'));
386
+ }
387
+ }
388
+ }
389
+ NgtsGizmoViewcubeEdgeCube.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcubeEdgeCube, deps: null, target: i0.ɵɵFactoryTarget.Component });
390
+ NgtsGizmoViewcubeEdgeCube.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoViewcubeEdgeCube, isStandalone: true, selector: "ngts-gizmo-viewcube-edge-cube[dimensions][position]", inputs: { dimensions: "dimensions", position: "position" }, usesInheritance: true, ngImport: i0, template: `
391
+ <ngt-mesh
392
+ [scale]="1.01"
393
+ [position]="get('position')"
394
+ (pointermove)="onPointerMove($any($event))"
395
+ (pointerout)="onPointerOut($any($event))"
396
+ (click)="onClick($any($event))"
397
+ >
398
+ <ngt-box-geometry *args="get('dimensions')" />
399
+ <ngt-mesh-basic-material
400
+ [color]="hover ? get('hoverColor') : 'white'"
401
+ [transparent]="true"
402
+ [opacity]="0.6"
403
+ [visible]="hover"
404
+ />
405
+ </ngt-mesh>
406
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcubeEdgeCube, decorators: [{
408
+ type: Component,
409
+ args: [{
410
+ selector: 'ngts-gizmo-viewcube-edge-cube[dimensions][position]',
411
+ standalone: true,
412
+ template: `
413
+ <ngt-mesh
414
+ [scale]="1.01"
415
+ [position]="get('position')"
416
+ (pointermove)="onPointerMove($any($event))"
417
+ (pointerout)="onPointerOut($any($event))"
418
+ (click)="onClick($any($event))"
419
+ >
420
+ <ngt-box-geometry *args="get('dimensions')" />
421
+ <ngt-mesh-basic-material
422
+ [color]="hover ? get('hoverColor') : 'white'"
423
+ [transparent]="true"
424
+ [opacity]="0.6"
425
+ [visible]="hover"
426
+ />
427
+ </ngt-mesh>
428
+ `,
429
+ imports: [NgtArgs],
430
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
431
+ }]
432
+ }], propDecorators: { dimensions: [{
433
+ type: Input
434
+ }], position: [{
435
+ type: Input
436
+ }] } });
437
+
438
+ extend({ MeshLambertMaterial, Mesh, BoxGeometry });
439
+ class NgtsGizmoViewcubeFaceMaterial extends NgtsGizmoViewcubeInputs {
440
+ constructor() {
441
+ super(...arguments);
442
+ this.document = inject(DOCUMENT);
443
+ }
444
+ set index(index) {
445
+ this.set({ index });
446
+ }
447
+ set hover(hover) {
448
+ this.set({ hover });
449
+ }
450
+ set font(font) {
451
+ this.set({ font });
452
+ }
453
+ set color(color) {
454
+ this.set({ color });
455
+ }
456
+ initialize() {
457
+ super.initialize();
458
+ this.set({
459
+ font: '20px Inter var, Arial, sans-serif',
460
+ faces: defaultFaces,
461
+ color: colors.bg,
462
+ hoverColor: colors.hover,
463
+ textColor: colors.text,
464
+ strokeColor: colors.stroke,
465
+ opacity: 1,
466
+ });
467
+ this.connect('texture', this.select(['index', 'faces', 'color', 'font', 'textColor', 'strokeColor'], ({ index, faces, color, font, textColor, strokeColor }) => {
468
+ const canvas = this.document.createElement('canvas');
469
+ canvas.width = 128;
470
+ canvas.height = 128;
471
+ const context = canvas.getContext('2d');
472
+ context.fillStyle = color;
473
+ context.fillRect(0, 0, canvas.width, canvas.height);
474
+ context.strokeStyle = strokeColor;
475
+ context.strokeRect(0, 0, canvas.width, canvas.height);
476
+ context.font = font;
477
+ context.textAlign = 'center';
478
+ context.fillStyle = textColor;
479
+ context.fillText(faces[index].toUpperCase(), 64, 76);
480
+ return new CanvasTexture(canvas);
481
+ }));
482
+ }
483
+ }
484
+ NgtsGizmoViewcubeFaceMaterial.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcubeFaceMaterial, deps: null, target: i0.ɵɵFactoryTarget.Component });
485
+ NgtsGizmoViewcubeFaceMaterial.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoViewcubeFaceMaterial, isStandalone: true, selector: "ngts-gizmo-viewcube-face-material[hover][index]", inputs: { index: "index", hover: "hover", font: "font", color: "color" }, usesInheritance: true, ngImport: i0, template: `
486
+ <ngt-mesh-lambert-material
487
+ [attach]="['material', get('index')]"
488
+ [map]="get('texture')"
489
+ [color]="get('hover') ? get('hoverColor') : get('color')"
490
+ [opacity]="get('opacity')"
491
+ [transparent]="true"
492
+ >
493
+ <ngt-value [rawValue]="store.get('gl').outputEncoding" attach="map.encoding" />
494
+ <ngt-value [rawValue]="store.get('gl').capabilities.getMaxAnisotropy() || 1" attach="map.anisotrophy" />
495
+ </ngt-mesh-lambert-material>
496
+ `, isInline: true });
497
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcubeFaceMaterial, decorators: [{
498
+ type: Component,
499
+ args: [{
500
+ selector: 'ngts-gizmo-viewcube-face-material[hover][index]',
501
+ standalone: true,
502
+ template: `
503
+ <ngt-mesh-lambert-material
504
+ [attach]="['material', get('index')]"
505
+ [map]="get('texture')"
506
+ [color]="get('hover') ? get('hoverColor') : get('color')"
507
+ [opacity]="get('opacity')"
508
+ [transparent]="true"
509
+ >
510
+ <ngt-value [rawValue]="store.get('gl').outputEncoding" attach="map.encoding" />
511
+ <ngt-value [rawValue]="store.get('gl').capabilities.getMaxAnisotropy() || 1" attach="map.anisotrophy" />
512
+ </ngt-mesh-lambert-material>
513
+ `,
514
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
515
+ }]
516
+ }], propDecorators: { index: [{
517
+ type: Input
518
+ }], hover: [{
519
+ type: Input
520
+ }], font: [{
521
+ type: Input
522
+ }], color: [{
523
+ type: Input
524
+ }] } });
525
+ class NgtsGizmoViewcubeFaceCube extends NgtsGizmoViewcubeInputs {
526
+ constructor() {
527
+ super(...arguments);
528
+ this.gizmoHelperApi = inject(NGTS_GIZMO_HELPER_API);
529
+ this.hover = -1;
530
+ }
531
+ set font(font) {
532
+ this.set({ font });
533
+ }
534
+ set color(color) {
535
+ this.set({ color });
536
+ }
537
+ onPointerMove(event) {
538
+ event.stopPropagation();
539
+ this.hover = Math.floor(event.faceIndex / 2);
540
+ }
541
+ onPointerOut(event) {
542
+ event.stopPropagation();
543
+ this.hover = -1;
544
+ }
545
+ onClick(event) {
546
+ var _a;
547
+ if ((_a = this.get('clickEmitter')) === null || _a === void 0 ? void 0 : _a.observed) {
548
+ this.get('clickEmitter').emit(event);
549
+ }
550
+ else {
551
+ event.stopPropagation();
552
+ this.gizmoHelperApi.tweenCamera(event.face.normal);
553
+ }
554
+ }
555
+ }
556
+ NgtsGizmoViewcubeFaceCube.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcubeFaceCube, deps: null, target: i0.ɵɵFactoryTarget.Component });
557
+ NgtsGizmoViewcubeFaceCube.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoViewcubeFaceCube, isStandalone: true, selector: "ngts-gizmo-viewcube-face-cube", inputs: { font: "font", color: "color" }, usesInheritance: true, ngImport: i0, template: `
558
+ <ngt-mesh
559
+ (pointermove)="onPointerMove($any($event))"
560
+ (pointerout)="onPointerOut($any($event))"
561
+ (click)="onClick($any($event))"
562
+ >
563
+ <ngt-box-geometry />
564
+ <ngts-gizmo-viewcube-face-material
565
+ *ngFor="let i; repeat: 6"
566
+ [hover]="hover === i"
567
+ [index]="i"
568
+ [font]="get('font')"
569
+ [color]="get('color')"
570
+ [opacity]="get('opacity')"
571
+ [hoverColor]="get('hoverColor')"
572
+ [textColor]="get('textColor')"
573
+ [strokeColor]="get('strokeColor')"
574
+ [faces]="get('faces')"
575
+ />
576
+ </ngt-mesh>
577
+ `, isInline: true, dependencies: [{ kind: "component", type: NgtsGizmoViewcubeFaceMaterial, selector: "ngts-gizmo-viewcube-face-material[hover][index]", inputs: ["index", "hover", "font", "color"] }, { kind: "directive", type: NgtRepeat, selector: "[ngFor][ngForRepeat]", inputs: ["ngForRepeat"] }] });
578
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcubeFaceCube, decorators: [{
579
+ type: Component,
580
+ args: [{
581
+ selector: 'ngts-gizmo-viewcube-face-cube',
582
+ standalone: true,
583
+ template: `
584
+ <ngt-mesh
585
+ (pointermove)="onPointerMove($any($event))"
586
+ (pointerout)="onPointerOut($any($event))"
587
+ (click)="onClick($any($event))"
588
+ >
589
+ <ngt-box-geometry />
590
+ <ngts-gizmo-viewcube-face-material
591
+ *ngFor="let i; repeat: 6"
592
+ [hover]="hover === i"
593
+ [index]="i"
594
+ [font]="get('font')"
595
+ [color]="get('color')"
596
+ [opacity]="get('opacity')"
597
+ [hoverColor]="get('hoverColor')"
598
+ [textColor]="get('textColor')"
599
+ [strokeColor]="get('strokeColor')"
600
+ [faces]="get('faces')"
601
+ />
602
+ </ngt-mesh>
603
+ `,
604
+ imports: [NgtsGizmoViewcubeFaceMaterial, NgtRepeat],
605
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
606
+ }]
607
+ }], propDecorators: { font: [{
608
+ type: Input
609
+ }], color: [{
610
+ type: Input
611
+ }] } });
612
+
613
+ extend({ Group, AmbientLight, PointLight });
614
+ class NgtsGizmoViewcube extends NgtsGizmoViewcubeInputs {
615
+ constructor() {
616
+ super(...arguments);
617
+ this.edges = edges;
618
+ this.edgeDimensions = edgeDimensions;
619
+ this.corners = corners;
620
+ this.cornerDimensions = cornerDimensions;
621
+ this.clicked = new EventEmitter();
622
+ }
623
+ set font(font) {
624
+ this.set({ font });
625
+ }
626
+ set color(color) {
627
+ this.set({ color });
628
+ }
629
+ }
630
+ NgtsGizmoViewcube.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcube, deps: null, target: i0.ɵɵFactoryTarget.Component });
631
+ NgtsGizmoViewcube.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoViewcube, isStandalone: true, selector: "ngts-gizmo-viewcube", inputs: { font: "font", color: "color" }, outputs: { clicked: "clicked" }, usesInheritance: true, ngImport: i0, template: `
632
+ <ngt-group [scale]="60">
633
+ <ngts-gizmo-viewcube-face-cube
634
+ [font]="get('font')"
635
+ [color]="get('color')"
636
+ [opacity]="get('opacity')"
637
+ [hoverColor]="get('hoverColor')"
638
+ [textColor]="get('textColor')"
639
+ [strokeColor]="get('strokeColor')"
640
+ [faces]="get('faces')"
641
+ [clickEmitter]="clicked"
642
+ />
643
+
644
+ <ngts-gizmo-viewcube-edge-cube
645
+ *ngFor="let edge of edges; let i = index"
646
+ [position]="edge"
647
+ [dimensions]="edgeDimensions[i]"
648
+ [font]="get('font')"
649
+ [color]="get('color')"
650
+ [opacity]="get('opacity')"
651
+ [hoverColor]="get('hoverColor')"
652
+ [textColor]="get('textColor')"
653
+ [strokeColor]="get('strokeColor')"
654
+ [faces]="get('faces')"
655
+ [clickEmitter]="clicked"
656
+ />
657
+
658
+ <ngts-gizmo-viewcube-edge-cube
659
+ *ngFor="let corner of corners"
660
+ [position]="corner"
661
+ [dimensions]="cornerDimensions"
662
+ [font]="get('font')"
663
+ [color]="get('color')"
664
+ [opacity]="get('opacity')"
665
+ [hoverColor]="get('hoverColor')"
666
+ [textColor]="get('textColor')"
667
+ [strokeColor]="get('strokeColor')"
668
+ [faces]="get('faces')"
669
+ [clickEmitter]="clicked"
670
+ />
671
+
672
+ <ngt-ambient-light [intensity]="0.5" />
673
+ <ngt-point-light [position]="10" [intensity]="0.5" />
674
+ </ngt-group>
675
+ `, isInline: true, dependencies: [{ kind: "component", type: NgtsGizmoViewcubeEdgeCube, selector: "ngts-gizmo-viewcube-edge-cube[dimensions][position]", inputs: ["dimensions", "position"] }, { kind: "component", type: NgtsGizmoViewcubeFaceCube, selector: "ngts-gizmo-viewcube-face-cube", inputs: ["font", "color"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewcube, decorators: [{
677
+ type: Component,
678
+ args: [{
679
+ selector: 'ngts-gizmo-viewcube',
680
+ standalone: true,
681
+ template: `
682
+ <ngt-group [scale]="60">
683
+ <ngts-gizmo-viewcube-face-cube
684
+ [font]="get('font')"
685
+ [color]="get('color')"
686
+ [opacity]="get('opacity')"
687
+ [hoverColor]="get('hoverColor')"
688
+ [textColor]="get('textColor')"
689
+ [strokeColor]="get('strokeColor')"
690
+ [faces]="get('faces')"
691
+ [clickEmitter]="clicked"
692
+ />
693
+
694
+ <ngts-gizmo-viewcube-edge-cube
695
+ *ngFor="let edge of edges; let i = index"
696
+ [position]="edge"
697
+ [dimensions]="edgeDimensions[i]"
698
+ [font]="get('font')"
699
+ [color]="get('color')"
700
+ [opacity]="get('opacity')"
701
+ [hoverColor]="get('hoverColor')"
702
+ [textColor]="get('textColor')"
703
+ [strokeColor]="get('strokeColor')"
704
+ [faces]="get('faces')"
705
+ [clickEmitter]="clicked"
706
+ />
707
+
708
+ <ngts-gizmo-viewcube-edge-cube
709
+ *ngFor="let corner of corners"
710
+ [position]="corner"
711
+ [dimensions]="cornerDimensions"
712
+ [font]="get('font')"
713
+ [color]="get('color')"
714
+ [opacity]="get('opacity')"
715
+ [hoverColor]="get('hoverColor')"
716
+ [textColor]="get('textColor')"
717
+ [strokeColor]="get('strokeColor')"
718
+ [faces]="get('faces')"
719
+ [clickEmitter]="clicked"
720
+ />
721
+
722
+ <ngt-ambient-light [intensity]="0.5" />
723
+ <ngt-point-light [position]="10" [intensity]="0.5" />
724
+ </ngt-group>
725
+ `,
726
+ imports: [NgtsGizmoViewcubeEdgeCube, NgtsGizmoViewcubeFaceCube, NgFor],
727
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
728
+ }]
729
+ }], propDecorators: { font: [{
730
+ type: Input
731
+ }], color: [{
732
+ type: Input
733
+ }], clicked: [{
734
+ type: Output
735
+ }] } });
736
+
737
+ extend({ Group, Mesh, BoxGeometry, MeshBasicMaterial, Sprite, SpriteMaterial });
738
+ class NgtsGizmoViewportAxis extends NgtRxStore {
739
+ set color(color) {
740
+ this.set({ color });
741
+ }
742
+ set rotation(rotation) {
743
+ this.set({ rotation });
744
+ }
745
+ set scale(scale) {
746
+ this.set({ scale: scale === undefined ? this.get('scale') : scale });
747
+ }
748
+ initialize() {
749
+ super.initialize();
750
+ this.set({ scale: [0.8, 0.05, 0.05] });
751
+ }
752
+ }
753
+ NgtsGizmoViewportAxis.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewportAxis, deps: null, target: i0.ɵɵFactoryTarget.Component });
754
+ NgtsGizmoViewportAxis.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoViewportAxis, isStandalone: true, selector: "ngts-gizmo-viewport-axis[color][rotation]", inputs: { color: "color", rotation: "rotation", scale: "scale" }, usesInheritance: true, ngImport: i0, template: `
755
+ <ngt-group [rotation]="get('rotation')">
756
+ <ngt-mesh [position]="[0.4, 0, 0]">
757
+ <ngt-box-geometry *args="get('scale')" />
758
+ <ngt-mesh-basic-material [color]="get('color')" [toneMapped]="false" />
759
+ </ngt-mesh>
760
+ </ngt-group>
761
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewportAxis, decorators: [{
763
+ type: Component,
764
+ args: [{
765
+ selector: 'ngts-gizmo-viewport-axis[color][rotation]',
766
+ standalone: true,
767
+ template: `
768
+ <ngt-group [rotation]="get('rotation')">
769
+ <ngt-mesh [position]="[0.4, 0, 0]">
770
+ <ngt-box-geometry *args="get('scale')" />
771
+ <ngt-mesh-basic-material [color]="get('color')" [toneMapped]="false" />
772
+ </ngt-mesh>
773
+ </ngt-group>
774
+ `,
775
+ imports: [NgtArgs],
776
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
777
+ }]
778
+ }], propDecorators: { color: [{
779
+ type: Input
780
+ }], rotation: [{
781
+ type: Input
782
+ }], scale: [{
783
+ type: Input
784
+ }] } });
785
+ class NgtsGizmoViewportAxisHead extends NgtRxStore {
786
+ constructor() {
787
+ super(...arguments);
788
+ this.document = inject(DOCUMENT);
789
+ this.store = inject(NgtStore);
790
+ this.gl = this.store.get('gl');
791
+ }
792
+ set arcStyle(arcStyle) {
793
+ this.set({ arcStyle });
794
+ }
795
+ set label(label) {
796
+ this.set({ label });
797
+ }
798
+ set labelColor(labelColor) {
799
+ this.set({ labelColor });
800
+ }
801
+ set axisHeadScale(axisHeadScale) {
802
+ this.set({ axisHeadScale });
803
+ }
804
+ set disabled(disabled) {
805
+ this.set({ disabled });
806
+ }
807
+ set font(font) {
808
+ this.set({ font });
809
+ }
810
+ set clickEmitter(clickEmitter) {
811
+ this.set({ clickEmitter });
812
+ }
813
+ initialize() {
814
+ super.initialize();
815
+ this.set({ axisHeadScale: 1, active: false });
816
+ this.connect('texture', combineLatest([
817
+ this.select('arcStyle'),
818
+ this.select('labelColor'),
819
+ this.select('font'),
820
+ this.select('label').pipe(startWithUndefined()),
821
+ ]).pipe(map(([arcStyle, labelColor, font, label]) => {
822
+ const canvas = this.document.createElement('canvas');
823
+ canvas.width = 64;
824
+ canvas.height = 64;
825
+ const context = canvas.getContext('2d');
826
+ context.beginPath();
827
+ context.arc(32, 32, 16, 0, 2 * Math.PI);
828
+ context.closePath();
829
+ context.fillStyle = arcStyle;
830
+ context.fill();
831
+ if (label) {
832
+ context.font = font;
833
+ context.textAlign = 'center';
834
+ context.fillStyle = labelColor;
835
+ context.fillText(label, 32, 41);
836
+ }
837
+ return new CanvasTexture(canvas);
838
+ })));
839
+ this.connect('scale', combineLatest([
840
+ this.select('active'),
841
+ this.select('axisHeadScale'),
842
+ this.select('label').pipe(startWithUndefined()),
843
+ ]).pipe(map(([active, axisHeadScale, label]) => (label ? 1 : 0.75) * (active ? 1.2 : 1) * axisHeadScale)));
844
+ }
845
+ onPointerOver(event) {
846
+ if (!this.get('disabled')) {
847
+ event.stopPropagation();
848
+ this.set({ active: true });
849
+ }
850
+ }
851
+ onPointerOut(event) {
852
+ var _a;
853
+ if (!this.get('disabled')) {
854
+ if ((_a = this.get('clickEmitter')) === null || _a === void 0 ? void 0 : _a.observed) {
855
+ this.get('clickEmitter').emit(event);
856
+ }
857
+ else {
858
+ event.stopPropagation();
859
+ this.set({ active: false });
860
+ }
861
+ }
862
+ }
863
+ }
864
+ NgtsGizmoViewportAxisHead.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewportAxisHead, deps: null, target: i0.ɵɵFactoryTarget.Component });
865
+ NgtsGizmoViewportAxisHead.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoViewportAxisHead, isStandalone: true, selector: "ngts-gizmo-viewport-axis-head", inputs: { arcStyle: "arcStyle", label: "label", labelColor: "labelColor", axisHeadScale: "axisHeadScale", disabled: "disabled", font: "font", clickEmitter: "clickEmitter" }, usesInheritance: true, ngImport: i0, template: `
866
+ <ngt-sprite
867
+ ngtCompound
868
+ [scale]="get('scale')"
869
+ (pointerover)="onPointerOver($any($event))"
870
+ (pointerout)="onPointerOut($any($event))"
871
+ >
872
+ <ngt-sprite-material
873
+ [map]="get('texture')"
874
+ [opacity]="get('label') ? 1 : 0.75"
875
+ [alphaTest]="0.3"
876
+ [toneMapped]="false"
877
+ >
878
+ <ngt-value [rawValue]="gl.outputEncoding" attach="map.encoding" />
879
+ <ngt-value [rawValue]="gl.capabilities.getMaxAnisotropy() || 1" attach="map.anisotropy" />
880
+ </ngt-sprite-material>
881
+ </ngt-sprite>
882
+ `, isInline: true });
883
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewportAxisHead, decorators: [{
884
+ type: Component,
885
+ args: [{
886
+ selector: 'ngts-gizmo-viewport-axis-head',
887
+ standalone: true,
888
+ template: `
889
+ <ngt-sprite
890
+ ngtCompound
891
+ [scale]="get('scale')"
892
+ (pointerover)="onPointerOver($any($event))"
893
+ (pointerout)="onPointerOut($any($event))"
894
+ >
895
+ <ngt-sprite-material
896
+ [map]="get('texture')"
897
+ [opacity]="get('label') ? 1 : 0.75"
898
+ [alphaTest]="0.3"
899
+ [toneMapped]="false"
900
+ >
901
+ <ngt-value [rawValue]="gl.outputEncoding" attach="map.encoding" />
902
+ <ngt-value [rawValue]="gl.capabilities.getMaxAnisotropy() || 1" attach="map.anisotropy" />
903
+ </ngt-sprite-material>
904
+ </ngt-sprite>
905
+ `,
906
+ imports: [NgtArgs],
907
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
908
+ }]
909
+ }], propDecorators: { arcStyle: [{
910
+ type: Input
911
+ }], label: [{
912
+ type: Input
913
+ }], labelColor: [{
914
+ type: Input
915
+ }], axisHeadScale: [{
916
+ type: Input
917
+ }], disabled: [{
918
+ type: Input
919
+ }], font: [{
920
+ type: Input
921
+ }], clickEmitter: [{
922
+ type: Input
923
+ }] } });
924
+
925
+ extend({ Group, AmbientLight, PointLight });
926
+ class NgtsGizmoViewport extends NgtRxStore {
927
+ constructor() {
928
+ super(...arguments);
929
+ this.gizmoHelperApi = inject(NGTS_GIZMO_HELPER_API);
930
+ this.Math = Math;
931
+ this.clicked = new EventEmitter();
932
+ }
933
+ set axisColors(axisColors) {
934
+ this.set({ axisColors });
935
+ }
936
+ set axisScale(axisScale) {
937
+ this.set({ axisScale });
938
+ }
939
+ set labels(labels) {
940
+ this.set({ labels });
941
+ }
942
+ set axisHeadScale(axisHeadScale) {
943
+ this.set({ axisHeadScale });
944
+ }
945
+ set labelColor(labelColor) {
946
+ this.set({ labelColor });
947
+ }
948
+ set hideNegativeAxes(hideNegativeAxes) {
949
+ this.set({ hideNegativeAxes });
950
+ }
951
+ set hideAxisHeads(hideAxisHeads) {
952
+ this.set({ hideAxisHeads });
953
+ }
954
+ set disabled(disabled) {
955
+ this.set({ disabled });
956
+ }
957
+ set font(font) {
958
+ this.set({ font });
959
+ }
960
+ initialize() {
961
+ super.initialize();
962
+ this.set({
963
+ font: '18px Inter var, Arial, sans-serif',
964
+ axisColors: ['#ff2060', '#20df80', '#2080ff'],
965
+ axisHeadScale: 1,
966
+ labels: ['X', 'Y', 'Z'],
967
+ labelColor: '#000',
968
+ });
969
+ }
970
+ onPointerDown(event) {
971
+ if (!this.get('disabled')) {
972
+ event.stopPropagation();
973
+ this.gizmoHelperApi.tweenCamera(event.object.position);
974
+ }
975
+ }
976
+ }
977
+ NgtsGizmoViewport.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewport, deps: null, target: i0.ɵɵFactoryTarget.Component });
978
+ NgtsGizmoViewport.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsGizmoViewport, isStandalone: true, selector: "ngts-gizmo-viewport", inputs: { axisColors: "axisColors", axisScale: "axisScale", labels: "labels", axisHeadScale: "axisHeadScale", labelColor: "labelColor", hideNegativeAxes: "hideNegativeAxes", hideAxisHeads: "hideAxisHeads", disabled: "disabled", font: "font" }, outputs: { clicked: "clicked" }, usesInheritance: true, ngImport: i0, template: `
979
+ <ngt-group ngtCompound [scale]="40">
980
+ <ngts-gizmo-viewport-axis
981
+ [color]="get('axisColors')[0]"
982
+ [rotation]="[0, 0, 0]"
983
+ [scale]="get('axisScale')"
984
+ ></ngts-gizmo-viewport-axis>
985
+ <ngts-gizmo-viewport-axis
986
+ [color]="get('axisColors')[1]"
987
+ [rotation]="[0, 0, Math.PI / 2]"
988
+ [scale]="get('axisScale')"
989
+ ></ngts-gizmo-viewport-axis>
990
+ <ngts-gizmo-viewport-axis
991
+ [color]="get('axisColors')[2]"
992
+ [rotation]="[0, -Math.PI / 2, 0]"
993
+ [scale]="get('axisScale')"
994
+ ></ngts-gizmo-viewport-axis>
995
+ <ng-container *ngIf="!get('hideAxisHeads')">
996
+ <ngts-gizmo-viewport-axis-head
997
+ [arcStyle]="get('axisColors')[0]"
998
+ [position]="[1, 0, 0]"
999
+ [label]="get('labels')[0]"
1000
+ [font]="get('font')"
1001
+ [disabled]="get('disabled')"
1002
+ [labelColor]="get('labelColor')"
1003
+ [clickEmitter]="clicked"
1004
+ [axisHeadScale]="get('axisHeadScale')"
1005
+ (pointerdown)="onPointerDown($any($event))"
1006
+ ></ngts-gizmo-viewport-axis-head>
1007
+ <ngts-gizmo-viewport-axis-head
1008
+ [arcStyle]="get('axisColors')[1]"
1009
+ [position]="[0, 1, 0]"
1010
+ [label]="get('labels')[1]"
1011
+ [font]="get('font')"
1012
+ [disabled]="get('disabled')"
1013
+ [labelColor]="get('labelColor')"
1014
+ [clickEmitter]="clicked"
1015
+ [axisHeadScale]="get('axisHeadScale')"
1016
+ (pointerdown)="onPointerDown($any($event))"
1017
+ ></ngts-gizmo-viewport-axis-head>
1018
+ <ngts-gizmo-viewport-axis-head
1019
+ [arcStyle]="get('axisColors')[2]"
1020
+ [position]="[0, 0, 1]"
1021
+ [label]="get('labels')[2]"
1022
+ [font]="get('font')"
1023
+ [disabled]="get('disabled')"
1024
+ [labelColor]="get('labelColor')"
1025
+ [clickEmitter]="clicked"
1026
+ [axisHeadScale]="get('axisHeadScale')"
1027
+ (pointerdown)="onPointerDown($any($event))"
1028
+ ></ngts-gizmo-viewport-axis-head>
1029
+ <ng-container *ngIf="!get('hideNegativeAxes')">
1030
+ <ngts-gizmo-viewport-axis-head
1031
+ [arcStyle]="get('axisColors')[0]"
1032
+ [position]="[-1, 0, 0]"
1033
+ [font]="get('font')"
1034
+ [disabled]="get('disabled')"
1035
+ [labelColor]="get('labelColor')"
1036
+ [clickEmitter]="clicked"
1037
+ [axisHeadScale]="get('axisHeadScale')"
1038
+ (pointerdown)="onPointerDown($any($event))"
1039
+ ></ngts-gizmo-viewport-axis-head>
1040
+ <ngts-gizmo-viewport-axis-head
1041
+ [arcStyle]="get('axisColors')[1]"
1042
+ [position]="[0, -1, 0]"
1043
+ [font]="get('font')"
1044
+ [disabled]="get('disabled')"
1045
+ [labelColor]="get('labelColor')"
1046
+ [clickEmitter]="clicked"
1047
+ [axisHeadScale]="get('axisHeadScale')"
1048
+ (pointerdown)="onPointerDown($any($event))"
1049
+ ></ngts-gizmo-viewport-axis-head>
1050
+ <ngts-gizmo-viewport-axis-head
1051
+ [arcStyle]="get('axisColors')[2]"
1052
+ [position]="[0, 0, -1]"
1053
+ [font]="get('font')"
1054
+ [disabled]="get('disabled')"
1055
+ [labelColor]="get('labelColor')"
1056
+ [clickEmitter]="clicked"
1057
+ [axisHeadScale]="get('axisHeadScale')"
1058
+ (pointerdown)="onPointerDown($any($event))"
1059
+ ></ngts-gizmo-viewport-axis-head>
1060
+ </ng-container>
1061
+ </ng-container>
1062
+ <ngt-ambient-light intensity="0.5"></ngt-ambient-light>
1063
+ <ngt-point-light position="10" intensity="0.5"></ngt-point-light>
1064
+ </ngt-group>
1065
+ `, isInline: true, dependencies: [{ kind: "component", type: NgtsGizmoViewportAxis, selector: "ngts-gizmo-viewport-axis[color][rotation]", inputs: ["color", "rotation", "scale"] }, { kind: "component", type: NgtsGizmoViewportAxisHead, selector: "ngts-gizmo-viewport-axis-head", inputs: ["arcStyle", "label", "labelColor", "axisHeadScale", "disabled", "font", "clickEmitter"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1066
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsGizmoViewport, decorators: [{
1067
+ type: Component,
1068
+ args: [{
1069
+ selector: 'ngts-gizmo-viewport',
1070
+ standalone: true,
1071
+ template: `
1072
+ <ngt-group ngtCompound [scale]="40">
1073
+ <ngts-gizmo-viewport-axis
1074
+ [color]="get('axisColors')[0]"
1075
+ [rotation]="[0, 0, 0]"
1076
+ [scale]="get('axisScale')"
1077
+ ></ngts-gizmo-viewport-axis>
1078
+ <ngts-gizmo-viewport-axis
1079
+ [color]="get('axisColors')[1]"
1080
+ [rotation]="[0, 0, Math.PI / 2]"
1081
+ [scale]="get('axisScale')"
1082
+ ></ngts-gizmo-viewport-axis>
1083
+ <ngts-gizmo-viewport-axis
1084
+ [color]="get('axisColors')[2]"
1085
+ [rotation]="[0, -Math.PI / 2, 0]"
1086
+ [scale]="get('axisScale')"
1087
+ ></ngts-gizmo-viewport-axis>
1088
+ <ng-container *ngIf="!get('hideAxisHeads')">
1089
+ <ngts-gizmo-viewport-axis-head
1090
+ [arcStyle]="get('axisColors')[0]"
1091
+ [position]="[1, 0, 0]"
1092
+ [label]="get('labels')[0]"
1093
+ [font]="get('font')"
1094
+ [disabled]="get('disabled')"
1095
+ [labelColor]="get('labelColor')"
1096
+ [clickEmitter]="clicked"
1097
+ [axisHeadScale]="get('axisHeadScale')"
1098
+ (pointerdown)="onPointerDown($any($event))"
1099
+ ></ngts-gizmo-viewport-axis-head>
1100
+ <ngts-gizmo-viewport-axis-head
1101
+ [arcStyle]="get('axisColors')[1]"
1102
+ [position]="[0, 1, 0]"
1103
+ [label]="get('labels')[1]"
1104
+ [font]="get('font')"
1105
+ [disabled]="get('disabled')"
1106
+ [labelColor]="get('labelColor')"
1107
+ [clickEmitter]="clicked"
1108
+ [axisHeadScale]="get('axisHeadScale')"
1109
+ (pointerdown)="onPointerDown($any($event))"
1110
+ ></ngts-gizmo-viewport-axis-head>
1111
+ <ngts-gizmo-viewport-axis-head
1112
+ [arcStyle]="get('axisColors')[2]"
1113
+ [position]="[0, 0, 1]"
1114
+ [label]="get('labels')[2]"
1115
+ [font]="get('font')"
1116
+ [disabled]="get('disabled')"
1117
+ [labelColor]="get('labelColor')"
1118
+ [clickEmitter]="clicked"
1119
+ [axisHeadScale]="get('axisHeadScale')"
1120
+ (pointerdown)="onPointerDown($any($event))"
1121
+ ></ngts-gizmo-viewport-axis-head>
1122
+ <ng-container *ngIf="!get('hideNegativeAxes')">
1123
+ <ngts-gizmo-viewport-axis-head
1124
+ [arcStyle]="get('axisColors')[0]"
1125
+ [position]="[-1, 0, 0]"
1126
+ [font]="get('font')"
1127
+ [disabled]="get('disabled')"
1128
+ [labelColor]="get('labelColor')"
1129
+ [clickEmitter]="clicked"
1130
+ [axisHeadScale]="get('axisHeadScale')"
1131
+ (pointerdown)="onPointerDown($any($event))"
1132
+ ></ngts-gizmo-viewport-axis-head>
1133
+ <ngts-gizmo-viewport-axis-head
1134
+ [arcStyle]="get('axisColors')[1]"
1135
+ [position]="[0, -1, 0]"
1136
+ [font]="get('font')"
1137
+ [disabled]="get('disabled')"
1138
+ [labelColor]="get('labelColor')"
1139
+ [clickEmitter]="clicked"
1140
+ [axisHeadScale]="get('axisHeadScale')"
1141
+ (pointerdown)="onPointerDown($any($event))"
1142
+ ></ngts-gizmo-viewport-axis-head>
1143
+ <ngts-gizmo-viewport-axis-head
1144
+ [arcStyle]="get('axisColors')[2]"
1145
+ [position]="[0, 0, -1]"
1146
+ [font]="get('font')"
1147
+ [disabled]="get('disabled')"
1148
+ [labelColor]="get('labelColor')"
1149
+ [clickEmitter]="clicked"
1150
+ [axisHeadScale]="get('axisHeadScale')"
1151
+ (pointerdown)="onPointerDown($any($event))"
1152
+ ></ngts-gizmo-viewport-axis-head>
1153
+ </ng-container>
1154
+ </ng-container>
1155
+ <ngt-ambient-light intensity="0.5"></ngt-ambient-light>
1156
+ <ngt-point-light position="10" intensity="0.5"></ngt-point-light>
1157
+ </ngt-group>
1158
+ `,
1159
+ imports: [NgtsGizmoViewportAxis, NgtsGizmoViewportAxisHead, NgIf],
1160
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
1161
+ }]
1162
+ }], propDecorators: { axisColors: [{
1163
+ type: Input
1164
+ }], axisScale: [{
1165
+ type: Input
1166
+ }], labels: [{
1167
+ type: Input
1168
+ }], axisHeadScale: [{
1169
+ type: Input
1170
+ }], labelColor: [{
1171
+ type: Input
1172
+ }], hideNegativeAxes: [{
1173
+ type: Input
1174
+ }], hideAxisHeads: [{
1175
+ type: Input
1176
+ }], disabled: [{
1177
+ type: Input
1178
+ }], font: [{
1179
+ type: Input
1180
+ }], clicked: [{
1181
+ type: Output
1182
+ }] } });
1183
+
1184
+ extend({ Mesh, TextGeometry });
1185
+ class NgtsText3D extends NgtRxStore {
1186
+ constructor() {
1187
+ super(...arguments);
1188
+ this.font$ = this.select('font').pipe(switchMap((font) => {
1189
+ if (typeof font === 'string')
1190
+ return fetch(font).then((res) => res.json());
1191
+ return of(font);
1192
+ }), map((fontData) => new FontLoader().parse(fontData)));
1193
+ this.geometryArgs$ = combineLatest([
1194
+ this.font$,
1195
+ this.select('text'),
1196
+ this.select('size'),
1197
+ this.select('height'),
1198
+ this.select('bevelThickness'),
1199
+ this.select('bevelSize'),
1200
+ this.select('bevelEnabled'),
1201
+ this.select('bevelSegments'),
1202
+ this.select('bevelOffset'),
1203
+ this.select('curveSegments'),
1204
+ this.select('letterSpacing'),
1205
+ this.select('lineHeight'),
1206
+ ]).pipe(map(([font, text, size, height, bevelThickness, bevelSize, bevelEnabled, bevelSegments, bevelOffset, curveSegments, letterSpacing, lineHeight,]) => [
1207
+ text,
1208
+ {
1209
+ font,
1210
+ size,
1211
+ height,
1212
+ bevelThickness,
1213
+ bevelSize,
1214
+ bevelSegments,
1215
+ bevelEnabled,
1216
+ bevelOffset,
1217
+ curveSegments,
1218
+ letterSpacing,
1219
+ lineHeight,
1220
+ },
1221
+ ]));
1222
+ }
1223
+ set font(font) {
1224
+ this.set({ font });
1225
+ }
1226
+ set text(text) {
1227
+ this.set({ text });
1228
+ }
1229
+ set bevelEnabled(bevelEnabled) {
1230
+ this.set({ bevelEnabled });
1231
+ }
1232
+ set bevelOffset(bevelOffset) {
1233
+ this.set({ bevelOffset });
1234
+ }
1235
+ set bevelSize(bevelSize) {
1236
+ this.set({ bevelSize });
1237
+ }
1238
+ set bevelThickness(bevelThickness) {
1239
+ this.set({ bevelThickness });
1240
+ }
1241
+ set curveSegments(curveSegments) {
1242
+ this.set({ curveSegments });
1243
+ }
1244
+ set bevelSegments(bevelSegments) {
1245
+ this.set({ bevelSegments });
1246
+ }
1247
+ set height(height) {
1248
+ this.set({ height });
1249
+ }
1250
+ set size(size) {
1251
+ this.set({ size });
1252
+ }
1253
+ set lineHeight(lineHeight) {
1254
+ this.set({ lineHeight });
1255
+ }
1256
+ set letterSpacing(letterSpacing) {
1257
+ this.set({ letterSpacing });
1258
+ }
1259
+ initialize() {
1260
+ super.initialize();
1261
+ this.set({
1262
+ letterSpacing: 0,
1263
+ lineHeight: 1,
1264
+ size: 1,
1265
+ height: 0.2,
1266
+ bevelThickness: 0.1,
1267
+ bevelSize: 0.01,
1268
+ bevelEnabled: false,
1269
+ bevelOffset: 0,
1270
+ bevelSegments: 4,
1271
+ curveSegments: 8,
1272
+ });
1273
+ }
1274
+ }
1275
+ NgtsText3D.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsText3D, deps: null, target: i0.ɵɵFactoryTarget.Component });
1276
+ NgtsText3D.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsText3D, isStandalone: true, selector: "ngts-text-3d[font]", inputs: { font: "font", text: "text", bevelEnabled: "bevelEnabled", bevelOffset: "bevelOffset", bevelSize: "bevelSize", bevelThickness: "bevelThickness", curveSegments: "curveSegments", bevelSegments: "bevelSegments", height: "height", size: "size", lineHeight: "lineHeight", letterSpacing: "letterSpacing" }, usesInheritance: true, ngImport: i0, template: `
1277
+ <ngt-mesh ngtCompound>
1278
+ <ngt-text-geometry *args="geometryArgs$ | ngtPush : null" />
1279
+ <ng-content />
1280
+ </ngt-mesh>
1281
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }, { kind: "pipe", type: NgtPush, name: "ngtPush" }] });
1282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsText3D, decorators: [{
1283
+ type: Component,
1284
+ args: [{
1285
+ selector: 'ngts-text-3d[font]',
1286
+ standalone: true,
1287
+ template: `
1288
+ <ngt-mesh ngtCompound>
1289
+ <ngt-text-geometry *args="geometryArgs$ | ngtPush : null" />
1290
+ <ng-content />
1291
+ </ngt-mesh>
1292
+ `,
1293
+ imports: [NgtArgs, NgtPush],
1294
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
1295
+ }]
1296
+ }], propDecorators: { font: [{
1297
+ type: Input
1298
+ }], text: [{
1299
+ type: Input
1300
+ }], bevelEnabled: [{
1301
+ type: Input
1302
+ }], bevelOffset: [{
1303
+ type: Input
1304
+ }], bevelSize: [{
1305
+ type: Input
1306
+ }], bevelThickness: [{
1307
+ type: Input
1308
+ }], curveSegments: [{
1309
+ type: Input
1310
+ }], bevelSegments: [{
1311
+ type: Input
1312
+ }], height: [{
1313
+ type: Input
1314
+ }], size: [{
1315
+ type: Input
1316
+ }], lineHeight: [{
1317
+ type: Input
1318
+ }], letterSpacing: [{
1319
+ type: Input
1320
+ }] } });
1321
+
1322
+ class NgtsText extends NgtRxStore {
1323
+ constructor() {
1324
+ super(...arguments);
1325
+ this.textRef = injectNgtRef();
1326
+ this.sync = new EventEmitter();
1327
+ this.store = inject(NgtStore);
1328
+ this.troikaText = new Text();
1329
+ }
1330
+ set text(text) {
1331
+ this.set({ text });
1332
+ }
1333
+ set characters(characters) {
1334
+ this.set({ characters });
1335
+ }
1336
+ set font(font) {
1337
+ this.set({ font });
1338
+ }
1339
+ set anchorX(anchorX) {
1340
+ this.set({ anchorX });
1341
+ }
1342
+ set anchorY(anchorY) {
1343
+ this.set({ anchorY });
1344
+ }
1345
+ initialize() {
1346
+ super.initialize();
1347
+ this.set({ anchorX: 'center', anchorY: 'middle', text: '' });
1348
+ }
1349
+ ngOnInit() {
1350
+ if (!this.textRef.nativeElement)
1351
+ this.textRef.nativeElement = this.troikaText;
1352
+ this.preloadFont();
1353
+ this.syncText();
1354
+ }
1355
+ ngOnDestroy() {
1356
+ this.troikaText.dispose();
1357
+ super.ngOnDestroy();
1358
+ }
1359
+ preloadFont() {
1360
+ const { font, characters } = this.get();
1361
+ if (font && characters) {
1362
+ preloadFont({ font, characters });
1363
+ }
1364
+ }
1365
+ syncText() {
1366
+ this.hold(this.select(), () => {
1367
+ const invalidate = this.store.get('invalidate');
1368
+ this.troikaText.sync(() => {
1369
+ invalidate();
1370
+ if (this.sync.observed)
1371
+ this.sync.next(this.troikaText);
1372
+ });
1373
+ });
1374
+ }
1375
+ }
1376
+ NgtsText.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsText, deps: null, target: i0.ɵɵFactoryTarget.Component });
1377
+ NgtsText.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.3", type: NgtsText, isStandalone: true, selector: "ngts-text[text]", inputs: { textRef: "textRef", text: "text", characters: "characters", font: "font", anchorX: "anchorX", anchorY: "anchorY" }, outputs: { sync: "sync" }, providers: [RxActionFactory], usesInheritance: true, ngImport: i0, template: `
1378
+ <ngt-primitive
1379
+ ngtCompound
1380
+ *args="[textRef.nativeElement]"
1381
+ [text]="get('text')"
1382
+ [anchorX]="get('anchorX')"
1383
+ [anchorY]="get('anchorY')"
1384
+ [font]="get('font')"
1385
+ >
1386
+ <ng-content />
1387
+ </ngt-primitive>
1388
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
1389
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.3", ngImport: i0, type: NgtsText, decorators: [{
1390
+ type: Component,
1391
+ args: [{
1392
+ selector: 'ngts-text[text]',
1393
+ standalone: true,
1394
+ template: `
1395
+ <ngt-primitive
1396
+ ngtCompound
1397
+ *args="[textRef.nativeElement]"
1398
+ [text]="get('text')"
1399
+ [anchorX]="get('anchorX')"
1400
+ [anchorY]="get('anchorY')"
1401
+ [font]="get('font')"
1402
+ >
1403
+ <ng-content />
1404
+ </ngt-primitive>
1405
+ `,
1406
+ imports: [NgtArgs],
1407
+ providers: [RxActionFactory],
1408
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
1409
+ }]
1410
+ }], propDecorators: { textRef: [{
1411
+ type: Input
1412
+ }], text: [{
1413
+ type: Input
1414
+ }], characters: [{
1415
+ type: Input
1416
+ }], font: [{
1417
+ type: Input
1418
+ }], anchorX: [{
1419
+ type: Input
1420
+ }], anchorY: [{
1421
+ type: Input
1422
+ }], sync: [{
1423
+ type: Output
1424
+ }] } });
1425
+
1426
+ /**
1427
+ * Generated bundle index. Do not edit.
1428
+ */
1429
+
1430
+ export { NGTS_GIZMO_HELPER_API, NgtsBillboard, NgtsGizmoHelper, NgtsGizmoHelperContent, NgtsGizmoViewcube, NgtsGizmoViewport, NgtsText, NgtsText3D };
1431
+ //# sourceMappingURL=angular-three-soba-abstractions.mjs.map