mirror of
https://github.com/konvajs/konva.git
synced 2025-11-24 08:46:44 +08:00
cmj build
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<script>
|
||||
mocha.setup('bdd');
|
||||
</script>
|
||||
<script>
|
||||
<script type="module">
|
||||
// CORE
|
||||
import './unit/Animation-test.ts';
|
||||
import './unit/Canvas-test.ts';
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user