@rbxts/character-viewport
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@rbxts/character-viewport

A live-updating character viewport, which shows animations.

Example

To use:

import { CharacterViewport } from '@rbxts/character-viewport';

const Players = game.GetService('Players');

// inside your Roact code
<CharacterViewport Player={Players.LocalPlayer}>

It's suggested that you unmount the component when not in use for performance reasons.

There are also static functions to trigger a re-render of a player's viewport locally:

import { CharacterViewport } from '@rbxts/character-viewport';

const Players = game.GetService('Players');

CharacterViewport.updatePlayer(Players.LocalPlayer);

Based off of boatbomber's character viewport. I've changed a couple things, such as converting the Heartbeat functions to use a batch array, and adding Roact lifecycle hooks, but I suspect that boatbomber spent more time than his than mine, so this message exists as a head-nod.

Readme

Keywords

none

Package Sidebar

Install

npm i @rbxts/character-viewport

Weekly Downloads

0

Version

1.0.1

License

Unlicense

Unpacked Size

9.61 kB

Total Files

5

Last publish

Collaborators

  • xethlyx