@visactor/vstory 0.0.1 → 0.0.3
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/cjs/dsl/constant/index.d.ts +1 -0
- package/cjs/dsl/constant/index.js +6 -6
- package/cjs/dsl/constant/index.js.map +1 -1
- package/cjs/dsl/story-chart/area.js +2 -1
- package/cjs/dsl/story-processor/graphic/effect/disappear.js +6 -1
- package/cjs/dsl/story-processor/graphic/effect/disappear.js.map +1 -1
- package/cjs/dsl/story-processor/index.js +1 -1
- package/cjs/dsl/story-processor/processor.js +1 -1
- package/cjs/dsl/story-processor/processorMap/processorMap.d.ts +1 -170
- package/cjs/dsl/story-processor/processorMap/processorMap.js +3 -8
- package/cjs/dsl/story-processor/processorMap/processorMap.js.map +1 -1
- package/cjs/edit/edit-component/box-selection.js +1 -2
- package/cjs/edit/edit-component/common.js +2 -1
- package/cjs/edit/interface.js +2 -1
- package/cjs/scene/action.js +1 -2
- package/cjs/story/character/component/characters/character-shape.d.ts +6 -0
- package/cjs/story/character/component/characters/character-shape.js +19 -0
- package/cjs/story/character/component/characters/character-shape.js.map +1 -0
- package/cjs/story/character/component/graphic/symbol.d.ts +19 -0
- package/cjs/story/character/component/graphic/symbol.js +32 -0
- package/cjs/story/character/component/graphic/symbol.js.map +1 -0
- package/cjs/story/index.js +2 -1
- package/cjs/story/index.js.map +1 -1
- package/cjs/template/ranking-bar/ranking-bar.js +1 -1
- package/cjs/template/ranking-bar/spec-parser.js +1 -1
- package/dist/index.js +47 -9
- package/dist/index.min.js +3 -3
- package/es/dsl/constant/index.d.ts +1 -0
- package/es/dsl/constant/index.js +6 -6
- package/es/dsl/constant/index.js.map +1 -1
- package/es/dsl/story-chart/area.js +2 -1
- package/es/dsl/story-processor/graphic/effect/disappear.js +6 -1
- package/es/dsl/story-processor/graphic/effect/disappear.js.map +1 -1
- package/es/dsl/story-processor/index.js +1 -1
- package/es/dsl/story-processor/processor.js +1 -1
- package/es/dsl/story-processor/processorMap/processorMap.d.ts +1 -170
- package/es/dsl/story-processor/processorMap/processorMap.js +5 -8
- package/es/dsl/story-processor/processorMap/processorMap.js.map +1 -1
- package/es/edit/edit-component/box-selection.js +1 -2
- package/es/edit/edit-component/common.js +2 -1
- package/es/edit/interface.js +2 -1
- package/es/scene/action.js +1 -2
- package/es/story/character/component/characters/character-shape.d.ts +6 -0
- package/es/story/character/component/characters/character-shape.js +15 -0
- package/es/story/character/component/characters/character-shape.js.map +1 -0
- package/es/story/character/component/graphic/symbol.d.ts +19 -0
- package/es/story/character/component/graphic/symbol.js +26 -0
- package/es/story/character/component/graphic/symbol.js.map +1 -0
- package/es/story/index.js +3 -0
- package/es/story/index.js.map +1 -1
- package/es/template/ranking-bar/ranking-bar.js +1 -1
- package/es/template/ranking-bar/spec-parser.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29441,6 +29441,7 @@
|
|
|
29441
29441
|
var StoryGraphicType;
|
|
29442
29442
|
(function (StoryGraphicType) {
|
|
29443
29443
|
StoryGraphicType["RECT"] = "RectComponent";
|
|
29444
|
+
StoryGraphicType["SHAPE"] = "ShapeComponent";
|
|
29444
29445
|
StoryGraphicType["LINE"] = "LineComponent";
|
|
29445
29446
|
StoryGraphicType["ARC"] = "ArcComponent";
|
|
29446
29447
|
StoryGraphicType["PATH"] = "PathComponent";
|
|
@@ -49912,6 +49913,41 @@
|
|
|
49912
49913
|
}
|
|
49913
49914
|
}
|
|
49914
49915
|
|
|
49916
|
+
class GraphicSymbol extends Graphic {
|
|
49917
|
+
getInitialAttributes() {
|
|
49918
|
+
return {
|
|
49919
|
+
x: 0,
|
|
49920
|
+
y: 0,
|
|
49921
|
+
width: 120,
|
|
49922
|
+
height: 80,
|
|
49923
|
+
angle: 0,
|
|
49924
|
+
anchor: [60, 40],
|
|
49925
|
+
lineWidth: 2,
|
|
49926
|
+
stroke: '#000000',
|
|
49927
|
+
shapePoints: [],
|
|
49928
|
+
symbolType: 'circle'
|
|
49929
|
+
};
|
|
49930
|
+
}
|
|
49931
|
+
init() {
|
|
49932
|
+
var _a, _b;
|
|
49933
|
+
if (!this._graphic) {
|
|
49934
|
+
this._graphic = createSymbol(this._transformAttributes(Object.assign(Object.assign({}, this.getInitialAttributes()), ((_b = (_a = this._character.spec.options) === null || _a === void 0 ? void 0 : _a.graphic) !== null && _b !== void 0 ? _b : {}))));
|
|
49935
|
+
this._graphic.name = `graphic-symbol-${this._character.id}`;
|
|
49936
|
+
this._character.getGraphicParent().add(this._graphic);
|
|
49937
|
+
}
|
|
49938
|
+
}
|
|
49939
|
+
}
|
|
49940
|
+
|
|
49941
|
+
class CharacterComponentShape extends CharacterComponent {
|
|
49942
|
+
constructor() {
|
|
49943
|
+
super(...arguments);
|
|
49944
|
+
this.graphicType = 'shape';
|
|
49945
|
+
}
|
|
49946
|
+
_createGraphic() {
|
|
49947
|
+
return new GraphicSymbol(StoryGraphicType.SHAPE, this);
|
|
49948
|
+
}
|
|
49949
|
+
}
|
|
49950
|
+
|
|
49915
49951
|
preLoadAllModule();
|
|
49916
49952
|
loadBrowserEnv(container);
|
|
49917
49953
|
vglobal.setEnv('browser');
|
|
@@ -51350,7 +51386,12 @@
|
|
|
51350
51386
|
break;
|
|
51351
51387
|
}
|
|
51352
51388
|
}
|
|
51353
|
-
graphic
|
|
51389
|
+
graphic
|
|
51390
|
+
.animate()
|
|
51391
|
+
.to({ x: toX, y: toY }, duration, easing)
|
|
51392
|
+
.onEnd(() => {
|
|
51393
|
+
graphic.setAttributes({ visible: false, visibleAll: false });
|
|
51394
|
+
});
|
|
51354
51395
|
return true;
|
|
51355
51396
|
}
|
|
51356
51397
|
const disappearEffectMap = {
|
|
@@ -52668,14 +52709,10 @@
|
|
|
52668
52709
|
style: styleProcessor,
|
|
52669
52710
|
bounce: bounceProcessor
|
|
52670
52711
|
};
|
|
52671
|
-
const processorMarkMap = {
|
|
52672
|
-
|
|
52673
|
-
[
|
|
52674
|
-
|
|
52675
|
-
[StoryGraphicType.RICH_TEXT]: Object.assign({}, commonMarkProcessor),
|
|
52676
|
-
[StoryGraphicType.LINE]: Object.assign({}, commonMarkProcessor),
|
|
52677
|
-
[StoryGraphicType.IMAGE]: Object.assign({}, commonMarkProcessor)
|
|
52678
|
-
};
|
|
52712
|
+
const processorMarkMap = {};
|
|
52713
|
+
Object.values(StoryGraphicType).forEach(type => {
|
|
52714
|
+
processorMarkMap[type] = commonMarkProcessor;
|
|
52715
|
+
});
|
|
52679
52716
|
const processorMap = Object.assign(Object.assign(Object.assign({}, processorChartMap), processorComponentMap), processorMarkMap);
|
|
52680
52717
|
|
|
52681
52718
|
class Ticker {
|
|
@@ -52911,6 +52948,7 @@
|
|
|
52911
52948
|
StoryFactory.registerCharacter(StoryGraphicType.QIPAO, CharacterComponentQipao);
|
|
52912
52949
|
StoryFactory.registerCharacter(StoryGraphicType.LINE, CharacterComponentLine);
|
|
52913
52950
|
StoryFactory.registerCharacter(StoryGraphicType.IMAGE, CharacterComponentImage);
|
|
52951
|
+
StoryFactory.registerCharacter(StoryGraphicType.SHAPE, CharacterComponentShape);
|
|
52914
52952
|
container.load(splitModule);
|
|
52915
52953
|
}
|
|
52916
52954
|
registerCharacter();
|