-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
working on initialize and linking groupdefs #820
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So exciting to see this coming along.
If you want, I'm happy to merge this (or whatever you have locally) in whatever state you want. We can always iterate.
|
||
function uuid () { | ||
return '_' + Math.random().toString(36).substr(2, 9); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably just be:
let id = 0;
function getId() {
return id++;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, had intended on coming back to that with something less hacky ..... but yea, really no reason I can just increment! haha
retArr.push(arr[i]); | ||
} | ||
return arr.map((v) => parseFloat(v)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retArr
is never used?
function splitValues(str) {
return str.split(",").map(parseFloat);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, nice catch. yay extra for loop hah!
experiments/modern/src/initialize.js
Outdated
}) | ||
); | ||
} | ||
// remove comments other trimmed nodes | ||
resolvedChildren = resolvedChildren.filter(item => item !== undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally prefer to use a new variable name in cases like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, me too. I was starting to feel like the naming was getting silly like now I add filteredResolvedChildren
or something, but probably better than mutating things :D
* move images to initialize * return nodes from initialize, lookup groupdefs * fix attributes when copying groupdefs * position groups with x/y * more parsers for classic modern skin * if img doesn't exist just return the node without adding to registry * dont need nested node * simplify ids * simplify splitValues * new variable with name
No description provided.