mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-24 06:34:09 +00:00
262 lines
8.3 KiB
YAML
262 lines
8.3 KiB
YAML
# This file is automatically generated. Please don't edit it manually.
|
|
# To submit a bug report on the content, see
|
|
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
|
|
|
|
name: AnimationClipProvider
|
|
type: class
|
|
memory_category: Animation
|
|
summary: |
|
|
Provides functions to load and preview `Class.AnimationClip|AnimationClips`.
|
|
description: |
|
|
Provides functions to load and preview `Class.AnimationClip|AnimationClips`.
|
|
It includes a number of functions that are useful when working with an
|
|
`Class.Animation`.
|
|
|
|
The `Class.AnimationClipProvider` replaces the deprecated
|
|
`Class.KeyframeSequenceProvider` that was used to download `KeyframeSequences`
|
|
by content ID.
|
|
|
|
The AnimationClipProvider has a number of uses.
|
|
|
|
- Download the `Class.AnimationClip` associated with an animation content ID
|
|
from the Roblox website, regardless of the underlying type of
|
|
`Class.AnimationClip` (`Class.KeyframeSequence` or `Class.CurveAnimation`).
|
|
- Generate a temporary ID to locally preview an animation.
|
|
- Fetch the content IDs of animations owned by a particular user.
|
|
code_samples: []
|
|
inherits:
|
|
- Instance
|
|
descendants: []
|
|
tags:
|
|
- NotCreatable
|
|
- Service
|
|
- NotReplicated
|
|
deprecation_message: ''
|
|
properties: []
|
|
methods:
|
|
- name: AnimationClipProvider:GetAnimationClip
|
|
summary: |
|
|
Returns a `Class.AnimationClip` from a given asset URL.
|
|
description: |
|
|
Returns a `Class.AnimationClip` from a given asset URL.
|
|
code_samples: []
|
|
parameters:
|
|
- name: assetId
|
|
type: ContentId
|
|
default:
|
|
summary: |
|
|
The content ID of the animation.
|
|
returns:
|
|
- type: AnimationClip
|
|
summary: |
|
|
The `Class.AnimationClip` found.
|
|
tags:
|
|
- Deprecated
|
|
deprecation_message: |
|
|
This function is deprecated and can lead to the game freezing until the
|
|
animation is loaded. Developers are recommended to use
|
|
`GetAnimationClipAsync` instead.
|
|
security: PluginSecurity
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- Animation
|
|
- name: AnimationClipProvider:GetAnimationClipAsync
|
|
summary: |
|
|
Returns a `Class.AnimationClip` based on the specified assetId
|
|
asynchronously.
|
|
description: |
|
|
Fetches an `Class.AnimationClip` based on the specified assetId. The
|
|
assetId must correspond to an animation asset in Roblox. The function will
|
|
yield until the `Class.AnimationClip` is loaded from the website and
|
|
should be wrapped in a `pcall`.
|
|
code_samples: []
|
|
parameters:
|
|
- name: assetId
|
|
type: ContentId
|
|
default:
|
|
summary: |
|
|
The content ID of the animation.
|
|
returns:
|
|
- type: AnimationClip
|
|
summary: |
|
|
The `Class.AnimationClip` found.
|
|
tags:
|
|
- Yields
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- Animation
|
|
- name: AnimationClipProvider:GetAnimationClipById
|
|
summary: |
|
|
Returns a `Class.AnimationClip` from the supplied assetId.
|
|
description: |
|
|
Returns a `Class.AnimationClip` from the supplied assetId. Can optionally
|
|
cache to reduce unnecessary loading freezes.
|
|
code_samples: []
|
|
parameters:
|
|
- name: assetId
|
|
type: int64
|
|
default:
|
|
summary: |
|
|
The content ID of the animation.
|
|
- name: useCache
|
|
type: boolean
|
|
default:
|
|
summary: |
|
|
True if a cached version can be returned.
|
|
returns:
|
|
- type: AnimationClip
|
|
summary: |
|
|
The `Class.AnimationClip` found.
|
|
tags:
|
|
- Deprecated
|
|
deprecation_message: |
|
|
This function is deprecated and can lead to the game freezing until the
|
|
animation is loaded. Developers are recommended to use
|
|
`GetAnimationClipAsync` instead.
|
|
security: PluginSecurity
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- Animation
|
|
- name: AnimationClipProvider:GetAnimationsAsync
|
|
summary: |
|
|
This function returns an `Class.InventoryPages` object which can be used
|
|
to iterate over animations owned by a specific user.
|
|
description: |
|
|
This function returns an `Class.InventoryPages` object which can be used
|
|
to iterate over animations owned by a specific user.
|
|
|
|
This function has a number of potential uses, such as allowing users to
|
|
browse and import animations into a custom animation plugin.
|
|
code_samples: []
|
|
parameters:
|
|
- name: userId
|
|
type: int64
|
|
default:
|
|
summary: |
|
|
The user ID of the user.
|
|
returns:
|
|
- type: Instance
|
|
summary: |
|
|
An `Class.InventoryPages` of animations.
|
|
tags:
|
|
- Yields
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- Animation
|
|
- name: AnimationClipProvider:GetAnimations
|
|
summary: |
|
|
This function returns an `Class.InventoryPages` object which can be used
|
|
to iterate over animations owned by a specific user.
|
|
description: ''
|
|
code_samples: []
|
|
parameters:
|
|
- name: userId
|
|
type: int64
|
|
default:
|
|
summary: |
|
|
The user ID of the user.
|
|
returns:
|
|
- type: Instance
|
|
summary: |
|
|
An `Class.InventoryPages` of animations.
|
|
tags:
|
|
- Yields
|
|
- Deprecated
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- Animation
|
|
- name: AnimationClipProvider:GetClipEvaluatorAsync
|
|
summary: ''
|
|
description: ''
|
|
code_samples: []
|
|
parameters:
|
|
- name: assetId
|
|
type: ContentId
|
|
default:
|
|
summary: ''
|
|
returns:
|
|
- type: ClipEvaluator
|
|
summary: ''
|
|
tags:
|
|
- Yields
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- Animation
|
|
- name: AnimationClipProvider:RegisterActiveAnimationClip
|
|
summary: |
|
|
Generates a temporary asset ID from a `Class.AnimationClip` that can be
|
|
used for localized testing of an animation.
|
|
description: |
|
|
Generates a temporary asset ID from a `Class.AnimationClip` that can be
|
|
used for localized testing of an animation. This performs the same
|
|
function as
|
|
`Class.AnimationClipProvider:RegisterAnimationClip()|RegisterAnimationClip()`
|
|
but generates an `active://` URL instead of a hash. The generated ID can
|
|
be used as an `Class.Animation.AnimationId|AnimationId` property for
|
|
testing.
|
|
|
|
The asset ID generated by this function is temporary and cannot be used
|
|
outside of Studio. Developers wishing to generate an asset ID that can be
|
|
used online should upload the `Class.AnimationClip` to Roblox.
|
|
code_samples: []
|
|
parameters:
|
|
- name: animationClip
|
|
type: AnimationClip
|
|
default:
|
|
summary: |
|
|
The `Class.AnimationClip` to be used.
|
|
returns:
|
|
- type: ContentId
|
|
summary: |
|
|
A temporary asset ID generated for localized animation playback.
|
|
tags: []
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- Animation
|
|
- name: AnimationClipProvider:RegisterAnimationClip
|
|
summary: |
|
|
Generates a temporary asset ID from a `Class.AnimationClip` that can be
|
|
used for localized testing of an animation. Generates a hash.
|
|
description: |
|
|
Generates a temporary asset ID from a `Class.AnimationClip` that can be
|
|
used for localized testing of an animation.
|
|
|
|
This function performs the same function to
|
|
`Class.AnimationClipProvider:RegisterActiveAnimationClip()|RegisterActiveAnimationClip`
|
|
yet generates a hash instead of an `active://` URL.
|
|
|
|
The ID generated can be used for the `Class.Animation.AnimationId`
|
|
property to test animations.
|
|
|
|
The asset ID generated by this function is temporary and cannot be used
|
|
outside of Studio. Developers wishing to generate an asset ID that can be
|
|
used online should upload the `Class.AnimationClip` to Roblox.
|
|
code_samples: []
|
|
parameters:
|
|
- name: animationClip
|
|
type: AnimationClip
|
|
default:
|
|
summary: |
|
|
The `Class.AnimationClip` to be used.
|
|
returns:
|
|
- type: ContentId
|
|
summary: |
|
|
A temporary asset ID generated for localized animation playback.
|
|
tags: []
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- Animation
|
|
events: []
|
|
callbacks: []
|