@lumiscaphe/ng-viewer 21.0.0 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/lumiscaphe-ng-viewer.mjs +14 -8
- package/fesm2022/lumiscaphe-ng-viewer.mjs.map +1 -1
- package/package.json +4 -4
- package/types/lumiscaphe-ng-viewer.d.ts +48 -0
- package/index.d.ts +0 -5
- package/lib/ng-viewer.component.d.ts +0 -36
- package/lib/ng-viewer.module.d.ts +0 -8
- package/public-api.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter,
|
|
2
|
+
import { EventEmitter, ViewChild, ContentChild, Output, Input, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { Viewer } from '@lumiscaphe/viewer';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -20,6 +20,8 @@ class NgViewerComponent {
|
|
|
20
20
|
this.viewer = new Viewer(this.container.nativeElement, {
|
|
21
21
|
server: this.server,
|
|
22
22
|
api: this.api || 'v1',
|
|
23
|
+
aspectRatio: this.aspectRatio,
|
|
24
|
+
autores: this.autores ?? true,
|
|
23
25
|
fit: this.fit || 'cover',
|
|
24
26
|
events: {
|
|
25
27
|
onLoadStart: (...args) => {
|
|
@@ -112,16 +114,20 @@ class NgViewerComponent {
|
|
|
112
114
|
this.hotspots2D = this.hotspotsFilter(this.hotspots2D);
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
116
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
117
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: NgViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
118
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: NgViewerComponent, isStandalone: false, selector: "NgViewer", inputs: { server: "server", api: "api", aspectRatio: "aspectRatio", autores: "autores", fit: "fit", scene: "scene", encoder: "encoder", parameters: "parameters", view: "view", vrcube: "vrcube", vrobject: "vrobject", hotspots: "hotspots", hotspotsFilter: "hotspotsFilter" }, outputs: { onLoadStart: "onLoadStart", onLoadProgress: "onLoadProgress", onLoadEnd: "onLoadEnd", onLoadError: "onLoadError", onInteraction: "onInteraction", onVrcubeInteraction: "onVrcubeInteraction", onVrobjectInteraction: "onVrobjectInteraction" }, queries: [{ propertyName: "hotspotTemplateRef", first: true, predicate: ["hotspotTemplate"], descendants: true }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #container></div>\n\n@if (hotspots2D.length) {\n <div class=\"position-absolute w-100 h-100\" style=\"pointer-events: none\">\n @for (hotspot of hotspots2D; track hotspot; let i = $index) {\n <div [ngStyle]=\"{ position: 'absolute', top: hotspot.position2D.y + 'px', left: hotspot.position2D.x + 'px' }\">\n <ng-container *ngTemplateOutlet=\"hotspotTemplateRef; context: { $implicit: hotspot, index: i }\"></ng-container>\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;flex:1 0 auto;position:relative}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
117
119
|
}
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: NgViewerComponent, decorators: [{
|
|
119
121
|
type: Component,
|
|
120
122
|
args: [{ selector: 'NgViewer', standalone: false, template: "<div #container></div>\n\n@if (hotspots2D.length) {\n <div class=\"position-absolute w-100 h-100\" style=\"pointer-events: none\">\n @for (hotspot of hotspots2D; track hotspot; let i = $index) {\n <div [ngStyle]=\"{ position: 'absolute', top: hotspot.position2D.y + 'px', left: hotspot.position2D.x + 'px' }\">\n <ng-container *ngTemplateOutlet=\"hotspotTemplateRef; context: { $implicit: hotspot, index: i }\"></ng-container>\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;flex:1 0 auto;position:relative}\n"] }]
|
|
121
123
|
}], propDecorators: { server: [{
|
|
122
124
|
type: Input
|
|
123
125
|
}], api: [{
|
|
124
126
|
type: Input
|
|
127
|
+
}], aspectRatio: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], autores: [{
|
|
130
|
+
type: Input
|
|
125
131
|
}], fit: [{
|
|
126
132
|
type: Input
|
|
127
133
|
}], scene: [{
|
|
@@ -163,11 +169,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
163
169
|
}] } });
|
|
164
170
|
|
|
165
171
|
class NgViewerModule {
|
|
166
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
167
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
168
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: NgViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
173
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: NgViewerModule, declarations: [NgViewerComponent], imports: [CommonModule], exports: [NgViewerComponent] }); }
|
|
174
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: NgViewerModule, imports: [CommonModule] }); }
|
|
169
175
|
}
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: NgViewerModule, decorators: [{
|
|
171
177
|
type: NgModule,
|
|
172
178
|
args: [{
|
|
173
179
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lumiscaphe-ng-viewer.mjs","sources":["../../../projects/ng-viewer/src/lib/ng-viewer.component.ts","../../../projects/ng-viewer/src/lib/ng-viewer.component.html","../../../projects/ng-viewer/src/lib/ng-viewer.module.ts","../../../projects/ng-viewer/src/public-api.ts","../../../projects/ng-viewer/src/lumiscaphe-ng-viewer.ts"],"sourcesContent":["import { AfterViewInit, Component, ContentChild, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, Output, SimpleChanges, TemplateRef, ViewChild } from '@angular/core';\nimport { Encoder, Hotspot, Parameters, Scene, View, Viewer, WRAPIv2, WidgetVRCube, WidgetVRObject } from '@lumiscaphe/viewer';\n\n@Component({\n selector: 'NgViewer',\n templateUrl: './ng-viewer.component.html',\n styleUrls: ['./ng-viewer.component.scss'],\n standalone: false\n})\nexport class NgViewerComponent implements AfterViewInit, OnChanges, OnDestroy {\n public viewer: Viewer | undefined;\n\n public hotspots2D: Hotspot[] = [];\n\n @Input() server: string | undefined;\n @Input() api: string | undefined;\n @Input() fit: 'contain' | 'cover' | 'fill' | undefined;\n @Input() scene: Scene | undefined;\n @Input() encoder: Encoder | undefined;\n @Input() parameters: Parameters | undefined;\n @Input() view: View | undefined;\n @Input() vrcube: Partial<WidgetVRCube> | undefined;\n @Input() vrobject: Partial<WidgetVRObject> | undefined;\n @Input() hotspots: Array<string | WRAPIv2.Vector3D> | undefined;\n @Input() hotspotsFilter: ((hotspots: Hotspot[]) => Hotspot[]) | undefined;\n\n @Output() onLoadStart = new EventEmitter();\n @Output() onLoadProgress = new EventEmitter();\n @Output() onLoadEnd = new EventEmitter();\n @Output() onLoadError = new EventEmitter();\n @Output() onInteraction = new EventEmitter();\n @Output() onVrcubeInteraction = new EventEmitter();\n @Output() onVrobjectInteraction = new EventEmitter();\n\n @ContentChild('hotspotTemplate') hotspotTemplateRef: TemplateRef<any> | null = null;\n\n @ViewChild('container') container!: ElementRef;\n\n ngAfterViewInit() {\n this.viewer = new Viewer(this.container.nativeElement, {\n server: this.server,\n api: this.api || 'v1',\n fit: this.fit || 'cover',\n events: {\n onLoadStart: (...args: any[]) => {\n this.onLoadStart.emit(...args);\n },\n onLoadProgress: (...args: any[]) => {\n this.onLoadProgress.emit(...args);\n },\n onLoadEnd: (...args: any[]) => {\n this.onLoadEnd.emit(...args);\n },\n onLoadError: (...args: any[]) => {\n this.onLoadError.emit(...args);\n },\n onHotspotsChange: this.onHotspotsChange.bind(this),\n onInteraction: (...args: any[]) => {\n this.onInteraction.emit(...args);\n },\n onVrcubeInteraction: (...args: any[]) => {\n this.onVrcubeInteraction.emit(...args);\n },\n onVrobjectInteraction: (...args: any[]) => {\n this.onVrobjectInteraction.emit(...args);\n }\n }\n });\n\n if (this.scene) {\n this.viewer.load(this.scene).catch(() => {});\n }\n\n if (this.encoder) {\n this.viewer.setEncoder(this.encoder).catch(() => {});\n }\n\n if (this.hotspots) {\n this.viewer.setHotspots(this.hotspots);\n }\n\n if (this.parameters) {\n this.viewer.setParameters(this.parameters).catch(() => {});\n }\n\n if (this.view) {\n this.viewer.setView(this.view).catch(() => {});\n }\n\n if (this.vrcube) {\n this.viewer.setVrcube(this.vrcube);\n }\n\n if (this.vrobject) {\n this.viewer.setVrobject(this.vrobject);\n }\n }\n\n ngOnDestroy(): void {\n this.viewer?.destroy();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (!this.viewer) {\n return;\n }\n\n if (changes['scene'] && changes['scene'].currentValue) {\n this.viewer.load(changes['scene'].currentValue).catch(() => {});\n }\n\n if (changes['encoder'] && changes['encoder'].currentValue) {\n this.viewer.setEncoder(changes['encoder'].currentValue).catch(() => {});\n }\n\n if (changes['hotspots'] && changes['hotspots'].currentValue) {\n this.viewer.setHotspots(changes['hotspots'].currentValue);\n }\n\n if (changes['parameters'] && changes['parameters'].currentValue) {\n this.viewer.setParameters(changes['parameters'].currentValue).catch(() => {});\n }\n\n if (changes['view'] && changes['view'].currentValue) {\n this.viewer.setView(changes['view'].currentValue).catch(() => {});\n }\n\n if (changes['vrcube'] && changes['vrcube'].currentValue) {\n this.viewer.setVrcube(changes['vrcube'].currentValue);\n }\n\n if (changes['vrobject'] && changes['vrobject'].currentValue) {\n this.viewer.setVrobject(changes['vrobject'].currentValue);\n }\n }\n\n async pick(position: WRAPIv2.Vector2D): Promise<WRAPIv2.PickResult | undefined> {\n return this.viewer?.pick(position);\n }\n\n async pickHotspot(position: WRAPIv2.Vector2D): Promise<WRAPIv2.PickResult | undefined> {\n return this.viewer?.pickHotspot(position);\n }\n\n snapshot(type: string, quality: number): string | undefined {\n return this.viewer?.snapshot(type, quality);\n }\n\n onHotspotsChange(hotspots: Hotspot[]): void {\n this.hotspots2D = hotspots;\n\n if (this.hotspotsFilter !== undefined) {\n this.hotspots2D = this.hotspotsFilter(this.hotspots2D);\n }\n }\n}\n","<div #container></div>\n\n@if (hotspots2D.length) {\n <div class=\"position-absolute w-100 h-100\" style=\"pointer-events: none\">\n @for (hotspot of hotspots2D; track hotspot; let i = $index) {\n <div [ngStyle]=\"{ position: 'absolute', top: hotspot.position2D.y + 'px', left: hotspot.position2D.x + 'px' }\">\n <ng-container *ngTemplateOutlet=\"hotspotTemplateRef; context: { $implicit: hotspot, index: i }\"></ng-container>\n </div>\n }\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { NgViewerComponent } from './ng-viewer.component';\n\n@NgModule({\n declarations: [\n NgViewerComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n NgViewerComponent\n ]\n})\n\nexport class NgViewerModule { }\n","/*\n * Public API Surface of ng-viewer\n */\n\nexport * from './lib/ng-viewer.component';\nexport * from './lib/ng-viewer.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MASa,iBAAiB,CAAA;AAN9B,IAAA,WAAA,GAAA;QASS,IAAU,CAAA,UAAA,GAAc,EAAE;AAcvB,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAE;AAChC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,YAAY,EAAE;AACnC,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAE;AAC9B,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAE;AAChC,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAE;AAClC,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAE;AACxC,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,YAAY,EAAE;QAEnB,IAAkB,CAAA,kBAAA,GAA4B,IAAI;AAyHpF;IArHC,eAAe,GAAA;QACb,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE;YACrD,MAAM,EAAE,IAAI,CAAC,MAAM;AACnB,YAAA,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,IAAI;AACrB,YAAA,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO;AACxB,YAAA,MAAM,EAAE;AACN,gBAAA,WAAW,EAAE,CAAC,GAAG,IAAW,KAAI;oBAC9B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;iBAC/B;AACD,gBAAA,cAAc,EAAE,CAAC,GAAG,IAAW,KAAI;oBACjC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;iBAClC;AACD,gBAAA,SAAS,EAAE,CAAC,GAAG,IAAW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er/src/lib/ng-viewer.component.ts","../../../projects/ng-viewer/src/lib/ng-viewer.component.html","../../../projects/ng-viewer/src/lib/ng-viewer.module.ts","../../../projects/ng-viewer/src/public-api.ts","../../../projects/ng-viewer/src/lumiscaphe-ng-viewer.ts"],"sourcesContent":["import { AfterViewInit, Component, ContentChild, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, Output, SimpleChanges, TemplateRef, ViewChild } from '@angular/core';\nimport { Encoder, Hotspot, Parameters, Scene, View, Viewer, WRAPIv2, WidgetVRCube, WidgetVRObject } from '@lumiscaphe/viewer';\n\n@Component({\n selector: 'NgViewer',\n templateUrl: './ng-viewer.component.html',\n styleUrls: ['./ng-viewer.component.scss'],\n standalone: false\n})\nexport class NgViewerComponent implements AfterViewInit, OnChanges, OnDestroy {\n public viewer: Viewer | undefined;\n\n public hotspots2D: Hotspot[] = [];\n\n @Input() server: string | undefined;\n @Input() api: string | undefined;\n @Input() aspectRatio: '4:3' | '16:9' | undefined;\n @Input() autores: boolean | undefined;\n @Input() fit: 'contain' | 'cover' | 'fill' | undefined;\n @Input() scene: Scene | undefined;\n @Input() encoder: Encoder | undefined;\n @Input() parameters: Parameters | undefined;\n @Input() view: View | undefined;\n @Input() vrcube: Partial<WidgetVRCube> | undefined;\n @Input() vrobject: Partial<WidgetVRObject> | undefined;\n @Input() hotspots: Array<string | WRAPIv2.Vector3D> | undefined;\n @Input() hotspotsFilter: ((hotspots: Hotspot[]) => Hotspot[]) | undefined;\n\n @Output() onLoadStart = new EventEmitter();\n @Output() onLoadProgress = new EventEmitter();\n @Output() onLoadEnd = new EventEmitter();\n @Output() onLoadError = new EventEmitter();\n @Output() onInteraction = new EventEmitter();\n @Output() onVrcubeInteraction = new EventEmitter();\n @Output() onVrobjectInteraction = new EventEmitter();\n\n @ContentChild('hotspotTemplate') hotspotTemplateRef: TemplateRef<any> | null = null;\n\n @ViewChild('container') container!: ElementRef;\n\n ngAfterViewInit() {\n this.viewer = new Viewer(this.container.nativeElement, {\n server: this.server,\n api: this.api || 'v1',\n aspectRatio: this.aspectRatio,\n autores: this.autores ?? true,\n fit: this.fit || 'cover',\n events: {\n onLoadStart: (...args: any[]) => {\n this.onLoadStart.emit(...args);\n },\n onLoadProgress: (...args: any[]) => {\n this.onLoadProgress.emit(...args);\n },\n onLoadEnd: (...args: any[]) => {\n this.onLoadEnd.emit(...args);\n },\n onLoadError: (...args: any[]) => {\n this.onLoadError.emit(...args);\n },\n onHotspotsChange: this.onHotspotsChange.bind(this),\n onInteraction: (...args: any[]) => {\n this.onInteraction.emit(...args);\n },\n onVrcubeInteraction: (...args: any[]) => {\n this.onVrcubeInteraction.emit(...args);\n },\n onVrobjectInteraction: (...args: any[]) => {\n this.onVrobjectInteraction.emit(...args);\n }\n }\n });\n\n if (this.scene) {\n this.viewer.load(this.scene).catch(() => {});\n }\n\n if (this.encoder) {\n this.viewer.setEncoder(this.encoder).catch(() => {});\n }\n\n if (this.hotspots) {\n this.viewer.setHotspots(this.hotspots);\n }\n\n if (this.parameters) {\n this.viewer.setParameters(this.parameters).catch(() => {});\n }\n\n if (this.view) {\n this.viewer.setView(this.view).catch(() => {});\n }\n\n if (this.vrcube) {\n this.viewer.setVrcube(this.vrcube);\n }\n\n if (this.vrobject) {\n this.viewer.setVrobject(this.vrobject);\n }\n }\n\n ngOnDestroy(): void {\n this.viewer?.destroy();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (!this.viewer) {\n return;\n }\n\n if (changes['scene'] && changes['scene'].currentValue) {\n this.viewer.load(changes['scene'].currentValue).catch(() => {});\n }\n\n if (changes['encoder'] && changes['encoder'].currentValue) {\n this.viewer.setEncoder(changes['encoder'].currentValue).catch(() => {});\n }\n\n if (changes['hotspots'] && changes['hotspots'].currentValue) {\n this.viewer.setHotspots(changes['hotspots'].currentValue);\n }\n\n if (changes['parameters'] && changes['parameters'].currentValue) {\n this.viewer.setParameters(changes['parameters'].currentValue).catch(() => {});\n }\n\n if (changes['view'] && changes['view'].currentValue) {\n this.viewer.setView(changes['view'].currentValue).catch(() => {});\n }\n\n if (changes['vrcube'] && changes['vrcube'].currentValue) {\n this.viewer.setVrcube(changes['vrcube'].currentValue);\n }\n\n if (changes['vrobject'] && changes['vrobject'].currentValue) {\n this.viewer.setVrobject(changes['vrobject'].currentValue);\n }\n }\n\n async pick(position: WRAPIv2.Vector2D): Promise<WRAPIv2.PickResult | undefined> {\n return this.viewer?.pick(position);\n }\n\n async pickHotspot(position: WRAPIv2.Vector2D): Promise<WRAPIv2.PickResult | undefined> {\n return this.viewer?.pickHotspot(position);\n }\n\n snapshot(type: string, quality: number): string | undefined {\n return this.viewer?.snapshot(type, quality);\n }\n\n onHotspotsChange(hotspots: Hotspot[]): void {\n this.hotspots2D = hotspots;\n\n if (this.hotspotsFilter !== undefined) {\n this.hotspots2D = this.hotspotsFilter(this.hotspots2D);\n }\n }\n}\n","<div #container></div>\n\n@if (hotspots2D.length) {\n <div class=\"position-absolute w-100 h-100\" style=\"pointer-events: none\">\n @for (hotspot of hotspots2D; track hotspot; let i = $index) {\n <div [ngStyle]=\"{ position: 'absolute', top: hotspot.position2D.y + 'px', left: hotspot.position2D.x + 'px' }\">\n <ng-container *ngTemplateOutlet=\"hotspotTemplateRef; context: { $implicit: hotspot, index: i }\"></ng-container>\n </div>\n }\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { NgViewerComponent } from './ng-viewer.component';\n\n@NgModule({\n declarations: [\n NgViewerComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n NgViewerComponent\n ]\n})\n\nexport class NgViewerModule { }\n","/*\n * Public API Surface of ng-viewer\n */\n\nexport * from './lib/ng-viewer.component';\nexport * from './lib/ng-viewer.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MASa,iBAAiB,CAAA;AAN9B,IAAA,WAAA,GAAA;QASS,IAAA,CAAA,UAAU,GAAc,EAAE;AAgBvB,QAAA,IAAA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BAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,YAAA,EAAA,CAVvB,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAGjB,YAAY,aAGZ,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAIR,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAPvB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAOH,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP;AACD;AACF,iBAAA;;;ACdD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiscaphe/ng-viewer",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^21.0.0",
|
|
6
6
|
"@angular/core": "^21.0.0",
|
|
7
|
-
"@lumiscaphe/viewer": "^4.
|
|
7
|
+
"@lumiscaphe/viewer": "^4.2.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"tslib": "^2.3.0"
|
|
11
11
|
},
|
|
12
12
|
"module": "fesm2022/lumiscaphe-ng-viewer.mjs",
|
|
13
|
-
"typings": "
|
|
13
|
+
"typings": "types/lumiscaphe-ng-viewer.d.ts",
|
|
14
14
|
"exports": {
|
|
15
15
|
"./package.json": {
|
|
16
16
|
"default": "./package.json"
|
|
17
17
|
},
|
|
18
18
|
".": {
|
|
19
|
-
"types": "./
|
|
19
|
+
"types": "./types/lumiscaphe-ng-viewer.d.ts",
|
|
20
20
|
"default": "./fesm2022/lumiscaphe-ng-viewer.mjs"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnChanges, OnDestroy, EventEmitter, TemplateRef, ElementRef, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { Viewer, Hotspot, Scene, Encoder, Parameters, View, WidgetVRCube, WidgetVRObject, WRAPIv2 } from '@lumiscaphe/viewer';
|
|
4
|
+
import * as i2 from '@angular/common';
|
|
5
|
+
|
|
6
|
+
declare class NgViewerComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
7
|
+
viewer: Viewer | undefined;
|
|
8
|
+
hotspots2D: Hotspot[];
|
|
9
|
+
server: string | undefined;
|
|
10
|
+
api: string | undefined;
|
|
11
|
+
aspectRatio: '4:3' | '16:9' | undefined;
|
|
12
|
+
autores: boolean | undefined;
|
|
13
|
+
fit: 'contain' | 'cover' | 'fill' | undefined;
|
|
14
|
+
scene: Scene | undefined;
|
|
15
|
+
encoder: Encoder | undefined;
|
|
16
|
+
parameters: Parameters | undefined;
|
|
17
|
+
view: View | undefined;
|
|
18
|
+
vrcube: Partial<WidgetVRCube> | undefined;
|
|
19
|
+
vrobject: Partial<WidgetVRObject> | undefined;
|
|
20
|
+
hotspots: Array<string | WRAPIv2.Vector3D> | undefined;
|
|
21
|
+
hotspotsFilter: ((hotspots: Hotspot[]) => Hotspot[]) | undefined;
|
|
22
|
+
onLoadStart: EventEmitter<any>;
|
|
23
|
+
onLoadProgress: EventEmitter<any>;
|
|
24
|
+
onLoadEnd: EventEmitter<any>;
|
|
25
|
+
onLoadError: EventEmitter<any>;
|
|
26
|
+
onInteraction: EventEmitter<any>;
|
|
27
|
+
onVrcubeInteraction: EventEmitter<any>;
|
|
28
|
+
onVrobjectInteraction: EventEmitter<any>;
|
|
29
|
+
hotspotTemplateRef: TemplateRef<any> | null;
|
|
30
|
+
container: ElementRef;
|
|
31
|
+
ngAfterViewInit(): void;
|
|
32
|
+
ngOnDestroy(): void;
|
|
33
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
34
|
+
pick(position: WRAPIv2.Vector2D): Promise<WRAPIv2.PickResult | undefined>;
|
|
35
|
+
pickHotspot(position: WRAPIv2.Vector2D): Promise<WRAPIv2.PickResult | undefined>;
|
|
36
|
+
snapshot(type: string, quality: number): string | undefined;
|
|
37
|
+
onHotspotsChange(hotspots: Hotspot[]): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgViewerComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgViewerComponent, "NgViewer", never, { "server": { "alias": "server"; "required": false; }; "api": { "alias": "api"; "required": false; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; }; "autores": { "alias": "autores"; "required": false; }; "fit": { "alias": "fit"; "required": false; }; "scene": { "alias": "scene"; "required": false; }; "encoder": { "alias": "encoder"; "required": false; }; "parameters": { "alias": "parameters"; "required": false; }; "view": { "alias": "view"; "required": false; }; "vrcube": { "alias": "vrcube"; "required": false; }; "vrobject": { "alias": "vrobject"; "required": false; }; "hotspots": { "alias": "hotspots"; "required": false; }; "hotspotsFilter": { "alias": "hotspotsFilter"; "required": false; }; }, { "onLoadStart": "onLoadStart"; "onLoadProgress": "onLoadProgress"; "onLoadEnd": "onLoadEnd"; "onLoadError": "onLoadError"; "onInteraction": "onInteraction"; "onVrcubeInteraction": "onVrcubeInteraction"; "onVrobjectInteraction": "onVrobjectInteraction"; }, ["hotspotTemplateRef"], never, false, never>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class NgViewerModule {
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgViewerModule, never>;
|
|
44
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgViewerModule, [typeof NgViewerComponent], [typeof i2.CommonModule], [typeof NgViewerComponent]>;
|
|
45
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgViewerModule>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { NgViewerComponent, NgViewerModule };
|
package/index.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
-
import { Encoder, Hotspot, Parameters, Scene, View, Viewer, WRAPIv2, WidgetVRCube, WidgetVRObject } from '@lumiscaphe/viewer';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgViewerComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
5
|
-
viewer: Viewer | undefined;
|
|
6
|
-
hotspots2D: Hotspot[];
|
|
7
|
-
server: string | undefined;
|
|
8
|
-
api: string | undefined;
|
|
9
|
-
fit: 'contain' | 'cover' | 'fill' | undefined;
|
|
10
|
-
scene: Scene | undefined;
|
|
11
|
-
encoder: Encoder | undefined;
|
|
12
|
-
parameters: Parameters | undefined;
|
|
13
|
-
view: View | undefined;
|
|
14
|
-
vrcube: Partial<WidgetVRCube> | undefined;
|
|
15
|
-
vrobject: Partial<WidgetVRObject> | undefined;
|
|
16
|
-
hotspots: Array<string | WRAPIv2.Vector3D> | undefined;
|
|
17
|
-
hotspotsFilter: ((hotspots: Hotspot[]) => Hotspot[]) | undefined;
|
|
18
|
-
onLoadStart: EventEmitter<any>;
|
|
19
|
-
onLoadProgress: EventEmitter<any>;
|
|
20
|
-
onLoadEnd: EventEmitter<any>;
|
|
21
|
-
onLoadError: EventEmitter<any>;
|
|
22
|
-
onInteraction: EventEmitter<any>;
|
|
23
|
-
onVrcubeInteraction: EventEmitter<any>;
|
|
24
|
-
onVrobjectInteraction: EventEmitter<any>;
|
|
25
|
-
hotspotTemplateRef: TemplateRef<any> | null;
|
|
26
|
-
container: ElementRef;
|
|
27
|
-
ngAfterViewInit(): void;
|
|
28
|
-
ngOnDestroy(): void;
|
|
29
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
30
|
-
pick(position: WRAPIv2.Vector2D): Promise<WRAPIv2.PickResult | undefined>;
|
|
31
|
-
pickHotspot(position: WRAPIv2.Vector2D): Promise<WRAPIv2.PickResult | undefined>;
|
|
32
|
-
snapshot(type: string, quality: number): string | undefined;
|
|
33
|
-
onHotspotsChange(hotspots: Hotspot[]): void;
|
|
34
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgViewerComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgViewerComponent, "NgViewer", never, { "server": { "alias": "server"; "required": false; }; "api": { "alias": "api"; "required": false; }; "fit": { "alias": "fit"; "required": false; }; "scene": { "alias": "scene"; "required": false; }; "encoder": { "alias": "encoder"; "required": false; }; "parameters": { "alias": "parameters"; "required": false; }; "view": { "alias": "view"; "required": false; }; "vrcube": { "alias": "vrcube"; "required": false; }; "vrobject": { "alias": "vrobject"; "required": false; }; "hotspots": { "alias": "hotspots"; "required": false; }; "hotspotsFilter": { "alias": "hotspotsFilter"; "required": false; }; }, { "onLoadStart": "onLoadStart"; "onLoadProgress": "onLoadProgress"; "onLoadEnd": "onLoadEnd"; "onLoadError": "onLoadError"; "onInteraction": "onInteraction"; "onVrcubeInteraction": "onVrcubeInteraction"; "onVrobjectInteraction": "onVrobjectInteraction"; }, ["hotspotTemplateRef"], never, false, never>;
|
|
36
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./ng-viewer.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
export declare class NgViewerModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgViewerModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgViewerModule, [typeof i1.NgViewerComponent], [typeof i2.CommonModule], [typeof i1.NgViewerComponent]>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NgViewerModule>;
|
|
8
|
-
}
|
package/public-api.d.ts
DELETED