vislite 0.5.2-alpha.0 → 0.5.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG +7 -1
- package/lib/Buffer/index.umd.js +55 -0
- package/lib/Buffer/index.umd.min.js +11 -0
- package/lib/Canvas/index.umd.js +721 -0
- package/lib/Canvas/index.umd.min.js +11 -0
- package/lib/Cardinal/index.umd.js +112 -0
- package/lib/Cardinal/index.umd.min.js +11 -0
- package/lib/Eoap/index.umd.js +53 -0
- package/lib/Eoap/index.umd.min.js +11 -0
- package/lib/Geometry/index.umd.js +205 -0
- package/lib/Geometry/index.umd.min.js +11 -0
- package/lib/Hermite/index.umd.js +55 -0
- package/lib/Hermite/index.umd.min.js +11 -0
- package/lib/Matrix4/index.umd.js +146 -0
- package/lib/Matrix4/index.umd.min.js +11 -0
- package/lib/Mercator/index.umd.js +39 -0
- package/lib/Mercator/index.umd.min.js +11 -0
- package/lib/OralCanvas/index.es.js +657 -0
- package/lib/OralCanvas/index.es.min.js +11 -0
- package/lib/OralWebGL/index.es.js +611 -0
- package/lib/OralWebGL/index.es.min.js +11 -0
- package/lib/SVG/index.umd.js +540 -0
- package/lib/SVG/index.umd.min.js +11 -0
- package/lib/Shader/index.umd.js +134 -0
- package/lib/Shader/index.umd.min.js +11 -0
- package/lib/Texture/index.umd.js +72 -0
- package/lib/Texture/index.umd.min.js +11 -0
- package/lib/TreeLayout/index.umd.js +430 -0
- package/lib/TreeLayout/index.umd.min.js +11 -0
- package/lib/WebGL/index.umd.js +684 -0
- package/lib/WebGL/index.umd.min.js +11 -0
- package/lib/animation/index.umd.js +91 -0
- package/lib/animation/index.umd.min.js +11 -0
- package/lib/formatColor/index.umd.js +59 -0
- package/lib/formatColor/index.umd.min.js +11 -0
- package/lib/getLoopColors/index.umd.js +55 -0
- package/lib/getLoopColors/index.umd.min.js +11 -0
- package/lib/getWebGLContext/index.umd.js +65 -0
- package/lib/getWebGLContext/index.umd.min.js +11 -0
- package/lib/index.umd.js +2916 -0
- package/lib/index.umd.min.js +11 -0
- package/lib/move/index.umd.js +27 -0
- package/lib/move/index.umd.min.js +11 -0
- package/lib/resizeObserver/index.umd.js +48 -0
- package/lib/resizeObserver/index.umd.min.js +11 -0
- package/lib/rotate/index.umd.js +27 -0
- package/lib/rotate/index.umd.min.js +11 -0
- package/lib/ruler/index.umd.js +145 -0
- package/lib/ruler/index.umd.min.js +11 -0
- package/lib/scale/index.umd.js +26 -0
- package/lib/scale/index.umd.min.js +11 -0
- package/lib/throttle/index.umd.js +70 -0
- package/lib/throttle/index.umd.min.js +11 -0
- package/lib/viewHandler/index.umd.js +139 -0
- package/lib/viewHandler/index.umd.min.js +11 -0
- package/package/index.ts +4 -0
- package/package/move/index.ts +3 -0
- package/package/scale/index.ts +3 -0
- package/package.json +1 -1
- package/src/common/svg/config.ts +157 -145
- package/src/common/svg/gradient.ts +63 -0
- package/src/common/svg/index.ts +12 -0
- package/src/move.ts +8 -0
- package/src/scale.ts +7 -0
- package/types/Canvas.d.ts +2 -2
- package/types/Gradient.d.ts +2 -2
- package/types/SVG.d.ts +23 -0
- package/types/index.d.ts +6 -0
- package/types/move.d.ts +3 -0
- package/types/scale.d.ts +3 -0
package/CHANGELOG
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* VISLite JavaScript Library v0.5.2-alpha.2
|
|
3
|
+
* git+https://github.com/oi-contrib/VISLite.git
|
|
4
|
+
*
|
|
5
|
+
* Copyright zxl20070701
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
* https://zxl20070701.github.io/notebook/home.html
|
|
8
|
+
*
|
|
9
|
+
* Publish Date: Mon Oct 23 2023 22:21:10 GMT+0800 (中国标准时间)
|
|
10
|
+
*/
|
|
11
|
+
(function (global, factory) {
|
|
12
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
13
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
|
14
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.VISLite_Buffer = factory());
|
|
15
|
+
})(this, (function () { 'use strict';
|
|
16
|
+
|
|
17
|
+
var newBuffer = function (painter) {
|
|
18
|
+
return painter.createBuffer();
|
|
19
|
+
};
|
|
20
|
+
var writeBuffer = function (painter, data, isElement, usage) {
|
|
21
|
+
var TYPE = isElement ? painter.ELEMENT_ARRAY_BUFFER : painter.ARRAY_BUFFER;
|
|
22
|
+
painter.bufferData(TYPE, data, usage);
|
|
23
|
+
};
|
|
24
|
+
var useBuffer = function (painter, location, size, type, stride, offset, normalized) {
|
|
25
|
+
painter.vertexAttribPointer(location, size, type, normalized, stride, offset);
|
|
26
|
+
painter.enableVertexAttribArray(location);
|
|
27
|
+
};
|
|
28
|
+
var BufferObject = (function () {
|
|
29
|
+
function BufferObject(painter, isElement) {
|
|
30
|
+
if (isElement === void 0) { isElement = false; }
|
|
31
|
+
this.__painter = painter;
|
|
32
|
+
this.__isElement = isElement;
|
|
33
|
+
this.__buffer = newBuffer(painter);
|
|
34
|
+
this.__type = isElement ? painter.ELEMENT_ARRAY_BUFFER : painter.ARRAY_BUFFER;
|
|
35
|
+
}
|
|
36
|
+
BufferObject.prototype.use = function () {
|
|
37
|
+
this.__painter.bindBuffer(this.__type, this.__buffer);
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
BufferObject.prototype.write = function (data) {
|
|
41
|
+
writeBuffer(this.__painter, data, this.__isElement, this.__painter.STATIC_DRAW);
|
|
42
|
+
this.__fsize = data.BYTES_PER_ELEMENT;
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
BufferObject.prototype.divide = function (location, size, stride, offset) {
|
|
46
|
+
if (offset === void 0) { offset = 0; }
|
|
47
|
+
useBuffer(this.__painter, location, size, this.__painter.FLOAT, stride * this.__fsize, offset * this.__fsize, false);
|
|
48
|
+
return this;
|
|
49
|
+
};
|
|
50
|
+
return BufferObject;
|
|
51
|
+
}());
|
|
52
|
+
|
|
53
|
+
return BufferObject;
|
|
54
|
+
|
|
55
|
+
}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* VISLite JavaScript Library v0.5.2-alpha.2
|
|
3
|
+
* git+https://github.com/oi-contrib/VISLite.git
|
|
4
|
+
*
|
|
5
|
+
* Copyright zxl20070701
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
* https://zxl20070701.github.io/notebook/home.html
|
|
8
|
+
*
|
|
9
|
+
* Publish Date: Mon Oct 23 2023 22:21:10 GMT+0800 (中国标准时间)
|
|
10
|
+
*/
|
|
11
|
+
var t,e;t=this,e=function(){"use strict";return function(){function t(t,e){void 0===e&&(e=!1),this.__painter=t,this.__isElement=e,this.__buffer=function(t){return t.createBuffer()}(t),this.__type=e?t.ELEMENT_ARRAY_BUFFER:t.ARRAY_BUFFER}return t.prototype.use=function(){return this.__painter.bindBuffer(this.__type,this.__buffer),this},t.prototype.write=function(t){return function(t,e,i,n){var r=i?t.ELEMENT_ARRAY_BUFFER:t.ARRAY_BUFFER;t.bufferData(r,e,n)}(this.__painter,t,this.__isElement,this.__painter.STATIC_DRAW),this.__fsize=t.BYTES_PER_ELEMENT,this},t.prototype.divide=function(t,e,i,n){return void 0===n&&(n=0),function(t,e,i,n,r,_,f){t.vertexAttribPointer(e,i,n,f,r,_),t.enableVertexAttribArray(e)}(this.__painter,t,e,this.__painter.FLOAT,i*this.__fsize,n*this.__fsize,!1),this},t}()},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).VISLite_Buffer=e();
|