@vyr/three-browser 0.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/package.json +25 -0
- package/src/common/index.ts +2 -0
- package/src/common/provider.ts +14 -0
- package/src/common/validate.ts +10 -0
- package/src/fragment/GeoMapFragment.vue +129 -0
- package/src/fragment/InstancedMeshFragment.vue +29 -0
- package/src/fragment/MeshFragment.vue +98 -0
- package/src/fragment/ModelFragment.vue +28 -0
- package/src/fragment/NodeFragment.vue +93 -0
- package/src/fragment/ParticleFragment.vue +147 -0
- package/src/fragment/PointsFragment.vue +34 -0
- package/src/fragment/SpriteFragment.vue +38 -0
- package/src/fragment/TextFragment.vue +98 -0
- package/src/fragment/animation/AnimationActionFragment.vue +110 -0
- package/src/fragment/geometry/BoxGeometryFragment.vue +44 -0
- package/src/fragment/geometry/BufferGeometryFragment.vue +26 -0
- package/src/fragment/geometry/CircleGeometryFragment.vue +35 -0
- package/src/fragment/geometry/CylinderGeometryFragment.vue +60 -0
- package/src/fragment/geometry/ExtrudeGeometryFragment.vue +111 -0
- package/src/fragment/geometry/PlaneGeometryFragment.vue +35 -0
- package/src/fragment/geometry/RingGeometryFragment.vue +45 -0
- package/src/fragment/geometry/SphereGeometryFragment.vue +51 -0
- package/src/fragment/geometry/SurfaceGeometryFragment.vue +18 -0
- package/src/fragment/geometry/TubeGeometryFragment.vue +65 -0
- package/src/fragment/light/AmbientLightFragment.vue +27 -0
- package/src/fragment/light/DirectionalLightFragment.vue +86 -0
- package/src/fragment/light/HemisphereLightFragment.vue +34 -0
- package/src/fragment/light/PointLightFragment.vue +68 -0
- package/src/fragment/light/RectAreaLightFragment.vue +48 -0
- package/src/fragment/light/SpotLightFragment.vue +96 -0
- package/src/fragment/material/MaterialFragment.vue +53 -0
- package/src/fragment/material/MeshBasicMaterialFragment.vue +126 -0
- package/src/fragment/material/MeshPhongMaterialFragment.vue +263 -0
- package/src/fragment/material/MeshStandardMaterialFragment.vue +256 -0
- package/src/fragment/material/PointsMaterialFragment.vue +81 -0
- package/src/fragment/material/ShaderMaterialFragment.vue +61 -0
- package/src/fragment/material/ShadowMaterialFragment.vue +49 -0
- package/src/fragment/material/SpriteMaterialFragment.vue +79 -0
- package/src/fragment/texture/TextureFragment.vue +131 -0
- package/src/index.ts +4 -0
- package/src/locale/Language.ts +10 -0
- package/src/locale/LanguageProvider.ts +655 -0
- package/src/locale/index.ts +2 -0
- package/src/option/Animation.ts +17 -0
- package/src/option/Geometry.ts +22 -0
- package/src/option/Material.ts +42 -0
- package/src/option/Mesh.ts +10 -0
- package/src/option/Shadow.ts +18 -0
- package/src/option/Texture.ts +55 -0
- package/src/option/index.ts +6 -0
- package/src/service/footer/action/geometry/index.ts +73 -0
- package/src/service/footer/action/index.ts +9 -0
- package/src/service/footer/action/material/index.ts +70 -0
- package/src/service/footer/action/texture/index.ts +63 -0
- package/src/service/global/index.ts +1 -0
- package/src/service/global/scripts/index.ts +12 -0
- package/src/service/index.ts +79 -0
- package/src/service/inspector/GeoMapViewer.vue +32 -0
- package/src/service/inspector/HTMLConvertViewer.vue +31 -0
- package/src/service/inspector/InstanceMeshViewer.vue +33 -0
- package/src/service/inspector/MeshViewer.vue +33 -0
- package/src/service/inspector/ModelViewer.vue +34 -0
- package/src/service/inspector/NodeViewer.vue +30 -0
- package/src/service/inspector/ParticleViewer.vue +37 -0
- package/src/service/inspector/PerspectiveCameraViewer.vue +62 -0
- package/src/service/inspector/PointsViewer.vue +33 -0
- package/src/service/inspector/ServiceViewer.vue +92 -0
- package/src/service/inspector/SpriteViewer.vue +34 -0
- package/src/service/inspector/TextViewer.vue +34 -0
- package/src/service/inspector/animation/AnimationActionViewer.vue +31 -0
- package/src/service/inspector/geometry/BoxGeometryViewer.vue +32 -0
- package/src/service/inspector/geometry/BufferGeometryViewer.vue +33 -0
- package/src/service/inspector/geometry/CircleGeometryViewer.vue +32 -0
- package/src/service/inspector/geometry/CylinderGeometryViewer.vue +32 -0
- package/src/service/inspector/geometry/ExtrudeGeometryViewer.vue +32 -0
- package/src/service/inspector/geometry/PlaneGeometryViewer.vue +32 -0
- package/src/service/inspector/geometry/RingGeometryViewer.vue +32 -0
- package/src/service/inspector/geometry/SphereGeometryViewer.vue +32 -0
- package/src/service/inspector/geometry/SurfaceGeometryViewer.vue +32 -0
- package/src/service/inspector/geometry/TubeGeometryViewer.vue +32 -0
- package/src/service/inspector/index.ts +50 -0
- package/src/service/inspector/light/AmbientLightViewer.vue +33 -0
- package/src/service/inspector/light/DirectionalLightViewer.vue +33 -0
- package/src/service/inspector/light/HemisphereLightViewer.vue +33 -0
- package/src/service/inspector/light/PointLightViewer.vue +33 -0
- package/src/service/inspector/light/RectAreaLightViewer.vue +33 -0
- package/src/service/inspector/light/SpotLightViewer.vue +33 -0
- package/src/service/inspector/material/MeshBasicMaterialViewer.vue +34 -0
- package/src/service/inspector/material/MeshPhongMaterialViewer.vue +34 -0
- package/src/service/inspector/material/MeshStandardMaterialViewer.vue +34 -0
- package/src/service/inspector/material/PointsMaterialViewer.vue +33 -0
- package/src/service/inspector/material/ShaderMaterialViewer.vue +34 -0
- package/src/service/inspector/material/ShadowMaterialViewer.vue +34 -0
- package/src/service/inspector/material/SpriteMaterialViewer.vue +34 -0
- package/src/service/inspector/texture/TextureViewer.vue +32 -0
- package/src/service/sidebar/asset/action/AddAnimationAction.ts +66 -0
- package/src/service/sidebar/asset/action/AddLightAction.ts +66 -0
- package/src/service/sidebar/asset/action/index.ts +7 -0
- package/src/service/sidebar/scene/action/AddAnimationAction.ts +64 -0
- package/src/service/sidebar/scene/action/AddLightAction.ts +66 -0
- package/src/service/sidebar/scene/action/index.ts +7 -0
- package/src/shims-vue.d.ts +10 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.Node')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<node-fragment></node-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor, NodeDescriptor } from '@vyr/engine';
|
|
12
|
+
import { VyrCard, } from '@vyr/design';
|
|
13
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
14
|
+
import { language } from '../../locale'
|
|
15
|
+
import { providerDescriptor } from '../../common';
|
|
16
|
+
import NodeFragment from '../../fragment/NodeFragment.vue';
|
|
17
|
+
|
|
18
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
19
|
+
const descriptor = ref(null) as Ref<NodeDescriptor | null>
|
|
20
|
+
const watchEditItem = (cur: string) => {
|
|
21
|
+
if (!cur) return descriptor.value = null
|
|
22
|
+
descriptor.value = Descriptor.get<NodeDescriptor>(cur)
|
|
23
|
+
}
|
|
24
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
25
|
+
|
|
26
|
+
providerDescriptor(descriptor)
|
|
27
|
+
builtinProviderDescriptor(descriptor)
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.Particle')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<node-fragment></node-fragment>
|
|
5
|
+
<particle-fragment></particle-fragment>
|
|
6
|
+
<material-fragment></material-fragment>
|
|
7
|
+
<points-material-fragment :sizable="false"></points-material-fragment>
|
|
8
|
+
</vyr-card>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
import { Ref, ref, watch } from 'vue'
|
|
14
|
+
import { Descriptor } from '@vyr/engine';
|
|
15
|
+
import { ParticleDescriptor } from '@vyr/three';
|
|
16
|
+
import { VyrCard, } from '@vyr/design';
|
|
17
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
18
|
+
import { language } from '../../locale'
|
|
19
|
+
import { providerDescriptor } from '../../common';
|
|
20
|
+
import NodeFragment from '../../fragment/NodeFragment.vue';
|
|
21
|
+
import ParticleFragment from '../../fragment/ParticleFragment.vue';
|
|
22
|
+
import MaterialFragment from '../../fragment/material/MaterialFragment.vue';
|
|
23
|
+
import PointsMaterialFragment from '../../fragment/material/PointsMaterialFragment.vue';
|
|
24
|
+
|
|
25
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
26
|
+
const descriptor = ref(null) as Ref<ParticleDescriptor | null>
|
|
27
|
+
const watchEditItem = (cur: string) => {
|
|
28
|
+
if (!cur) return descriptor.value = null
|
|
29
|
+
descriptor.value = Descriptor.get<ParticleDescriptor>(cur)
|
|
30
|
+
}
|
|
31
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
32
|
+
|
|
33
|
+
providerDescriptor(descriptor)
|
|
34
|
+
builtinProviderDescriptor(descriptor)
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.PerspectiveCamera')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<node-fragment></node-fragment>
|
|
5
|
+
<template #tool>
|
|
6
|
+
<i class="vyrfont vyr-copy_from" title="同步场景相机的位置、旋转和缩放" @click="syncCamera"></i>
|
|
7
|
+
<i class="vyrfont vyr-copy_to" title="使用此相机来设置场景相机的位置、旋转和缩放" @click="setCamera"></i>
|
|
8
|
+
</template>
|
|
9
|
+
</vyr-card>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
import { onBeforeUnmount, Ref, ref, watch } from 'vue'
|
|
15
|
+
import { runtime, RemoteService } from '@vyr/runtime';
|
|
16
|
+
import { Job } from '@vyr/remote'
|
|
17
|
+
import { Descriptor } from '@vyr/engine';
|
|
18
|
+
import { PerspectiveCameraDescriptor } from '@vyr/three';
|
|
19
|
+
import { VyrCard, } from '@vyr/design';
|
|
20
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
21
|
+
import { language } from '../../locale'
|
|
22
|
+
import { providerDescriptor } from '../../common';
|
|
23
|
+
import NodeFragment from '../../fragment/NodeFragment.vue';
|
|
24
|
+
|
|
25
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
26
|
+
|
|
27
|
+
const descriptor = ref(null) as Ref<PerspectiveCameraDescriptor | null>
|
|
28
|
+
const watchEditItem = (cur: string) => {
|
|
29
|
+
if (!cur) return descriptor.value = null
|
|
30
|
+
descriptor.value = Descriptor.get<PerspectiveCameraDescriptor>(cur)
|
|
31
|
+
}
|
|
32
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
33
|
+
|
|
34
|
+
providerDescriptor(descriptor)
|
|
35
|
+
builtinProviderDescriptor(descriptor)
|
|
36
|
+
|
|
37
|
+
const remoteService = runtime.get<RemoteService>('remote')
|
|
38
|
+
const preview = remoteService.get('preview')
|
|
39
|
+
|
|
40
|
+
const updateCamera = (task: InstanceType<typeof Job['invoke']['properties']['Response']>) => {
|
|
41
|
+
if (descriptor.value === null) return
|
|
42
|
+
descriptor.value.position.x = task.params.properties.position.x
|
|
43
|
+
descriptor.value.position.y = task.params.properties.position.y
|
|
44
|
+
descriptor.value.position.z = task.params.properties.position.z
|
|
45
|
+
descriptor.value.rotation.x = task.params.properties.rotation.x
|
|
46
|
+
descriptor.value.rotation.y = task.params.properties.rotation.y
|
|
47
|
+
descriptor.value.rotation.z = task.params.properties.rotation.z
|
|
48
|
+
descriptor.value.scale.x = task.params.properties.scale.x
|
|
49
|
+
descriptor.value.scale.y = task.params.properties.scale.y
|
|
50
|
+
descriptor.value.scale.z = task.params.properties.scale.z
|
|
51
|
+
}
|
|
52
|
+
const syncCamera = () => {
|
|
53
|
+
preview.bridge.send(new Job.invoke.properties.Task({ type: 'getCurrentCamera', uuid: props.raw }))
|
|
54
|
+
}
|
|
55
|
+
const setCamera = () => {
|
|
56
|
+
preview.bridge.send(new Job.invoke.properties.Task({ type: 'setCurrentCamera', uuid: props.raw }))
|
|
57
|
+
}
|
|
58
|
+
preview.bridge.listen(Job.invoke.properties.Method, updateCamera)
|
|
59
|
+
onBeforeUnmount(() => preview.bridge.unlisten(Job.invoke.properties.Method, updateCamera))
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.Points')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<node-fragment></node-fragment>
|
|
5
|
+
<points-fragment></points-fragment>
|
|
6
|
+
</vyr-card>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { Ref, ref, watch } from 'vue'
|
|
12
|
+
import { Descriptor } from '@vyr/engine';
|
|
13
|
+
import { PointsDescriptor } from '@vyr/three';
|
|
14
|
+
import { VyrCard, } from '@vyr/design';
|
|
15
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
16
|
+
import { language } from '../../locale'
|
|
17
|
+
import { providerDescriptor } from '../../common';
|
|
18
|
+
import NodeFragment from '../../fragment/NodeFragment.vue';
|
|
19
|
+
import PointsFragment from '../../fragment/PointsFragment.vue';
|
|
20
|
+
|
|
21
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
22
|
+
const descriptor = ref(null) as Ref<PointsDescriptor | null>
|
|
23
|
+
const watchEditItem = (cur: string) => {
|
|
24
|
+
if (!cur) return descriptor.value = null
|
|
25
|
+
descriptor.value = Descriptor.get<PointsDescriptor>(cur)
|
|
26
|
+
}
|
|
27
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
28
|
+
|
|
29
|
+
providerDescriptor(descriptor)
|
|
30
|
+
builtinProviderDescriptor(descriptor)
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get(`descriptor.type.${descriptor.type}` as any)" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<HTML-fragment :raw="raw"></HTML-fragment>
|
|
5
|
+
<vyr-row>
|
|
6
|
+
<vyr-label :label="language.get('inspector.Service.shadowMap.type')">
|
|
7
|
+
<vyr-col>
|
|
8
|
+
<vyr-select v-model="descriptor.shadowMapType" :data="Shadow.typeOptions"></vyr-select>
|
|
9
|
+
</vyr-col>
|
|
10
|
+
</vyr-label>
|
|
11
|
+
</vyr-row>
|
|
12
|
+
<vyr-row>
|
|
13
|
+
<vyr-label :label="language.get('inspector.Service.shadowMap.update')">
|
|
14
|
+
<vyr-col>
|
|
15
|
+
<vyr-select v-model="descriptor.autoUpdateShadowMap" :data="Shadow.updateOptions"></vyr-select>
|
|
16
|
+
</vyr-col>
|
|
17
|
+
</vyr-label>
|
|
18
|
+
</vyr-row>
|
|
19
|
+
<vyr-row>
|
|
20
|
+
<vyr-label :label="language.get('inspector.Service.background')">
|
|
21
|
+
<vyr-col>
|
|
22
|
+
<vyr-input v-model="descriptor.background" :clearable="true" dragkey="background"
|
|
23
|
+
:draggable="draggable" trigger="blur"></vyr-input>
|
|
24
|
+
</vyr-col>
|
|
25
|
+
</vyr-label>
|
|
26
|
+
</vyr-row>
|
|
27
|
+
<!-- <template v-if="isComposer(descriptor)">
|
|
28
|
+
<vyr-row>
|
|
29
|
+
<vyr-label :label="language.get('inspector.Service.multisampling')">
|
|
30
|
+
<vyr-col>
|
|
31
|
+
<vyr-input-number v-model="descriptor.multisampling" :allow-null="false"
|
|
32
|
+
:min="0"></vyr-input-number>
|
|
33
|
+
</vyr-col>
|
|
34
|
+
</vyr-label>
|
|
35
|
+
</vyr-row>
|
|
36
|
+
<vyr-row>
|
|
37
|
+
<vyr-label :label="language.get('inspector.Service.frameBufferType')">
|
|
38
|
+
<vyr-col>
|
|
39
|
+
<vyr-select v-model="descriptor.frameBufferType" :data="Texture.ftypeOptions"></vyr-select>
|
|
40
|
+
</vyr-col>
|
|
41
|
+
</vyr-label>
|
|
42
|
+
</vyr-row>
|
|
43
|
+
<vyr-row>
|
|
44
|
+
<vyr-label :label="language.get('inspector.Service.depthBuffer')">
|
|
45
|
+
<vyr-col>
|
|
46
|
+
<vyr-select v-model="descriptor.depthBuffer" :data="option.booleanOptions"></vyr-select>
|
|
47
|
+
</vyr-col>
|
|
48
|
+
</vyr-label>
|
|
49
|
+
</vyr-row>
|
|
50
|
+
<vyr-row>
|
|
51
|
+
<vyr-label :label="language.get('inspector.Service.stencilBuffer')">
|
|
52
|
+
<vyr-col>
|
|
53
|
+
<vyr-select v-model="descriptor.stencilBuffer" :data="option.booleanOptions"></vyr-select>
|
|
54
|
+
</vyr-col>
|
|
55
|
+
</vyr-label>
|
|
56
|
+
</vyr-row>
|
|
57
|
+
</template> -->
|
|
58
|
+
</vyr-card>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
<script lang="ts" setup>
|
|
63
|
+
import { computed, Ref, ref, watch } from 'vue'
|
|
64
|
+
import { Descriptor } from '@vyr/engine';
|
|
65
|
+
import { SceneServiceDescriptor } from '@vyr/three';
|
|
66
|
+
import { VyrCard, VyrRow, VyrLabel, VyrCol, VyrSelect, VyrInput, VyrInputNumber } from '@vyr/design';
|
|
67
|
+
import { BaseFragment, HTMLFragment, option, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
68
|
+
import { Shadow, Texture } from '../../option'
|
|
69
|
+
import { language } from '../../locale'
|
|
70
|
+
import { providerDescriptor } from '../../common';
|
|
71
|
+
import { DraggableService, runtime } from '@vyr/runtime';
|
|
72
|
+
|
|
73
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
74
|
+
const descriptor = ref(null) as Ref<SceneServiceDescriptor | null>
|
|
75
|
+
const watchEditItem = (cur: string) => {
|
|
76
|
+
if (!cur) return descriptor.value = null
|
|
77
|
+
descriptor.value = Descriptor.get<SceneServiceDescriptor>(cur)
|
|
78
|
+
}
|
|
79
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
80
|
+
|
|
81
|
+
providerDescriptor(descriptor)
|
|
82
|
+
builtinProviderDescriptor(descriptor)
|
|
83
|
+
|
|
84
|
+
const draggableService = runtime.get<DraggableService>('draggable')
|
|
85
|
+
const draggable = computed(() => draggableService.get(draggableService.key.inspector))
|
|
86
|
+
|
|
87
|
+
// const isComposer = (descriptor: Descriptor): descriptor is ComposerServiceDescriptor => {
|
|
88
|
+
// return descriptor instanceof ComposerServiceDescriptor
|
|
89
|
+
// }
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.Sprite')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<node-fragment></node-fragment>
|
|
5
|
+
<sprite-fragment></sprite-fragment>
|
|
6
|
+
</vyr-card>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { Ref, ref, watch } from 'vue'
|
|
12
|
+
import { Descriptor } from '@vyr/engine';
|
|
13
|
+
import { SpriteDescriptor } from '@vyr/three';
|
|
14
|
+
import { VyrCard } from '@vyr/design';
|
|
15
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
16
|
+
import { language } from '../../locale'
|
|
17
|
+
import { providerDescriptor } from '../../common';
|
|
18
|
+
import NodeFragment from '../../fragment/NodeFragment.vue';
|
|
19
|
+
import SpriteFragment from '../../fragment/SpriteFragment.vue';
|
|
20
|
+
|
|
21
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
22
|
+
|
|
23
|
+
const descriptor = ref(null) as Ref<SpriteDescriptor | null>
|
|
24
|
+
const watchEditItem = (cur: string) => {
|
|
25
|
+
if (!cur) return descriptor.value = null
|
|
26
|
+
descriptor.value = Descriptor.get<SpriteDescriptor>(cur)
|
|
27
|
+
}
|
|
28
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
29
|
+
|
|
30
|
+
providerDescriptor(descriptor)
|
|
31
|
+
builtinProviderDescriptor(descriptor)
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.Text')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<node-fragment></node-fragment>
|
|
5
|
+
<text-fragment></text-fragment>
|
|
6
|
+
</vyr-card>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { Ref, ref, watch } from 'vue'
|
|
12
|
+
import { Descriptor } from '@vyr/engine';
|
|
13
|
+
import { TextDescriptor } from '@vyr/three';
|
|
14
|
+
import { VyrCard } from '@vyr/design';
|
|
15
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
16
|
+
import { language } from '../../locale'
|
|
17
|
+
import { providerDescriptor } from '../../common';
|
|
18
|
+
import NodeFragment from '../../fragment/NodeFragment.vue';
|
|
19
|
+
import TextFragment from '../../fragment/TextFragment.vue';
|
|
20
|
+
|
|
21
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
22
|
+
|
|
23
|
+
const descriptor = ref(null) as Ref<TextDescriptor | null>
|
|
24
|
+
const watchEditItem = (cur: string) => {
|
|
25
|
+
if (!cur) return descriptor.value = null
|
|
26
|
+
descriptor.value = Descriptor.get<TextDescriptor>(cur)
|
|
27
|
+
}
|
|
28
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
29
|
+
|
|
30
|
+
providerDescriptor(descriptor)
|
|
31
|
+
builtinProviderDescriptor(descriptor)
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.AnimationAction')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<animation-action-fragment :raw="raw">
|
|
5
|
+
</animation-action-fragment>
|
|
6
|
+
</vyr-card>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { Ref, ref, watch } from 'vue'
|
|
12
|
+
import { AnimationActionDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import AnimationActionFragment from '../../../fragment/animation/AnimationActionFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
const descriptor = ref(null) as Ref<AnimationActionDescriptor | null>
|
|
21
|
+
const watchEditItem = (cur: string) => {
|
|
22
|
+
if (!cur) return descriptor.value = null
|
|
23
|
+
descriptor.value = AnimationActionDescriptor.get<AnimationActionDescriptor>(cur)
|
|
24
|
+
}
|
|
25
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
26
|
+
|
|
27
|
+
providerDescriptor(descriptor)
|
|
28
|
+
builtinProviderDescriptor(descriptor)
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.BoxGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<box-geometry-fragment></box-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { BoxGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import BoxGeometryFragment from '../../../fragment/geometry/BoxGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
const descriptor = ref(null) as Ref<BoxGeometryDescriptor | null>
|
|
22
|
+
const watchEditItem = (cur: string) => {
|
|
23
|
+
if (!cur) return descriptor.value = null
|
|
24
|
+
descriptor.value = Descriptor.get<BoxGeometryDescriptor>(cur)
|
|
25
|
+
}
|
|
26
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
27
|
+
|
|
28
|
+
providerDescriptor(descriptor)
|
|
29
|
+
builtinProviderDescriptor(descriptor)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.BufferGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<buffer-geometry-fragment></buffer-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { BufferGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import BufferGeometryFragment from '../../../fragment/geometry/BufferGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const descriptor = ref(null) as Ref<BufferGeometryDescriptor | null>
|
|
23
|
+
const watchEditItem = (cur: string) => {
|
|
24
|
+
if (!cur) return descriptor.value = null
|
|
25
|
+
descriptor.value = Descriptor.get<BufferGeometryDescriptor>(cur)
|
|
26
|
+
}
|
|
27
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
28
|
+
|
|
29
|
+
providerDescriptor(descriptor)
|
|
30
|
+
builtinProviderDescriptor(descriptor)
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.CircleGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<circle-geometry-fragment></circle-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { CircleGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import CircleGeometryFragment from '../../../fragment/geometry/CircleGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
const descriptor = ref(null) as Ref<CircleGeometryDescriptor | null>
|
|
22
|
+
const watchEditItem = (cur: string) => {
|
|
23
|
+
if (!cur) return descriptor.value = null
|
|
24
|
+
descriptor.value = Descriptor.get<CircleGeometryDescriptor>(cur)
|
|
25
|
+
}
|
|
26
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
27
|
+
|
|
28
|
+
providerDescriptor(descriptor)
|
|
29
|
+
builtinProviderDescriptor(descriptor)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.CylinderGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<cylinder-geometry-fragment></cylinder-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { CylinderGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import CylinderGeometryFragment from '../../../fragment/geometry/CylinderGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
const descriptor = ref(null) as Ref<CylinderGeometryDescriptor | null>
|
|
22
|
+
const watchEditItem = (cur: string) => {
|
|
23
|
+
if (!cur) return descriptor.value = null
|
|
24
|
+
descriptor.value = Descriptor.get<CylinderGeometryDescriptor>(cur)
|
|
25
|
+
}
|
|
26
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
27
|
+
|
|
28
|
+
providerDescriptor(descriptor)
|
|
29
|
+
builtinProviderDescriptor(descriptor)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.ExtrudeGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<extrude-geometry-fragment></extrude-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { TubeGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import ExtrudeGeometryFragment from '../../../fragment/geometry/ExtrudeGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
const descriptor = ref(null) as Ref<TubeGeometryDescriptor | null>
|
|
22
|
+
const watchEditItem = (cur: string) => {
|
|
23
|
+
if (!cur) return descriptor.value = null
|
|
24
|
+
descriptor.value = Descriptor.get<TubeGeometryDescriptor>(cur)
|
|
25
|
+
}
|
|
26
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
27
|
+
|
|
28
|
+
providerDescriptor(descriptor)
|
|
29
|
+
builtinProviderDescriptor(descriptor)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.PlaneGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<plane-geometry-fragment></plane-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { PlaneGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import PlaneGeometryFragment from '../../../fragment/geometry/PlaneGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
const descriptor = ref(null) as Ref<PlaneGeometryDescriptor | null>
|
|
22
|
+
const watchEditItem = (cur: string) => {
|
|
23
|
+
if (!cur) return descriptor.value = null
|
|
24
|
+
descriptor.value = Descriptor.get<PlaneGeometryDescriptor>(cur)
|
|
25
|
+
}
|
|
26
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
27
|
+
|
|
28
|
+
providerDescriptor(descriptor)
|
|
29
|
+
builtinProviderDescriptor(descriptor)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.RingGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<ring-geometry-fragment></ring-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { RingGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import RingGeometryFragment from '../../../fragment/geometry/RingGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
const descriptor = ref(null) as Ref<RingGeometryDescriptor | null>
|
|
22
|
+
const watchEditItem = (cur: string) => {
|
|
23
|
+
if (!cur) return descriptor.value = null
|
|
24
|
+
descriptor.value = Descriptor.get<RingGeometryDescriptor>(cur)
|
|
25
|
+
}
|
|
26
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
27
|
+
|
|
28
|
+
providerDescriptor(descriptor)
|
|
29
|
+
builtinProviderDescriptor(descriptor)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.SphereGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<sphere-geometry-fragment></sphere-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { SphereGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import SphereGeometryFragment from '../../../fragment/geometry/SphereGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
const descriptor = ref(null) as Ref<SphereGeometryDescriptor | null>
|
|
22
|
+
const watchEditItem = (cur: string) => {
|
|
23
|
+
if (!cur) return descriptor.value = null
|
|
24
|
+
descriptor.value = Descriptor.get<SphereGeometryDescriptor>(cur)
|
|
25
|
+
}
|
|
26
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
27
|
+
|
|
28
|
+
providerDescriptor(descriptor)
|
|
29
|
+
builtinProviderDescriptor(descriptor)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vyr-card v-if="descriptor" :title="language.get('descriptor.type.SurfaceGeometry')" :scroll="true">
|
|
3
|
+
<base-fragment :raw="raw"></base-fragment>
|
|
4
|
+
<surface-geometry-fragment></surface-geometry-fragment>
|
|
5
|
+
</vyr-card>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { Ref, ref, watch } from 'vue'
|
|
11
|
+
import { Descriptor } from '@vyr/engine';
|
|
12
|
+
import { TubeGeometryDescriptor } from '@vyr/three';
|
|
13
|
+
import { VyrCard, } from '@vyr/design';
|
|
14
|
+
import { BaseFragment, providerDescriptor as builtinProviderDescriptor } from '@vyr/builtin'
|
|
15
|
+
import { language } from '../../../locale'
|
|
16
|
+
import { providerDescriptor } from '../../../common';
|
|
17
|
+
import SurfaceGeometryFragment from '../../../fragment/geometry/SurfaceGeometryFragment.vue';
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{ raw: string, uuid: string }>()
|
|
20
|
+
|
|
21
|
+
const descriptor = ref(null) as Ref<TubeGeometryDescriptor | null>
|
|
22
|
+
const watchEditItem = (cur: string) => {
|
|
23
|
+
if (!cur) return descriptor.value = null
|
|
24
|
+
descriptor.value = Descriptor.get<TubeGeometryDescriptor>(cur)
|
|
25
|
+
}
|
|
26
|
+
watch(() => props.uuid, watchEditItem, { immediate: true })
|
|
27
|
+
|
|
28
|
+
providerDescriptor(descriptor)
|
|
29
|
+
builtinProviderDescriptor(descriptor)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped></style>
|