Minor cleanup
This commit is contained in:
@@ -40,14 +40,14 @@ const { categorize, isolate, animate, resetFilters } = useViewer()
|
||||
const levels = ref()
|
||||
|
||||
// Get all the properties with the key 'properties.Instance Parameters.Constraints.Level.value'
|
||||
const getLevels = async () => {
|
||||
const getLevels = () => {
|
||||
if (!properties) return
|
||||
levels.value = properties.find((property: PropertyInfo) => property.key === 'properties.Instance Parameters.Constraints.Level.value')
|
||||
}
|
||||
|
||||
// Categorize the levels and isolate the objects
|
||||
const categorizeLevels = async () => {
|
||||
await getLevels()
|
||||
getLevels()
|
||||
categorize(levels.value.valueGroups)
|
||||
isolate(levels.value.valueGroups.flatMap((group: StringPropertyInfo['valueGroups']) => group.ids))
|
||||
animate()
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function useViewer() {
|
||||
* Initialize the viewer
|
||||
* @param element - DOM element to initialize the viewer on
|
||||
*/
|
||||
async function init(element: HTMLDivElement) {
|
||||
const init = async (element: HTMLDivElement) => {
|
||||
const params = {
|
||||
...DefaultViewerParams,
|
||||
showStats: false,
|
||||
@@ -57,7 +57,7 @@ export default function useViewer() {
|
||||
* The viewer can be extended with additional functionality by adding extensions
|
||||
* You can use extensions provided by the viewer, or create your own
|
||||
*/
|
||||
function addExtensions() {
|
||||
const addExtensions = () => {
|
||||
if (!viewer) return
|
||||
viewer.createExtension(CameraController)
|
||||
viewer.createExtension(SelectionExtension)
|
||||
|
||||
Reference in New Issue
Block a user