Skip to content

Commit

Permalink
remove reference of arrayex
Browse files Browse the repository at this point in the history
  • Loading branch information
glenzli committed Apr 25, 2020
1 parent efacf23 commit 7f57473
Show file tree
Hide file tree
Showing 10 changed files with 449 additions and 669 deletions.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let tasks = []

tasks.push(rollup.rollup({
input: 'src/index.ts',
external: ['arrayex', 'paper'],
external: ['paper'],
plugins: defaultPlugins
}).then(bundle => {
bundle.write({ format: 'umd', file: pkg.main, name: camelCase(libraryName), sourcemap: true })
Expand Down
12 changes: 12 additions & 0 deletions demo/debug.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<html>
<head>
<title>Demo</title>
<link rel="stylesheet" href="./demo.css"/>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/paper-full.min.js"></script>
<script type="text/javascript" src="./paperjs-offset.js"></script>
<script type="text/javascript" src="./debug.js"></script>
</head>
<body>
<canvas width="1200" height="768"></canvas>
</body>
</html>
23 changes: 23 additions & 0 deletions demo/debug.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(function() {
function DebugCase() {
let canvas = document.querySelector('canvas');
paper.setup(canvas);
paper.view.center = [0, 0];

const c3 = new paper.Path.Circle({ center: [180, 260], radius: 50, strokeColor: 'black' });
const c4 = new paper.Path.Circle({ center: [230, 260], radius: 40, strokeColor: 'black' });
const c5 = new paper.Path.Circle({ center: [205, 200], radius: 40, strokeColor: 'black' });
const cc1 = c3.unite(c4, { insert: true });
const cc = cc1.unite(c5, { insert: true });
c3.remove();
c4.remove();
c5.remove();
cc1.remove();
cc.bringToFront();
cc.translate(new paper.Point(-100, -100));

PaperOffset.offset(cc, 24);
}

window.onload = DebugCase;
})();
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<title>Demo</title>
<link rel="stylesheet" href="./demo.css"/>
<script type="text/javascript" src="https://cdn.bootcss.com/paper.js/0.12.0/paper-core.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/paper@0.12.4/dist/paper-full.min.js"></script>
<script type="text/javascript" src="./paperjs-offset.js"></script>
<script type="text/javascript" src="./demo.js"></script>
</head>
Expand Down
Loading

0 comments on commit 7f57473

Please sign in to comment.