content/hifi-public/tony/docs/Resource.html
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

821 lines
No EOL
8.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Resource</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: Resource</h1>
<section>
<header>
<h2>Resource</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Resource"><span class="type-signature"></span>new Resource<span class="signature">()</span><span class="type-signature"></span></h4>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">url of this resource</td>
</tr>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type"><a href="Resource.html#.State">Resource.State</a></span>
</td>
<td class="description last">current loading state</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id=".State"><span class="type-signature">(static) </span>State<span class="type-signature"></span></h4>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>QUEUED</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">The resource is queued up, waiting to be loaded.</td>
</tr>
<tr>
<td class="name"><code>LOADING</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">The resource is downloading</td>
</tr>
<tr>
<td class="name"><code>LOADED</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">The resource has finished downloaded by is not complete</td>
</tr>
<tr>
<td class="name"><code>FINISHED</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">The resource has completly finished loading and is ready.</td>
</tr>
<tr>
<td class="name"><code>FAILED</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">Downloading the resource has failed.</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="progressChanged"><span class="type-signature"></span>progressChanged<span class="signature">(bytesReceived, bytesTotal)</span><span class="type-signature"> &rarr; {Signal}</span></h4>
<div class="description">
Signaled when download progress for this resource has changed
</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>bytesReceived</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">bytes downloaded so far</td>
</tr>
<tr>
<td class="name"><code>bytesTotal</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">total number of bytes in the resource</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Signal</span>
</dd>
</dl>
<h4 class="name" id="release"><span class="type-signature"></span>release<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Release this resource
</div>
<dl class="details">
</dl>
<h4 class="name" id="stateChanged"><span class="type-signature"></span>stateChanged<span class="signature">(bytesReceived)</span><span class="type-signature"> &rarr; {Signal}</span></h4>
<div class="description">
Signaled when resource loading state has changed
</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>bytesReceived</code></td>
<td class="type">
<span class="param-type"><a href="Resource.html#.State">Resource.State</a></span>
</td>
<td class="description last">new state</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Signal</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Resource.html">Resource</a></li></ul><h3>Namespaces</h3><ul><li><a href="Account.html">Account</a></li><li><a href="AnimationCache.html">AnimationCache</a></li><li><a href="Assets.html">Assets</a></li><li><a href="ResourceCache.html">ResourceCache</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Nov 09 2016 18:12:13 GMT-0800 (Pacific Standard Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>