@vyr/three-browser 0.0.33 → 0.0.35
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/package.json +1 -1
- package/src/common/provider.ts +3 -5
- package/src/common/validate.ts +2 -4
- package/src/fragment/GeoMapFragment.vue +2 -2
- package/src/fragment/InstancedMeshFragment.vue +4 -4
- package/src/fragment/MeshFragment.vue +4 -4
- package/src/fragment/ModelFragment.vue +2 -2
- package/src/fragment/NodeFragment.vue +2 -2
- package/src/fragment/ParticleFragment.vue +2 -2
- package/src/fragment/PointsFragment.vue +2 -2
- package/src/fragment/SpriteFragment.vue +2 -2
- package/src/fragment/{TextFragment.vue → Text3DFragment.vue} +8 -8
- package/src/fragment/animation/AnimationActionFragment.vue +3 -3
- package/src/fragment/geometry/BoxGeometryFragment.vue +2 -2
- package/src/fragment/geometry/BufferGeometryFragment.vue +2 -2
- package/src/fragment/geometry/CircleGeometryFragment.vue +2 -2
- package/src/fragment/geometry/CylinderGeometryFragment.vue +2 -2
- package/src/fragment/geometry/ExtrudeGeometryFragment.vue +2 -2
- package/src/fragment/geometry/PlaneGeometryFragment.vue +2 -2
- package/src/fragment/geometry/RingGeometryFragment.vue +2 -2
- package/src/fragment/geometry/SphereGeometryFragment.vue +2 -2
- package/src/fragment/geometry/SurfaceGeometryFragment.vue +2 -2
- package/src/fragment/geometry/TubeGeometryFragment.vue +2 -2
- package/src/fragment/light/AmbientLightFragment.vue +2 -2
- package/src/fragment/light/DirectionalLightFragment.vue +2 -2
- package/src/fragment/light/HemisphereLightFragment.vue +2 -2
- package/src/fragment/light/PointLightFragment.vue +2 -2
- package/src/fragment/light/RectAreaLightFragment.vue +2 -2
- package/src/fragment/light/SpotLightFragment.vue +2 -2
- package/src/fragment/material/MaterialFragment.vue +4 -4
- package/src/fragment/material/MeshBasicMaterialFragment.vue +4 -4
- package/src/fragment/material/MeshPhongMaterialFragment.vue +4 -4
- package/src/fragment/material/MeshStandardMaterialFragment.vue +4 -4
- package/src/fragment/material/PointsMaterialFragment.vue +4 -4
- package/src/fragment/material/ShaderMaterialFragment.vue +2 -2
- package/src/fragment/material/ShadowMaterialFragment.vue +4 -4
- package/src/fragment/material/SpriteMaterialFragment.vue +4 -4
- package/src/fragment/texture/TextureFragment.vue +10 -10
- package/src/locale/Language.ts +1 -5
- package/src/locale/LanguageProvider.ts +28 -33
- package/src/option/Animation.ts +3 -8
- package/src/option/Geometry.ts +4 -10
- package/src/option/Material.ts +6 -14
- package/src/option/Mesh.ts +2 -6
- package/src/option/Shadow.ts +3 -8
- package/src/option/Texture.ts +6 -14
- package/src/service/footer/action/geometry/index.ts +15 -20
- package/src/service/footer/action/material/index.ts +12 -17
- package/src/service/footer/action/texture/index.ts +6 -11
- package/src/service/global/index.ts +0 -1
- package/src/service/index.ts +20 -47
- package/src/service/inspector/GeoMapViewer.vue +3 -3
- package/src/service/inspector/HTMLConvertViewer.vue +3 -3
- package/src/service/inspector/InstanceMeshViewer.vue +3 -3
- package/src/service/inspector/MeshViewer.vue +3 -3
- package/src/service/inspector/ModelViewer.vue +3 -3
- package/src/service/inspector/NodeViewer.vue +3 -3
- package/src/service/inspector/ParticleViewer.vue +3 -3
- package/src/service/inspector/PerspectiveCameraViewer.vue +3 -3
- package/src/service/inspector/PointsViewer.vue +3 -3
- package/src/service/inspector/ServiceViewer.vue +10 -42
- package/src/service/inspector/SpriteViewer.vue +3 -3
- package/src/service/inspector/{TextViewer.vue → Text3DViewer.vue} +6 -6
- package/src/service/inspector/animation/AnimationActionViewer.vue +3 -3
- package/src/service/inspector/geometry/BoxGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/BufferGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/CircleGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/CylinderGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/ExtrudeGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/PlaneGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/RingGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/SphereGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/SurfaceGeometryViewer.vue +3 -3
- package/src/service/inspector/geometry/TubeGeometryViewer.vue +3 -3
- package/src/service/inspector/index.ts +46 -46
- package/src/service/inspector/light/AmbientLightViewer.vue +3 -3
- package/src/service/inspector/light/DirectionalLightViewer.vue +3 -3
- package/src/service/inspector/light/HemisphereLightViewer.vue +3 -3
- package/src/service/inspector/light/PointLightViewer.vue +3 -3
- package/src/service/inspector/light/RectAreaLightViewer.vue +3 -3
- package/src/service/inspector/light/SpotLightViewer.vue +3 -3
- package/src/service/inspector/material/MeshBasicMaterialViewer.vue +3 -3
- package/src/service/inspector/material/MeshPhongMaterialViewer.vue +3 -3
- package/src/service/inspector/material/MeshStandardMaterialViewer.vue +3 -3
- package/src/service/inspector/material/PointsMaterialViewer.vue +3 -3
- package/src/service/inspector/material/ShaderMaterialViewer.vue +3 -3
- package/src/service/inspector/material/ShadowMaterialViewer.vue +3 -3
- package/src/service/inspector/material/SpriteMaterialViewer.vue +3 -3
- package/src/service/inspector/texture/TextureViewer.vue +3 -3
- package/src/service/sidebar/asset/action/AddAnimationAction.ts +14 -25
- package/src/service/sidebar/asset/action/AddLightAction.ts +17 -26
- package/src/service/global/scripts/index.ts +0 -22
- package/src/service/sidebar/scene/action/AddAnimationAction.ts +0 -65
- package/src/service/sidebar/scene/action/AddLightAction.ts +0 -67
- package/src/service/sidebar/scene/action/index.ts +0 -7
package/package.json
CHANGED
package/src/common/provider.ts
CHANGED
|
@@ -3,12 +3,10 @@ import { Descriptor } from "@vyr/engine";
|
|
|
3
3
|
|
|
4
4
|
const providerKey = Symbol()
|
|
5
5
|
|
|
6
|
-
const providerDescriptor = (descriptor: Ref<Descriptor | null>) => {
|
|
6
|
+
export const providerDescriptor = (descriptor: Ref<Descriptor | null>) => {
|
|
7
7
|
provide(providerKey, descriptor)
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const useDescriptor = <T extends Descriptor = Descriptor>() => {
|
|
10
|
+
export const useDescriptor = <T extends Descriptor = Descriptor>() => {
|
|
11
11
|
return inject(providerKey) as Ref<T>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { providerDescriptor, useDescriptor }
|
|
12
|
+
}
|
package/src/common/validate.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Descriptor } from "@vyr/engine"
|
|
2
2
|
|
|
3
|
-
const instanceofArray = (Class: typeof Descriptor, instances: Descriptor[]) => {
|
|
3
|
+
export const instanceofArray = (Class: typeof Descriptor, instances: Descriptor[]) => {
|
|
4
4
|
for (const instance of instances) {
|
|
5
5
|
if (instance instanceof Class) return true
|
|
6
6
|
}
|
|
7
7
|
return false
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { instanceofArray }
|
|
8
|
+
}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
import { computed, ref } from 'vue';
|
|
83
83
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
84
84
|
import { VyrInput, VyrRow, VyrCol, VyrLabel, VyrSelect } from '@vyr/design';
|
|
85
|
-
import {
|
|
85
|
+
import { GeoMap } from '@vyr/three';
|
|
86
86
|
import { language } from '../locale'
|
|
87
87
|
import { useDescriptor } from '../common';
|
|
88
88
|
import { Mesh } from '../option';
|
|
@@ -90,7 +90,7 @@ import { Mesh } from '../option';
|
|
|
90
90
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
91
91
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
92
92
|
|
|
93
|
-
const descriptor = useDescriptor<
|
|
93
|
+
const descriptor = useDescriptor<GeoMap>()
|
|
94
94
|
const materialOptions = computed(() => {
|
|
95
95
|
const options: { label: string; value: number }[] = []
|
|
96
96
|
if (typeof descriptor.value.material === 'string') return options
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<mesh-fragment>
|
|
3
3
|
<vyr-row>
|
|
4
|
-
<vyr-label :label="language.get('inspector.InstancedMesh.
|
|
4
|
+
<vyr-label :label="language.get('inspector.InstancedMesh.data')">
|
|
5
5
|
<vyr-col>
|
|
6
|
-
<vyr-input v-model="descriptor.
|
|
6
|
+
<vyr-input v-model="descriptor.data" :clearable="true" dragkey="data" :draggable="draggable"
|
|
7
7
|
trigger="blur"></vyr-input>
|
|
8
8
|
</vyr-col>
|
|
9
9
|
</vyr-label>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import { computed } from 'vue'
|
|
16
16
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
17
17
|
import { VyrInput, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
18
|
-
import {
|
|
18
|
+
import { InstancedMesh } from '@vyr/three';
|
|
19
19
|
import { language } from '../locale'
|
|
20
20
|
import { useDescriptor } from '../common';
|
|
21
21
|
import MeshFragment from './MeshFragment.vue';
|
|
@@ -23,7 +23,7 @@ import MeshFragment from './MeshFragment.vue';
|
|
|
23
23
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
24
24
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
25
25
|
|
|
26
|
-
const descriptor = useDescriptor<
|
|
26
|
+
const descriptor = useDescriptor<InstancedMesh>()
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<style lang="less" scoped></style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<vyr-row>
|
|
3
3
|
<vyr-label :label="language.get('inspector.Node.material.type')">
|
|
4
4
|
<vyr-col>
|
|
5
|
-
<vyr-select :model-value="typeof descriptor.material === 'string' ? 1 : 2" :data="
|
|
5
|
+
<vyr-select :model-value="typeof descriptor.material === 'string' ? 1 : 2" :data="MeshOption.typeOptions"
|
|
6
6
|
@update:modelValue="changeMode"></vyr-select>
|
|
7
7
|
</vyr-col>
|
|
8
8
|
</vyr-label>
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
import { computed, ref } from 'vue';
|
|
51
51
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
52
52
|
import { VyrInput, VyrRow, VyrCol, VyrLabel, VyrSelect } from '@vyr/design';
|
|
53
|
-
import {
|
|
53
|
+
import { Mesh } from '@vyr/three';
|
|
54
54
|
import { language } from '../locale'
|
|
55
55
|
import { useDescriptor } from '../common';
|
|
56
|
-
import { Mesh } from '../option';
|
|
56
|
+
import { Mesh as MeshOption } from '../option';
|
|
57
57
|
|
|
58
58
|
defineProps<{ }>()
|
|
59
59
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
60
60
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
61
61
|
|
|
62
|
-
const descriptor = useDescriptor<
|
|
62
|
+
const descriptor = useDescriptor<Mesh>()
|
|
63
63
|
const materialOptions = computed(() => {
|
|
64
64
|
const options: { label: string; value: number }[] = []
|
|
65
65
|
if (typeof descriptor.value.material === 'string') return options
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
import { computed } from 'vue'
|
|
15
15
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
16
16
|
import { VyrInput, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
17
|
-
import {
|
|
17
|
+
import { Model } from '@vyr/three';
|
|
18
18
|
import { language } from '../locale'
|
|
19
19
|
import { useDescriptor } from '../common';
|
|
20
20
|
|
|
21
21
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
22
22
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
23
23
|
|
|
24
|
-
const descriptor = useDescriptor<
|
|
24
|
+
const descriptor = useDescriptor<Model>()
|
|
25
25
|
|
|
26
26
|
</script>
|
|
27
27
|
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
<script lang="ts" setup>
|
|
84
|
-
import {
|
|
84
|
+
import { Node } from '@vyr/engine';
|
|
85
85
|
import { VyrSelect, VyrInputNumber, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
86
86
|
import { option } from '@vyr/builtin'
|
|
87
87
|
import { language } from '../locale'
|
|
88
88
|
import { useDescriptor } from '../common';
|
|
89
89
|
|
|
90
|
-
const descriptor = useDescriptor<
|
|
90
|
+
const descriptor = useDescriptor<Node>()
|
|
91
91
|
</script>
|
|
92
92
|
|
|
93
93
|
<style lang="less" scoped></style>
|
|
@@ -135,13 +135,13 @@
|
|
|
135
135
|
import { computed } from 'vue'
|
|
136
136
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
137
137
|
import { VyrInput, VyrRow, VyrCol, VyrLabel, VyrInputNumber } from '@vyr/design';
|
|
138
|
-
import {
|
|
138
|
+
import { Particle } from '@vyr/three';
|
|
139
139
|
import { language } from '../locale'
|
|
140
140
|
import { useDescriptor } from '../common';
|
|
141
141
|
|
|
142
142
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
143
143
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
144
|
-
const descriptor = useDescriptor<
|
|
144
|
+
const descriptor = useDescriptor<Particle>()
|
|
145
145
|
</script>
|
|
146
146
|
|
|
147
147
|
<style lang="less" scoped></style>
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
import { computed } from 'vue'
|
|
23
23
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
24
24
|
import { VyrInput, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
25
|
-
import {
|
|
25
|
+
import { Points } from '@vyr/three';
|
|
26
26
|
import { language } from '../locale'
|
|
27
27
|
import { useDescriptor } from '../common';
|
|
28
28
|
|
|
29
29
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
30
30
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
31
|
-
const descriptor = useDescriptor<
|
|
31
|
+
const descriptor = useDescriptor<Points>()
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<style lang="less" scoped></style>
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
import { computed } from 'vue'
|
|
27
27
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
28
28
|
import { VyrInput, VyrRow, VyrCol, VyrLabel, VyrInputNumber } from '@vyr/design';
|
|
29
|
-
import {
|
|
29
|
+
import { Sprite } from '@vyr/three';
|
|
30
30
|
import { language } from '../locale'
|
|
31
31
|
import { useDescriptor } from '../common';
|
|
32
32
|
|
|
33
33
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
34
34
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
35
|
-
const descriptor = useDescriptor<
|
|
35
|
+
const descriptor = useDescriptor<Sprite>()
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<style lang="less" scoped></style>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</vyr-label>
|
|
9
9
|
</vyr-row>
|
|
10
10
|
<vyr-row>
|
|
11
|
-
<vyr-label :label="language.get('inspector.
|
|
11
|
+
<vyr-label :label="language.get('inspector.Text3D.font')">
|
|
12
12
|
<vyr-col>
|
|
13
13
|
<vyr-input v-model="descriptor.font" :clearable="true" :draggable="draggable" trigger="blur"
|
|
14
14
|
dragkey="font"></vyr-input>
|
|
@@ -16,35 +16,35 @@
|
|
|
16
16
|
</vyr-label>
|
|
17
17
|
</vyr-row>
|
|
18
18
|
<vyr-row>
|
|
19
|
-
<vyr-label :label="language.get('inspector.
|
|
19
|
+
<vyr-label :label="language.get('inspector.Text3D.size')">
|
|
20
20
|
<vyr-col>
|
|
21
21
|
<vyr-input-number v-model="descriptor.size" :allow-null="false"></vyr-input-number>
|
|
22
22
|
</vyr-col>
|
|
23
23
|
</vyr-label>
|
|
24
24
|
</vyr-row>
|
|
25
25
|
<vyr-row>
|
|
26
|
-
<vyr-label :label="language.get('inspector.
|
|
26
|
+
<vyr-label :label="language.get('inspector.Text3D.maxWidth')">
|
|
27
27
|
<vyr-col>
|
|
28
28
|
<vyr-input-number v-model="descriptor.maxWidth" :allow-null="false"></vyr-input-number>
|
|
29
29
|
</vyr-col>
|
|
30
30
|
</vyr-label>
|
|
31
31
|
</vyr-row>
|
|
32
32
|
<vyr-row>
|
|
33
|
-
<vyr-label :label="language.get('inspector.
|
|
33
|
+
<vyr-label :label="language.get('inspector.Text3D.lineHeight')">
|
|
34
34
|
<vyr-col>
|
|
35
35
|
<vyr-input-number v-model="descriptor.lineHeight" :allow-null="false"></vyr-input-number>
|
|
36
36
|
</vyr-col>
|
|
37
37
|
</vyr-label>
|
|
38
38
|
</vyr-row>
|
|
39
39
|
<vyr-row>
|
|
40
|
-
<vyr-label :label="language.get('inspector.
|
|
40
|
+
<vyr-label :label="language.get('inspector.Text3D.letterSpacing')">
|
|
41
41
|
<vyr-col>
|
|
42
42
|
<vyr-input-number v-model="descriptor.letterSpacing" :allow-null="false"></vyr-input-number>
|
|
43
43
|
</vyr-col>
|
|
44
44
|
</vyr-label>
|
|
45
45
|
</vyr-row>
|
|
46
46
|
<vyr-row>
|
|
47
|
-
<vyr-label :label="language.get('inspector.
|
|
47
|
+
<vyr-label :label="language.get('inspector.Text3D.text')">
|
|
48
48
|
<vyr-col>
|
|
49
49
|
<vyr-input v-model="descriptor.text" trigger="blur"></vyr-input>
|
|
50
50
|
</vyr-col>
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
<script lang="ts" setup>
|
|
84
84
|
import { computed } from 'vue'
|
|
85
85
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
86
|
-
import {
|
|
86
|
+
import { Text3D } from '@vyr/three';
|
|
87
87
|
import { VyrInput, VyrInputNumber, VyrRow, VyrCol, VyrLabel, VyrSelect } from '@vyr/design';
|
|
88
88
|
import { language } from '../locale'
|
|
89
89
|
import { useDescriptor } from '../common';
|
|
90
90
|
import { Geometry } from '../option';
|
|
91
91
|
|
|
92
|
-
const descriptor = useDescriptor<
|
|
92
|
+
const descriptor = useDescriptor<Text3D>()
|
|
93
93
|
|
|
94
94
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
95
95
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
<script lang="ts" setup>
|
|
85
85
|
import { computed } from 'vue';
|
|
86
86
|
import { DataService, runtime } from '@vyr/runtime';
|
|
87
|
-
import {
|
|
87
|
+
import { AnimationAction } from '@vyr/three';
|
|
88
88
|
import { option } from '@vyr/builtin'
|
|
89
89
|
import { VyrRow, VyrCol, VyrLabel, VyrInputNumber, VyrSelect } from '@vyr/design';
|
|
90
90
|
import { language } from '../../locale'
|
|
@@ -92,11 +92,11 @@ import { useDescriptor } from '../../common';
|
|
|
92
92
|
import { Animation } from '../../option'
|
|
93
93
|
|
|
94
94
|
const props = defineProps<{ raw: string }>()
|
|
95
|
-
const descriptor = useDescriptor<
|
|
95
|
+
const descriptor = useDescriptor<AnimationAction>()
|
|
96
96
|
const dataService = runtime.get<DataService>('data')
|
|
97
97
|
|
|
98
98
|
const animationOptions = computed(() => {
|
|
99
|
-
const raw =
|
|
99
|
+
const raw = AnimationAction.get<AnimationAction>(props.raw)
|
|
100
100
|
if (raw === null) return []
|
|
101
101
|
const { parent } = raw.traceAncestor(false)
|
|
102
102
|
if (parent === null) return []
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
<script lang="ts" setup>
|
|
36
|
-
import {
|
|
36
|
+
import { BoxGeometry } from '@vyr/three';
|
|
37
37
|
import { VyrInputNumber, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
38
38
|
import { language } from '../../locale'
|
|
39
39
|
import { useDescriptor } from '../../common';
|
|
40
40
|
|
|
41
|
-
const descriptor = useDescriptor<
|
|
41
|
+
const descriptor = useDescriptor<BoxGeometry>()
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
<style lang="less" scoped></style>
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
<script lang="ts" setup>
|
|
13
13
|
import { computed } from 'vue';
|
|
14
14
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
15
|
-
import {
|
|
15
|
+
import { BufferGeometry } from '@vyr/three';
|
|
16
16
|
import { VyrInput, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
17
17
|
import { language } from '../../locale'
|
|
18
18
|
import { useDescriptor } from '../../common';
|
|
19
19
|
|
|
20
|
-
const descriptor = useDescriptor<
|
|
20
|
+
const descriptor = useDescriptor<BufferGeometry>()
|
|
21
21
|
|
|
22
22
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
23
23
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
<script lang="ts" setup>
|
|
27
|
-
import {
|
|
27
|
+
import { CircleGeometry } from '@vyr/three';
|
|
28
28
|
import { VyrInputNumber, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
29
29
|
import { language } from '../../locale'
|
|
30
30
|
import { useDescriptor } from '../../common';
|
|
31
31
|
|
|
32
|
-
const descriptor = useDescriptor<
|
|
32
|
+
const descriptor = useDescriptor<CircleGeometry>()
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<style lang="less" scoped></style>
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
<script lang="ts" setup>
|
|
51
|
-
import {
|
|
51
|
+
import { CylinderGeometry } from '@vyr/three';
|
|
52
52
|
import { VyrInputNumber, VyrRow, VyrCol, VyrLabel, VyrSelect } from '@vyr/design';
|
|
53
53
|
import { language } from '../../locale'
|
|
54
54
|
import { useDescriptor } from '../../common';
|
|
55
55
|
import { Geometry } from '../../option';
|
|
56
56
|
|
|
57
|
-
const descriptor = useDescriptor<
|
|
57
|
+
const descriptor = useDescriptor<CylinderGeometry>()
|
|
58
58
|
</script>
|
|
59
59
|
|
|
60
60
|
<style lang="less" scoped></style>
|
|
@@ -95,14 +95,14 @@
|
|
|
95
95
|
<script lang="ts" setup>
|
|
96
96
|
import { computed } from 'vue'
|
|
97
97
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
98
|
-
import {
|
|
98
|
+
import { ExtrudeGeometry } from '@vyr/three';
|
|
99
99
|
import { option } from '@vyr/builtin'
|
|
100
100
|
import { VyrInput, VyrInputNumber, VyrRow, VyrCol, VyrLabel, VyrSelect } from '@vyr/design';
|
|
101
101
|
import { language } from '../../locale'
|
|
102
102
|
import { useDescriptor } from '../../common';
|
|
103
103
|
import { Geometry } from '../../option';
|
|
104
104
|
|
|
105
|
-
const descriptor = useDescriptor<
|
|
105
|
+
const descriptor = useDescriptor<ExtrudeGeometry>()
|
|
106
106
|
|
|
107
107
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
108
108
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
<script lang="ts" setup>
|
|
27
|
-
import {
|
|
27
|
+
import { PlaneGeometry } from '@vyr/three';
|
|
28
28
|
import { VyrInputNumber, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
29
29
|
import { language } from '../../locale'
|
|
30
30
|
import { useDescriptor } from '../../common';
|
|
31
31
|
|
|
32
|
-
const descriptor = useDescriptor<
|
|
32
|
+
const descriptor = useDescriptor<PlaneGeometry>()
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<style lang="less" scoped></style>
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
<script lang="ts" setup>
|
|
37
|
-
import {
|
|
37
|
+
import { RingGeometry } from '@vyr/three';
|
|
38
38
|
import { VyrInputNumber, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
39
39
|
import { language } from '../../locale'
|
|
40
40
|
import { useDescriptor } from '../../common';
|
|
41
41
|
|
|
42
|
-
const descriptor = useDescriptor<
|
|
42
|
+
const descriptor = useDescriptor<RingGeometry>()
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
45
|
<style lang="less" scoped></style>
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
<script lang="ts" setup>
|
|
43
|
-
import {
|
|
43
|
+
import { SphereGeometry } from '@vyr/three';
|
|
44
44
|
import { VyrInputNumber, VyrRow, VyrCol, VyrLabel } from '@vyr/design';
|
|
45
45
|
import { language } from '../../locale'
|
|
46
46
|
import { useDescriptor } from '../../common';
|
|
47
47
|
|
|
48
|
-
const descriptor = useDescriptor<
|
|
48
|
+
const descriptor = useDescriptor<SphereGeometry>()
|
|
49
49
|
</script>
|
|
50
50
|
|
|
51
51
|
<style lang="less" scoped></style>
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts" setup>
|
|
10
|
-
import {
|
|
10
|
+
import { SurfaceGeometry } from '@vyr/three';
|
|
11
11
|
import { VyrInputNumber } from '@vyr/design';
|
|
12
12
|
import { useDescriptor } from '../../common';
|
|
13
13
|
import ExtrudeGeometryFragment from './ExtrudeGeometryFragment.vue';
|
|
14
14
|
|
|
15
|
-
const descriptor = useDescriptor<
|
|
15
|
+
const descriptor = useDescriptor<SurfaceGeometry>()
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<style lang="less" scoped></style>
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
<script lang="ts" setup>
|
|
51
51
|
import { computed } from 'vue'
|
|
52
52
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
53
|
-
import {
|
|
53
|
+
import { TubeGeometry } from '@vyr/three';
|
|
54
54
|
import { VyrInput, VyrInputNumber, VyrRow, VyrCol, VyrLabel, VyrSelect } from '@vyr/design';
|
|
55
55
|
import { language } from '../../locale'
|
|
56
56
|
import { useDescriptor } from '../../common';
|
|
57
57
|
import { Geometry } from '../../option';
|
|
58
58
|
|
|
59
|
-
const descriptor = useDescriptor<
|
|
59
|
+
const descriptor = useDescriptor<TubeGeometry>()
|
|
60
60
|
|
|
61
61
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
62
62
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
|
|
18
18
|
<script lang="ts" setup>
|
|
19
19
|
import { VyrRow, VyrCol, VyrLabel, VyrColorPicker, VyrInputNumber } from '@vyr/design';
|
|
20
|
-
import {
|
|
20
|
+
import { AmbientLight } from '@vyr/three';
|
|
21
21
|
import { language } from '../../locale'
|
|
22
22
|
import { useDescriptor } from '../../common';
|
|
23
23
|
|
|
24
|
-
const descriptor = useDescriptor<
|
|
24
|
+
const descriptor = useDescriptor<AmbientLight>()
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<style lang="less" scoped></style>
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
import { computed } from 'vue'
|
|
74
74
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
75
75
|
import { VyrRow, VyrCol, VyrLabel, VyrInput, VyrColorPicker, VyrInputNumber } from '@vyr/design';
|
|
76
|
-
import {
|
|
76
|
+
import { DirectionalLight } from '@vyr/three';
|
|
77
77
|
import { language } from '../../locale'
|
|
78
78
|
import { useDescriptor } from '../../common';
|
|
79
79
|
|
|
80
80
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
81
81
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
82
82
|
|
|
83
|
-
const descriptor = useDescriptor<
|
|
83
|
+
const descriptor = useDescriptor<DirectionalLight>()
|
|
84
84
|
</script>
|
|
85
85
|
|
|
86
86
|
<style lang="less" scoped></style>
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
|
|
25
25
|
<script lang="ts" setup>
|
|
26
26
|
import { VyrRow, VyrCol, VyrLabel, VyrColorPicker, VyrInputNumber } from '@vyr/design';
|
|
27
|
-
import {
|
|
27
|
+
import { HemisphereLight } from '@vyr/three';
|
|
28
28
|
import { language } from '../../locale'
|
|
29
29
|
import { useDescriptor } from '../../common';
|
|
30
30
|
|
|
31
|
-
const descriptor = useDescriptor<
|
|
31
|
+
const descriptor = useDescriptor<HemisphereLight>()
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<style lang="less" scoped></style>
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
|
|
59
59
|
<script lang="ts" setup>
|
|
60
60
|
import { VyrRow, VyrCol, VyrLabel, VyrColorPicker, VyrInputNumber } from '@vyr/design';
|
|
61
|
-
import {
|
|
61
|
+
import { PointLight } from '@vyr/three';
|
|
62
62
|
import { language } from '../../locale'
|
|
63
63
|
import { useDescriptor } from '../../common';
|
|
64
64
|
|
|
65
|
-
const descriptor = useDescriptor<
|
|
65
|
+
const descriptor = useDescriptor<PointLight>()
|
|
66
66
|
</script>
|
|
67
67
|
|
|
68
68
|
<style lang="less" scoped></style>
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
|
|
39
39
|
<script lang="ts" setup>
|
|
40
40
|
import { VyrRow, VyrCol, VyrLabel, VyrColorPicker, VyrInputNumber } from '@vyr/design';
|
|
41
|
-
import {
|
|
41
|
+
import { RectAreaLight } from '@vyr/three';
|
|
42
42
|
import { language } from '../../locale'
|
|
43
43
|
import { useDescriptor } from '../../common';
|
|
44
44
|
|
|
45
|
-
const descriptor = useDescriptor<
|
|
45
|
+
const descriptor = useDescriptor<RectAreaLight>()
|
|
46
46
|
</script>
|
|
47
47
|
|
|
48
48
|
<style lang="less" scoped></style>
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
import { computed } from 'vue'
|
|
84
84
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
85
85
|
import { VyrInput, VyrRow, VyrCol, VyrLabel, VyrColorPicker, VyrInputNumber } from '@vyr/design';
|
|
86
|
-
import {
|
|
86
|
+
import { SpotLight } from '@vyr/three';
|
|
87
87
|
import { language } from '../../locale'
|
|
88
88
|
import { useDescriptor } from '../../common';
|
|
89
89
|
|
|
90
90
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
91
91
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
92
92
|
|
|
93
|
-
const descriptor = useDescriptor<
|
|
93
|
+
const descriptor = useDescriptor<SpotLight>()
|
|
94
94
|
</script>
|
|
95
95
|
|
|
96
96
|
<style lang="less" scoped></style>
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
</vyr-label>
|
|
23
23
|
</vyr-row>
|
|
24
24
|
<vyr-row>
|
|
25
|
-
<vyr-label :label="language.get('inspector.Material.
|
|
25
|
+
<vyr-label :label="language.get('inspector.Material.depthWrite')">
|
|
26
26
|
<vyr-col>
|
|
27
|
-
<vyr-select v-model="descriptor.
|
|
27
|
+
<vyr-select v-model="descriptor.depthWrite" :data="option.stateOptions"></vyr-select>
|
|
28
28
|
</vyr-col>
|
|
29
29
|
</vyr-label>
|
|
30
30
|
</vyr-row>
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
<script lang="ts" setup>
|
|
43
|
-
import {
|
|
43
|
+
import { MeshBasicMaterial } from '@vyr/three';
|
|
44
44
|
import { VyrRow, VyrCol, VyrLabel, VyrChecked, VyrSelect } from '@vyr/design';
|
|
45
45
|
import { option, } from '@vyr/builtin'
|
|
46
46
|
import { language } from '../../locale'
|
|
47
47
|
import { useDescriptor } from '../../common';
|
|
48
48
|
import { Material } from '../../option';
|
|
49
49
|
|
|
50
|
-
const descriptor = useDescriptor<
|
|
50
|
+
const descriptor = useDescriptor<MeshBasicMaterial>()
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<style lang="less" scoped></style>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<vyr-label :label="language.get('inspector.Material.color')">
|
|
4
4
|
<vyr-col>
|
|
5
5
|
<vyr-checked v-model="descriptor.colorWrite"></vyr-checked>
|
|
6
|
-
<vyr-color-picker v-model="descriptor.color
|
|
6
|
+
<vyr-color-picker v-model="descriptor.color" width="all"></vyr-color-picker>
|
|
7
7
|
</vyr-col>
|
|
8
8
|
</vyr-label>
|
|
9
9
|
</vyr-row>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<vyr-label :label="language.get('inspector.Material.transparent')">
|
|
28
28
|
<vyr-col>
|
|
29
29
|
<vyr-checked v-model="descriptor.transparent"></vyr-checked>
|
|
30
|
-
<vyr-input-number v-model="descriptor.
|
|
30
|
+
<vyr-input-number v-model="descriptor.opacity" :allow-null="false"></vyr-input-number>
|
|
31
31
|
</vyr-col>
|
|
32
32
|
</vyr-label>
|
|
33
33
|
</vyr-row>
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
<script lang="ts" setup>
|
|
111
111
|
import { computed } from 'vue'
|
|
112
112
|
import { DraggableService, runtime } from '@vyr/runtime';
|
|
113
|
-
import {
|
|
113
|
+
import { MeshBasicMaterial } from '@vyr/three';
|
|
114
114
|
import { VyrInput, VyrRow, VyrCol, VyrLabel, VyrChecked, VyrColorPicker, VyrInputNumber, VyrSelect } from '@vyr/design';
|
|
115
115
|
import { option } from '@vyr/builtin'
|
|
116
116
|
import { language } from '../../locale'
|
|
@@ -119,7 +119,7 @@ import { Material } from '../../option';
|
|
|
119
119
|
|
|
120
120
|
const draggableService = runtime.get<DraggableService>('draggable')
|
|
121
121
|
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
122
|
-
const descriptor = useDescriptor<
|
|
122
|
+
const descriptor = useDescriptor<MeshBasicMaterial>()
|
|
123
123
|
|
|
124
124
|
</script>
|
|
125
125
|
|