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