vislite 0.6.0 → 0.7.0
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 +15 -1
- package/README.md +24 -5
- package/lib/Buffer/index.umd.js +2 -2
- package/lib/Buffer/index.umd.min.js +2 -2
- package/lib/Canvas/index.umd.js +4 -4
- package/lib/Canvas/index.umd.min.js +3 -3
- package/lib/Cardinal/index.umd.js +2 -2
- package/lib/Cardinal/index.umd.min.js +2 -2
- package/lib/Eoap/index.umd.js +2 -2
- package/lib/Eoap/index.umd.min.js +2 -2
- package/lib/Geometry/index.umd.js +69 -8
- package/lib/Geometry/index.umd.min.js +3 -3
- package/lib/Hermite/index.umd.js +2 -2
- package/lib/Hermite/index.umd.min.js +2 -2
- package/lib/Matrix4/index.umd.js +2 -2
- package/lib/Matrix4/index.umd.min.js +2 -2
- package/lib/Mercator/index.umd.js +2 -2
- package/lib/Mercator/index.umd.min.js +2 -2
- package/lib/OralCanvas/index.es.js +3 -3
- package/lib/OralCanvas/index.es.min.js +3 -3
- package/lib/OralWebGL/index.es.js +21 -18
- package/lib/OralWebGL/index.es.min.js +3 -3
- package/lib/SVG/index.umd.js +2 -2
- package/lib/SVG/index.umd.min.js +2 -2
- package/lib/Shader/index.umd.js +3 -2
- package/lib/Shader/index.umd.min.js +3 -3
- package/lib/Texture/index.umd.js +2 -2
- package/lib/Texture/index.umd.min.js +2 -2
- package/lib/TreeLayout/index.umd.js +13 -11
- package/lib/TreeLayout/index.umd.min.js +3 -3
- package/lib/WebGL/index.umd.js +22 -19
- package/lib/WebGL/index.umd.min.js +3 -3
- package/lib/animation/index.umd.js +2 -2
- package/lib/animation/index.umd.min.js +2 -2
- package/lib/formatColor/index.umd.js +2 -2
- package/lib/formatColor/index.umd.min.js +2 -2
- package/lib/getLoopColors/index.umd.js +2 -2
- package/lib/getLoopColors/index.umd.min.js +2 -2
- package/lib/getWebGLContext/index.umd.js +4 -4
- package/lib/getWebGLContext/index.umd.min.js +3 -3
- package/lib/index.umd.js +104 -38
- package/lib/index.umd.min.js +3 -3
- package/lib/move/index.umd.js +2 -2
- package/lib/move/index.umd.min.js +2 -2
- package/lib/resizeObserver/index.umd.js +2 -2
- package/lib/resizeObserver/index.umd.min.js +2 -2
- package/lib/rotate/index.umd.js +2 -2
- package/lib/rotate/index.umd.min.js +2 -2
- package/lib/ruler/index.umd.js +4 -4
- package/lib/ruler/index.umd.min.js +3 -3
- package/lib/scale/index.umd.js +2 -2
- package/lib/scale/index.umd.min.js +2 -2
- package/lib/throttle/index.umd.js +2 -2
- package/lib/throttle/index.umd.min.js +2 -2
- package/lib/viewHandler/index.umd.js +2 -2
- package/lib/viewHandler/index.umd.min.js +2 -2
- package/package/TreeLayout/index.ts +2 -2
- package/package.json +1 -1
- package/src/Canvas.ts +1 -1
- package/src/Eoap.ts +66 -66
- package/src/Geometry.ts +57 -13
- package/src/Matrix4/index.ts +84 -84
- package/src/Matrix4/move.ts +12 -12
- package/src/Matrix4/rotate.ts +1 -1
- package/src/Matrix4/transform.ts +1 -1
- package/src/Mercator.ts +27 -27
- package/src/SVG.ts +24 -24
- package/src/WebGL.ts +1 -1
- package/src/animation.ts +98 -98
- package/src/common/assemble.ts +1 -1
- package/src/common/canvas/arc.ts +51 -51
- package/src/common/canvas/config.ts +158 -158
- package/src/common/canvas/gradient.ts +29 -29
- package/src/common/canvas/index.ts +2 -2
- package/src/common/canvas/painter.ts +2 -0
- package/src/common/geometry/prism-horizontal.ts +35 -35
- package/src/common/geometry/prism-vertical.ts +1 -1
- package/src/common/geometry/sphere-fragment.ts +40 -40
- package/src/common/geometry/tool/circle.ts +11 -11
- package/src/common/geometry/tool/rotateLine.ts +36 -0
- package/src/common/mergeOption.ts +6 -6
- package/src/common/setStyle.ts +1 -1
- package/src/common/svg/config.ts +10 -6
- package/src/common/svg/gradient.ts +63 -63
- package/src/common/svg/index.ts +5 -5
- package/src/common/svg/tool.ts +6 -6
- package/src/common/tree/toInnerTree.ts +8 -6
- package/src/common/tree/toPlainTree.ts +1 -1
- package/src/common/webgl/buffer.ts +1 -1
- package/src/common/webgl/doDraw.ts +16 -16
- package/src/common/webgl/getColorFactory.ts +26 -26
- package/src/common/webgl/getShader.ts +48 -48
- package/src/common/webgl/getTexture.ts +11 -11
- package/src/common/webgl/getWebGLContext.ts +3 -3
- package/src/common/webgl/index.ts +6 -4
- package/src/common/webgl/shader.ts +3 -3
- package/src/common/webgl/texture.ts +2 -2
- package/src/formatColor.ts +44 -44
- package/src/getLoopColors.ts +42 -42
- package/src/interpolation/Cardinal.ts +110 -110
- package/src/interpolation/Hermite.ts +65 -65
- package/src/layout/TreeLayout.ts +13 -11
- package/src/move.ts +7 -7
- package/src/resizeObserver.ts +2 -2
- package/src/rotate.ts +7 -7
- package/src/ruler.ts +10 -10
- package/src/throttle.ts +52 -52
- package/src/viewHandler.ts +4 -2
- package/types/Canvas.d.ts +1 -1
- package/types/CanvasOption.d.ts +8 -8
- package/types/CanvasOpts.d.ts +9 -9
- package/types/Geometry.d.ts +65 -40
- package/types/Matrix4.d.ts +47 -47
- package/types/SVGConfig.d.ts +79 -76
- package/types/TreeConfig.d.ts +36 -24
- package/uni-app/ui-canvas.vue +9 -31
- package/.editorconfig +0 -19
- package/.eslintrc.js +0 -26
package/uni-app/ui-canvas.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view :class="cover || isH5 ? 'cover-view' : 'normal-view'">
|
|
3
|
-
<view :class="'view-img view-' + uniqueid" @touchstart="doitstart">
|
|
2
|
+
<view :class="cover || isH5 ? 'cover-view' : 'normal-view'" :style="{ display: 'inline-block' }">
|
|
3
|
+
<view v-if="!cover && !isH5" :class="'view-img view-' + uniqueid" @touchstart="doitstart">
|
|
4
4
|
<image
|
|
5
5
|
:style="{ width: width + 'px', height: height + 'px' }"
|
|
6
6
|
:src="viewImg"
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
class="painter"
|
|
13
13
|
:id="'painter-' + uniqueid"
|
|
14
14
|
@touchstart="doitstart"
|
|
15
|
-
:style="{ width: width + 'px', height: height + 'px' }"
|
|
15
|
+
:style="[{ width: width + 'px', height: height + 'px'}, cover || isH5 ? {} : {position: 'fixed', left: '50000px'}]"
|
|
16
16
|
></canvas>
|
|
17
17
|
<canvas
|
|
18
18
|
v-if="region"
|
|
19
19
|
class="region"
|
|
20
20
|
:id="'region-' + uniqueid"
|
|
21
|
-
:style="{ width: width + 'px', height: height + 'px' }"
|
|
21
|
+
:style="{ width: width + 'px', height: height + 'px', position: 'fixed', left: '50000px' }"
|
|
22
22
|
></canvas>
|
|
23
23
|
<!-- #endif -->
|
|
24
24
|
<!-- #ifdef MP-WEIXIN -->
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
class="painter"
|
|
27
27
|
canvas-id="painter"
|
|
28
28
|
@touchstart="doitstart"
|
|
29
|
-
:style="{ width: width + 'px', height: height + 'px' }"
|
|
29
|
+
:style="[{ width: width + 'px', height: height + 'px'}, cover || isH5 ? {} : {position: 'fixed', left: '50000px'}]"
|
|
30
30
|
></canvas>
|
|
31
31
|
<canvas
|
|
32
32
|
v-if="region"
|
|
33
33
|
class="region"
|
|
34
34
|
canvas-id="region"
|
|
35
|
-
:style="{ width: width + 'px', height: height + 'px' }"
|
|
35
|
+
:style="{ width: width + 'px', height: height + 'px', position: 'fixed', left: '50000px' }"
|
|
36
36
|
></canvas>
|
|
37
37
|
<!-- #endif -->
|
|
38
38
|
<!-- #ifndef MP-WEIXIN||MP-ALIPAY -->
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
class="painter"
|
|
41
41
|
:canvas-id="'painter-' + uniqueid"
|
|
42
42
|
@touchstart="doitstart"
|
|
43
|
-
:style="{ width: width + 'px', height: height + 'px' }"
|
|
43
|
+
:style="[{ width: width + 'px', height: height + 'px'}, cover || isH5 ? {} : {position: 'fixed', left: '50000px'}]"
|
|
44
44
|
></canvas>
|
|
45
45
|
<canvas
|
|
46
46
|
v-if="region"
|
|
47
47
|
class="region"
|
|
48
48
|
:canvas-id="'region-' + uniqueid"
|
|
49
|
-
:style="{ width: width + 'px', height: height + 'px' }"
|
|
49
|
+
:style="{ width: width + 'px', height: height + 'px', position: 'fixed', left: '50000px' }"
|
|
50
50
|
></canvas>
|
|
51
51
|
<!-- #endif -->
|
|
52
52
|
</view>
|
|
53
53
|
</template>
|
|
54
|
-
|
|
54
|
+
<script>
|
|
55
55
|
import OralCanvas from "../lib/OralCanvas/index.es.js";
|
|
56
56
|
export default {
|
|
57
57
|
data() {
|
|
@@ -235,25 +235,3 @@ export default {
|
|
|
235
235
|
},
|
|
236
236
|
};
|
|
237
237
|
</script>
|
|
238
|
-
|
|
239
|
-
<style lang="css" scoped>
|
|
240
|
-
/* 辅助的区域不应该可以看见 */
|
|
241
|
-
.region {
|
|
242
|
-
position: fixed;
|
|
243
|
-
left: 50000px;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.cover-view,
|
|
247
|
-
.normal-view {
|
|
248
|
-
display: inline-block;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.cover-view .view-img {
|
|
252
|
-
display: none;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.normal-view .painter {
|
|
256
|
-
position: fixed;
|
|
257
|
-
left: 50000px;
|
|
258
|
-
}
|
|
259
|
-
</style>
|
package/.editorconfig
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# http://editorconfig.org
|
|
2
|
-
|
|
3
|
-
root = true
|
|
4
|
-
|
|
5
|
-
[*]
|
|
6
|
-
charset = utf-8
|
|
7
|
-
indent_style = space
|
|
8
|
-
indent_size = 4
|
|
9
|
-
end_of_line = cr
|
|
10
|
-
insert_final_newline = false
|
|
11
|
-
trim_trailing_whitespace = true
|
|
12
|
-
|
|
13
|
-
[*.md]
|
|
14
|
-
insert_final_newline = false
|
|
15
|
-
trim_trailing_whitespace = false
|
|
16
|
-
|
|
17
|
-
[*.json]
|
|
18
|
-
indent_size = 2
|
|
19
|
-
insert_final_newline = true
|
package/.eslintrc.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
|
|
3
|
-
//定义ESLint的解析器
|
|
4
|
-
parser: '@typescript-eslint/parser',
|
|
5
|
-
|
|
6
|
-
//定义文件继承的子规范
|
|
7
|
-
extends: ['plugin:@typescript-eslint/recommended'],
|
|
8
|
-
|
|
9
|
-
//定义了该eslint文件所依赖的插件
|
|
10
|
-
plugins: ['@typescript-eslint'],
|
|
11
|
-
|
|
12
|
-
//指定代码的运行环境
|
|
13
|
-
env: {
|
|
14
|
-
browser: true,
|
|
15
|
-
node: false
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
// 设置规则
|
|
19
|
-
rules: {
|
|
20
|
-
"@typescript-eslint/ban-types": "off",
|
|
21
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
22
|
-
"@typescript-eslint/no-this-alias": ["error", {
|
|
23
|
-
"allowedNames": ["_this"]
|
|
24
|
-
}]
|
|
25
|
-
}
|
|
26
|
-
}
|