mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Rename Document -> Project, DocumentView -> ProjectView, paper.document -> paper.project and paper.documents -> paper.projects, to avoid name clashing with window.document.
This commit is contained in:
parent
edd36e7df8
commit
cfe968d30e
37 changed files with 699 additions and 183 deletions
|
@ -7,7 +7,7 @@
|
|||
<script type="text/javascript">var root = '../../'</script>
|
||||
<script type="text/javascript" src="../../src/load.js"></script>
|
||||
<script type="text/paperscript" canvas="canvas">
|
||||
var layer = document.activeLayer;
|
||||
var layer = project.activeLayer;
|
||||
|
||||
var values = {
|
||||
count: 34,
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
// Reposition the paths whenever the window is resized:
|
||||
function onResize(event) {
|
||||
document.activeLayer.position = view.center;
|
||||
project.activeLayer.position = view.center;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Adapted from Flocking Processing example by Daniel Schiffman:
|
||||
// http://processing.org/learning/topics/flocking.html
|
||||
|
||||
document.currentStyle = {
|
||||
project.currentStyle = {
|
||||
strokeColor: 'white',
|
||||
strokeWidth: 2,
|
||||
strokeCap: 'round'
|
||||
|
@ -281,7 +281,7 @@
|
|||
groupTogether = !groupTogether;
|
||||
}
|
||||
|
||||
var layer = document.activeLayer;
|
||||
var layer = project.activeLayer;
|
||||
function onKeyDown(event) {
|
||||
if (event.key == 'space') {
|
||||
layer.selected = !layer.selected;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
var position = view.center;
|
||||
var mousePos = position;
|
||||
var children = document.activeLayer.children;
|
||||
var children = project.activeLayer.children;
|
||||
var count = 0;
|
||||
|
||||
function iterate() {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
mousePoint = event.point;
|
||||
}
|
||||
|
||||
var children = document.activeLayer.children;
|
||||
var children = project.activeLayer.children;
|
||||
function onFrame(event) {
|
||||
for (var i = 0, l = children.length; i < l; i++) {
|
||||
var item = children[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue