current location: Home > Download > JS effects > jQuery effects > html5 canvas animated scene of seaweed and water plants bubbling on the bottom of the sea
html5 canvas animated scene of seaweed and water plants bubbling on the bottom of the sea
Classify: JS effects / jQuery effects | Release time: 2018-05-21 | visits: 1252 |
Download: 41 |
Latest Downloads
Fantasy Aquarium
Girls Frontline
Wings of Stars
Little Flower Fairy Fairy Paradise
Restaurant Cute Story
Shanhe Travel Exploration
Love and Producer
The most powerful brain 3
Odd Dust: Damila
Young Journey to the West 2
24 HoursReading Leaderboard
- 1 Lambda function with GraalVM Native Image - Part easuring cold and warm starts using different Lambda memory settings
- 2 How to Count Rows in a Go Database?
- 3 WHAT A DRAG...
- 4 How do you pass parameters to Java threads?
- 5 How can Prepared Statements Enhance Database Security in MySQL?
- 6 How to Decode []byte as Strings in Go JSON?
- 7 Dragon Age: The Veilguard - How To Solve The Dellamorte Estate Puzzle
- 8 How to Retrieve Data from Dynamically Specified Tables in Stored Procedures?
- 9 How can I group a multidimensional array by multiple column values and sum another column's values?
- 10 How to Insert and Select PostGIS Geometry Types with Gorm and EWKB?
- 11 How to Create Clean URLs with .htaccess?
- 12 Why Doesn't Directly Appending to a Slice in a Go Map Work as Expected?
- 13 What Happens When You Delete a Parent Row in MySQL? Understanding ON DELETE Behavior and Default Options.
- 14 dpvacm.dll - What is dpvacm.dll?
- 15 Why Am I Getting "Undefined Reference to `WinMain'" When Using wWinMain with MinGW?
Latest Tutorials
-
- Go language practical GraphQL
- 1966 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 3387 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 1779 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 2596 2024-03-29
代码片段:
Stem.prototype.draw = function(ctx) {
var len, ctrlPoint, point;
len = this.points.length - 1;
ctrlPoint = {x: 0, y: 0};
ctx.save();
ctx.strokeStyle = this.color;
ctx.beginPath();
ctx.moveTo(this.points[this.points.length - 1].x, this.points[this.points.length - 1].y);
for (var i = len; i >= 1; i--) {
point = this.points[i];
ctrlPoint.x = (point.x + this.points[i - 1].x) / 2;
ctrlPoint.y = (point.y + this.points[i - 1].y) / 2;
ctx.quadraticCurveTo(point.x, point.y, ctrlPoint.x, ctrlPoint.y);
ctx.lineWidth = i * 1.1;
ctx.stroke();
ctx.fillStyle = 'red';
}
ctx.restore();
}