Skip to content

Commit 7b64622

Browse files
committed
begun work on vector
1 parent aa8ed00 commit 7b64622

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

resources/vector.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class vector {
2+
constructor(a_x=0,a_y=0,color=[1,1,1,1]) {
3+
4+
this.color = color;
5+
//coordinates for point a
6+
this.a_x = a_x;
7+
this.a_y = a_y;
8+
//coordinates for point b
9+
this.b_x = a_x; //b_x and b_y will be determined by user input, so they can just be made the same as point a by default
10+
this.b_y = a_y;
11+
}
12+
//what will my vector need
13+
14+
render() {
15+
//webgl stuff, may need to get some variables from the constructor when it's called in main
16+
}
17+
18+
}

0 commit comments

Comments
 (0)