Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 15d79e6606 | |||
| bc5d16dfb8 | |||
| e445d27b01 | |||
| 75c8a60cef | |||
| 0f034c17d0 | |||
| bded971ecf | |||
| 77b13c2d89 | |||
| e3855a71c1 | |||
| 90c22211a9 | |||
| b13eef0b18 | |||
| 31c75f5407 | |||
| cd75dca5d7 | |||
| 72f1a836cb | |||
| 0232c91d42 | |||
| 38b2c55166 | |||
| fac7d8e547 | |||
| b19986ec35 | |||
| 3430cba29a | |||
| 6b57415d10 | |||
| 653dfb9910 | |||
| 30dbd19c52 | |||
| cfc958f9fd | |||
| 9cf6786e52 | |||
| 7ad8cd7e24 | |||
| 71cbd55583 |
@@ -6,3 +6,4 @@ webpack.statistics.prod.html
|
||||
.DS_Store
|
||||
.idea/
|
||||
webpack.statistics.html
|
||||
**/Thumbs.db
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
# ⚠️⚠️⚠️ Note: This repository is no longer maintained and has been merged with the [Speckle Power BI](https://github.com/specklesystems/speckle-powerbi) repository. ⚠️⚠️⚠️
|
||||
|
||||
The functionalities and features of Speckle Power BI Visuals have been consolidated into the main [Speckle Power BI](https://github.com/specklesystems/speckle-powerbi) repository. Please visit the Speckle Power BI repository for the latest updates, installation instructions, and continued development.
|
||||
|
||||
|
||||
|
||||
<h1 align="center">
|
||||
<img src="https://user-images.githubusercontent.com/2679513/131189167-18ea5fe1-c578-47f6-9785-3748178e4312.png" width="150px"/><br/>
|
||||
Speckle | PowerBI Visuals
|
||||
@@ -7,7 +13,7 @@
|
||||
Expected use case is that the visual displays data pulled from Speckle via the Speckle Data Connector for PowerBI (https://github.com/specklesystems/speckle-powerbi)
|
||||
</h3>
|
||||
|
||||
> ⚠️ This repo is still in very early stages of development, use at your own risk!
|
||||
> This repo is still in very early stages of development, use at your own risk!
|
||||
|
||||
<p align="center"><b>Speckle</b> is data infrastructure for the AEC industry.</p><br/>
|
||||
|
||||
@@ -35,7 +41,7 @@ What is Speckle? Check our ](https://speckle.xyz) ⇒ creating an account at
|
||||
- [](https://app.speckle.systems) ⇒ creating an account
|
||||
- [](https://marketplace.digitalocean.com/apps/speckle-server?refcode=947a2b5d7dc1) ⇒ deploying an instance in 1 click
|
||||
|
||||
### Resources
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
+4
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"dataRoles": [
|
||||
{
|
||||
"displayName": "Stream URL",
|
||||
"displayName": "Model URL",
|
||||
"kind": "Grouping",
|
||||
"name": "stream"
|
||||
},
|
||||
{
|
||||
"displayName": "Commit Object ID",
|
||||
"displayName": "Version Object ID",
|
||||
"kind": "Grouping",
|
||||
"name": "parentObject"
|
||||
},
|
||||
@@ -207,6 +207,8 @@
|
||||
"name": "WebAccess",
|
||||
"parameters": [
|
||||
"https://speckle.xyz",
|
||||
"https://app.speckle.systems",
|
||||
"https://latest.speckle.systems",
|
||||
"https://*.speckle.xyz",
|
||||
"https://latest.speckle.dev",
|
||||
"https://*.speckle.dev",
|
||||
|
||||
Generated
+330
-238
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -16,9 +16,9 @@
|
||||
"@babel/runtime-corejs3": "^7.21.5",
|
||||
"@headlessui/vue": "^1.7.13",
|
||||
"@heroicons/vue": "^2.0.12",
|
||||
"@speckle/tailwind-theme": "^2.14.7",
|
||||
"@speckle/ui-components": "^2.14.7",
|
||||
"@speckle/viewer": "^2.14.7",
|
||||
"@speckle/tailwind-theme": "2.14.7",
|
||||
"@speckle/ui-components": "2.14.7",
|
||||
"@speckle/viewer": "^2.18.14",
|
||||
"color-interpolate": "^1.0.5",
|
||||
"core-js": "^3.30.2",
|
||||
"lodash": "^4.17.21",
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
"displayName": "Speckle PowerBI Viewer",
|
||||
"guid": "powerbiSpeckleVisualAA98F06515D847E8ACB33BAB487244E0",
|
||||
"visualClassName": "Visual",
|
||||
"version": "2.15.0-rc",
|
||||
"version": "2.19.0",
|
||||
"description": "An interactive 3D viewer for Speckle Data",
|
||||
"supportUrl": "https://speckle.community",
|
||||
"gitHubUrl": "https://github.com/specklesystems/speckle-powerbi-visuals"
|
||||
|
||||
@@ -37,6 +37,7 @@ export default class TooltipHandler {
|
||||
}
|
||||
|
||||
this.tooltipService.show(tooltipData)
|
||||
if (Object.keys(tooltipData.dataItems).length > 0) this.tooltipService.show(tooltipData)
|
||||
}
|
||||
|
||||
public hide() {
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import {
|
||||
CanonicalView,
|
||||
FilteringState,
|
||||
Viewer,
|
||||
LegacyViewer,
|
||||
IntersectionQuery,
|
||||
DefaultViewerParams,
|
||||
Box3,
|
||||
SpeckleView
|
||||
SpeckleView,
|
||||
CameraController
|
||||
} from '@speckle/viewer'
|
||||
import { pickViewableHit, projectToScreen } from '../utils/viewerUtils'
|
||||
import _ from 'lodash'
|
||||
import { SpeckleVisualSettingsModel } from 'src/settings/visualSettingsModel'
|
||||
export default class ViewerHandler {
|
||||
private viewer: Viewer
|
||||
private viewer: LegacyViewer
|
||||
private readonly parent: HTMLElement
|
||||
private state: FilteringState
|
||||
private loadedObjectsCache: Set<string> = new Set<string>()
|
||||
@@ -37,7 +38,8 @@ export default class ViewerHandler {
|
||||
break
|
||||
}
|
||||
|
||||
this.viewer.cameraHandler.controls.maxPolarAngle = settings.camera.allowCameraUnder.value
|
||||
this.viewer.getExtension(CameraController).controls.maxPolarAngle = settings.camera
|
||||
.allowCameraUnder.value
|
||||
? Math.PI
|
||||
: Math.PI / 2
|
||||
|
||||
@@ -70,7 +72,7 @@ export default class ViewerHandler {
|
||||
}
|
||||
|
||||
public addCameraUpdateEventListener(listener: (ev) => void) {
|
||||
this.viewer.cameraHandler.controls.addEventListener('update', listener)
|
||||
this.viewer.getExtension(CameraController).controls.addEventListener('update', listener)
|
||||
}
|
||||
|
||||
public constructor(parent: HTMLElement) {
|
||||
@@ -82,7 +84,7 @@ export default class ViewerHandler {
|
||||
const viewerSettings = DefaultViewerParams
|
||||
viewerSettings.showStats = false
|
||||
viewerSettings.verbose = false
|
||||
const viewer = new Viewer(this.parent, viewerSettings)
|
||||
const viewer = new LegacyViewer(this.parent, viewerSettings)
|
||||
await viewer.init()
|
||||
this.viewer = viewer
|
||||
}
|
||||
@@ -203,17 +205,21 @@ export default class ViewerHandler {
|
||||
}
|
||||
|
||||
public async selectObjects(objectIds: string[] = null) {
|
||||
if (!this.viewer) return
|
||||
await this.viewer.resetHighlight()
|
||||
const objIds = objectIds ?? []
|
||||
this.state = await this.viewer.selectObjects(objIds)
|
||||
}
|
||||
|
||||
public getScreenPosition(worldPosition): { x: number; y: number } {
|
||||
return projectToScreen(this.viewer.cameraHandler.camera, worldPosition)
|
||||
return projectToScreen(
|
||||
this.viewer.getExtension(CameraController).controls.camera,
|
||||
worldPosition
|
||||
)
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
this.viewer.cameraHandler.controls.removeAllEventListeners()
|
||||
this.viewer.getExtension(CameraController).controls.removeAllEventListeners()
|
||||
this.viewer.dispose()
|
||||
this.viewer = null
|
||||
}
|
||||
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
declare module '*.png' {
|
||||
const source: string
|
||||
export default source
|
||||
}
|
||||
@@ -20,7 +20,7 @@ function goToGuide() {
|
||||
class="flex flex-col justify-center items-center h-full w-full bg-primary text-center text-foundation"
|
||||
>
|
||||
<div class="flex justify-center items-center">
|
||||
<img src="../../assets/logo-white.png" alt="Logo" class="w-1/3" />
|
||||
<img src="@assets/logo-white.png" alt="Logo" class="w-1/3" />
|
||||
</div>
|
||||
<p class="heading">Speckle PowerBI 3D Visual</p>
|
||||
<div class="flex justify-center mt-2 gap-1">
|
||||
|
||||
@@ -1,9 +1,35 @@
|
||||
<script setup lang="ts">
|
||||
import ViewerWrapper from 'src/components/ViewerWrapper.vue'
|
||||
import { inject } from 'vue'
|
||||
import { hostKey } from 'src/injectionKeys'
|
||||
|
||||
const host = inject(hostKey)
|
||||
|
||||
const goToSpeckleWebsite = () => host.launchUrl('https://speckle.systems')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="overlay">
|
||||
<img class="watermark" src="@assets/powered-by-speckle.png" @click="goToSpeckleWebsite" />
|
||||
</div>
|
||||
<viewer-wrapper id="speckle-3d-view" class="h-full w-full"></viewer-wrapper>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
.watermark {
|
||||
height: auto;
|
||||
width: 60pt;
|
||||
margin-top: 3pt;
|
||||
margin-right: 3pt;
|
||||
}
|
||||
|
||||
.watermark:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#overlay {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
}
|
||||
</style>
|
||||
|
||||
+4
-2
@@ -76,9 +76,11 @@ export class Visual implements IVisual {
|
||||
console.log('❌Input not valid:', (e as Error).message)
|
||||
this.host.displayWarningIcon(
|
||||
`Incomplete data input.`,
|
||||
`"Stream URL", "Commit Object ID" and "Object ID" data inputs are mandatory. If your data connector does not output all these columns, please update it.`
|
||||
`"Model URL", "Version Object ID" and "Object ID" data inputs are mandatory. If your data connector does not output all these columns, please update it.`
|
||||
)
|
||||
console.warn(
|
||||
`Incomplete data input. "Model URL", "Version Object ID" and "Object ID" data inputs are mandatory. If your data connector does not output all these columns, please update it.`
|
||||
)
|
||||
console.warn(`Incomplete data input. "Stream URL" and "Object ID" data inputs are mandatory`)
|
||||
store.commit('setStatus', 'incomplete')
|
||||
return
|
||||
}
|
||||
|
||||
+4
-10
@@ -12,14 +12,10 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"types": [],
|
||||
"baseUrl": "./",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"src/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"assets/*": [
|
||||
"./assets/*"
|
||||
]
|
||||
"@src/*": ["src/*"],
|
||||
"@assets/*": ["assets/*"]
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
@@ -30,7 +26,5 @@
|
||||
},
|
||||
"files": ["./src/visual.ts"],
|
||||
"include": ["./src/**/*.ts", "./src/**/*.vue"],
|
||||
"exclude": [
|
||||
"webpack.config.dev.ts"
|
||||
]
|
||||
"exclude": ["webpack.config.dev.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user