Move assets to vite public folder (#152)
Closes: #151 Models and samples are now properly structured in the vite public folder so they are properly automatically incorporated into the the builds and work with both builds and dev tests. Reviewed-on: #152
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
limbsDetails: { "version": "N/A" },
|
||||
headneckDetails: { "version": "N/A" },
|
||||
alvinnVersion: store().getVersion,
|
||||
isCordova: !!window.cordova,
|
||||
otherSettings: {}
|
||||
}
|
||||
},
|
||||
@@ -54,22 +55,18 @@
|
||||
created () {
|
||||
var loadOtherSettings = localStorage.getItem('otherSettings')
|
||||
if (loadOtherSettings) this.otherSettings = JSON.parse(loadOtherSettings)
|
||||
import('../models/thorax/descript.json')
|
||||
.then((mod) => {
|
||||
this.thoraxDetails = mod.default
|
||||
})
|
||||
import('../models/thorax-mini/descript.json')
|
||||
.then((mod) => {
|
||||
this.miniThoraxDetails = mod.default
|
||||
})
|
||||
import('../models/abdomen/descript.json')
|
||||
.then((mod) => {
|
||||
this.abdomenDetails = mod.default
|
||||
})
|
||||
import('../models/abdomen-mini/descript.json')
|
||||
.then((mod) => {
|
||||
this.miniAbdomenDetails = mod.default
|
||||
})
|
||||
fetch(`${this.isCordova ? 'https://localhost' : '.'}/models/thorax/descript.json`)
|
||||
.then((mod) => { return mod.json() })
|
||||
.then((desc) => { this.thoraxDetails = desc })
|
||||
fetch(`${this.isCordova ? 'https://localhost' : '.'}/models/thorax-mini/descript.json`)
|
||||
.then((mod) => { return mod.json() })
|
||||
.then((desc) => { this.miniThoraxDetails = desc })
|
||||
fetch(`${this.isCordova ? 'https://localhost' : '.'}/models/abdomen/descript.json`)
|
||||
.then((mod) => { return mod.json() })
|
||||
.then((desc) => { this.abdomenDetails = desc })
|
||||
fetch(`${this.isCordova ? 'https://localhost' : '.'}/models/abdomen-mini/descript.json`)
|
||||
.then((mod) => { return mod.json() })
|
||||
.then((desc) => { this.miniAbdomenDetails = desc })
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user