Skip to content

Instantly share code, notes, and snippets.

@mattexdee
mattexdee / drawings-to-walls.js
Last active October 20, 2023 11:14 — forked from schultzcole/drawings-to-walls.js
A macro script to convert polygonal drawings to walls
let drawings = canvas.drawings.controlled;
drawings = drawings.map(drawing =>{
switch (drawing.data.type) {
case "f":
case "p": {
let { _id, points, rotation, x, y, width, height } = drawing.data;
return { id: _id, valid: true, points, rotation, x, y, width, height };
}
case "r": {
/**
*
* Copyright (C) 2015 Ken L.
* Licensed under the GPL Version 3 license.
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Andy W.
* Shu Zong C.
* Carlos R. L. Rodrigues
@adamreisnz
adamreisnz / package.json
Last active January 19, 2024 13:01
Simple pure npm scripts build process
{
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "http://www.project-name.com",
"author": {
"name": "Adam Reis",
"url": "http://adam.reis.nz"
},
"license": "UNLICENSED",