@things-factory/board-ui 4.0.13 → 4.0.18
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/client/index.js +0 -2
- package/client/pages/board-modeller-page.js +6 -75
- package/client/pages/board-player-page.js +1 -1
- package/client/pages/board-viewer-page.js +1 -1
- package/package.json +9 -9
- package/assets/images/icon-properties-ipattern.png +0 -0
- package/client/board-modeller/board-modeller.js +0 -229
- package/client/board-modeller/component-toolbar/component-menu.js +0 -153
- package/client/board-modeller/component-toolbar/component-toolbar.js +0 -193
- package/client/board-modeller/edit-toolbar-style.js +0 -228
- package/client/board-modeller/edit-toolbar.js +0 -637
- package/client/board-modeller/property-sidebar/abstract-property.js +0 -73
- package/client/board-modeller/property-sidebar/data-binding/data-binding-mapper.js +0 -366
- package/client/board-modeller/property-sidebar/data-binding/data-binding.js +0 -476
- package/client/board-modeller/property-sidebar/effects/effects-shared-style.js +0 -58
- package/client/board-modeller/property-sidebar/effects/effects.js +0 -64
- package/client/board-modeller/property-sidebar/effects/property-animation.js +0 -141
- package/client/board-modeller/property-sidebar/effects/property-animations.js +0 -92
- package/client/board-modeller/property-sidebar/effects/property-event-hover.js +0 -144
- package/client/board-modeller/property-sidebar/effects/property-event-tap.js +0 -146
- package/client/board-modeller/property-sidebar/effects/property-event.js +0 -72
- package/client/board-modeller/property-sidebar/effects/property-shadow.js +0 -122
- package/client/board-modeller/property-sidebar/effects/value-converter.js +0 -26
- package/client/board-modeller/property-sidebar/inspector/inspector.js +0 -338
- package/client/board-modeller/property-sidebar/property-shared-style.js +0 -132
- package/client/board-modeller/property-sidebar/property-sidebar.js +0 -324
- package/client/board-modeller/property-sidebar/shapes/box-padding-editor-styles.js +0 -94
- package/client/board-modeller/property-sidebar/shapes/shapes.js +0 -421
- package/client/board-modeller/property-sidebar/specifics/specific-properties-builder.js +0 -149
- package/client/board-modeller/property-sidebar/specifics/specifics.js +0 -248
- package/client/board-modeller/property-sidebar/styles/styles.js +0 -591
- package/client/board-modeller/scene-viewer/confidential-overlay.js +0 -18
- package/client/board-modeller/scene-viewer/things-scene-handler.js +0 -50
- package/client/board-modeller/scene-viewer/things-scene-layer.js +0 -52
- package/client/board-modeller/scene-viewer/things-scene-player.js +0 -115
- package/client/board-modeller/scene-viewer/things-scene-property.js +0 -25
- package/client/board-modeller/scene-viewer/things-scene-viewer.js +0 -312
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { LitElement, html } from 'lit-element'
|
|
2
|
-
|
|
3
|
-
import './things-scene-property'
|
|
4
|
-
|
|
5
|
-
export default class ThingsSceneLayer extends LitElement {
|
|
6
|
-
static get is() {
|
|
7
|
-
return 'things-scene-layer'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static get properties() {
|
|
11
|
-
return {
|
|
12
|
-
type: String,
|
|
13
|
-
text: String
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
render() {
|
|
18
|
-
return html`
|
|
19
|
-
<slot select="things-scene-property"></slot>
|
|
20
|
-
`
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
getModel() {
|
|
24
|
-
let model = {
|
|
25
|
-
type: this.type
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
model = Array.from(this.querySelectorAll('things-scene-property')).reduce((model, property) => {
|
|
29
|
-
let value = property.value
|
|
30
|
-
|
|
31
|
-
if (property.name) {
|
|
32
|
-
switch (property.type) {
|
|
33
|
-
case 'number':
|
|
34
|
-
value = Number(value)
|
|
35
|
-
break
|
|
36
|
-
case 'boolean':
|
|
37
|
-
value = Boolean(value)
|
|
38
|
-
break
|
|
39
|
-
default:
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
model[property.name] = value
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return model
|
|
46
|
-
}, model)
|
|
47
|
-
|
|
48
|
-
return model
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
customElements.define(ThingsSceneLayer.is, ThingsSceneLayer)
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from 'lit-element'
|
|
2
|
-
|
|
3
|
-
class ThingsScenePlayer extends LitElement {
|
|
4
|
-
constructor() {
|
|
5
|
-
super()
|
|
6
|
-
|
|
7
|
-
this.sceneId = ''
|
|
8
|
-
this.fit = 'ratio'
|
|
9
|
-
this.provider = null
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
static get is() {
|
|
13
|
-
return 'things-scene-player'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
static get properties() {
|
|
17
|
-
return {
|
|
18
|
-
sceneId: String,
|
|
19
|
-
/*
|
|
20
|
-
* 캔바스에 모델을 어떻게 적절하게 보여줄 것인지를 설정한다.
|
|
21
|
-
*
|
|
22
|
-
* @none 가로, 세로 스케일을 1로 고정하고, {0, 0}좌표로 translate시킨다.
|
|
23
|
-
* @both 캔바스에 모델을 꼭 채우도록 가로, 세로 스케일을 조정하고, {0, 0}좌표로 translate시킨다.
|
|
24
|
-
* @width 캔바스의 폭에 모델의 폭을 일치하도록 가로, 세로 스케일을 동일하게 조정하고, {0, 0}좌표로 translate시킨다.
|
|
25
|
-
* @height 캔바스의 높이에 모델의 높이를 일치하도록 가로, 세로 스케일을 동일하게 조정하고, {0, 0}좌표로 translate시킨다.
|
|
26
|
-
* @center 가로, 세로 스케일을 1로 고정하고 모델이 화면의 중앙에 위치하도록 translate시킨다.
|
|
27
|
-
* @ratio 모델의 모든 부분이 캔바스에 최대 크기로 표현될 수 있도록 가로, 세로 동일한 스케일로 조정하고, {0, 0}좌표로 translate시킨다.
|
|
28
|
-
*
|
|
29
|
-
* @todo things-real 에서는 enumeration type 이며, FitMode.RATIO | FitMode.BOTH 중 하나로 정의한다.
|
|
30
|
-
*/
|
|
31
|
-
fit: String,
|
|
32
|
-
provider: Object
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
static get styles() {
|
|
37
|
-
return [
|
|
38
|
-
css`
|
|
39
|
-
:host {
|
|
40
|
-
display: block;
|
|
41
|
-
width: 100%;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
#root {
|
|
45
|
-
width: 100%;
|
|
46
|
-
height: 100%;
|
|
47
|
-
}
|
|
48
|
-
`
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
render() {
|
|
53
|
-
return html`
|
|
54
|
-
<div id="root"></div>
|
|
55
|
-
`
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
connectedCallback() {
|
|
59
|
-
super.connectedCallback()
|
|
60
|
-
|
|
61
|
-
window.addEventListener('resize', () => {
|
|
62
|
-
requestAnimationFrame(() => {
|
|
63
|
-
if (this.scene) {
|
|
64
|
-
this.scene.resize()
|
|
65
|
-
|
|
66
|
-
if (this.offsetWidth) {
|
|
67
|
-
this.scene.fit(this.fit)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
disconnectedCallback() {
|
|
75
|
-
super.disconnectedCallback()
|
|
76
|
-
|
|
77
|
-
this._releaseRef()
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
updated(change) {
|
|
81
|
-
change.has('sceneId') && this._onSceneIdChanged(this.sceneId)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
_releaseRef() {
|
|
85
|
-
if (this.scene) {
|
|
86
|
-
this.scene.target = null
|
|
87
|
-
this.scene.release()
|
|
88
|
-
delete this.scene
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
_onSceneIdChanged() {
|
|
93
|
-
if (!this.provider) return
|
|
94
|
-
|
|
95
|
-
this._releaseRef()
|
|
96
|
-
|
|
97
|
-
if (!this.sceneId) return
|
|
98
|
-
|
|
99
|
-
this.provider.get(this.sceneId, true).then(
|
|
100
|
-
scene => {
|
|
101
|
-
this.scene = scene
|
|
102
|
-
this.scene.target = this.shadowRoot.getElementById('root')
|
|
103
|
-
|
|
104
|
-
/* 이 컴포넌트의 폭이 값을 가지고 있으면 - 화면상에 자리를 잡고 보여지고 있음을 의미한다.
|
|
105
|
-
* 이 때는 정상적으로 그려주고,
|
|
106
|
-
* 그렇지 않으면, 다음 Resize Handling시에 처리하도록 한다.
|
|
107
|
-
*/
|
|
108
|
-
if (this.scene.target.offsetWidth) this.scene.fit(this.fit)
|
|
109
|
-
},
|
|
110
|
-
e => {}
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
customElements.define(ThingsScenePlayer.is, ThingsScenePlayer)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { LitElement, html } from 'lit-element'
|
|
2
|
-
|
|
3
|
-
export default class ThingsSceneProperty extends LitElement {
|
|
4
|
-
constructor() {
|
|
5
|
-
super()
|
|
6
|
-
|
|
7
|
-
this.name = ''
|
|
8
|
-
this.value = ''
|
|
9
|
-
this.type = ''
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
static get is() {
|
|
13
|
-
return 'things-scene-property'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
static get properties() {
|
|
17
|
-
return {
|
|
18
|
-
name: String,
|
|
19
|
-
value: String,
|
|
20
|
-
type: String
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
customElements.define(ThingsSceneProperty.is, ThingsSceneProperty)
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from 'lit-element'
|
|
2
|
-
|
|
3
|
-
import { create as createScene } from '@hatiolab/things-scene'
|
|
4
|
-
|
|
5
|
-
import './confidential-overlay'
|
|
6
|
-
|
|
7
|
-
import './things-scene-layer'
|
|
8
|
-
import './things-scene-handler'
|
|
9
|
-
|
|
10
|
-
export default class ThingsSceneViewer extends LitElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super()
|
|
13
|
-
|
|
14
|
-
this.scene = null
|
|
15
|
-
this.model = {}
|
|
16
|
-
/* Scene Mode - mode 0 : view mode, mode 1 : edit mode, mode 2 : shift mode */
|
|
17
|
-
this.mode = 0
|
|
18
|
-
/* Transform Mode - 'translate' | 'scale' | 'rotate' */
|
|
19
|
-
this.transformMode = 'translate'
|
|
20
|
-
/* Space Mode - 'world' | 'local' */
|
|
21
|
-
this.spaceMode = 'world'
|
|
22
|
-
this.screenSize = 13.3
|
|
23
|
-
this.variables = {}
|
|
24
|
-
this.data = {}
|
|
25
|
-
this.fit = 'none'
|
|
26
|
-
this.selected = []
|
|
27
|
-
this.disposeWhenDetached = false
|
|
28
|
-
this.baseUrl = ''
|
|
29
|
-
this.provider = null
|
|
30
|
-
this.name = 'noname'
|
|
31
|
-
this.enableInspector = true
|
|
32
|
-
this.showInspector = false
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static get is() {
|
|
36
|
-
return 'things-scene-viewer'
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static get properties() {
|
|
40
|
-
return {
|
|
41
|
-
scene: Object,
|
|
42
|
-
model: Object,
|
|
43
|
-
/* Scene Mode - mode 0 : view mode, mode 1 : edit mode, mode 2 : shift mode */
|
|
44
|
-
mode: Number,
|
|
45
|
-
/* Transform Mode - 'translate' | 'scale' | 'rotate' */
|
|
46
|
-
transformMode: String,
|
|
47
|
-
/* Space Mode - 'world' | 'local' */
|
|
48
|
-
spaceMode: String,
|
|
49
|
-
screenSize: Number,
|
|
50
|
-
variables: Object,
|
|
51
|
-
data: Object,
|
|
52
|
-
/*
|
|
53
|
-
* 캔바스에 모델을 어떻게 적절하게 보여줄 것인지를 설정한다.
|
|
54
|
-
*
|
|
55
|
-
* @none 가로, 세로 스케일을 1로 고정하고, {0, 0}좌표로 translate시킨다.
|
|
56
|
-
* @both 캔바스에 모델을 꼭 채우도록 가로, 세로 스케일을 조정하고, {0, 0}좌표로 translate시킨다.
|
|
57
|
-
* @width 캔바스의 폭에 모델의 폭을 일치하도록 가로, 세로 스케일을 동일하게 조정하고, {0, 0}좌표로 translate시킨다.
|
|
58
|
-
* @height 캔바스의 높이에 모델의 높이를 일치하도록 가로, 세로 스케일을 동일하게 조정하고, {0, 0}좌표로 translate시킨다.
|
|
59
|
-
* @center 가로, 세로 스케일을 1로 고정하고 모델이 화면의 중앙에 위치하도록 translate시킨다.
|
|
60
|
-
* @ratio 모델의 모든 부분이 캔바스에 최대 크기로 표현될 수 있도록 가로, 세로 동일한 스케일로 조정하고, {0, 0}좌표로 translate시킨다.
|
|
61
|
-
*/
|
|
62
|
-
fit: String,
|
|
63
|
-
selected: Array,
|
|
64
|
-
disposeWhenDetached: Boolean,
|
|
65
|
-
baseUrl: String,
|
|
66
|
-
provider: Object,
|
|
67
|
-
name: String,
|
|
68
|
-
enableInspector: Boolean,
|
|
69
|
-
showInspector: Boolean
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
static get styles() {
|
|
74
|
-
return [
|
|
75
|
-
css`
|
|
76
|
-
:host {
|
|
77
|
-
outline: none;
|
|
78
|
-
}
|
|
79
|
-
`
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
disconnectedCallback() {
|
|
84
|
-
super.disconnectedCallback()
|
|
85
|
-
|
|
86
|
-
if (this.scene && this.disposeWhenDetached) {
|
|
87
|
-
this._disposeScene()
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
render() {
|
|
92
|
-
return html` <slot></slot> `
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
updated(change) {
|
|
96
|
-
change.has('model') && this._onModelChanged(this.model)
|
|
97
|
-
change.has('mode') && this._onModeChanged(this.mode)
|
|
98
|
-
change.has('screenSize') && this._onDisplayChanged(this.screenSize)
|
|
99
|
-
change.has('data') && this._onDataChanged(this.data)
|
|
100
|
-
change.has('baseUrl') && this._onBaseUrlChanged(this.baseUrl)
|
|
101
|
-
change.has('transformMode') && this._onTransformModeChanged(this.transformMode)
|
|
102
|
-
change.has('spaceMode') && this._onSpaceModeChanged(this.spaceMode)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
_setScene(scene) {
|
|
106
|
-
this.scene = scene
|
|
107
|
-
this.dispatchEvent(
|
|
108
|
-
new CustomEvent('scene-changed', {
|
|
109
|
-
bubbles: true,
|
|
110
|
-
composed: true,
|
|
111
|
-
detail: { value: scene }
|
|
112
|
-
})
|
|
113
|
-
)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
_setMode(mode) {
|
|
117
|
-
this.mode = mode
|
|
118
|
-
this.dispatchEvent(
|
|
119
|
-
new CustomEvent('mode-changed', {
|
|
120
|
-
bubbles: true,
|
|
121
|
-
composed: true,
|
|
122
|
-
detail: { value: mode }
|
|
123
|
-
})
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
_setVariables(variables) {
|
|
128
|
-
this.variables = variables
|
|
129
|
-
this.dispatchEvent(
|
|
130
|
-
new CustomEvent('variables-changed', {
|
|
131
|
-
bubbles: true,
|
|
132
|
-
composed: true,
|
|
133
|
-
detail: { value: variables }
|
|
134
|
-
})
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
_setSelected(selected) {
|
|
139
|
-
this.selected = selected
|
|
140
|
-
this.dispatchEvent(
|
|
141
|
-
new CustomEvent('selected-changed', {
|
|
142
|
-
bubbles: true,
|
|
143
|
-
composed: true,
|
|
144
|
-
detail: { value: selected }
|
|
145
|
-
})
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
_disposeScene() {
|
|
150
|
-
if (this.scene) {
|
|
151
|
-
this.scene.off('selected', this._onSelectedChanged, this)
|
|
152
|
-
this.scene.off('mode', this._onSceneModeChanged, this)
|
|
153
|
-
|
|
154
|
-
if (this.provider) {
|
|
155
|
-
this.scene.release()
|
|
156
|
-
} else {
|
|
157
|
-
this.scene.dispose()
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
this._setScene(null)
|
|
161
|
-
this._setSelected([])
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
resize(force) {
|
|
166
|
-
if (typeof this.scene == 'object') {
|
|
167
|
-
if (force || this.fit === 'both' || Math.abs(this.offsetWidth - (this.lastOffsetWidth || 0)) >= 1) {
|
|
168
|
-
requestAnimationFrame(() => {
|
|
169
|
-
if (this.scene) {
|
|
170
|
-
this.scene.resize()
|
|
171
|
-
this.scene.fit(this.fit)
|
|
172
|
-
}
|
|
173
|
-
})
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
this.lastOffsetWidth = this.offsetWidth
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
_onModelChanged(model) {
|
|
181
|
-
this._disposeScene()
|
|
182
|
-
|
|
183
|
-
if (!model) {
|
|
184
|
-
return
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const layers = Array.from(this.querySelectorAll('things-scene-layer')).map(layer => layer.getModel())
|
|
188
|
-
|
|
189
|
-
const handlers = Array.from(this.querySelectorAll('things-scene-handler')).map(handler =>
|
|
190
|
-
handler.getAttribute('type')
|
|
191
|
-
)
|
|
192
|
-
|
|
193
|
-
this._setScene(
|
|
194
|
-
createScene({
|
|
195
|
-
target: this,
|
|
196
|
-
model: JSON.parse(JSON.stringify(model)),
|
|
197
|
-
layers,
|
|
198
|
-
handlers,
|
|
199
|
-
mode: this.mode,
|
|
200
|
-
refProvider: this.provider
|
|
201
|
-
})
|
|
202
|
-
)
|
|
203
|
-
|
|
204
|
-
if (this.provider) {
|
|
205
|
-
this.provider.add(this.name, this.scene)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
this.scene.screen = this.screenSize
|
|
209
|
-
|
|
210
|
-
/* 이 컴포넌트의 폭이 값을 가지고 있으면 - 화면상에 자리를 잡고 보여지고 있음을 의미한다.
|
|
211
|
-
* 이 때는 정상적으로 그려주고,
|
|
212
|
-
* 그렇지 않으면, 다음 Resize Handling시에 처리하도록 한다.
|
|
213
|
-
*/
|
|
214
|
-
this.resize(true)
|
|
215
|
-
|
|
216
|
-
this._setVariables(model.variables || this.scene.variables)
|
|
217
|
-
|
|
218
|
-
this.scene.on('selected', this._onSelectedChanged, this)
|
|
219
|
-
this.scene.on('mode', this._onSceneModeChanged, this)
|
|
220
|
-
|
|
221
|
-
this._onModeChanged(this.mode)
|
|
222
|
-
this._onDisplayChanged(this.screenSize)
|
|
223
|
-
this._onBaseUrlChanged(this.baseUrl)
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
_onDisplayChanged(screenSize) {
|
|
227
|
-
if (!this.scene) {
|
|
228
|
-
return
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
if (screenSize) {
|
|
232
|
-
this.scene.screen = parseFloat(screenSize)
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
_onModeChanged(mode) {
|
|
237
|
-
if (!this.scene) {
|
|
238
|
-
return
|
|
239
|
-
}
|
|
240
|
-
this.scene.mode = Number(mode)
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
_onDataChanged(data) {
|
|
244
|
-
if (!this.scene || !data) {
|
|
245
|
-
return
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
this.scene.data = data
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
_onSelectedChanged(after) {
|
|
252
|
-
/*
|
|
253
|
-
scene 컴포넌트의 속성을 속성 에디터(input box등)에서 변경하다가,
|
|
254
|
-
scene의 다른 컴포넌트를 클릭해서 포커스(선택) 컴포넌트를 변경하게되면,
|
|
255
|
-
속성 에디터(input box등)의 value change 이벤트의 처리와 충돌(레이스)하게된다.
|
|
256
|
-
|
|
257
|
-
기대하는 순서는 먼저 속성 에디터의 value change 이벤트를 처리한 후에,
|
|
258
|
-
selected 이벤트를 처리할 수 있도록 requestAnimationFrame으로 한 프레임을 지연하도록 하였다.
|
|
259
|
-
*/
|
|
260
|
-
requestAnimationFrame(() => {
|
|
261
|
-
this._setSelected(after)
|
|
262
|
-
})
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
_onSceneModeChanged(after) {
|
|
266
|
-
if (!this.scene) {
|
|
267
|
-
return
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
if (this.mode !== after) {
|
|
271
|
-
this._setMode(after)
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if (after === 2) {
|
|
275
|
-
this.style.cursor = 'all-scroll'
|
|
276
|
-
} else {
|
|
277
|
-
this.style.cursor = 'default'
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
_onBaseUrlChanged(after) {
|
|
282
|
-
if (!this.scene) {
|
|
283
|
-
return
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
this.scene.baseUrl = after
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
_onTransformModeChanged(after) {
|
|
290
|
-
if (!this.scene) {
|
|
291
|
-
return
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
this.scene.transformMode = {
|
|
295
|
-
mode: this.transformMode,
|
|
296
|
-
space: this.spaceMode
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
_onSpaceModeChanged(after) {
|
|
301
|
-
if (!this.scene) {
|
|
302
|
-
return
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
this.scene.transformMode = {
|
|
306
|
-
mode: this.transformMode,
|
|
307
|
-
space: this.spaceMode
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
customElements.define(ThingsSceneViewer.is, ThingsSceneViewer)
|