refactor(stage-*): static assets path migrated to use new URL(...)
|
Before Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 240 KiB |
|
Before Width: | Height: | Size: 260 KiB |
@@ -12,7 +12,6 @@ import type { DirectionalLight, SphericalHarmonics3, Texture, WebGLRenderTarget
|
||||
|
||||
import type { Vec3 } from '../stores/model-store'
|
||||
|
||||
import { withBase } from '@proj-airi/stage-shared'
|
||||
import { TresCanvas } from '@tresjs/core'
|
||||
import { EffectComposerPmndrs, HueSaturationPmndrs } from '@tresjs/post-processing'
|
||||
import { useElementBounding } from '@vueuse/core'
|
||||
@@ -44,7 +43,7 @@ const props = withDefaults(defineProps<{
|
||||
paused?: boolean
|
||||
}>(), {
|
||||
showAxes: false,
|
||||
idleAnimation: withBase('/assets/vrm/animations/idle_loop.vrma'),
|
||||
idleAnimation: new URL('../assets/vrm/animations/idle_loop.vrma', import.meta.url).href,
|
||||
paused: false,
|
||||
})
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 240 KiB |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 260 KiB |
@@ -26,6 +26,14 @@ export type DisplayModel
|
||||
= | DisplayModelFile
|
||||
| DisplayModelURL
|
||||
|
||||
const presetLive2dProUrl = new URL('../assets/live2d/models/hiyori_pro_zh.zip', import.meta.url).href
|
||||
const presetLive2dFreeUrl = new URL('../assets/live2d/models/hiyori_free_zh.zip', import.meta.url).href
|
||||
const presetLive2dPreview = new URL('../assets/live2d/models/hiyori/preview.png', import.meta.url).href
|
||||
const presetVrmAvatarAUrl = new URL('../assets/vrm/models/AvatarSample-A/AvatarSample_A.vrm', import.meta.url).href
|
||||
const presetVrmAvatarAPreview = new URL('../assets/vrm/models/AvatarSample-A/preview.png', import.meta.url).href
|
||||
const presetVrmAvatarBUrl = new URL('../assets/vrm/models/AvatarSample-B/AvatarSample_B.vrm', import.meta.url).href
|
||||
const presetVrmAvatarBPreview = new URL('../assets/vrm/models/AvatarSample-B/preview.png', import.meta.url).href
|
||||
|
||||
export interface DisplayModelFile {
|
||||
id: string
|
||||
format: DisplayModelFormat
|
||||
@@ -47,10 +55,10 @@ export interface DisplayModelURL {
|
||||
}
|
||||
|
||||
const displayModelsPresets: DisplayModel[] = [
|
||||
{ id: 'preset-live2d-1', format: DisplayModelFormat.Live2dZip, type: 'url', url: '/assets/live2d/models/hiyori_pro_zh.zip', name: 'Hiyori (Pro)', previewImage: '/assets/live2d/models/hiyori/preview.png', importedAt: 1733113886840 },
|
||||
{ id: 'preset-live2d-2', format: DisplayModelFormat.Live2dZip, type: 'url', url: '/assets/live2d/models/hiyori_free_zh.zip', name: 'Hiyori (Free)', previewImage: '/assets/live2d/models/hiyori/preview.png', importedAt: 1733113886840 },
|
||||
{ id: 'preset-vrm-1', format: DisplayModelFormat.VRM, type: 'url', url: '/assets/vrm/models/AvatarSample-A/AvatarSample_A.vrm', name: 'AvatarSample_A', previewImage: '/assets/vrm/models/AvatarSample-A/preview.png', importedAt: 1733113886840 },
|
||||
{ id: 'preset-vrm-2', format: DisplayModelFormat.VRM, type: 'url', url: '/assets/vrm/models/AvatarSample-B/AvatarSample_B.vrm', name: 'AvatarSample_B', previewImage: '/assets/vrm/models/AvatarSample-B/preview.png', importedAt: 1733113886840 },
|
||||
{ id: 'preset-live2d-1', format: DisplayModelFormat.Live2dZip, type: 'url', url: presetLive2dProUrl, name: 'Hiyori (Pro)', previewImage: presetLive2dPreview, importedAt: 1733113886840 },
|
||||
{ id: 'preset-live2d-2', format: DisplayModelFormat.Live2dZip, type: 'url', url: presetLive2dFreeUrl, name: 'Hiyori (Free)', previewImage: presetLive2dPreview, importedAt: 1733113886840 },
|
||||
{ id: 'preset-vrm-1', format: DisplayModelFormat.VRM, type: 'url', url: presetVrmAvatarAUrl, name: 'AvatarSample_A', previewImage: presetVrmAvatarAPreview, importedAt: 1733113886840 },
|
||||
{ id: 'preset-vrm-2', format: DisplayModelFormat.VRM, type: 'url', url: presetVrmAvatarBUrl, name: 'AvatarSample_B', previewImage: presetVrmAvatarBPreview, importedAt: 1733113886840 },
|
||||
]
|
||||
|
||||
export const useDisplayModelsStore = defineStore('display-models', () => {
|
||||
|
||||