Introduction

9 views
Skip to first unread message

Noah Vawter

unread,
Feb 16, 2010, 4:29:05 AM2/16/10
to jsvectoreditor

Hello, everyone.

I'm new. I'm glad I stumbled onto this little project. It looks like
it's off to a good start.

I'm currently a Ph.D. student, researching electronic musical
instruments with built-in electrical generators. As part of the
project, I am curious about browser-based (online and offline) musical
instrument design applications. Your program seems to strike me as
similar to CAD programs like xfig, Illustrator, MAX/MSP, CorelDraw,
etc.

I'm not very experienced with Javascript, but I am interested in
developing JSVE further. Specifically, I'd like to add an "Info"
window like Info(F10) in PhotoShop, or the coords in CorelDraw.

BTW, here is my project's wiki http://exertion.pbworks.com/ and

Here's sneak preview of what I have so far:
http://exertion.pbworks.com/f/1266312338/CoordinateDemo.png

Kevin

unread,
Feb 16, 2010, 8:17:23 AM2/16/10
to jsvecto...@googlegroups.com
That's really cool!

charles thomas

unread,
Feb 16, 2010, 8:52:22 AM2/16/10
to jsvecto...@googlegroups.com
Hi

you want to make you application sensitive to keystrokes..

function changeKey(which, to){
    switch (which){
        case 65:case 37: key[0]=to; break; // 'traps ASCII A & Left arrow key
        case 87: case 38: key[2]=to; break; // up
        case 68: case 39: key[1]=to; break; // right
        case 83: case 40: key[3]=to; break;// down
    }
}

document.onkeydown=function(e){changeKey((e||window.event).keyCode, 1);};
document.onkeyup=function(e){changeKey((e||window.event).keyCode, 0);};

Regards Charles.

--- On Tue, 2/16/10, Kevin <antima...@gmail.com> wrote:


The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free!

Noah Vawter

unread,
Feb 16, 2010, 12:08:29 PM2/16/10
to jsvecto...@googlegroups.com
That is awesome, Charles.  BTW, do you know how to detect shifted cursor keys?

charles thomas

unread,
Feb 16, 2010, 1:38:29 PM2/16/10
to jsvecto...@googlegroups.com
Noah,

You can probably trap the keycode you want by playing with the keyboard and this script:
http://javascript.internet.com/miscellaneous/ascii-character-code.html

Regards Charles http://www.irunmywebsite.com/

--- On Tue, 2/16/10, Noah Vawter <nva...@media.mit.edu> wrote:


Looking for the perfect gift? Give the gift of Flickr!

Kevin

unread,
Feb 16, 2010, 4:49:20 PM2/16/10
to jsvecto...@googlegroups.com
The event object normally includes a .shiftKey part,

document.onkeydown=function(e){changeKey((e||window.event).keyCode, 1, (e||window.event));};
document.onkeyup=function(e){changeKey((e||window.event).keyCode, 0, (e||window.event));};

function changeKey(which, to, event){
  if(event.shiftKey){
//shifted stuff

Noah Vawter

unread,
Feb 17, 2010, 9:55:24 PM2/17/10
to jsvecto...@googlegroups.com

Hello, everyone. 
Here are my diffs and editor.js for a basic implementation of drawing objects' position and size.  I understand my code may be overly simplistic, but if you would please consider including it, then I will continue to streamline it.

In particular, I would like to add angle of rotation to the display, but please help me understand: is this not currently tracked in the object properties?   I just wanted to make sure before I started adding it.
(also, I would like make it reflect the object properties rather than its bounding box, but we'll get there one step at a time)

great project guys, epic potential!  

Sincerely,
Noah




diff.txt
editor.js
CoordinateDemo 02.tiff

Kevin

unread,
Feb 17, 2010, 10:23:22 PM2/17/10
to jsvecto...@googlegroups.com
You can look at the underlying graphics library, raphael: http://raphaeljs.com/reference.html#attr

The rotation is accessible through .attr('rotation')

Does anyone want commit access? I don't really have the time to really do much more to improve the app.

Noah Vawter

unread,
Feb 18, 2010, 12:11:40 AM2/18/10
to jsvecto...@googlegroups.com

Yes please, Kevin, what would be very nice of you.

Thank you.

Sincerely,
Noah

charles thomas

unread,
Feb 18, 2010, 11:17:39 AM2/18/10
to jsvecto...@googlegroups.com
Noah

I'm thinking you need to understand the transformation aspect of SVG.

The most complex of which is transform Matrix.

Here is a URL to study...

http://www.w3.org/TR/SVG/coords.html#TransformAttribute

It's about performing all transforms using SVG Matrix math.

Sometimes simpler transforms can be used and sometimes the transforms affect a group rather than an individual object.

Regards Charles


--- On Wed, 2/17/10, Noah Vawter <nva...@media.mit.edu> wrote:

From: Noah Vawter <nva...@media.mit.edu>
Subject: Re: Introduction
To: jsvecto...@googlegroups.com
On Feb 16, 2010, at 8:17 AM, Kevin wrote:

That's really cool!

On Tue, Feb 16, 2010 at 4:29 AM, Noah Vawter <nva...@media.mit.edu> wrote:

Hello, everyone.

I'm new.  I'm glad I stumbled onto this little project.  It looks like
it's off to a good start.

I'm currently a Ph.D. student, researching electronic musical
instruments with built-in electrical generators.  As part of the
project, I am curious about browser-based (online and offline) musical
instrument design applications.  Your program seems to strike me as
similar to CAD programs like xfig, Illustrator, MAX/MSP, CorelDraw,
etc.

I'm not very experienced with Javascript, but I am interested in
developing JSVE further.  Specifically, I'd like to add an "Info"
window like  Info(F10) in PhotoShop, or the coords in CorelDraw.

BTW, here is my project's wiki http://exertion.pbworks.com/ and

Here's sneak preview of what I have so far:
http://exertion.pbworks.com/f/1266312338/CoordinateDemo.png




Get the name you've always wanted ! @ymail.com or @rocketmail.com.
Reply all
Reply to author
Forward
0 new messages