@abi-software/scaffoldvuer

0.3.2 • Public • Published

Scaffoldvuer

This project aims to provide high-level 3D physiological models viewing capability.

Scaffoldvuer on NPM

Scaffoldvuer is available on npm and can be installed into your project with the following command:

npm i @abi-software/scaffoldvuer

Project setup

npm install

Compiles and minifies for production

npm run build-bundle

How to use

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/scaffoldvuer.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/ .

Project setup from Github

The source code is available from Github, it can be found here: https://github.com/ABI-Software/scaffoldvuer .

Clone the respositroy

git clone https://github.com/ABI-Software/scaffoldvuer.git

Setup

npm install

Compiles and minifies for production

npm run build-bundle

Run the sample application

npm run serve

Example

The following example showcases ScaffoldVuer in action: https://mapcore-demo.org/current/scaffoldvuer/

Scaffoldvuer release process:

Versioning

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

Publishing

1. Update the package number in package.json

2. Bundles for scaffoldvuer can be built by using

npm run build-bundle

This builds the package to be digested by other vue packages by importing either the build or the source.

Build import
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";

3. Publish with npm publish in the package directory

Testing

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.

Visual check

Open the links below, checking that they load in, render correctly and are usable:

Region http://localhost:8081/#/?url=https://mapcore-bucket1.s3.us-west-2.amazonaws.com/format-testing/MyExport_metadata.json

Glyph small http://localhost:8081/#/?url=https://mapcore-bucket1.s3.us-west-2.amazonaws.com/format-testing/TimeGlyphs/timeGlyphs_1.json

Lines http://localhost:8081/#/?url=https://mapcore-bucket1.s3.us-west-2.amazonaws.com/format-testing/Lines/lines_metadata.json

Glyph large http://localhost:8081/#/?url=https://mapcore-bucket1.s3.us-west-2.amazonaws.com/format-testing/TimeGlyphs/timeGlyphs_large_metadata.json

Points http://localhost:8081/#/?url=https://mapcore-bucket1.s3.us-west-2.amazonaws.com/format-testing/Points/point_time_metadata.json

Surfaces http://localhost:8081/#/?url=https://mapcore-bucket1.s3.us-west-2.amazonaws.com/format-testing/Surfaces/beating_heart_metadata.json

Testing the build bundle in other packages

Use one of the following methods for testing the scaffoldvuer build in apps that depend on this package:

  1. Use npm link to test scaffoldvuer works in apps that import it.
  2. Use symlink, or copy and paste the /dist directory.
  3. 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

Readme

Keywords

none

Package Sidebar

Install

npm i @abi-software/scaffoldvuer

Weekly Downloads

22

Version

0.3.2

License

Apache-2.0

Unpacked Size

33.1 MB

Total Files

49

Last publish

Collaborators

  • ddjnw1yu
  • hsorby
  • alan-wu
  • tehsurfer
  • agarny
  • dbrnz