Files
Owen/docs/module-core.OwenAnimationContext.html
Kaj Kowalski e2402d8fdc
Some checks failed
CI/CD Pipeline / Test & Lint (16.x) (push) Has been cancelled
CI/CD Pipeline / Test & Lint (18.x) (push) Has been cancelled
CI/CD Pipeline / Test & Lint (20.x) (push) Has been cancelled
CI/CD Pipeline / Security Audit (push) Has been cancelled
Release / Validate Version (push) Has been cancelled
CI/CD Pipeline / Release (push) Has been cancelled
Release / Build and Test (push) Has been cancelled
Release / Create Release (push) Has been cancelled
Release / Publish to NPM (push) Has been cancelled
Release / Deploy Demo (push) Has been cancelled
Multi-Scheme Testing / Validate Naming Schemes (artist) (push) Has been cancelled
Multi-Scheme Testing / Validate Naming Schemes (hierarchical) (push) Has been cancelled
Multi-Scheme Testing / Validate Naming Schemes (legacy) (push) Has been cancelled
Multi-Scheme Testing / Validate Naming Schemes (semantic) (push) Has been cancelled
Multi-Scheme Testing / Test Scheme Conversions (push) Has been cancelled
Multi-Scheme Testing / Validate Demo Functionality (push) Has been cancelled
Multi-Scheme Testing / Performance Benchmarks (push) Has been cancelled
Performance Testing / Animation Conversion Performance (100, artist) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (100, hierarchical) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (100, legacy) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (100, semantic) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (1000, artist) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (1000, hierarchical) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (1000, legacy) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (1000, semantic) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (5000, artist) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (5000, hierarchical) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (5000, legacy) (push) Has been cancelled
Performance Testing / Animation Conversion Performance (5000, semantic) (push) Has been cancelled
Performance Testing / Memory Usage Analysis (push) Has been cancelled
Performance Testing / Demo Performance Audit (push) Has been cancelled
Performance Testing / Generate Performance Report (push) Has been cancelled
Add state handler implementations and documentation
- Implemented StateHandler class with methods for entering, exiting, and updating states.
- Created TypeStateHandler for handling typing state with appropriate animations and transitions.
- Developed WaitStateHandler for managing idle state with quirk animations.
- Added JSDoc documentation for all new classes and methods.
- Included CSS styles for documentation formatting and syntax highlighting.

fix: update standard configuration to include ignore for scripts directory
2025-05-24 13:12:14 +02:00

