openbim-components
Advanced tools
Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "openbim-components", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "author": "harry collin, antonio gonzalez viegas", |
import * as THREE from "three"; | ||
import { Fragment } from "bim-fragment"; | ||
import { Disposable, Updateable, Event, FragmentIdMap, Configurable } from "../../base-types"; | ||
import { Disposable, Event, FragmentIdMap, Configurable } from "../../base-types"; | ||
import { Component } from "../../base-types/component"; | ||
@@ -23,3 +23,3 @@ import { Components } from "../../core/Components"; | ||
} | ||
export declare class FragmentHighlighter extends Component<HighlightMaterials> implements Disposable, Updateable, Configurable<FragmentHighlighterConfig> { | ||
export declare class FragmentHighlighter extends Component<HighlightMaterials> implements Disposable, Configurable<FragmentHighlighterConfig> { | ||
static readonly uuid: "cb8a76f2-654a-4b50-80c6-66fd83cafd77"; | ||
@@ -32,2 +32,3 @@ /** {@link Disposable.onDisposed} */ | ||
readonly onAfterUpdate: Event<FragmentHighlighter>; | ||
needsUpdate: boolean; | ||
/** {@link Configurable.isSetup} */ | ||
@@ -64,4 +65,3 @@ isSetup: boolean; | ||
add(name: string, material?: THREE.Material[]): Promise<void>; | ||
/** {@link Updateable.update} */ | ||
update(): Promise<void>; | ||
updateHighlight(): Promise<void>; | ||
highlight(name: string, removePrevious?: boolean, zoomToSelection?: boolean): Promise<{ | ||
@@ -68,0 +68,0 @@ id: number; |
@@ -33,2 +33,3 @@ import * as THREE from "three"; | ||
this.onAfterUpdate = new Event(); | ||
this.needsUpdate = false; | ||
/** {@link Configurable.isSetup} */ | ||
@@ -171,9 +172,9 @@ this.isSetup = false; | ||
}; | ||
await this.update(); | ||
await this.updateHighlight(); | ||
} | ||
/** {@link Updateable.update} */ | ||
async update() { | ||
async updateHighlight() { | ||
if (!this.fillEnabled) { | ||
return; | ||
} | ||
console.log("Heyho"); | ||
await this.onBeforeUpdate.trigger(this); | ||
@@ -187,2 +188,5 @@ const fragments = this.components.tools.get(FragmentManager); | ||
fragment.mesh.updateMatrixWorld(true); | ||
outlinedMesh.position.set(0, 0, 0); | ||
outlinedMesh.rotation.set(0, 0, 0); | ||
outlinedMesh.scale.set(1, 1, 1); | ||
outlinedMesh.applyMatrix4(fragment.mesh.matrixWorld); | ||
@@ -189,0 +193,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1758893
24428