@operato/scene-ar 7.0.1 → 7.3.19

Sign up to get free protection for your applications and to get access to all the features.
package/src/arview.ts DELETED
@@ -1,70 +0,0 @@
1
- /*
2
- * Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@google/model-viewer'
6
-
7
- import { Component, ComponentNature, HTMLOverlayContainer } from '@hatiolab/things-scene'
8
-
9
- const NATURE: ComponentNature = {
10
- mutable: false,
11
- resizable: true,
12
- rotatable: true,
13
- properties: [
14
- {
15
- type: 'attachment-selector',
16
- label: 'src',
17
- name: 'src'
18
- },
19
- {
20
- type: 'checkbox',
21
- label: 'camera-controls',
22
- name: 'cameraControls'
23
- }
24
- ],
25
- 'value-property': 'src'
26
- }
27
-
28
- export default class Arview extends HTMLOverlayContainer {
29
- get nature() {
30
- return NATURE
31
- }
32
-
33
- /*
34
- * 컴포넌트의 생성 또는 속성 변화 시에 호출되며,
35
- * 그에 따른 html element의 반영이 필요한 부분을 구현한다.
36
- *
37
- * ThingsComponent state => HTML element properties
38
- */
39
- setElementProperties(element: HTMLElement & { src: string }) {
40
- var { src, cameraControls } = this.state
41
-
42
- // element.style.pointerEvents = 'auto' //'inherit'
43
-
44
- element.src = src || ''
45
- if (cameraControls) {
46
- element.setAttribute('camera-controls', cameraControls)
47
- } else {
48
- element.removeAttribute('camera-controls')
49
- }
50
-
51
- element.setAttribute('ar', '')
52
- element.setAttribute('ar-modes', 'webxr scene-viewer quick-look')
53
- element.setAttribute('environment-image', 'neutral')
54
- element.setAttribute('auto-rotate', '')
55
- }
56
-
57
- /*
58
- * 컴포넌트가 ready 상태가 되거나, 컴포넌트의 속성이 변화될 시 setElementProperties 뒤에 호출된다.
59
- * 변화에 따른 기본적인 html 속성이 super.reposition()에서 진행되고, 그 밖의 작업이 필요할 때, 오버라이드 한다.
60
- */
61
- reposition() {
62
- super.reposition()
63
- }
64
-
65
- get tagName() {
66
- return 'model-viewer'
67
- }
68
- }
69
-
70
- Component.register('arview', Arview)
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { default as Arview } from './arview'
@@ -1,17 +0,0 @@
1
- const icon = new URL('../../icons/scene-arview.png', import.meta.url).href
2
-
3
- export default {
4
- type: 'arview',
5
- description: 'arview',
6
- group: '3D',
7
- /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
8
- icon: icon,
9
- model: {
10
- type: 'arview',
11
- left: 100,
12
- top: 100,
13
- width: 400,
14
- height: 300,
15
- fillStyle: '#00ff00'
16
- }
17
- }
@@ -1,3 +0,0 @@
1
- import arview from './arview'
2
-
3
- export default [arview]
package/tsconfig.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "noEmitOnError": true,
7
- "lib": ["es2019", "dom"],
8
- "strict": true,
9
- "esModuleInterop": false,
10
- "allowJs": true,
11
- "allowSyntheticDefaultImports": true,
12
- "experimentalDecorators": true,
13
- "importHelpers": true,
14
- "outDir": "dist",
15
- "sourceMap": true,
16
- "inlineSources": true,
17
- "rootDir": "src",
18
- "declaration": true,
19
- "incremental": true,
20
- "skipLibCheck": true
21
- },
22
- "include": ["**/*.ts", "*.d.ts"]
23
- }