memononen / stylii Goto Github PK
View Code? Open in Web Editor NEWexperiment in paper.js
License: zlib License
experiment in paper.js
License: zlib License
var drawingArea = new paper.Path.Rectangle(new paper.Point(100, 100), materialWidth,materialHeight);
drawingArea.strokeColor ='black';
//Lock the drawing area so it doesn't respond to hit events. Also excluded from the intersection test in editor.js
drawingArea.locked=true;
drawingArea.name = "drawingArea";
Hi Mikko. The above shape is drawn automatically when the editor fires up. Unfortunately when I click undo it dissapears which is something I would rather not happen. Is there any way to prevent this from happening?
Hi, I use paperjs 0.9.25 in your example and I am not able to paste things. Do you know what I need to change so as it can work with 0.9.25?
Thanks
It would be lovely to have a switch that allows the Pen tool tip to snap to an invinsible grid(if close enough).
If I were to implement something like that, which parts of the code should I watch out for?
I have tried to integrate the functions from the grid Example in paper.js docs to no avail.
PS: I would like to mark some of the issues I pass here as questions so they don't show up as bugs but since you are the owner of Stylii I cannot do that.
When trying to add a segment to a pre-existing path the console produces the error ''Segment is not defined''.
I can't seem to grasp what is wrong, but i have a feeling that it should be something trivial.
Any ideas Mikko?
Hi Miko,
I would like to select the first element that was picked using the selection tool(either Shift+Click, or dragging a selection box).
If it's Shift+Click its the first selected element
If its selectionBox, the first hit result of the selection box.
Is it possible to get this?
I've tried this:
clipboard = captureSelectionState();
var selected = paper.project.selectedItems;
var firstSelected=selected[0];
but this doesn't return what i need. (it returns the first-drawn item instead of the first selected)
Any ideas ?
When the user clicks on a tool to activate it doesn't get activated instantly.
Instead it is activated only when the mouse moves 1px in any direction or a keypress is made. A click must be made first on the tool however.
This is a very strange error that probably has something to do with Paper.js itself.
If we start drawing a path with a quadratic (hold + drag), when we try to close the path (by naturally clicking on the first placed node, that node becomes a line segment thus destroying the original first quadratic.
Is this the expected behavior in CAD programs or is this a bug?
EDIT:
This affects Chrome Canary/FF but it seems that IE11 is just fine for some strange reason.
One of the most important stuff i have going on in my Stylii fork is the ability of the user to add opacity to the paths.
When i give opacity to the paths and i pan/zoom, the path fill appears at an offset from the strokes.
The other issues are still difficult for me to solve but i usually find a way to either solve them or hack around them(i am very novice in coding).
This one has been driving me nuts from the beginning.
Any help here?
I attach a picture where i gave opacity to my path and then panned around
Hi, do you have a specific license for this repo?
Well, I did refrain from asking too many questions in the days that passed:) Until now.
Having many items with a large segment count degrades performance a lot, as it was expected.
Do you have any tips as to how performance could be improved in Stylii?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.