@galacean/engine-toolkit-skeleton-viewer
TypeScript icon, indicating that this package has built-in type declarations

1.3.9 • Public • Published

Skeleton Viewer

The Skeleton Viewer tool can help you display all bone entities in the model, and display bone placeholders of different sizes according to the layer weight. You can also configure the size, proportion, color and other functions of the bone placeholders.

skeleton

Features

  • 🖇  midStep - Distance from connector to bone, [0~1].
  • ⚖  midWidthScale -The scale of the linker.
  • ⚾︎  ballSize - Ball size.
  • 📉  scaleFactor - Skeleton Decrease Factor.
  • ⚫️  colorMin - The min color.
  • ⚪️  colorMax - The max color.

npm

The Outline is published on npm with full typing support. To install, use:

$ npm install @galacean/engine-toolkit-skeleton-viewer

This will allow you to import package entirely using:

import * as TOOLKIT from "@galacean/engine-toolkit-skeleton-viewer";

or individual classes using:

import { SkeletonViewer } from "@galacean/engine-toolkit-skeleton-viewer";

Usage

// The entity you want to show skeleton
const skeletonViewer = entity.addComponent(SkeletonViewer);

// hidden skeleton viewer
skeletonViewer.enabled = false;

// reshow skeleton viewer
skeletonViewer.enabled = true;

// destroy resource
skeletonViewer.destroy();

// some configuration
skeletonViewer.midStep = 0.2;
skeletonViewer.midWidthScale = 0.1;
skeletonViewer.ballSize = 0.1;
skeletonViewer.scaleFactor = 0.1;
skeletonViewer.colorMin.set(1, 1, 1, 1);
skeletonViewer.colorMax.set(1, 1, 1, 1);

Links

License

The engine is released under the MIT license. See LICENSE file.

Readme

Keywords

none

Package Sidebar

Install

npm i @galacean/engine-toolkit-skeleton-viewer

Weekly Downloads

245

Version

1.3.9

License

MIT

Unpacked Size

79 kB

Total Files

12

Last publish

Collaborators

  • yiqi
  • imchenjian
  • chengkong.zxx
  • eyworldwide
  • yinjie
  • ruimeng.su
  • gl3336563
  • zhanyingwei
  • zhuxudong
  • johanzhu
  • mrkou47
  • husong
  • luzhuang
  • jujie