1662 lines
46 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>JSDoc: Class: OwenAnimationContext</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link
type="text/css"
rel="stylesheet"
href="styles/prettify-tomorrow.css"
/>
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css" />
</head>
<body>
<div id="main">
<h1 class="page-title">Class: OwenAnimationContext</h1>
<section>
<header>
<h2>
<span class="attribs"><span class="type-signature"></span></span>
<span class="ancestors"><a href="module-core.html">core</a>.</span
>OwenAnimationContext<span class="signature"
>(model, mixer, animationClipFactory, stateFactory)</span
><span class="type-signature"></span>
</h2>
<div class="class-description">
<p>
Main controller for the Owen animation system Manages state
transitions, animation playback, and user interactions
</p>
</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="OwenAnimationContext">
<span class="type-signature"></span>new OwenAnimationContext<span
class="signature"
>(model, mixer, animationClipFactory, stateFactory)</span
><span class="type-signature"></span>
</h4>
<div class="description">
<p>Create an Owen animation context</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">THREE.Object3D</span>
</td>
<td class="description last">
<p>The 3D character model</p>
</td>
</tr>
<tr>
<td class="name"><code>mixer</code></td>
<td class="type">
<span class="param-type">THREE.AnimationMixer</span>
</td>
<td class="description last">
<p>The Three.js animation mixer</p>
</td>
</tr>
<tr>
<td class="name"><code>animationClipFactory</code></td>
<td class="type">
<span class="param-type">AnimationClipFactory</span>
</td>
<td class="description last">
<p>Factory for creating clips</p>
</td>
</tr>
<tr>
<td class="name"><code>stateFactory</code></td>
<td class="type">
<span class="param-type">StateFactory</span>
</td>
<td class="description last">
<p>Factory for creating state handlers</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line14"
>line 14</a
>
</li>
</ul>
</dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="animationClipFactory">
<span class="type-signature"></span>animationClipFactory<span
class="type-signature"
>
:AnimationClipFactory</span
>
</h4>
<div class="description">
<p>Factory for creating animation clips</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">AnimationClipFactory</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line39">line 39</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="clips">
<span class="type-signature"></span>clips<span
class="type-signature"
>
:Map.&lt;string, AnimationClip></span
>
</h4>
<div class="description">
<p>Map of animation clips by name</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Map.&lt;string, AnimationClip></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line57">line 57</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="currentState">
<span class="type-signature"></span>currentState<span
class="type-signature"
>
:string</span
>
</h4>
<div class="description">
<p>Current active state</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line69">line 69</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="currentStateHandler">
<span class="type-signature"></span>currentStateHandler<span
class="type-signature"
>
:StateHandler|null</span
>
</h4>
<div class="description">
<p>Current active state handler</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">StateHandler</span>
|
<span class="param-type">null</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line75">line 75</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="inactivityTimeout">
<span class="type-signature"></span>inactivityTimeout<span
class="type-signature"
>
:number</span
>
</h4>
<div class="description">
<p>Inactivity timeout in milliseconds</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line87">line 87</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="inactivityTimer">
<span class="type-signature"></span>inactivityTimer<span
class="type-signature"
>
:number</span
>
</h4>
<div class="description">
<p>Timer for inactivity detection</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line81">line 81</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="initialized">
<span class="type-signature"></span>initialized<span
class="type-signature"
>
:boolean</span
>
</h4>
<div class="description">
<p>Whether the system is initialized</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line93">line 93</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="mixer">
<span class="type-signature"></span>mixer<span
class="type-signature"
>
:THREE.AnimationMixer</span
>
</h4>
<div class="description">
<p>The Three.js animation mixer</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">THREE.AnimationMixer</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line33">line 33</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="model">
<span class="type-signature"></span>model<span
class="type-signature"
>
:THREE.Object3D</span
>
</h4>
<div class="description">
<p>The 3D character model</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">THREE.Object3D</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line27">line 27</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="nameMapper">
<span class="type-signature"></span>nameMapper<span
class="type-signature"
>
:AnimationNameMapper</span
>
</h4>
<div class="description">
<p>Multi-scheme animation name mapper</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">AnimationNameMapper</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line51">line 51</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="stateFactory">
<span class="type-signature"></span>stateFactory<span
class="type-signature"
>
:StateFactory</span
>
</h4>
<div class="description">
<p>Factory for creating state handlers</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">StateFactory</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line45">line 45</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="states">
<span class="type-signature"></span>states<span
class="type-signature"
>
:Map.&lt;string, StateHandler></span
>
</h4>
<div class="description">
<p>Map of state handlers by name</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Map.&lt;string, StateHandler></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line63">line 63</a>
</li>
</ul>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="dispose">
<span class="type-signature"></span>dispose<span class="signature"
>()</span
><span class="type-signature"> &rarr; {void}</span>
</h4>
<div class="description">
<p>Dispose of the animation system and clean up resources</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line417"
>line 417</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id="getAnimationNames">
<span class="type-signature"></span>getAnimationNames<span
class="signature"
>(name)</span
><span class="type-signature"> &rarr; {Object}</span>
</h4>
<div class="description">
<p>Get all naming scheme variants for an animation</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">
<p>The animation name in any scheme</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line321"
>line 321</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>
Object with all scheme variants: {legacy, artist, hierarchical,
semantic}
</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="getAnimationsByStateAndEmotion">
<span class="type-signature"></span
>getAnimationsByStateAndEmotion<span class="signature"
>(state, emotion<span class="signature-attributes">opt</span>,
scheme<span class="signature-attributes">opt</span>)</span
><span class="type-signature"> &rarr; {Array.&lt;string>}</span>
</h4>
<div class="description">
<p>Get available animations by state and emotion</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes"></td>
<td class="default"></td>
<td class="description last">
<p>The state name (wait, react, type, sleep)</p>
</td>
</tr>
<tr>
<td class="name"><code>emotion</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">&lt;optional><br /></td>
<td class="default"></td>
<td class="description last">
<p>The emotion name (angry, happy, sad, shocked, neutral)</p>
</td>
</tr>
<tr>
<td class="name"><code>scheme</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">&lt;optional><br /></td>
<td class="default">'semantic'</td>
<td class="description last">
<p>The naming scheme to return</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line360"
>line 360</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Array of animation names in the specified scheme</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Array.&lt;string></span>
</dd>
</dl>
<h4 class="name" id="getAvailableClips">
<span class="type-signature"></span>getAvailableClips<span
class="signature"
>()</span
><span class="type-signature"> &rarr; {Array.&lt;string>}</span>
</h4>
<div class="description">
<p>Get all available animation clip names</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line401"
>line 401</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Array of clip names</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Array.&lt;string></span>
</dd>
</dl>
<h4 class="name" id="getAvailableStates">
<span class="type-signature"></span>getAvailableStates<span
class="signature"
>()</span
><span class="type-signature"> &rarr; {Array.&lt;string>}</span>
</h4>
<div class="description">
<p>Get all available state names</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line409"
>line 409</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Array of state names</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Array.&lt;string></span>
</dd>
</dl>
<h4 class="name" id="getAvailableTransitions">
<span class="type-signature"></span>getAvailableTransitions<span
class="signature"
>()</span
><span class="type-signature"> &rarr; {Array.&lt;string>}</span>
</h4>
<div class="description">
<p>Get available transitions from current state</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line390"
>line 390</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Array of available state transitions</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Array.&lt;string></span>
</dd>
</dl>
<h4 class="name" id="getClip">
<span class="type-signature"></span>getClip<span class="signature"
>(name)</span
><span class="type-signature">
&rarr; {AnimationClip|undefined}</span
>
</h4>
<div class="description">
<p>Get an animation clip by name (supports all naming schemes)</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">
<p>The animation clip name in any supported scheme</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line254"
>line 254</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The animation clip or undefined if not found</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">AnimationClip</span>
|
<span class="param-type">undefined</span>
</dd>
</dl>
<h4 class="name" id="getClipByScheme">
<span class="type-signature"></span>getClipByScheme<span
class="signature"
>(name, targetScheme<span class="signature-attributes">opt</span
>)</span
><span class="type-signature">
&rarr; {AnimationClip|undefined}</span
>
</h4>
<div class="description">
<p>Get an animation clip by name in a specific naming scheme</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes"></td>
<td class="description last"><p>The animation name</p></td>
</tr>
<tr>
<td class="name"><code>targetScheme</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">&lt;optional><br /></td>
<td class="description last">
<p>
Target scheme: 'legacy', 'artist', 'hierarchical',
'semantic'
</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line302"
>line 302</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The animation clip or undefined if not found</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">AnimationClip</span>
|
<span class="param-type">undefined</span>
</dd>
</dl>
<h4 class="name" id="getClipsByPattern">
<span class="type-signature"></span>getClipsByPattern<span
class="signature"
>(pattern)</span
><span class="type-signature">
&rarr; {Array.&lt;AnimationClip>}</span
>
</h4>
<div class="description">
<p>Get animation clips matching a pattern</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pattern</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">
<p>Pattern to match (supports * wildcards)</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line283"
>line 283</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Array of matching clips</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Array.&lt;AnimationClip></span>
</dd>
</dl>
<h4 class="name" id="getCurrentState">
<span class="type-signature"></span>getCurrentState<span
class="signature"
>()</span
><span class="type-signature"> &rarr; {string}</span>
</h4>
<div class="description">
<p>Get the current state name</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line374"
>line 374</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The current state name</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="getCurrentStateHandler">
<span class="type-signature"></span>getCurrentStateHandler<span
class="signature"
>()</span
><span class="type-signature"> &rarr; {StateHandler|null}</span>
</h4>
<div class="description">
<p>Get the current state handler</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line382"
>line 382</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The current state handler</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">StateHandler</span>
|
<span class="param-type">null</span>
</dd>
</dl>
<h4 class="name" id="handleUserMessage">
<span class="type-signature">(async) </span>handleUserMessage<span
class="signature"
>(message)</span
><span class="type-signature"> &rarr; {Promise.&lt;void>}</span>
</h4>
<div class="description">
<p>Handle a user message</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The user message</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line171"
>line 171</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Promise.&lt;void></span>
</dd>
</dl>
<h4 class="name" id="initialize">
<span class="type-signature">(async) </span>initialize<span
class="signature"
>()</span
><span class="type-signature"> &rarr; {Promise.&lt;void>}</span>
</h4>
<div class="description">
<p>Initialize the animation system</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line100"
>line 100</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Promise.&lt;void></span>
</dd>
</dl>
<h4 class="name" id="onUserActivity">
<span class="type-signature"></span>onUserActivity<span
class="signature"
>()</span
><span class="type-signature"> &rarr; {void}</span>
</h4>
<div class="description">
<p>Called when user activity is detected</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line198"
>line 198</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id="transitionTo">
<span class="type-signature">(async) </span>transitionTo<span
class="signature"
>(newStateName, emotion<span class="signature-attributes"
>opt</span
>)</span
><span class="type-signature"> &rarr; {Promise.&lt;void>}</span>
</h4>
<div class="description">
<p>Transition to a new state</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>newStateName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes"></td>
<td class="default"></td>
<td class="description last">
<p>The name of the state to transition to</p>
</td>
</tr>
<tr>
<td class="name"><code>emotion</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">&lt;optional><br /></td>
<td class="default">Emotions.NEUTRAL</td>
<td class="description last">
<p>The emotion for the transition</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line142"
>line 142</a
>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<dl>
<dt>
<div class="param-desc">
<p>If state is not found or transition is invalid</p>
</div>
</dt>
<dd></dd>
<dt>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Error</span>
</dd>
</dl>
</dt>
<dd></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Promise.&lt;void></span>
</dd>
</dl>
<h4 class="name" id="update">
<span class="type-signature"></span>update<span class="signature"
>(deltaTime)</span
><span class="type-signature"> &rarr; {void}</span>
</h4>
<div class="description">
<p>Update the animation system (call every frame)</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>deltaTime</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">
<p>Time elapsed since last update (ms)</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line231"
>line 231</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id="validateAnimationName">
<span class="type-signature"></span>validateAnimationName<span
class="signature"
>(name)</span
><span class="type-signature"> &rarr; {Object}</span>
</h4>
<div class="description">
<p>Validate an animation name and get suggestions if invalid</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">
<p>The animation name to validate</p>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_OwenAnimationContext.js.html"
>core/OwenAnimationContext.js</a
>,
<a href="core_OwenAnimationContext.js.html#line340"
>line 340</a
>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>
Validation result with isValid, scheme, error, and suggestions
</p>
</div>
<dl>
<dt>Type</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2>
<h3>Modules</h3>
<ul>
<li><a href="module-StateHandler.html">StateHandler</a></li>
<li><a href="module-animation.html">animation</a></li>
<li>
<a href="module-animation_AnimationConstants.html"
>animation/AnimationConstants</a
>
</li>
<li>
<a href="module-animation_AnimationNameMapper.html"
>animation/AnimationNameMapper</a
>
</li>
<li><a href="module-constants.html">constants</a></li>
<li><a href="module-core.html">core</a></li>
<li><a href="module-factories.html">factories</a></li>
<li><a href="module-loaders.html">loaders</a></li>
<li><a href="module-owen.html">owen</a></li>
<li><a href="module-states.html">states</a></li>
</ul>
<h3>Classes</h3>
<ul>
<li>
<a href="module-StateHandler.StateHandler.html">StateHandler</a>
</li>
<li><a href="module-animation.AnimationClip.html">AnimationClip</a></li>
<li>
<a href="module-animation.AnimationClipFactory.html"
>AnimationClipFactory</a
>
</li>
<li>
<a
href="module-animation_AnimationNameMapper.AnimationNameMapper.html"
>AnimationNameMapper</a
>
</li>
<li>
<a href="module-core.OwenAnimationContext.html"
>OwenAnimationContext</a
>
</li>
<li>
<a href="module-factories.OwenSystemFactory.html"
>OwenSystemFactory</a
>
</li>
<li>
<a href="module-loaders.AnimationLoader.html">AnimationLoader</a>
</li>
<li>
<a href="module-loaders.GLTFAnimationLoader.html"
>GLTFAnimationLoader</a
>
</li>
<li>
<a href="module-states.ReactStateHandler.html">ReactStateHandler</a>
</li>
<li>
<a href="module-states.SleepStateHandler.html">SleepStateHandler</a>
</li>
<li><a href="module-states.StateFactory.html">StateFactory</a></li>
<li>
<a href="module-states.TypeStateHandler.html">TypeStateHandler</a>
</li>
<li>
<a href="module-states.WaitStateHandler.html">WaitStateHandler</a>
</li>
</ul>
</nav>
<br class="clear" />
<footer>
Documentation generated by
<a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Sat May 24
2025 12:29:38 GMT+0200 (Midden-Europese zomertijd)
</footer>
<script>
prettyPrint();
</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>