Implemented the concept of RenderTree which just extends the functionality of the general purpose WorldTree. Moved all geometry conversions to a seaprate source where no async, no fetches, no special things happen, with the intent of possibly moving this to a webworker in the future

This commit is contained in:
AlexandruPopovici
2022-06-03 16:37:06 +03:00
parent 59ad804227
commit fcea53ddd2
7 changed files with 768 additions and 24 deletions
@@ -0,0 +1,22 @@
import { GeometryData } from './converter/Geometry'
import { SpeckleType } from './converter/GeometryConverter'
export interface NodeRenderData {
speckleType: SpeckleType
geometry: GeometryData
batchId: string
batchIndexStart: number
batchIndexCount: number
}
export class NodeRenderView {
private readonly _renderData: { [id: string]: NodeRenderData } = {}
public get renderData() {
return this._renderData
}
public setData(id: string, data: NodeRenderData) {
this._renderData[id] = data
}
}