Skip to content

Latest commit

 

History

History

skeleton-viewer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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.