Skip to content

Commit

Permalink
Merge pull request #9 from VisActor/feat/scene9-scene12
Browse files Browse the repository at this point in the history
Feat/scene9-scene12
  • Loading branch information
xiaoluoHe authored Jun 18, 2024
2 parents c5354b3 + 8e3a7d5 commit c3892e3
Show file tree
Hide file tree
Showing 54 changed files with 3,150 additions and 156 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/vstory/demo/src/assets/scene11/chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/vstory/demo/src/assets/scene11/title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/vstory/demo/src/assets/scene12/title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/vstory/demo/src/assets/scene13/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/vstory/demo/src/assets/scene9/chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/vstory/demo/src/assets/scene9/title.png
65 changes: 52 additions & 13 deletions packages/vstory/demo/src/demos/VChartSite/VChartSite.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React, { act, useEffect } from 'react';
import { IStorySpec } from '../../../../src/story/interface';
import { Story } from '../../../../src/story/story';
import { scene1, scene1Characters } from './scene1';
Expand All @@ -9,6 +9,12 @@ import { scene5, scene5Characters } from './scene5';
import { scene6, scene6Characters } from './scene6';
import { scene7, scene7Characters } from './scene7';
import { scene8, scene8Characters } from './scene8';
import { scene9, scene9Characters } from './scene9';
import { scene10, scene10Characters } from './scene10';
import { scene11, scene11Characters } from './scene11';
import { scene12, scene12Characters } from './scene12';
import { scene12_2, scene12_2_Characters } from './scene12-2';
import { scene13, scene13Characters } from './scene13';

export const VChartSiteDemo = () => {
const id = 'storyBar';
Expand All @@ -18,24 +24,38 @@ export const VChartSiteDemo = () => {
const tempSpec: IStorySpec = {
characters: [
...scene1Characters,
...scene2Characters
// ...scene3Characters,
// ...scene4Characters,
// ...scene5Characters,
// ...scene6Characters,
// ...scene7Characters,
// ...scene8Characters
...scene2Characters,
...scene3Characters,
...scene4Characters,
...scene5Characters,
...scene6Characters,
...scene7Characters,
...scene8Characters,
...scene9Characters,
...scene10Characters,
...scene11Characters,
...scene12Characters,
...scene12_2_Characters,
...scene13Characters
],
acts: [
{
id: 'default-chapter',
scenes: [
scene1,
scene2
// scene3, scene4, scene5,
// scene6,
// scene7,
// scene8
scene2,
scene3,
scene4,
scene5,
scene6,
scene7,
scene8,
scene9,
scene10,
scene11,
scene12,
scene12_2,
scene13
]
}
]
Expand All @@ -49,6 +69,25 @@ export const VChartSiteDemo = () => {
btn1.addEventListener('click', () => {
story.play();
});

{
let paused = false;
let actIndex: string | number = 0;
document.addEventListener('keydown', function (event) {
if (event.code === 'Space') {
if (paused) {
story.play(actIndex);
paused = false;
console.log(111111, 'continue', actIndex);
} else {
actIndex = story.pause();
paused = true;
console.log(111111, 'pause', actIndex);
}
}
});
}

const btn2 = document.createElement('button');
btn2.innerText = 'export';
btn2.addEventListener('click', () => {
Expand Down
8 changes: 5 additions & 3 deletions packages/vstory/demo/src/demos/VChartSite/scene1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const chartSpecList = [
]
}
],

direction: 'horizontal',
seriesSpec: [
{
Expand Down Expand Up @@ -845,6 +844,8 @@ const chartSpecList = [
valueField: 'value',
outerRadius: 1,
innerRadius: 0,
gap: 1,
sunburst: { style: { stroke: false, lineWidth: 0 } },
label: {
visible: false
}
Expand Down Expand Up @@ -873,7 +874,7 @@ export const scene1Characters = chartSpecList.map((item, i) => ({
zIndex: 1,
position: {
top: i < 5 ? 50 : 570,
left: 100 + (i % 5) * 170 + 20,
left: 220 + (i % 5) * (110 + 72),
width: 110,
height: 110
},
Expand Down Expand Up @@ -1011,7 +1012,8 @@ export const scene1 = {
payload: {
animation: {
duration: 1000
}
},
fade: { isBaseOpacity: true }
}
}
]
Expand Down
Loading

0 comments on commit c3892e3

Please sign in to comment.