Skip to content

Commit

Permalink
Version bump 2.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
altspaceautobot committed Feb 15, 2018
1 parent 654429d commit b89eb72
Show file tree
Hide file tree
Showing 41 changed files with 263 additions and 56 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -34,11 +34,11 @@ Many APIs are present in the client without loading `altspace.js`, but please st

The version baked into the altspace.js script will determine which version of the entire SDK the client will provide your app. This means that if we make any breaking internal changes to things like rendering or cursor events, and you are using an older version of `altspace.js`, we will try to return legacy behavior appropriate to your version of `altspace.js`. Versioning will follow [SEMVER](http://semver.org/) as closely as possible. Details for each version can be found in the [Release Notes](https://github.com/AltspaceVR/AltspaceSDK/releases).

**Latest Version: v2.8.0 -- [See Changes](https://github.com/AltspaceVR/AltspaceSDK/releases/tag/v2.8.0)**
**Latest Version: v2.8.1 -- [See Changes](https://github.com/AltspaceVR/AltspaceSDK/releases/tag/v2.8.1)**

Include the latest version of the SDK in your app with:

`<script src="https://sdk.altvr.com/libs/altspace.js/2.8.0/altspace.min.js"></script>`
`<script src="https://sdk.altvr.com/libs/altspace.js/2.8.1/altspace.min.js"></script>`

If you use npm, you can install altspace.js with:

Expand Down
63 changes: 54 additions & 9 deletions dist/altspace.js
Expand Up @@ -501,7 +501,7 @@ var AltspaceTrackedControls = (function (AFrameComponent$$1) {
* <head>
* <title>My A-Frame Scene</title>
* <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
* <script src="https://cdn.rawgit.com/AltspaceVR/AltspaceSDK/v2.8.0/dist/altspace.min.js"></script>
* <script src="https://cdn.rawgit.com/AltspaceVR/AltspaceSDK/v2.8.1/dist/altspace.min.js"></script>
* </head>
* <body>
* <a-scene altspace>
Expand Down Expand Up @@ -2041,12 +2041,20 @@ var NativeComponent = (function (AFrameComponent$$1) {
altspace.removeNativeComponent(mesh, this.name);
};

NativeComponent.prototype.callComponent = function callComponent (name){
NativeComponent.prototype.callComponentFunc = function callComponentFunc (name){
var args = [], len = arguments.length - 1;
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];

var mesh = this.mesh || this.el.object3DMap.mesh;
altspace.callNativeComponent(mesh, this.name, name, args);
return altspace.callNativeComponentFunc(mesh, this.name, name, args);
};

NativeComponent.prototype.callComponentAction = function callComponentAction (name){
var args = [], len = arguments.length - 1;
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];

var mesh = this.mesh || this.el.object3DMap.mesh;
return altspace.callNativeComponentAction(mesh, this.name, name, args);
};

return NativeComponent;
Expand Down Expand Up @@ -2845,7 +2853,7 @@ var NSound = (function (NativeComponent$$1) {
* @fires module:altspace/components.n-sound#sound-paused
*/
NSound.prototype.pauseSound = function pauseSound () {
this.callComponent('pause');
this.callComponentAction('pause');

this.el.emit('sound-paused');
};
Expand All @@ -2855,7 +2863,7 @@ var NSound = (function (NativeComponent$$1) {
* @fires module:altspace/components.n-sound#sound-played
*/
NSound.prototype.playSound = function playSound () {
this.callComponent('play');
this.callComponentAction('play');

this.el.emit('sound-played');
};
Expand All @@ -2865,7 +2873,7 @@ var NSound = (function (NativeComponent$$1) {
* @param {number} time - The time in milliseconds to jump to.
*/
NSound.prototype.seek = function seek (time) {
this.callComponent('seek', {time: time});
this.callComponentAction('seek', {time: time});
};

Object.defineProperties( NSound.prototype, prototypeAccessors );
Expand Down Expand Up @@ -2954,21 +2962,58 @@ var NGLTF = (function (NativeComponent$$1) {
sceneIndex: { type: 'int' }
};
};
NGLTF.prototype.update = function update (){
NGLTF.prototype.init = function init (){
NativeComponent$$1.prototype.init.call(this);
this.boundsCache = null;
};
NGLTF.prototype.update = function update (oldData)
{
var mesh = this.mesh || this.el.object3DMap.mesh;
var data = Object.assign({}, this.data);
data.url = new Url(data.url).toString();

if(this.sendUpdates){
altspace.updateNativeComponent(mesh, this.name, data);
}

if(this.data.url && oldData && this.data.url !== oldData.url){
this.boundsCache = null;
}
};

/**
* Returns a promise that resolves with a [THREE.Box3](https://threejs.org/docs/index.html#api/math/Box3)
* @instance
* @method getBoundingBox
* @memberof module:altspace/components.n-gltf
* @returns {Promise}
*/
NGLTF.prototype.getBoundingBox = function getBoundingBox ()
{
if(!this.boundsCache){
this.boundsCache = this.callComponentFunc('GetBoundingBox').then(function (data) {
var V3 = AFRAME.THREE.Vector3;
return new AFRAME.THREE.Box3(
new V3().subVectors(data.center, data.extents),
new V3().addVectors(data.center, data.extents)
);
});
}
return this.boundsCache;
};

Object.defineProperties( NGLTF.prototype, prototypeAccessors );

return NGLTF;
}(NativeComponent));



/**
* Emitted when the glTF model is finished loading
* @event module:altspace/components.n-gltf#n-gltf-loaded
*/

/**
* @name module:altspace/components.n-text
* @class
Expand Down Expand Up @@ -3131,7 +3176,7 @@ var Visible = (function (AFrameComponent$$1) {
* <head>
* <title>My A-Frame Scene</title>
* <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
* <script src="https://cdn.rawgit.com/AltspaceVR/AltspaceSDK/v2.8.0/dist/altspace.min.js"></script>
* <script src="https://cdn.rawgit.com/AltspaceVR/AltspaceSDK/v2.8.1/dist/altspace.min.js"></script>
* </head>
* <body>
* <a-scene altspace>
Expand Down Expand Up @@ -6399,7 +6444,7 @@ var utilities_lib = Object.freeze({
if(!Object.isFrozen(window.altspace))
{ Object.assign(window.altspace, {components: {}, utilities: {}, inClient: false}); }

var version = '2.8.0';
var version = '2.8.1';
if (window.altspace.requestVersion) {
window.altspace.requestVersion(version);
}
Expand Down
6 changes: 3 additions & 3 deletions dist/altspace.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/aframe/index.html
Expand Up @@ -33,7 +33,7 @@
<label for="nav-trigger" class="overlay"></label>

<nav onscroll='saveVerticalScrollPosition(event)'>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-altspace_components.html">altspace/components</a></li><li><a href="module-altspace_resources.html">altspace/resources</a></li></ul><h3>Classes</h3><ul><li><a href="module-altspace_components.AFrameComponent.html">AFrameComponent</a></li><li><a href="module-altspace_components.AFrameSystem.html">AFrameSystem</a></li><li><a href="module-altspace_components.altspace.html">altspace</a></li><li><a href="module-altspace_components.altspace-cursor-collider.html">altspace-cursor-collider</a></li><li><a href="module-altspace_components.altspace-tracked-controls.html">altspace-tracked-controls</a></li><li><a href="module-altspace_components.collapse-model.html">collapse-model</a></li><li><a href="module-altspace_components.instantiator.html">instantiator</a></li><li><a href="module-altspace_components.n-billboard.html">n-billboard</a></li><li><a href="module-altspace_components.n-box-collider.html">n-box-collider</a></li><li><a href="module-altspace_components.n-capsule-collider.html">n-capsule-collider</a></li><li><a href="module-altspace_components.n-cockpit-parent.html">n-cockpit-parent</a></li><li><a href="module-altspace_components.n-collider.html">n-collider</a></li><li><a href="module-altspace_components.n-container.html">n-container</a></li><li><a href="module-altspace_components.n-gltf.html">n-gltf</a></li><li><a href="module-altspace_components.n-layout-browser.html">n-layout-browser</a></li><li><a href="module-altspace_components.n-mesh-collider.html">n-mesh-collider</a></li><li><a href="module-altspace_components.n-object.html">n-object</a></li><li><a href="module-altspace_components.n-portal.html">n-portal</a></li><li><a href="module-altspace_components.n-skeleton-parent.html">n-skeleton-parent</a></li><li><a href="module-altspace_components.n-sound.html">n-sound</a></li><li><a href="module-altspace_components.n-spawner.html">n-spawner</a></li><li><a href="module-altspace_components.n-sphere-collider.html">n-sphere-collider</a></li><li><a href="module-altspace_components.n-text.html">n-text</a></li><li><a href="module-altspace_components.NativeComponent.html">NativeComponent</a></li><li><a href="module-altspace_components.one-per-user.html">one-per-user</a></li><li><a href="module-altspace_components.sync.html">sync</a><ul class='methods'><li data-type='method'><a href="module-altspace_components.sync.html#takeOwnership">takeOwnership</a></li></ul></li><li><a href="module-altspace_components.sync-color.html">sync-color</a></li><li><a href="module-altspace_components.sync-n-skeleton-parent.html">sync-n-skeleton-parent</a></li><li><a href="module-altspace_components.sync-n-sound.html">sync-n-sound</a></li><li><a href="module-altspace_components.sync-system.html">sync-system</a><ul class='methods'><li data-type='method'><a href="module-altspace_components.sync-system.html#instantiate">instantiate</a></li><li data-type='method'><a href="module-altspace_components.sync-system.html#isMasterClient">isMasterClient</a></li></ul></li><li><a href="module-altspace_components.sync-transform.html">sync-transform</a></li><li><a href="module-altspace_components.wire.html">wire</a></li></ul><h3>Events</h3><ul><li><a href="module-altspace_components.sync-system.html#event:clientjoined">clientjoined</a></li><li><a href="module-altspace_components.sync-system.html#event:clientleft">clientleft</a></li><li><a href="module-altspace_components.sync-system.html#event:connected">connected</a></li><li><a href="module-altspace_components.sync%250DFired%2520when%2520the%2520connection%2520with%2520the%2520sync%2520server%2520is%2520established..html#event:connected">connected</a></li><li><a href="module-altspace_components.n-container.html#.event:container-count-changed">container-count-changed</a></li><li><a href="module-altspace_components.n-container.html#.event:container-empty">container-empty</a></li><li><a href="module-altspace_components.n-container.html#.event:container-full">container-full</a></li><li><a href="module-altspace_components.n-sound.html#event:n-sound-loaded">n-sound-loaded</a></li><li><a href="module-altspace_components.n-sound.html#event:sound-paused">sound-paused</a></li><li><a href="module-altspace_components.n-sound.html#event:sound-played">sound-played</a></li><li><a href="module-altspace_components.n-collider.html#.event:triggerenter">triggerenter</a></li><li><a href="module-altspace_components.n-collider.html#.event:triggerexit">triggerexit</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-altspace_components.html">altspace/components</a></li><li><a href="module-altspace_resources.html">altspace/resources</a></li></ul><h3>Classes</h3><ul><li><a href="module-altspace_components.AFrameComponent.html">AFrameComponent</a></li><li><a href="module-altspace_components.AFrameSystem.html">AFrameSystem</a></li><li><a href="module-altspace_components.altspace.html">altspace</a></li><li><a href="module-altspace_components.altspace-cursor-collider.html">altspace-cursor-collider</a></li><li><a href="module-altspace_components.altspace-tracked-controls.html">altspace-tracked-controls</a></li><li><a href="module-altspace_components.collapse-model.html">collapse-model</a></li><li><a href="module-altspace_components.instantiator.html">instantiator</a></li><li><a href="module-altspace_components.n-billboard.html">n-billboard</a></li><li><a href="module-altspace_components.n-box-collider.html">n-box-collider</a></li><li><a href="module-altspace_components.n-capsule-collider.html">n-capsule-collider</a></li><li><a href="module-altspace_components.n-cockpit-parent.html">n-cockpit-parent</a></li><li><a href="module-altspace_components.n-collider.html">n-collider</a></li><li><a href="module-altspace_components.n-container.html">n-container</a></li><li><a href="module-altspace_components.n-gltf.html">n-gltf</a><ul class='methods'><li data-type='method'><a href="module-altspace_components.n-gltf.html#getBoundingBox">getBoundingBox</a></li></ul></li><li><a href="module-altspace_components.n-layout-browser.html">n-layout-browser</a></li><li><a href="module-altspace_components.n-mesh-collider.html">n-mesh-collider</a></li><li><a href="module-altspace_components.n-object.html">n-object</a></li><li><a href="module-altspace_components.n-portal.html">n-portal</a></li><li><a href="module-altspace_components.n-skeleton-parent.html">n-skeleton-parent</a></li><li><a href="module-altspace_components.n-sound.html">n-sound</a></li><li><a href="module-altspace_components.n-spawner.html">n-spawner</a></li><li><a href="module-altspace_components.n-sphere-collider.html">n-sphere-collider</a></li><li><a href="module-altspace_components.n-text.html">n-text</a></li><li><a href="module-altspace_components.NativeComponent.html">NativeComponent</a></li><li><a href="module-altspace_components.one-per-user.html">one-per-user</a></li><li><a href="module-altspace_components.sync.html">sync</a><ul class='methods'><li data-type='method'><a href="module-altspace_components.sync.html#takeOwnership">takeOwnership</a></li></ul></li><li><a href="module-altspace_components.sync-color.html">sync-color</a></li><li><a href="module-altspace_components.sync-n-skeleton-parent.html">sync-n-skeleton-parent</a></li><li><a href="module-altspace_components.sync-n-sound.html">sync-n-sound</a></li><li><a href="module-altspace_components.sync-system.html">sync-system</a><ul class='methods'><li data-type='method'><a href="module-altspace_components.sync-system.html#instantiate">instantiate</a></li><li data-type='method'><a href="module-altspace_components.sync-system.html#isMasterClient">isMasterClient</a></li></ul></li><li><a href="module-altspace_components.sync-transform.html">sync-transform</a></li><li><a href="module-altspace_components.wire.html">wire</a></li></ul><h3>Events</h3><ul><li><a href="module-altspace_components.sync-system.html#event:clientjoined">clientjoined</a></li><li><a href="module-altspace_components.sync-system.html#event:clientleft">clientleft</a></li><li><a href="module-altspace_components.sync-system.html#event:connected">connected</a></li><li><a href="module-altspace_components.sync%250DFired%2520when%2520the%2520connection%2520with%2520the%2520sync%2520server%2520is%2520established..html#event:connected">connected</a></li><li><a href="module-altspace_components.n-container.html#.event:container-count-changed">container-count-changed</a></li><li><a href="module-altspace_components.n-container.html#.event:container-empty">container-empty</a></li><li><a href="module-altspace_components.n-container.html#.event:container-full">container-full</a></li><li><a href="module-altspace_components.n-gltf.html#event:n-gltf-loaded">n-gltf-loaded</a></li><li><a href="module-altspace_components.n-sound.html#event:n-sound-loaded">n-sound-loaded</a></li><li><a href="module-altspace_components.n-sound.html#event:sound-paused">sound-paused</a></li><li><a href="module-altspace_components.n-sound.html#event:sound-played">sound-played</a></li><li><a href="module-altspace_components.n-collider.html#.event:triggerenter">triggerenter</a></li><li><a href="module-altspace_components.n-collider.html#.event:triggerexit">triggerexit</a></li></ul>
</nav>
<script>loadVerticalScrollPosition()</script>

Expand Down Expand Up @@ -73,7 +73,7 @@ <h2>Quick Start</h2><p>This is a fully functional example of what A-Frame code l
<pre class="prettyprint source lang-html"><code>&lt;!DOCTYPE html>
&lt;html>&lt;head>
&lt;script src=&quot;https://aframe.io/releases/0.7.0/aframe.min.js&quot;>&lt;/script>
&lt;script src=&quot;https://sdk.altvr.com/libs/altspace.js/2.8.0/altspace.min.js&quot;>&lt;/script>
&lt;script src=&quot;https://sdk.altvr.com/libs/altspace.js/2.8.1/altspace.min.js&quot;>&lt;/script>
&lt;script>

// an example custom component, that will change the color when clicked
Expand Down

0 comments on commit b89eb72

Please sign in to comment.