mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Prebuilt module for commit b9c1c712800b7764021a897add594871eec1ab2e
This commit is contained in:
parent
3270f3d981
commit
8a557440b5
7 changed files with 86 additions and 37 deletions
2
dist/docs/assets/js/paper.js
vendored
2
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 23:20:19 2020 +0200
|
||||
* Date: Mon May 25 13:51:06 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
86
dist/docs/classes/Raster.html
vendored
86
dist/docs/classes/Raster.html
vendored
|
@ -105,27 +105,6 @@ var imageElement = document.getElementById('art');
|
|||
// Create the raster:
|
||||
var raster = new Raster(imageElement);</code></pre>
|
||||
|
||||
<h4>Example:</h4>
|
||||
|
||||
<div class="paperscript split">
|
||||
|
||||
<div class="buttons">
|
||||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-1">
|
||||
var raster = new Raster({
|
||||
source: 'http://assets.paperjs.org/images/marilyn.jpg',
|
||||
position: view.center
|
||||
});
|
||||
|
||||
raster.scale(0.5);
|
||||
raster.rotate(10);
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="300" id="canvas-1"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -181,7 +160,7 @@ raster.rotate(10);
|
|||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-2">
|
||||
<script type="text/paperscript" canvas="canvas-1">
|
||||
var width = 100;
|
||||
var height = 100;
|
||||
|
||||
|
@ -196,7 +175,68 @@ for (var i = 0; i < width; i++) {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="150" id="canvas-2"></canvas></div>
|
||||
<div class="canvas"><canvas width="516" height="150" id="canvas-1"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="raster-object" class="member">
|
||||
<div class="member-link">
|
||||
<a name="raster-object" href="#raster-object"><tt><b>Raster</b>(object)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Creates a new raster from an object description, and places it in the active layer.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>object:</tt>
|
||||
<tt>Object</tt>
|
||||
— an object containing properties to be set on the raster
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Raster.html"><tt>Raster</tt></a></tt>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4>Example:</h4>
|
||||
|
||||
<div class="paperscript split">
|
||||
|
||||
<div class="buttons">
|
||||
<div class="button run">Run</div>
|
||||
</div>
|
||||
|
||||
<script type="text/paperscript" canvas="canvas-2">
|
||||
var raster = new Raster({
|
||||
source: 'http://assets.paperjs.org/images/marilyn.jpg',
|
||||
position: view.center
|
||||
});
|
||||
|
||||
raster.scale(0.5);
|
||||
raster.rotate(10);
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="300" id="canvas-2"></canvas></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
2
dist/paper-core.js
vendored
2
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 23:20:19 2020 +0200
|
||||
* Date: Mon May 25 13:51:06 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
2
dist/paper-core.min.js
vendored
2
dist/paper-core.min.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 23:20:19 2020 +0200
|
||||
* Date: Mon May 25 13:51:06 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
2
dist/paper-full.js
vendored
2
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 23:20:19 2020 +0200
|
||||
* Date: Mon May 25 13:51:06 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
2
dist/paper-full.min.js
vendored
2
dist/paper-full.min.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 23:20:19 2020 +0200
|
||||
* Date: Mon May 25 13:51:06 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
27
dist/paper.d.ts
vendored
27
dist/paper.d.ts
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 23:20:19 2020 +0200
|
||||
* Date: Mon May 25 13:51:06 2020 +0200
|
||||
*
|
||||
* This is an auto-generated type definition.
|
||||
*/
|
||||
|
@ -1754,7 +1754,7 @@ declare namespace paper {
|
|||
*
|
||||
* @return the item itself
|
||||
*/
|
||||
set(props: object): Item
|
||||
set(props: object): this
|
||||
|
||||
/**
|
||||
* Clones the item within the same project and places the copy above the
|
||||
|
@ -1768,7 +1768,7 @@ declare namespace paper {
|
|||
*
|
||||
* @return the newly cloned item
|
||||
*/
|
||||
clone(options?: object): Item
|
||||
clone(options?: object): this
|
||||
|
||||
/**
|
||||
* Copies the content of the specified item over to this item.
|
||||
|
@ -2161,7 +2161,7 @@ declare namespace paper {
|
|||
*
|
||||
* @return the item itself, if it was successfully added
|
||||
*/
|
||||
addTo(owner: Project | Layer | Group | CompoundPath): Item
|
||||
addTo(owner: Project | Layer | Group | CompoundPath): this
|
||||
|
||||
/**
|
||||
* Clones the item and adds it to the specified owner, which can be either
|
||||
|
@ -2172,7 +2172,7 @@ declare namespace paper {
|
|||
*
|
||||
* @return the new copy of the item, if it was successfully added
|
||||
*/
|
||||
copyTo(owner: Project | Layer | Group | CompoundPath): Item
|
||||
copyTo(owner: Project | Layer | Group | CompoundPath): this
|
||||
|
||||
/**
|
||||
* If this is a group, layer or compound-path with only one child-item,
|
||||
|
@ -2486,7 +2486,7 @@ declare namespace paper {
|
|||
*
|
||||
* @return this item itself, so calls can be chained
|
||||
*/
|
||||
on(type: string, callback: Function): Item
|
||||
on(type: string, callback: Function): this
|
||||
|
||||
/**
|
||||
* Attaches one or more event handlers to the item.
|
||||
|
@ -2497,7 +2497,7 @@ declare namespace paper {
|
|||
*
|
||||
* @return this item itself, so calls can be chained
|
||||
*/
|
||||
on(object: object): Item
|
||||
on(object: object): this
|
||||
|
||||
/**
|
||||
* Detach an event handler from the item.
|
||||
|
@ -2509,7 +2509,7 @@ declare namespace paper {
|
|||
*
|
||||
* @return this item itself, so calls can be chained
|
||||
*/
|
||||
off(type: string, callback: Function): Item
|
||||
off(type: string, callback: Function): this
|
||||
|
||||
/**
|
||||
* Detach one or more event handlers to the item.
|
||||
|
@ -2520,7 +2520,7 @@ declare namespace paper {
|
|||
*
|
||||
* @return this item itself, so calls can be chained
|
||||
*/
|
||||
off(object: object): Item
|
||||
off(object: object): this
|
||||
|
||||
/**
|
||||
* Emit an event on the item.
|
||||
|
@ -5379,6 +5379,15 @@ declare namespace paper {
|
|||
*/
|
||||
constructor(size: Size, position?: Point)
|
||||
|
||||
/**
|
||||
* Creates a new raster from an object description, and places it in the
|
||||
* active layer.
|
||||
*
|
||||
* @param object - an object containing properties to be set on the
|
||||
* raster
|
||||
*/
|
||||
constructor(object: object)
|
||||
|
||||
/**
|
||||
* Extracts a part of the Raster's content as a sub image, and returns it as
|
||||
* a Canvas object.
|
||||
|
|
Loading…
Reference in a new issue