Skip to content

Commit

Permalink
Start updating doc styles
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenvergenz committed Nov 16, 2017
1 parent 70fd2d5 commit b5bef1d
Show file tree
Hide file tree
Showing 20 changed files with 217 additions and 192 deletions.
2 changes: 1 addition & 1 deletion examples/aframe/model-repos.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
data-attribution='https://www.remix3d.com/details/G009SXJCMDL3'></a-asset-item>
</a-assets>

<a-entity id='moon' visible=false position='0 -.77 .05' gltf-model='#moon' visible='false' ></a-entity>
<a-entity id='moon' position='0 -.77 .05' gltf-model='#moon'></a-entity>
<a-entity id='bear' scale='2.5 2.5 2.5' gltf-model='#bear'></a-entity>
</a-scene>
</body>
Expand Down
12 changes: 6 additions & 6 deletions src/components/AltspaceComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import {AFrameComponent} from './AFrameComponent';
import {safeDeepSet} from './utilities';

/**
* The altspace component makes A-Frame apps compatible with AltspaceVR. @aframe
* @name module:altspace/components.altspace
* @class
* @extends module:altspace/components.AFrameComponent
* @classdesc The altspace component makes A-Frame apps compatible with AltspaceVR.
*
* **Note**: This component can have side-effects on some default components. To be
* safe, this component should be specified last.
* safe, this component should be specified last. @aframe
*
* @example
* <head>
Expand All @@ -20,10 +24,6 @@ import {safeDeepSet} from './utilities';
* <a-entity geometry="primitive: box" material="color: #C03546"></a-entity>
* </a-scene>
* </body>
*
* @alias altspace
* @memberof module:altspace/components
* @extends module:altspace/components.AFrameComponent
*/
class AltspaceComponent extends AFrameComponent
{
Expand Down
7 changes: 4 additions & 3 deletions src/components/AltspaceCursorCollider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import {safeDeepSet} from './utilities';


/**
* Enable or disable cursor collision on the object. @aframe
* @alias altspace-cursor-collider
* @memberof module:altspace/components
* @name module:altspace/components.altspace-cursor-collider
* @class
* @extends module:altspace/components.AFrameComponent
* @classdesc Enable or disable cursor collision on the object. @aframe
* @example <a-box altspace-cursor-collider='enabled: false'></a-box>
*/
class AltspaceCursorCollider extends AFrameComponent
{
Expand Down
8 changes: 4 additions & 4 deletions src/components/AltspaceTrackedControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import {AFrameComponent} from './AFrameComponent';

/**
* Enables tracked control support for A-Frame applications that use the built-in
* `tracked-controls`, `vive-controls` or `hand-controls` components. @aframe
* @alias altspace-tracked-controls
* @name module:altspace/components.altspace-tracked-controls
* @class
* @extends module:altspace/components.AFrameComponent
* @memberof module:altspace/components
* @classdesc Enables tracked control support for A-Frame applications that use the built-in
* `tracked-controls`, `vive-controls` or `hand-controls` components. @aframe
*/
class AltspaceTrackedControls extends AFrameComponent
{
Expand Down
9 changes: 4 additions & 5 deletions src/components/CollapseModel.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import {AFrameComponent} from './AFrameComponent';

/**
* Reaches into a model's hierarchy and directly assigns the first mesh found
* @name module:altspace/components.collapse-model
* @class
* @extends module:altspace/components.AFrameComponent
* @classdesc Reaches into a model's hierarchy and directly assigns the first mesh found
* to the containing entity. This is mostly necessary for use alongside native
* components like [n-skeleton-parent]{@link module:altspace/components.n-skeleton-parent}. @aframe
*
* @alias collapse-model
* @memberof module:altspace/components
* @extends module:altspace/components.AFrameComponent
*/
class CollapseModel extends AFrameComponent
{
Expand Down
62 changes: 34 additions & 28 deletions src/components/NColliders.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import NativeComponent from './NativeComponent';

/**
* Abstract base class for [n-sphere-collider]{@link module:altspace/components.n-sphere-collider},
* @name module:altspace/components.n-collider
* @class
* @extends module:altspace/components.NativeComponent
* @classdesc Abstract base class for [n-sphere-collider]{@link module:altspace/components.n-sphere-collider},
* [n-box-collider]{@link module:altspace/components.n-box-collider},
* [n-capsule-collider]{@link module:altspace/components.n-capsule-collider},
* and [n-mesh-collider]{@link module:altspace/components.n-mesh-collider}. You cannot use
* this class directly, but instead you should add one of those components
* to your objects.
* @memberof module:altspace/components
* @extends module:altspace/components.NativeComponent
* to your objects. @aframe
*/
class NCollider extends NativeComponent {
get schema(){
Expand All @@ -20,7 +21,7 @@ class NCollider extends NativeComponent {
* @instance
* @member {vec3} center
* @default [0, 0, 0]
* @memberof module:altspace/components.NCollider
* @memberof module:altspace/components.n-collider
*/
center: { type: 'vec3' },

Expand All @@ -33,7 +34,7 @@ class NCollider extends NativeComponent {
* @instance
* @member {string} type
* @default "hologram"
* @memberof module:altspace/components.NCollider
* @memberof module:altspace/components.n-collider
*/
type: { type: 'string', default: 'object' },

Expand All @@ -44,7 +45,7 @@ class NCollider extends NativeComponent {
* @instance
* @member {boolean} isTrigger
* @default false
* @memberof module:altspace/components.NCollider
* @memberof module:altspace/components.n-collider
*/
isTrigger: { default: false, type: 'boolean' }
};
Expand All @@ -53,19 +54,20 @@ class NCollider extends NativeComponent {

/**
* Fired when an object enters a trigger volume, e.g. `isTrigger: true`
* @event module:altspace/components.NCollider.triggerenter
* @event module:altspace/components.n-collider.triggerenter
*/

/**
* Fired when an object leaves a trigger volume, e.g. `isTrigger: true`
* @event module:altspace/components.NCollider.triggerexit
* @event module:altspace/components.n-collider.triggerexit
*/

/**
* A sphere-shaped collider. @aframe
* @alias n-sphere-collider
* @memberof module:altspace/components
* @extends module:altspace/components.NCollider
* @name module:altspace/components.n-sphere-collider
* @class
* @extends module:altspace/components.n-collider
* @classdesc Creates a sphere-shaped collider of the given radius. Collides with
* the cursor or avatars depending on the [type]{@link module:altspace/components.n-sphere-collider#type} property. @aframe
* @example <a-sphere radius=1 n-sphere-collider='radius: 1; type: object;'></a-sphere>
*/
class NSphereCollider extends NCollider {
Expand All @@ -85,10 +87,12 @@ class NSphereCollider extends NCollider {
}

/**
* Create a box-shaped collider on this entity. @aframe
* @alias n-box-collider
* @memberof module:altspace/components
* @extends module:altspace/components.NCollider
* @name module:altspace/components.n-box-collider
* @class
* @extends module:altspace/components.n-collider
* @classdesc Creates a sphere-shaped collider of the given radius. Collides with
* the cursor or avatars depending on the [type]{@link module:altspace/components.n-box-collider#type} property. @aframe
* @example <a-box n-box-collider='type: environment'></a-box>
*/
class NBoxCollider extends NCollider {
constructor(){ super('n-box-collider'); }
Expand All @@ -107,11 +111,13 @@ class NBoxCollider extends NCollider {
}

/**
* Create a capsule-shaped collider on this entity. Capsules
* are a union of a cylinder and two spheres on top and bottom. @aframe
* @alias n-capsule-collider
* @memberof module:altspace/components
* @extends module:altspace/components.NCollider
* @name module:altspace/components.n-capsule-collider
* @class
* @extends module:altspace/components.n-collider
* @classdesc Create a capsule-shaped collider on this entity. Capsules
* are a union of a cylinder and two spheres on top and bottom. Collides with
* the cursor or avatars depending on the [type]{@link module:altspace/components.n-capsule-collider#type} property. @aframe
* @example <a-cylinder n-capsule-collider='type: environment'></a-cylinder>
*/
class NCapsuleCollider extends NCollider {
constructor(){ super('n-capsule-collider'); }
Expand Down Expand Up @@ -149,13 +155,13 @@ class NCapsuleCollider extends NCollider {
}

/**
* Enable collision for the entire attached mesh. This is expensive to evaluate, so should only be used on
* @name module:altspace/components.n-mesh-collider
* @class
* @extends module:altspace/components.n-collider
* @classdesc Enable collision for the entire attached mesh. This is expensive to evaluate, so should only be used on
* low-poly meshes. If using this alongside the `geometry` component, make sure that
* `geometry` comes before this component. @aframe
* @example <a-box n-mesh-collider></a-box>
* @alias n-mesh-collider
* @memberof module:altspace/components
* @extends module:altspace/components.NCollider
* @example <a-entity gltf-model='#building' n-mesh-collider='type: environment'></a-entity>
*/
class NMeshCollider extends NCollider {
get schema(){
Expand All @@ -164,7 +170,7 @@ class NMeshCollider extends NCollider {
/**
* Whether the collider should be convex or concave. Set this to false if you have holes
* in your mesh. Convex colliders are limited to 255 triangles. Note: concave colliders can be significantly more
* expensive compared to convex colliders.
* expensive to evaluate compared to convex colliders, so should be used sparingly.
* @instance
* @member {boolean} convex
* @default true
Expand Down
11 changes: 5 additions & 6 deletions src/components/NContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
import NativeComponent from './NativeComponent';

/**
* A container keeps a running tally of how many objects are within
* @name module:altspace/components.n-container
* @class
* @extends module:altspace/components.NativeComponent
* @classdesc A container keeps a running tally of how many objects are within
* its bounds, and adds and removes the states `container-full` and
* `container-empty` based on the current count of objects. Requires a native
* collider component set to trigger mode. @aframe
* @alias n-container
* @memberof module:altspace/components
* @extends module:altspace/components.NativeComponent
* @example
* <a-box n-box-collider="isTrigger: true" n-container="capacity: 6"></a-box>
* @example <a-box n-box-collider="isTrigger: true" n-container="capacity: 6"></a-box>
*/
class NContainer extends NativeComponent
{
Expand Down
8 changes: 4 additions & 4 deletions src/components/NLayoutBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import NativeComponent from './NativeComponent';

/**
* Spawn a browser or enclosure during the "layout" phase when a space is first created or reset.
* @name module:altspace/components.n-layout-browser
* @class
* @extends module:altspace/components.NativeComponent
* @classdesc Spawn a browser or enclosure during the "layout" phase when a space is first created or reset.
* Layout browsers can only be used by apps that are set as the default app in a space.
* @aframe
* @alias n-layout-browser
* @memberof module:altspace/components
* @extends module:altspace/components.NativeComponent
*/
class NLayoutBrowser extends NativeComponent
{
Expand Down
8 changes: 4 additions & 4 deletions src/components/NPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import NativeComponent from './NativeComponent';

/**
* Spawn a portal that allows you to travel to a different space or a different location in the current space.
* @aframe
* @alias n-portal
* @memberof module:altspace/components
* @name module:altspace/components.n-portal
* @class
* @extends module:altspace/components.NativeComponent
* @classdesc Spawn a portal that allows you to travel to a different space or a different location in the current space. @aframe
* @example <a-entity n-portal='target-space: campfire-lobby'></a-entity>
*/
class NPortal extends NativeComponent {
constructor(){ super('n-portal'); }
Expand Down
Loading

0 comments on commit b5bef1d

Please sign in to comment.