Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.
Permalink
8ab221d4ed
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
40 lines (36 sloc) 968 Bytes
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Actor, /*Animation, Material*/ } from '..';
/** The types that support animation */
export type Animatible = Actor /*| Animation | Material*/;
/* eslint-disable no-shadow */
/** The names of types that support animation */
export enum AnimatibleName {
Actor = 'actor',
/*
Animation = 'animation',
Material = 'material'
*/
}
/* eslint-enable no-shadow */
/**
* Get an object's animation type.
* @param obj The object you want the type for.
* @returns An [[AnimatibleName]] value, or null if the object does not match an animatible type.
* @hidden
*/
export function getAnimatibleName(obj: any) {
if (obj instanceof Actor) {
return AnimatibleName.Actor;
/*
} else if (obj instanceof Animation) {
return AnimatibleName.Animation;
} else if (obj instanceof Material) {
return AnimatibleName.Material;
*/
} else {
return null;
}
}