This project aims to provide high-level 3D physiological models viewing capability.
Scaffoldvuer is now built with Vue3 frameworks. Vue 2 version of Scaffoldvuer is no longer maintained and the source can be found in this branch.
Scaffoldvuer is available on npm and can be installed into your project with the following command:
npm i @abi-software/scaffoldvuer
npm install
npm run build-bundle
Install the package in your vue app project with the following command "npm i @abi-software/scaffoldvuer". Import the package in your script as followed:
import { ScaffoldVuer } from '@abi-software/scaffoldvuer';
import '@abi-software/scaffoldvuer/dist/style.css';
Local registration in vue component:
export default {
...
components: {
ScaffoldVuer,
}
...
}
The codes above register the ScaffoldVuer component in the global scope. You can now use the ScaffoldVuer in your vue template as followed:
<ScaffoldVuer url="Metafile.json" v-on:scaffold-selected="ScaffoldSelected" style="height:50%"/>
url should be a variable/string containing the url of a compatible json model. scaffold-selected is the custom event triggered when a part of the 3D-scaffold is selected, see below for a sample callback.
methods: {
ScaffoldSelected: function(annotation) {
console.log(annotation);
}
}
A more in depth API reference can be found here: https://abi-software.github.io/scaffoldvuer/ .
The source code is available from Github, it can be found here: https://github.com/ABI-Software/scaffoldvuer .
git clone https://github.com/ABI-Software/scaffoldvuer.git
npm install
npm run build-bundle
npm run serve
The following example showcases ScaffoldVuer in action: https://mapcore-demo.org/current/scaffoldvuer/
Scaffoldvuer uses semantic versioning.
If any changes are experimental or parallel to the main development, npm dist tags are used to keep this version from being the default when npm install @abi-software/scaffoldvuer
is used.
Dist tags can be used like so:
npm publish --tag <tag>
<tag>
is the dist tag to add. In example: npm publish --tag beta
1. Update the package number in package.json
npm run build-bundle
This builds the package to be digested by other vue packages by importing either the build or the source.
import { ScaffoldVuer } from "@abi-software/scaffoldvuer";
import '@abi-software/scaffoldvuer/dist/map-side-bar.css';
Source import (used in abi-software/mapintegratedvuer)
import { ScaffoldVuer } from "@abi-software/scaffoldvuer/src/components/index.js";
Testing zincjs
Check that the version of zincjs used is running correctly and passing the tests.
Test runs can be found here: https://autotest.bioeng.auckland.ac.nz/jenkins/blue/organizations/jenkins/ZincJS/activity
Click on the latest test and search for zincjs@
to find the zincjs version number.
Open the links below, checking that they load in, render correctly and are usable:
Use one of the following methods for testing the scaffoldvuer build in apps that depend on this package:
- Use
npm link
to test scaffoldvuer works in apps that import it. - Use symlink, or copy and paste the
/dist
directory. - Modify the package.json to /scaffoldvuer and publish. (Careful! If this is not done the version will need to be deprecated
One of the above methods will often need to be used in abi-software/mapintegratedvuer