Skip to content

Commit

Permalink
Added polyfills for unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenvergenz committed Oct 9, 2017
1 parent 162e5dd commit 58ae469
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
8 changes: 5 additions & 3 deletions src/components/AltspaceComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AltspaceComponent extends AFrameComponent
* @default false
* @memberof module:altspace/components.altspace
*/
usePixelScale: { type: 'boolean', default: 'false'},
usePixelScale: { type: 'boolean', default: false},

/**
* Puts the origin at the `bottom`, `middle` (default), or `top` of the Altspace enclosure.
Expand All @@ -56,7 +56,7 @@ class AltspaceComponent extends AFrameComponent
* @default true
* @memberof module:altspace/components.altspace
*/
enclosuresOnly: { type: 'boolean', default: 'true'},
enclosuresOnly: { type: 'boolean', default: true},

/**
* Puts the app into fullspace mode.
Expand All @@ -65,7 +65,7 @@ class AltspaceComponent extends AFrameComponent
* @default false
* @memberof module:altspace/components.altspace
*/
fullspace: { type: 'boolean', default: 'false'}
fullspace: { type: 'boolean', default: false}
}
}

Expand Down Expand Up @@ -160,8 +160,10 @@ class AltspaceComponent extends AFrameComponent
renderer.getPixelRatio = noop;
renderer.getMaxAnisotropy = noop;
renderer.setFaceCulling = noop;
renderer.submitFrame = noop;
renderer.context = {canvas: {}};
renderer.shadowMap = {};
renderer.requestAnimationFrame = window.requestAnimationFrame;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion src/components/AltspaceCursorCollider.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AltspaceCursorCollider extends AFrameComponent
* @default true
* @memberof module:altspace/components.altspace-cursor-collider
*/
enabled: {type: 'boolean', default: 'true'}
enabled: {type: 'boolean', default: true}
};
}

Expand Down
8 changes: 4 additions & 4 deletions src/components/NColliders.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class NBoxCollider extends NCollider {
* @default [1, 1, 1]
* @memberof module:altspace/components.n-box-collider
*/
size: { type: 'vec3', default: '1 1 1' }
size: { type: 'vec3', default: {x:1,y:1,z:1} }
};
}
}
Expand All @@ -125,7 +125,7 @@ class NCapsuleCollider extends NCollider {
* @default 1
* @memberof module:altspace/components.n-capsule-collider
*/
radius: { default: '0', type: 'number' },
radius: { default: 0, type: 'number' },

/**
* The height of the shaft of the capsule in meters.
Expand All @@ -134,7 +134,7 @@ class NCapsuleCollider extends NCollider {
* @default 0
* @memberof module:altspace/components.n-capsule-collider
*/
height: { default: '0', type: 'number' },
height: { default: 0, type: 'number' },

/**
* The axis with which the capsule is aligned. Must be one of 'x', 'y' or 'z'.
Expand Down Expand Up @@ -170,7 +170,7 @@ class NMeshCollider extends NCollider {
* @default true
* @memberof module:altspace/components.n-mesh-collider
*/
convex: { type: 'boolean', default: 'true' }
convex: { type: 'boolean', default: true }
};
}

Expand Down
6 changes: 3 additions & 3 deletions src/components/NSmallComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class NText extends NativeComponent {
* @default 10
* @memberof module:altspace/components.n-text
*/
fontSize: { default: '10', type: 'int' },//roughly a meter tall
fontSize: { default: 10, type: 'int' },//roughly a meter tall

/**
* The width of the text area in meters. If the
Expand All @@ -86,7 +86,7 @@ class NText extends NativeComponent {
* @default 10
* @memberof module:altspace/components.n-text
*/
width: { default: '10', type: 'number' },//in meters
width: { default: 10, type: 'number' },//in meters

/**
* The height of the text area in meters. If the
Expand All @@ -96,7 +96,7 @@ class NText extends NativeComponent {
* @default 1
* @memberof module:altspace/components.n-text
*/
height: { default: '1', type: 'number' },//in meters
height: { default: 1, type: 'number' },//in meters

/**
* The horizontal anchor point for the text. Can be `left`, `middle`, or `right`.
Expand Down
8 changes: 4 additions & 4 deletions src/components/SyncSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@ class SyncSystem extends AFrameSystem
* @member {string} author
* @memberof module:altspace/components.sync-system
*/
author: { type: 'string', default: null },
author: { type: 'string' },

/**
* The name of the app.
* @instance
* @member {string} app
* @memberof module:altspace/components.sync-system
*/
app: { type: 'string', default: null },
app: { type: 'string' },

/**
* Override the instance ID. Can also be overridden with a URL parameter.
* @instance
* @member {string} instance
* @memberof module:altspace/components.sync-system
*/
instance: { type: 'string', default: null },
instance: { type: 'string' },

/**
* Override the base reference. Set this to use your own Firebase.
* @instance
* @member {string} refUrl
* @memberof module:altspace/components.sync-system
*/
refUrl: { type: 'string', default: null }
refUrl: { type: 'string' }
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/instantiator.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Instantiator extends AFrameComponent
* @default true
* @memberof module:altspace/components.instantiator
*/
removeLast: {type: 'boolean', default: 'true'},
removeLast: {type: 'boolean', default: true},
}; }

init() {
Expand Down

0 comments on commit 58ae469

Please sign in to comment.