Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jasondkiesling authored May 23, 2019
2 parents 6424cce + 2273c7f commit 42a6a5b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/myr/Myr.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class Myr {
if (typeof i === 'number') {
this.phiLength = String(i);
} else {
console.error("must pass a numeric for setRadius");
console.error("must pass a numeric for setPhiLength");
}
};

Expand Down
92 changes: 48 additions & 44 deletions src/myr/reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,76 @@ import React from 'react';
let geometry = [
{
name: 'box()',
description: <span>Renders a box using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a box using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'circle()',
description: <span>Renders a circle using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a circle using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'cone()',
description: <span>Renders a cone using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a cone using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'cylinder()',
description: <span>Renders a cylinder using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a cylinder using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'dodecahedron()',
description: <span>Renders a dodecahedron using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a dodecahedron using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'icosahedron()',
description: <span>Renders a icosahedron using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a icosahedron using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'octahedron()',
description: <span>Renders a octahedron using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a octahedron using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
//should this be documented?
{
name: 'line()',
description: <span>Renders a line using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a line using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'plane()',
description: <span>Renders a plane using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a plane using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'prism()',
description: <span>Renders a prism using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a prism using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'ring()',
description: <span>Renders a ring using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a ring using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'sphere()',
description: <span>Renders a sphere using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a sphere using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'tetrahedron()',
description: <span>Renders a tetrahedron using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a tetrahedron using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'text()',
description: <span>Renders text using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders text using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'torus()',
description: <span>Renders a torus using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a torus using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'torusknot()',
description: <span>Renders a torusknot using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a torusknot using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'triangle()',
description: <span>Renders a triangle using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a triangle using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
{
name: 'tube()',
description: <span>Renders a tube using current internal MYR properties. Returns an <span className="string element">element id</span>.</span>
description: <span>Renders a tube using current internal cursor properties. Returns an <span className="string element">element id</span>.</span>
},
//should this be documented?
// {
Expand All @@ -88,7 +88,7 @@ let transformations = [
},
{
name: <span>setColor(<span className="string">color</span>)</span>,
description: <span>Changes the color of the cursor <a href='https://htmlcolorcodes.com/color-names/' target="_blank" rel="noopener noreferrer">using these color codes</a>.</span>
description: <span>Changes the color of the cursor <a href='https://htmlcolorcodes.com/color-names/' target="_blank" rel="noopener noreferrer">using these color codes</a>, or HEX values.</span>
},
{
name: <span>setPosition(<span className="number">x</span>,<span className="number">y</span>,<span className="number">z</span>)</span>,
Expand All @@ -108,56 +108,60 @@ let transformations = [
},
{
name: <span>setScale(<span className="number">x</span>,<span className="number">y</span>,<span className="number">z</span>)</span>,
description: <span>Sets the scale of the cursor to the given dimensions.</span>
description: <span>Sets the scale of the cursor to the given ratios.</span>
},
{
name: <span>setXScale(<span className="number">x</span>)</span>,
description: <span>Changes the scale of the cursor in the X dimension to the given value.</span>
description: <span>Changes the scale of the cursor in the X dimension to the given ratio.</span>
},
{
name: <span>setYScale(<span className="number">y</span>)</span>,
description: <span>Changes the scale of the cursor in the Y dimension to the given value.</span>
description: <span>Changes the scale of the cursor in the Y dimension to the given ratio.</span>
},
{
name: <span>setZScale(<span className="number">z</span>)</span>,
description: <span>Changes the scale of the cursor in the Z dimension to the given value.</span>
description: <span>Changes the scale of the cursor in the Z dimension to the given ratio.</span>
},
{
name: <span>setRotation(<span className="number">x</span>, <span className="number">y</span>, <span className="number">z</span>)</span>,
description: <span>Changes the rotation of the cursor to the given angles (in degrees).</span>
description: <span>Changes the rotation of the cursor to the given angles in degrees.</span>
},
{
name: <span>pitchX(<span className="number">x</span>)</span>,
description: <span>Changes the pitch (rotation about the x axis).</span>
description: <span>Changes the pitch (rotation about the x axis) to the given angle in degrees.</span>
},
{
name: <span>yawY(<span className="number">y</span>)</span>,
description: <span>Changes the yaw (rotation about the y axis).</span>
description: <span>Changes the yaw (rotation about the y axis) to the given angle in degrees.</span>
},
{
name: <span>rollZ(<span className="number">z</span>)</span>,
description: <span>Changes the roll (rotation about the z axis).</span>
description: <span>Changes the roll (rotation about the z axis) to the given angle in degrees.</span>
},
{
name: <span>setRadius(<span className="number">radius</span>)</span>,
description: <span>Sets the radius of the brush to the given <span className="number">radius</span>.</span>
description: <span>Sets the radius of the cursor to the given <span className="number">radius</span>.</span>
},
{
name: <span>setPhiLength(<span className="number">phiLength</span>)</span>,
description: <span>Sets the phi length of the cursor to the given <span className="number">phiLength</span> in degrees. This changes the fraction of the circumference shown on certain shapes to be <span className="number">phiLength</span>/360.</span>
},
{
name: <span>makeDroppable(<span className="string">element</span>, <span className="number">mass</span>)</span>,
description: <span>Allows the entity to be affected by physics, and sets the mass of the object to <span className="number">mass</span>.</span>
description: <span>Allows the <span className="string">element</span> to be affected by physics, and sets the mass of the object to <span className="number">mass</span>.</span>
},
{
name: <span>makeUnDroppable(<span className="string">element</span>)</span>,
description: <span>Prevents the entity from being affected by physics.</span>
description: <span>Prevents the <span className="string">element</span> from being affected by physics.</span>
},
{
name: <span>makePushable(<span className="string">element</span>, <span className="number">mass</span>)</span>,
description: <span>Allows the entity to be pushed using the cursor and with the given <span className="number">mass</span>(default = 2). Also makes the object droppable (see above).</span>
description: <span>Allows the <span className="string">element</span> to be pushed using the cursor and with the given <span className="number">mass</span>(default = 2). Also makes the object droppable (see above).</span>
},
//This function doesn't quite make sense.
{
name: <span>makeUnPushable(<span className="string">element</span>)</span>,
description: <span>Prevents the entity from being pushed by the cursor, or being affected by physics.</span>
description: <span>Prevents the <span className="string">element</span> from being pushed by the cursor, or being affected by physics.</span>
},
//Not quite sure about the inner workings of this one yet
];
Expand All @@ -169,51 +173,51 @@ let animations = [
},
{
name: <span>yoyo(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Bounces the element <span className="number">magnitude</span> units in a positive direction on the y axis.</span>
description: <span>Bounces the element <span className="number">magnitude</span> units in a positive direction on the y axis for <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>sideToSide(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Shifts the element <span className="number">magnitude</span> units in a negative direction on the x axis and back to the original coordinate.</span>
description: <span>Shifts the element <span className="number">magnitude</span> units in a negative direction on the x axis and back to the original coordinate over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>goUp(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Translates the element <span className="number">magnitude</span> units in a positive direction on the y axis.</span>
description: <span>Translates the element <span className="number">magnitude</span> units in a positive direction on the y axis over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>goDown(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Translates the element <span className="number">magnitude</span> units in a negative direction on the y axis.</span>
description: <span>Translates the element <span className="number">magnitude</span> units in a negative direction on the y axis over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>goRight(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Translates the element <span className="number">magnitude</span> units in a positive direction on the x axis.</span>
description: <span>Translates the element <span className="number">magnitude</span> units in a positive direction on the x axis over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>goLeft(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Translates the element <span className="number">magnitude</span> units in a negative direction on the x axis.</span>
description: <span>Translates the element <span className="number">magnitude</span> units in a negative direction on the x axis over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>goTowards(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Translates the element <span className="number">magnitude</span> units in a positive direction on the z axis.</span>
description: <span>Translates the element <span className="number">magnitude</span> units in a positive direction on the z axis over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>goAway(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Translates the element <span className="number">magnitude</span> units in a negative direction on the z axis.</span>
description: <span>Translates the element <span className="number">magnitude</span> units in a negative direction on the z axis over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>grow(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Scales the element by a <span className="number">magnitude</span> multiplier.</span>
description: <span>Scales the element by a <span className="number">magnitude</span> multiplier over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>shrink(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Scales the element by a 1/<span className="number">magnitude</span> multiplier.</span>
description: <span>Scales the element by a 1/<span className="number">magnitude</span> multiplier over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>fadeOut(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Modifies transparency from 1 to <span className="number">magnitude</span> [0,1).</span>
description: <span>Modifies transparency from 1 to <span className="number">magnitude</span> [0,1) over <span className="number">duration</span> milliseconds.</span>
},
{
name: <span>fadeIn(<span className="string">element</span>, <span className="number">magnitude</span>, <span className="bool">loop</span>, <span className="number">duration</span>)</span>,
description: <span>Modifies transparency from 0 to <span className="number">magnitude</span> (0,1].</span>
description: <span>Modifies transparency from 0 to <span className="number">magnitude</span> (0,1] over <span className="number">duration</span> milliseconds.</span>
},
];

Expand Down

0 comments on commit 42a6a5b

Please sign in to comment.