🚧 Last changes for pivot to JavaScript
This commit is contained in:
parent
9fbef27330
commit
27500d52e1
4 changed files with 10 additions and 5 deletions
|
@ -3,6 +3,7 @@ import attributes from "./attributes";
|
|||
function path() {
|
||||
this.render = true;
|
||||
this.attributes = new attributes();
|
||||
this.ops = [];
|
||||
}
|
||||
|
||||
/** Adds a move operation to Point to */
|
||||
|
|
|
@ -35,6 +35,7 @@ export default function pattern(config = false) {
|
|||
this.hooks = new hooks();
|
||||
|
||||
// Data containers
|
||||
this.settings = {};
|
||||
this.values = {};
|
||||
this.parts = {};
|
||||
for (let id of config.parts) {
|
||||
|
@ -53,7 +54,8 @@ export default function pattern(config = false) {
|
|||
parts: this.parts,
|
||||
options: this.options,
|
||||
values: this.values,
|
||||
config: this.config
|
||||
config: this.config,
|
||||
settings: this.settings
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -66,12 +66,12 @@ point.prototype.rotate = function(deg, that) {
|
|||
let x = that.x + radius * Math.cos(this.deg2rad(angle + deg)) * -1;
|
||||
let y = that.y + radius * Math.sin(this.deg2rad(angle + deg));
|
||||
|
||||
return new Point(x, y);
|
||||
return new point(x, y);
|
||||
};
|
||||
|
||||
/** returns an identical copy of this point */
|
||||
point.prototype.copy = function() {
|
||||
return new Point(this.x, this.y);
|
||||
return new point(this.x, this.y);
|
||||
};
|
||||
|
||||
/** checks whether this point is equal to that point */
|
||||
|
@ -81,12 +81,12 @@ point.prototype.equals = function(that) {
|
|||
|
||||
/** Mirrors this point around X value of that point */
|
||||
point.prototype.flipX = function(that) {
|
||||
return new Point(that.x + this.dx(that), that.y);
|
||||
return new point(that.x + this.dx(that), that.y);
|
||||
};
|
||||
|
||||
/** Mirrors this point around Y value of that point */
|
||||
point.prototype.flipY = function(that) {
|
||||
return new Point(that.x, that.y + this.dy(that));
|
||||
return new point(that.x, that.y + this.dy(that));
|
||||
};
|
||||
|
||||
/** Shifts this point distance in the deg direction */
|
||||
|
|
|
@ -5,6 +5,8 @@ import hooks from "./hooks";
|
|||
import { version } from "../package.json";
|
||||
|
||||
function svg(pattern) {
|
||||
this.openGroups = [];
|
||||
this.freeId = 0;
|
||||
this.body = "";
|
||||
this.style = "";
|
||||
this.script = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue