随笔分类 - html
学习
摘要: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
阅读全文
摘要:实现代码: 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 "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
阅读全文
摘要:废话在后文讲, 具体的 javascript 实现代码: 1 /* 把 target 以相等的比例缩放至 result 大小 2 target, result: Object{width, height}; //也可以是img元素 3 */ 4 setSizeToSameScale(target,
阅读全文
摘要:依赖内裤: 1 "use strict"; 2 3 var __emptyPoint = null, __emptyContext = null, __emptyPointA = null; 4 5 const ColorRefTable = { 6 "aliceblue": "#f0f8ff",
阅读全文
摘要:数组的内容: 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
阅读全文
摘要:1 /* SeekPath A*寻路 2 3 parameter: 4 option: Object{ 5 angle, timeout, maxHeight, size, lenX, lenY 6 } 7 8 heights: Array[Number] 9 10 attribute: 11 si
阅读全文
摘要:1 /* CanvasAnimateUI UI控件 2 依赖: 3 ImageViewer 4 MenuView 5 ColorTestViewer 6 7 注意: 8 传入的 .target 和 .data: CanvasUI不污染其内容(既只读), 所以可以重复利用; 9 一旦初始化完UI后(.
阅读全文
摘要:1 /* ImageViewer 图片查看器 2 3 parameter: 4 option: Object; 5 6 attribute: 7 image: CanvasImage; 8 scale: Number; //小于1缩小, 大于1放大 9 10 method: 11 center():
阅读全文
摘要:1 /* ColorTestViewer 颜色调试器 2 3 attribute: 4 onchange: Function; //颜色改变回调; 默认null 5 6 //以下属性不建议直接修改 7 rgb: RGBColor; //rgb模式颜色 8 hsv: Object{h,s,v}; //
阅读全文
摘要:1 <!DOCTYPE html> 2 <html lang = "zh-cmn-Hans"> 3 4 <head> 5 <title>MyGame</title> 6 <meta charset = "utf-8" /> 7 <script src = "./js/Utils.js" type =
阅读全文
摘要:1 搭建服务器 1 package index 2 3 import ( 4 "log" 5 "net/http" 6 7 "2021.6.28_WebServer_email.go/lib/utils" 8 ) 9 10 const ( 11 path = "json/users.json" 12
阅读全文