摘要:
先来看结果图(转.gif掉帧了): 完整源码分享网址: https://share.weiyun.com/Vpkp5KP3 1 首先初始化用到的所有图片: 1 const images = [ 2 "./img/girls.jpg", 3 "./img/ball.png", 4 "./img/wat 阅读全文
摘要:
1 import { Box, Matrix3, Vector2 } from './Utils.js'; 2 import { Shape, ShapeUtils, SplineCurve } from './TwoUtils.js'; 3 4 const BlendEquationAdd = [ 阅读全文
摘要:
依赖的类: 1 "use strict"; 2 3 var __emptyPoint = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "antiquewhite": "#fae 阅读全文
摘要:
心得: 写代码的人有多舒服, 运行代码的电脑就有多难受! 强类型语言与弱类型语言的区别就能很好的体现 现在的js的更新我个人没法理解,完全是奔着更多人去的 如果未来的某天go支持前端我会毫不犹豫的弃用js 我很欣赏go的创始人说的一句话: 建议go加一个三元判断语句! go回复:条件控制语句一个就够 阅读全文
摘要:
1 func absInt(x int) int { 2 if x < 0 { 3 return -x 4 } 5 return x 6 } 下面会用到此方法, int类型值取绝对值 1 type sp_item struct { 2 x int 3 y int 4 g int 5 h int 6 阅读全文
摘要:
index.html: 1 <!DOCTYPE html> 2 <html lang = "zh-cn"> 3 4 <head> 5 <title>testCanvas</title> 6 <meta charset = "utf-8" /> 7 <meta name="viewport" cont 阅读全文
摘要:
实现代码: 1 import { UTILS } from "./Utils.js"; 2 import { CanvasImageDraw, CanvasEvent, CanvasImageScroll, CanvasImageCustom } from "./ElementUtils.js"; 阅读全文
摘要:
依赖: 1 "use strict"; 2 3 var __emptyPoint = null, __emptyPointA = null, __emptyContext = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 阅读全文
摘要:
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 阅读全文
摘要:
1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
摘要:
1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
摘要:
1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
摘要:
1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
摘要:
1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
摘要:
1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
摘要:
1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 7 "ant 阅读全文
摘要:
前言: 为什么要用canvas渲染视频? 个人理解,不喜勿喷! 用来测试的视频是我在某个视频网站按F12偷来的(它们并不想用户下载视频), 所以用canvas渲染视频增加视频盗取的难度吧! H5的video控件太丑,不可自定义, 所以也可以用canvas创建自定义的视频控件 ... 创建 canva 阅读全文
摘要:
依赖内裤: 1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff", 阅读全文
摘要:
为什么要使用 easyjson 包: 因为解析json原生包用的是反射所以性能较差, 用 easyjson 比原生json包快好几倍 安装: cmd 输入下载代码 go get -u github.com/mailru/easyjson/ 坑(我的golang版本 go1.16.7 windows/ 阅读全文
摘要:
1 /* CanvasAnimateUI UI控件 2 依赖: 3 ImageViewer 4 MenuView 5 ColorTestViewer 6 7 注意: 8 传入的 .target 和 .data: CanvasUI不污染其内容(既只读), 所以可以重复利用; 9 一旦初始化完UI后(. 阅读全文