cmj build

This commit is contained in:
Anton Lavrenov
2021-09-23 11:17:50 -05:00
parent 586ea3d860
commit cc5b67ed10
15 changed files with 102 additions and 7911 deletions

View File

@@ -19,7 +19,7 @@
document.getElementById('konva-container').appendChild(title);
});
</script>
<script>
<script type="module">
import './manual/Manual-test.ts';
import './manual/Blur-test.ts';

View File

@@ -24,35 +24,7 @@
<body>
Some text
<div id="container"></div>
<script src="../src/index.ts"></script>
<script>
// noprotect
class Ktest {
constructor() {
this.testLayer = new Konva.Group();
this.image = (() => {
const img = new Image();
img.onerror = () => console.error(`Failed to load image`);
img.src = 'https://www.webkit.org/blog-files/acid3-100.png';
return img;
})();
}
redraw() {
console.log('redraw()');
for (let n = 0; n < 20; ++n) {
const g = this.testLayer;
g.destroyChildren();
for (let i = 0; i < 10; ++i) {
const icon = new Konva.Image({ image: this.image });
g.add(icon);
}
}
}
}
const ktest = new Ktest();
setInterval(() => ktest.redraw(), 500);
</script>
<script src="../src/index.ts" type="module"></script>
<script></script>
</body>
</html>

View File

@@ -8,7 +8,7 @@
<script>
mocha.setup('bdd');
</script>
<script>
<script type="module">
// CORE
import './unit/Animation-test.ts';
import './unit/Canvas-test.ts';

View File

@@ -2,7 +2,7 @@ import { assert } from 'chai';
import { addStage, Konva, cloneAndCompareLayer } from './test-utils';
describe.only('Arrow', function () {
describe('Arrow', function () {
// ======================================================
it('add arrow', function () {
var stage = addStage();

View File

@@ -1,5 +1,5 @@
import { assert } from 'chai';
import { Shape } from '../../src/Shape.js';
import { Shape } from '../../src/Shape';
import {
addStage,
@@ -1018,56 +1018,12 @@ describe('Node', function () {
animation: 'standing',
animations: {
standing: [
0,
0,
49,
109,
52,
0,
49,
109,
105,
0,
49,
109,
158,
0,
49,
109,
210,
0,
49,
109,
262,
0,
49,
109,
0, 0, 49, 109, 52, 0, 49, 109, 105, 0, 49, 109, 158, 0, 49, 109,
210, 0, 49, 109, 262, 0, 49, 109,
],
kicking: [
0,
109,
45,
98,
45,
109,
45,
98,
95,
109,
63,
98,
156,
109,
70,
98,
229,
109,
60,
98,
287,
109,
41,
98,
0, 109, 45, 98, 45, 109, 45, 98, 95, 109, 63, 98, 156, 109, 70, 98,
229, 109, 60, 98, 287, 109, 41, 98,
],
},
frameRate: 10,

View File

@@ -10,8 +10,8 @@ Konva.enableTrace = true;
Konva.showWarnings = true;
import { imagediff } from './imagediff';
import { Layer } from '../../src/Layer.js';
import { Stage } from '../../src/Stage.js';
import { Layer } from '../../src/Layer';
import { Stage } from '../../src/Stage';
// reset some data
beforeEach(function () {