Skip to content

Commit

Permalink
homepage and docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed Aug 6, 2018
1 parent 0972a64 commit af7ed56
Show file tree
Hide file tree
Showing 15 changed files with 184 additions and 147 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ npm run typings
npm run minify
```

---

### Contributing

We appreciate your support and feedbacks!

Please file issues if you find bugs and have feature requests. If you are able to send small PRs to improve Pts or fix bugs, that would be awesome too.

For larger PRs, please ping [@williamngan](https://twitter.com/williamngan) to discuss first.

---

### License
Expand Down
2 changes: 1 addition & 1 deletion assets/cover.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ window.demoDescription = "In a field of points that revolves around a center, dr
let lp = perpend( p );
var ratio = Math.min( 1, 1 - lp.$subtract(p).magnitude()/(space.size.x/2) );
form.stroke(`rgba(255,255,255,${ratio}`, ratio*2).line( [ p, lp ] );
form.fillOnly( ["#f03", "#09f", "#0c6"][i%3] ).point( p, 1 );
form.fillOnly( ["#f03", "#09f", "#0c6"][i%3] ).point( p, 1.5, "circle" );
});

// header position
Expand Down
Binary file added assets/feature1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/feature2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/feature3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/feature4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,41 @@ html * {
display: inline-block;
}


.feature-block {
column-count: 4;
height: 450px;
column-gap: 1px;
margin: 100px 0px;

}

.feature-block .feature {
display: inline-block;
height: 450px;
padding: 0;
position: relative;

}

.feature-block .image {
display: block;
width: 100%;
height: 300px;
background-size: cover;
}

.feature-block .usage{
color: #345;
padding: 20px 20px 20px 20px;
font-size: 1.3em;
text-align: left;
}

.feature-block .cta-link {
margin-top: 15px;
}

.block h3 {
font-size: 2.1em;
color: #345;
Expand Down
2 changes: 1 addition & 1 deletion demo/pts.quickStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ window.demoDescription = "An example of using quickStart function to create this
// Pts.quickStart instantiates a CanvasSapce and CanvasForm and put the respective "space" and "form" variables into global scope and bind mouse and touch events.
// It returns a function where you can init with callback functions ( animateFn, startFn, actionFn, resizeFn )
// See guides for more details: https://ptsjs.org/guide/Get-started-0100.html
var run = Pts.quickStart( "pt", "#f00" );
var run = Pts.quickStart( "pt", "#f03" );

// Pass an animate callback function to run
run( ( time, ftime ) => {
Expand Down
42 changes: 16 additions & 26 deletions docs/json/class/Canvas_CanvasForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
"source": [
[
"Form.ts",
160,
166,
9
]
],
Expand Down Expand Up @@ -366,23 +366,18 @@
"inherits": "VisualForm.fillOnly",
"signatures": [
{
"comment": "Set current fill style and remove stroke style.",
"comment": "Set current fill style and remove stroke style. (not implemented here -- to be implemented in subclasses).",
"returns": "this",
"returns_comment": false,
"parameters": [
{
"name": "c",
"comment": "fill color which can be as color, gradient, or pattern. (See [canvas documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle))\n",
"comment": "fill color as string or `false` to specify transparent.\n",
"type": "string | boolean",
"default": false
}
],
"tags": [
{
"tag": "example",
"text": "`form.fillOnly(\"#F90\")`, `form.fillOnly(\"rgba(0,0,0,.5\")`"
}
]
"tags": []
}
]
},
Expand Down Expand Up @@ -582,7 +577,7 @@
"source": [
[
"Form.ts",
196,
202,
7
]
],
Expand Down Expand Up @@ -743,7 +738,7 @@
"source": [
[
"Form.ts",
138,
144,
8
]
],
Expand Down Expand Up @@ -815,7 +810,7 @@
"source": [
[
"Form.ts",
212,
218,
10
]
],
Expand Down Expand Up @@ -875,7 +870,7 @@
"source": [
[
"Form.ts",
229,
235,
7
]
],
Expand Down Expand Up @@ -994,7 +989,7 @@
"source": [
[
"Form.ts",
169,
175,
9
]
],
Expand Down Expand Up @@ -1077,7 +1072,7 @@
"source": [
[
"Form.ts",
117,
123,
12
]
],
Expand All @@ -1087,41 +1082,36 @@
"inherits": "VisualForm.strokeOnly",
"signatures": [
{
"comment": "Set current stroke style and remove fill style.",
"comment": "Set stroke style and remove fill style. (not implemented here -- to be implemented in subclasses).",
"returns": "this",
"returns_comment": false,
"parameters": [
{
"name": "c",
"comment": "stroke color which can be as color, gradient, or pattern. (See [canvas documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeStyle)\n",
"comment": "stroke color as string or `false` to specify transparent.",
"type": "string | boolean",
"default": false
},
{
"name": "width",
"comment": "",
"comment": "Optional value (can be floating point) to set line width",
"type": "number",
"default": false
},
{
"name": "linejoin",
"comment": "",
"comment": "Optional string to set line joint style. Can be \"miter\", \"bevel\", or \"round\".",
"type": "string",
"default": false
},
{
"name": "linecap",
"comment": "",
"comment": "Optional string to set line cap style. Can be \"butt\", \"round\", or \"square\".\n",
"type": "string",
"default": false
}
],
"tags": [
{
"tag": "example",
"text": "`form.strokeOnly(\"#F90\")`, `form.strokeOnly(\"#000\", 0.5, 'round', 'square')`"
}
]
"tags": []
}
]
},
Expand Down
42 changes: 16 additions & 26 deletions docs/json/class/Dom_HTMLForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
"source": [
[
"Form.ts",
160,
166,
9
]
],
Expand Down Expand Up @@ -370,23 +370,18 @@
"inherits": "VisualForm.fillOnly",
"signatures": [
{
"comment": "Set current fill style and remove stroke style.",
"comment": "Set current fill style and remove stroke style. (not implemented here -- to be implemented in subclasses).",
"returns": "this",
"returns_comment": false,
"parameters": [
{
"name": "c",
"comment": "fill color which can be as color, gradient, or pattern. (See [canvas documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle))\n",
"comment": "fill color as string or `false` to specify transparent.\n",
"type": "string | boolean",
"default": false
}
],
"tags": [
{
"tag": "example",
"text": "`form.fillOnly(\"#F90\")`, `form.fillOnly(\"rgba(0,0,0,.5\")`"
}
]
"tags": []
}
]
},
Expand Down Expand Up @@ -519,7 +514,7 @@
"source": [
[
"Form.ts",
196,
202,
7
]
],
Expand Down Expand Up @@ -649,7 +644,7 @@
"source": [
[
"Form.ts",
138,
144,
8
]
],
Expand Down Expand Up @@ -721,7 +716,7 @@
"source": [
[
"Form.ts",
212,
218,
10
]
],
Expand Down Expand Up @@ -781,7 +776,7 @@
"source": [
[
"Form.ts",
229,
235,
7
]
],
Expand Down Expand Up @@ -900,7 +895,7 @@
"source": [
[
"Form.ts",
169,
175,
9
]
],
Expand Down Expand Up @@ -983,7 +978,7 @@
"source": [
[
"Form.ts",
117,
123,
12
]
],
Expand All @@ -993,41 +988,36 @@
"inherits": "VisualForm.strokeOnly",
"signatures": [
{
"comment": "Set current stroke style and remove fill style.",
"comment": "Set stroke style and remove fill style. (not implemented here -- to be implemented in subclasses).",
"returns": "this",
"returns_comment": false,
"parameters": [
{
"name": "c",
"comment": "stroke color which can be as color, gradient, or pattern. (See [canvas documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeStyle)\n",
"comment": "stroke color as string or `false` to specify transparent.",
"type": "string | boolean",
"default": false
},
{
"name": "width",
"comment": "",
"comment": "Optional value (can be floating point) to set line width",
"type": "number",
"default": false
},
{
"name": "linejoin",
"comment": "",
"comment": "Optional string to set line joint style. Can be \"miter\", \"bevel\", or \"round\".",
"type": "string",
"default": false
},
{
"name": "linecap",
"comment": "",
"comment": "Optional string to set line cap style. Can be \"butt\", \"round\", or \"square\".\n",
"type": "string",
"default": false
}
],
"tags": [
{
"tag": "example",
"text": "`form.strokeOnly(\"#F90\")`, `form.strokeOnly(\"#000\", 0.5, 'round', 'square')`"
}
]
"tags": []
}
]
},
Expand Down
Loading

0 comments on commit af7ed56

Please sign in to comment.