Package update and cleanup
This commit is contained in:
Родитель
4ea10664ea
Коммит
6441351f62
|
@ -1201,14 +1201,14 @@
|
|||
"dev": true
|
||||
},
|
||||
"@speckle/objectloader": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@speckle/objectloader/-/objectloader-2.0.3.tgz",
|
||||
"integrity": "sha512-hSyJU0ktZOYbgjDtwrHHXowRu5L0lxoO32N2JPJUjURoy+M1ZpvJVGyT4jKG03HvH30j9rynja0PVjVoW9LdEw=="
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@speckle/objectloader/-/objectloader-2.1.1.tgz",
|
||||
"integrity": "sha512-EdMBYixK//8OrL/8aLvOkjNbEJab59FZyMETcPW9hgwo/M4a0pX6ao9LTrHyBMCGpjx5iyidk8SDpExebAtARw=="
|
||||
},
|
||||
"@speckle/viewer": {
|
||||
"version": "2.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@speckle/viewer/-/viewer-2.0.12.tgz",
|
||||
"integrity": "sha512-R5NL2/ECacW4GFni/Cri2mUbwRPkSu5EaOybQL/Vhp1QdNPA2wwotAdfxGr84KzQV0+A1J0lypZchVafLUZpDg==",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@speckle/viewer/-/viewer-2.1.1.tgz",
|
||||
"integrity": "sha512-OQWLfVIb79AJJYEl90kk9Ra/WcmpmDaloTgbkaRQOC0jMNmhFSFfrsFvfNX5G3BdhuDGKpbSwDx2j81xJucKJQ==",
|
||||
"requires": {
|
||||
"camera-controls": "^1.28.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
|
@ -3060,9 +3060,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"camera-controls": {
|
||||
"version": "1.28.0",
|
||||
"resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-1.28.0.tgz",
|
||||
"integrity": "sha512-V9HIwjcdD843RpToJjW2fUZfZUQaFIA2/Wx87+zq781/tJGzjE1g1PBeMTOV8oTGl8cskS5yV8AqtBn9+HlrUQ=="
|
||||
"version": "1.33.1",
|
||||
"resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-1.33.1.tgz",
|
||||
"integrity": "sha512-+l0LgV+w0G4GAtwiSahHLj7rCqzVMSa+/BHE3+aE7vdku2B9QF8CXgDSlCH9cBt2TZeg+WQSkRPeIYwjvtjdPw=="
|
||||
},
|
||||
"caniuse-api": {
|
||||
"version": "3.0.0",
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@speckle/objectloader": "2.0.3",
|
||||
"@speckle/viewer": "2.0.12",
|
||||
"@speckle/objectloader": "^2.1.1",
|
||||
"@speckle/viewer": "^2.1.1",
|
||||
"chart.js": "^2.9.4",
|
||||
"color-interpolate": "^1.0.5",
|
||||
"colorjs.io": "^0.0.3",
|
||||
|
|
15
src/App.vue
15
src/App.vue
|
@ -18,9 +18,16 @@
|
|||
<stream-search v-if="isAuthenticated" @selected="$router.push(`/streams/${$event.id}`)"/>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon link href="https://speckle.community" target="_blank">
|
||||
<v-icon>mdi-help-circle-outline</v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-tooltip left>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn small v-bind="attrs" v-on="on" icon link href="https://speckle.community" target="_blank" class="mr-3">
|
||||
<v-icon>mdi-help-circle-outline</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>Have any questions? <b>Join our Community!</b></span>
|
||||
</v-tooltip>
|
||||
|
||||
<v-btn
|
||||
class="ma-2"
|
||||
small
|
||||
|
@ -69,7 +76,7 @@
|
|||
<v-alert prominent v-if="alert" color="error" max-width="60%">
|
||||
<v-row align="center">
|
||||
<v-col class="grow white--text">
|
||||
This app is still in <b>ALPHA</b> stage; meaning some things may not work as expected. You can provide feedback on our <a src="https://speckle.community" class="font-weight-bold white--text text-decoration-underline">Community Forum</a>
|
||||
This app is still in <b>ALPHA</b> stage; meaning some things may not work as expected. You can provide feedback on our <a href="https://speckle.community" class="font-weight-bold white--text text-decoration-underline">Community Forum</a>
|
||||
</v-col>
|
||||
<v-col class="shrink">
|
||||
<v-btn outlined color="white" @click="alert = false">OK</v-btn>
|
||||
|
|
|
@ -143,7 +143,6 @@ export default {
|
|||
this.localExpand = this.expand
|
||||
if(!this.localExpand){
|
||||
var res = await getObject(this.streamId,this.value.referencedId)
|
||||
console.log("object res", res)
|
||||
delete res.data.stream.object.data.__closure
|
||||
this.object = res.data.stream.object
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<v-card
|
||||
elevation="0"
|
||||
v-show="hasLoadedModel && loadProgress >= 99"
|
||||
style="position: absolute; bottom: 0px; z-index: 2; width: 100%"
|
||||
style="position: absolute; bottom: 0; z-index: 2; width: 100%"
|
||||
class="pa-0 text-center transparent elevation-0 pb-3"
|
||||
>
|
||||
<v-btn-toggle class="elevation-0" style="z-index: 100">
|
||||
|
@ -235,7 +235,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
isSmall() {
|
||||
return this.$vuetify.breakpoint.name == 'xs' || this.$vuetify.breakpoint.name == 'sm'
|
||||
return this.$vuetify.breakpoint.name === 'xs' || this.$vuetify.breakpoint.name === 'sm'
|
||||
},
|
||||
darkMode() {
|
||||
return this.$vuetify.theme.dark
|
||||
|
@ -325,7 +325,6 @@ export default {
|
|||
)
|
||||
|
||||
window.__viewer.on('select', (objects) => {
|
||||
// console.log(objects)
|
||||
this.selectedObjects.splice(0, this.selectedObjects.length)
|
||||
this.selectedObjects.push(...objects)
|
||||
this.$emit('selection', this.selectedObjects)
|
||||
|
@ -351,20 +350,6 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style>
|
||||
.top-left {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.top-right {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
#rendererparent {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
|
|
@ -22,13 +22,14 @@
|
|||
</v-col>
|
||||
<v-col lg="6" sm="12" xs="12">
|
||||
<v-card max-height="500px" min-height="500px" outlined>
|
||||
<v-card-title>Families and Types</v-card-title>
|
||||
<v-card-title>Families<v-badge inline :content="totals.families"></v-badge> and Types <v-badge inline :content="totals.types"></v-badge></v-card-title>
|
||||
<v-card-subtitle>
|
||||
<v-text-field dense clearable prepend-icon="mdi-filter" placeholder="Filter all family types"
|
||||
v-model="typeFilter"></v-text-field>
|
||||
</v-card-subtitle>
|
||||
<v-card-text>
|
||||
<v-treeview dense :items="famTypeTree" :search="typeFilter"></v-treeview>
|
||||
<v-treeview dense :items="familyTypeTree" :search="typeFilter"></v-treeview>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
@ -60,6 +61,7 @@ export default {
|
|||
props: ["streamId", "objectId", "revitData", "info", "stream"],
|
||||
data() {
|
||||
return {
|
||||
familyTypeTree: [],
|
||||
typeFilter: "",
|
||||
loader: null,
|
||||
objsPerLevel: null,
|
||||
|
@ -69,7 +71,9 @@ export default {
|
|||
totals: {
|
||||
levels: 0,
|
||||
elements: 0,
|
||||
views: 0
|
||||
views: 0,
|
||||
families: 0,
|
||||
types: 0
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
|
@ -108,37 +112,6 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
famTypeTree() {
|
||||
if (!this.availableFamTypes) return []
|
||||
var id = 0;
|
||||
var items = []
|
||||
// Iterate through the categories
|
||||
Object.entries(this.availableFamTypes).forEach(([key, val]) => {
|
||||
var children = []
|
||||
// Iterate through the families
|
||||
Object.entries(val).forEach(([childKey, childVal]) => {
|
||||
var grandChilds = []
|
||||
// Iterate through available types
|
||||
Object.entries(childVal).forEach(([grandKey, grandVal]) => {
|
||||
grandChilds.push({
|
||||
id: id++,
|
||||
name: grandKey
|
||||
})
|
||||
})
|
||||
children.push({
|
||||
id: id++,
|
||||
name: childKey,
|
||||
children: grandChilds
|
||||
})
|
||||
})
|
||||
items.push({
|
||||
id: id++,
|
||||
name: key,
|
||||
children: children
|
||||
})
|
||||
})
|
||||
return items
|
||||
},
|
||||
objsByLevelData() {
|
||||
// Fast exit if no object has been set yet
|
||||
if (!this.objsPerLevel) return null
|
||||
|
@ -186,7 +159,7 @@ export default {
|
|||
labels.push(key)
|
||||
dataSet.backgroundColor.push(this.colorRange(count / Object.keys(this.objsPerLevel).length))
|
||||
var total = 0
|
||||
for (const [lvlKey, lvlValue] of Object.entries(value)) {
|
||||
for (const [_, lvlValue] of Object.entries(value)) {
|
||||
// Push category count per level to dataset data
|
||||
total += Object.keys(lvlValue).length
|
||||
}
|
||||
|
@ -213,9 +186,51 @@ export default {
|
|||
handler: function (val, oldVal) {
|
||||
this.processStreamObjects()
|
||||
}
|
||||
},
|
||||
availableFamTypes: {
|
||||
handler: function(val, oldVal) {
|
||||
this.familyTypeTree = this.famTypeTree();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
famTypeTree() {
|
||||
var totalFams = 0
|
||||
var totalTypes = 0
|
||||
if (!this.availableFamTypes) return []
|
||||
var id = 0;
|
||||
var items = []
|
||||
// Iterate through the categories
|
||||
Object.entries(this.availableFamTypes).forEach(([key, val]) => {
|
||||
var children = []
|
||||
// Iterate through the families
|
||||
Object.entries(val).forEach(([childKey, childVal]) => {
|
||||
var grandChilds = []
|
||||
// Iterate through available types
|
||||
Object.entries(childVal).forEach(([grandKey, grandVal]) => {
|
||||
grandChilds.push({
|
||||
id: id++,
|
||||
name: grandKey
|
||||
})
|
||||
totalTypes++
|
||||
})
|
||||
children.push({
|
||||
id: id++,
|
||||
name: childKey,
|
||||
children: grandChilds
|
||||
})
|
||||
totalFams++
|
||||
})
|
||||
items.push({
|
||||
id: id++,
|
||||
name: key,
|
||||
children: children
|
||||
})
|
||||
})
|
||||
this.totals.families = totalFams
|
||||
this.totals.types = totalTypes
|
||||
return items
|
||||
},
|
||||
async processStreamObjects() {
|
||||
this.$emit("loaded", false)
|
||||
this.$emit("progress", 0)
|
||||
|
@ -251,7 +266,6 @@ export default {
|
|||
for await (let obj of this.loader.getObjectIterator()) {
|
||||
if (!total) total = obj.totalChildrenCount
|
||||
var progress = Math.floor((count * 100) / total)
|
||||
console.log(`Progress: ${progress}`, count, total)
|
||||
this.$emit("progress", progress)
|
||||
count++
|
||||
// Get all types in the document
|
||||
|
@ -327,11 +341,6 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
.scroll-box {
|
||||
overflow: scroll;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.v-card {
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
|
|
|
@ -1,6 +1,51 @@
|
|||
module.exports = {
|
||||
transpileDependencies: [
|
||||
'vuetify',
|
||||
'vuex-persist'
|
||||
'vuex-persist',
|
||||
'@speckle/objectloader',
|
||||
'@speckle/viewer'
|
||||
],
|
||||
pwa: {
|
||||
manifestOptions: {
|
||||
"name": "Revit Dash",
|
||||
"icons": [
|
||||
{
|
||||
"src": "img/icons/android-icon-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "img/icons/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "img/icons/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "img/icons/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "img/icons/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"density": "4.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче