@abi-software/scaffoldvuer 中文文档教程

发布于 3年前 浏览 25 项目主页 更新于 3年前

Scaffoldvuer

该项目旨在提供高级 3D 生理模型查看功能。

Scaffoldvuer on NPM

Scaffoldvuer 在 npm 上可用,可以使用以下命令安装到您的项目中:

npm i @abi-software/scaffoldvuer

Project setup

npm install

Compiles and minifies for production

npm run build-bundle

How to use

使用以下命令“npm i @abi-software/scaffoldvuer”将软件包安装到您的 vue 应用程序项目中。 如下在脚本中导入包:

import { ScaffoldVuer } from '@abi-software/scaffoldvuer';
import '@abi-software/scaffoldvuer/dist/scaffoldvuer.css';

vue 组件中的本地注册:

export default {
  ...
  components: {
    ScaffoldVuer,
  }
  ...
}

上面的代码在全局范围内注册了 ScaffoldVuer 组件。 您现在可以在 vue 模板中使用 ScaffoldVuer,如下所示:

<ScaffoldVuer url="Metafile.json" v-on:scaffold-selected="ScaffoldSelected"  style="height:50%"/>

url 应该是包含兼容 json 模型 url 的变量/字符串。 scaffold-selected 是 3D-scaffold 的一部分被选中时触发的自定义事件,见下文 示例回调。

  methods: {
    ScaffoldSelected: function(annotation) {
     console.log(annotation);
    }
  }

可以在此处找到更深入的 API 参考:https://abi-software.github.io/scaffoldvuer/。

Project setup from Github

源代码可以从 Github 获得,可以在这里找到: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

以下示例展示了 ScaffoldVuer 的实际应用:https://mapcore-demo.org/current/scaffoldvuer/

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/

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文