Giter Site home page Giter Site logo

paperjs / paperjs.org Goto Github PK

View Code? Open in Web Editor NEW
47.0 7.0 33.0 57.83 MB

The source of the Paper.js website http://paperjs.org, translated to the static pages in https://github.com/paperjs/paperjs.github.io by running it through https://github.com/paperjs/woods in a Travis CI worker on each commit.

CSS 3.94% JavaScript 91.84% Shell 0.25% SCSS 2.87% Pug 1.10%

paperjs.org's Introduction

paperjs.org's People

Contributors

alexistm avatar beardicus avatar craigdanj avatar glumb avatar kontur avatar lafisrap avatar lehni avatar maboiteaspam avatar ponychicken avatar puckey avatar rbvea avatar sasensi avatar sunny-b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

paperjs.org's Issues

Mobile Support

The current documentation is not readable in mobile, because the sidebar overlaps the content:

image

how to create pattern for strokeStyle in Paper.js

I can create pattern for the stroke like this in Javascript:

var img = new Image();
img.src = "xx.png";

img.onload = function(){

  var pattern = ctx.createPattern(img, "repeat");
  ctx.strokeStyle=pattern;

  ctx.lineWidth = 30;

  ctx.beginPath();
  ctx.moveTo(100,0)
  ctx.lineTo(100,300);

  ctx.stroke();
}

How can i create pattern for Path items created with Paper.js?

the tutorial code does not work

The initial tutorial code on http://paperjs.org/tutorials/getting-started/working-with-paper-js,

<!DOCTYPE html>
<html>
<head>
<!-- Load the Paper.js library -->
<script type="text/javascript" src="js/paper.js"></script>
<!-- Define inlined PaperScript associate it with myCanvas -->
<script type="text/paperscript" canvas="myCanvas">
    // Create a Paper.js Path to draw a line into it:
    var path = new Path();
    // Give the stroke a color
    path.strokeColor = 'black';
    var start = new Point(100, 100);
    // Move to start and draw a line from there
    path.moveTo(start);
    // Note the plus operator on Point objects.
    // PaperScript does that for us, and much more!
    path.lineTo(start + [ 100, -50 ]);
</script>
</head>
<body>
    <canvas id="myCanvas" resize></canvas>
</body>
</html>

does not work with paperjs 0.9.23, instead throwing a parse error about a missing ], as can be seen in this jsbin: http://jsbin.com/kedixufiye/edit?html,output

Invalid SSL certificate

I'm unable to load paperjs.org assets, so I did an SSL Test:

SSL Labs Test

We were able to retrieve a certificate for this site, but the domain names listed in it do not match the domain name you requested us to inspect.

Page titles all say "Paper.js - Paper.js" regardless of where you are at.

For example, going to http://paperjs.org/reference/layer/ will still have the same title as the main http://paperjs.org page.

This makes it really hard to use the documentation. After a couple of open tabs you quickly lose track of where things went.

I am not familiar with the tool you are using to generate the website otherwise I would attempt to fix it myself. The format of the one .txt file that has a title parameter reminds me of Jekyll.

Script issue on 'Path' reference

When I visit the reference for Path, since yesterday, the page keeps hanging until I stop the script.
This is the notice I get:

"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Script: http://paperjs.org/assets/js/paper.js:133"

On the issue of naming

Why is an active layer called activeLayer, but the active (current) project is paper.project instead of activeProject?

SVG Export broken on main Paperjs.org site

Moved from Paper.js source repo issue 1945

Description/Steps to reproduce

SVG Export broken on main Paperjs.org site as well as other places which use that code, such as my Ruler Genrator.
Go to Paperjs.org, click features, scroll to SVG export section, click Download as SVG

Link to reproduction test-case

Paper JS Main Site

Expected result

Download SVG
Error: 500 Server Error
The server encountered an error and could not complete your request.
URL of error: https://download-data-uri.appspot.com/

Additional information

Switching to React.js (Mobile Support)

Could we possibly switch to react? I am unable to add CSS media queries. Given the static nature of the site, a switch would be fairly simple and fast.

Links point to pages from scriptographer.org

There are some links that point to scriptographer.org, despite the linked articles are also available on paperjs.org like here:

Read more about mouse handlers in the <url "http://scriptographer.org/tutorials/interaction/creating-mouse-tools/">Creating Mouse Tools</url> tutorial.

http://scriptographer.org/tutorials/interaction/creating-mouse-tools/
http://       paperjs.org/tutorials/interaction/creating-mouse-tools/

Is this intended or needs to be fixed?

P.S. You can find other similar links by searching for scriptographer.org:
https://github.com/paperjs/paperjs.org/search?q=scriptographer

Math Functions vs Math Operators in Reference

The doc is very good. Well above average for an open source project. I thought this might help some folks...

At...
http://paperjs.org/reference/point/#add-point

the example shows using the Math Operator, not the Math Operator Function. When one is converting from PaperScript to JavaScript this is important. I think line 3 of the example should read...

var result = point1.add( point2 );

instead of the current...

var result = point1 + point2;

Animations using js

Doesn't look like paper.js works with animation via JS. The onFrame below works as expected, using setInterval and rotate doesn't rotate. However, moving the mouse over the rect causes it to advance 3 degrees as long as the mouse is moving.

(I'm coming from snap.svg where rotations work as expected)

paper.install(window)
window.onload = function() {
paper.setup('myCanvas')
var rect = new Path.Rectangle([75,75], [100,100])
rect.strokeColor = 'black'

//view.onFrame = function(event) {
//    rect.rotate(3)
//}
setInterval(function(){
    rect.rotate(3)}, 500)

}

"Source" button does not work in Chromium

As title says, "Source" button in the examples doesn't work. Console shows this error:

"TypeError: Cannot read property 'on' of null
    at createPaperScript (http://paperjs.org/assets/js/scripts.js:435:14)
    at HTMLDivElement.<anonymous> (http://paperjs.org/assets/js/scripts.js:243:3)
    at Function.each (http://paperjs.org/assets/js/jquery.js:4:5347)
    at init.each (http://paperjs.org/assets/js/jquery.js:4:1999)
    at Object.behaviors.paperscript (http://paperjs.org/assets/js/scripts.js:242:28)
    at HTMLDocument.<anonymous> (http://paperjs.org/assets/js/scripts.js:531:15)
    at c (http://paperjs.org/assets/js/jquery.js:4:26051)
    at Object.fireWith [as resolveWith] (http://paperjs.org/assets/js/jquery.js:4:26856)
    at Function.ready (http://paperjs.org/assets/js/jquery.js:4:3305)
    at HTMLDocument.q (http://paperjs.org/assets/js/jquery.js:4:717)"

Version

Version 69.0.3497.92 (Developer Build) built on Debian buster/sid, running on Debian buster/sid (64-bit)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.