随笔分类 -  javascript

学习笔记
摘要:先来看结果图(转.gif掉帧了): 完整源码分享网址: https://share.weiyun.com/Vpkp5KP3 1 首先初始化用到的所有图片: 1 const images = [ 2 "./img/girls.jpg", 3 "./img/ball.png", 4 "./img/wat 阅读全文
posted @ 2024-08-03 00:41 鸡儿er 阅读(231) 评论(0) 推荐(0) 编辑
摘要:1 import { Box, Matrix3, Vector2 } from './Utils.js'; 2 import { Shape, ShapeUtils, SplineCurve } from './TwoUtils.js'; 3 4 const BlendEquationAdd = [ 阅读全文
posted @ 2024-07-30 20:02 鸡儿er 阅读(50) 评论(0) 推荐(0) 编辑
摘要:依赖的类: 1 "use strict"; 2 3 var __emptyPoint = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "antiquewhite": "#fae 阅读全文
posted @ 2023-03-05 20:24 鸡儿er 阅读(159) 评论(0) 推荐(0) 编辑
摘要:心得: 写代码的人有多舒服, 运行代码的电脑就有多难受! 强类型语言与弱类型语言的区别就能很好的体现 现在的js的更新我个人没法理解,完全是奔着更多人去的 如果未来的某天go支持前端我会毫不犹豫的弃用js 我很欣赏go的创始人说的一句话: 建议go加一个三元判断语句! go回复:条件控制语句一个就够 阅读全文
posted @ 2023-02-27 22:24 鸡儿er 阅读(117) 评论(0) 推荐(0) 编辑
摘要:实现代码: 1 import { UTILS } from "./Utils.js"; 2 import { CanvasImageDraw, CanvasEvent, CanvasImageScroll, CanvasImageCustom } from "./ElementUtils.js"; 阅读全文
posted @ 2023-02-04 20:49 鸡儿er 阅读(101) 评论(0) 推荐(0) 编辑
摘要:依赖: 1 "use strict"; 2 3 var __emptyPoint = null, __emptyPointA = null, __emptyContext = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 阅读全文
posted @ 2023-02-03 17:42 鸡儿er 阅读(10) 评论(0) 推荐(0) 编辑
摘要:1 /* Point 2 parameter: 3 x = 0, y = 0; 4 5 attribute 6 x, y: Number; 7 8 method: 9 set(x, y): this; 10 angle(origin): Number; 11 copy(point): this; 1 阅读全文
posted @ 2022-10-20 21:15 鸡儿er 阅读(30) 评论(0) 推荐(0) 编辑
摘要:1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
posted @ 2022-10-04 01:12 鸡儿er 阅读(38) 评论(0) 推荐(0) 编辑
摘要:1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
posted @ 2022-10-02 17:33 鸡儿er 阅读(72) 评论(0) 推荐(0) 编辑
摘要:1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
posted @ 2022-09-29 10:54 鸡儿er 阅读(117) 评论(0) 推荐(0) 编辑
摘要:1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
posted @ 2022-09-20 15:56 鸡儿er 阅读(29) 评论(0) 推荐(0) 编辑
摘要:1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
posted @ 2022-09-18 08:00 鸡儿er 阅读(37) 评论(0) 推荐(0) 编辑
摘要:1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
posted @ 2022-09-14 15:38 鸡儿er 阅读(116) 评论(0) 推荐(0) 编辑
摘要:1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
posted @ 2022-09-10 07:36 鸡儿er 阅读(35) 评论(0) 推荐(0) 编辑
摘要:前言: 为什么要用canvas渲染视频? 个人理解,不喜勿喷! 用来测试的视频是我在某个视频网站按F12偷来的(它们并不想用户下载视频), 所以用canvas渲染视频增加视频盗取的难度吧! H5的video控件太丑,不可自定义, 所以也可以用canvas创建自定义的视频控件 ... 创建 canva 阅读全文
posted @ 2022-09-09 21:16 鸡儿er 阅读(1525) 评论(0) 推荐(0) 编辑
摘要:废话在后文讲, 具体的 javascript 实现代码: 1 /* 把 target 以相等的比例缩放至 result 大小 2 target, result: Object{width, height}; //也可以是img元素 3 */ 4 setSizeToSameScale(target, 阅读全文
posted @ 2022-09-09 19:01 鸡儿er 阅读(222) 评论(0) 推荐(0) 编辑
摘要:依赖内裤: 1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 阅读全文
posted @ 2022-09-07 21:05 鸡儿er 阅读(205) 评论(0) 推荐(0) 编辑
摘要:↑ 测试图 依赖类: 1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8 阅读全文
posted @ 2022-09-05 19:53 鸡儿er 阅读(213) 评论(0) 推荐(0) 编辑
摘要:数组的内容: data.length: w * h * 4 r: 0 - 255 g: 0 - 255 b: 0 - 255 a: 0 - 255 Math.round(255 * a) 数组遍历: const data = context.getImageData(0, 0, canvas.wid 阅读全文
posted @ 2022-09-03 14:04 鸡儿er 阅读(72) 评论(0) 推荐(0) 编辑
摘要:"use strict"; var __emptyPoint = null, __emptyContext = null; const ColorRefTable = [ ['aliceblue','#f0f8ff'], ['antiquewhite','#faebd7'], ['aqua','#0 阅读全文
posted @ 2022-09-02 23:00 鸡儿er 阅读(42) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示