Skip to content

Commit

Permalink
Merge pull request #251 from hepengwei/feat_he
Browse files Browse the repository at this point in the history
优化代码
  • Loading branch information
hepengwei authored Jul 11, 2024
2 parents bcab770 + 90df2d4 commit f2e64db
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 103 deletions.
4 changes: 2 additions & 2 deletions docs/128.js → docs/800.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/antd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="public/favicon.ico"/><meta name="keywords" content="visualization,collection,css3,canvas,threejs,前端"/><meta name="description" content="一个专注于前端视觉效果的集合应用,包含CSS动效、Canvas动画、Three.js3D、人工智能应用等上百个案例"/><meta name="author" content="River,100741801@qq.com"/><meta name="copyright" content="River"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="renderer" content="webkit"/><meta http-equiv="cache-control" content="no-cache"/><title>Visualization Collection</title><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2891754467184980" crossorigin="anonymous"></script><script defer="defer" src="chunk-tensorflow_tfjs_core.js"></script><script defer="defer" src="chunk-tensorflow_tfjs_webgl.js"></script><script defer="defer" src="antd.js"></script><script defer="defer" src="chunk-echarts.js"></script><script defer="defer" src="chunk-tensorflow_models.js"></script><script defer="defer" src="128.js"></script><script defer="defer" src="main.js"></script><link href="styles/main.css" rel="stylesheet"></head><body><div id="root"></div></body><script src="https://cdn.jsdelivr.net/npm/echarts@5.4.0/dist/echarts.min.js" async></script></html>
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="public/favicon.ico"/><meta name="keywords" content="visualization,collection,css3,canvas,threejs,前端"/><meta name="description" content="一个专注于前端视觉效果的集合应用,包含CSS动效、Canvas动画、Three.js3D、人工智能应用等上百个案例"/><meta name="author" content="River,100741801@qq.com"/><meta name="copyright" content="River"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="renderer" content="webkit"/><meta http-equiv="cache-control" content="no-cache"/><title>Visualization Collection</title><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2891754467184980" crossorigin="anonymous"></script><script defer="defer" src="chunk-tensorflow_tfjs_core.js"></script><script defer="defer" src="chunk-tensorflow_tfjs_webgl.js"></script><script defer="defer" src="antd.js"></script><script defer="defer" src="chunk-echarts.js"></script><script defer="defer" src="chunk-tensorflow_models.js"></script><script defer="defer" src="800.js"></script><script defer="defer" src="main.js"></script><link href="styles/main.css" rel="stylesheet"></head><body><div id="root"></div></body><script src="https://cdn.jsdelivr.net/npm/echarts@5.4.0/dist/echarts.min.js" async></script></html>
2 changes: 1 addition & 1 deletion docs/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/styles/main.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/layout/Menus/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
RocketOutlined,
FireOutlined,
FileImageOutlined,
VideoCameraAddOutlined,
// VideoCameraAddOutlined,
} from "@ant-design/icons";
import { useDebounceFn } from "ahooks";
import { Button, Menu } from "antd";
Expand Down Expand Up @@ -274,11 +274,11 @@ const Menus: React.FC = () => {
"imageProcessingTool",
<FileImageOutlined />
),
getItem(
intl.formatMessage({ id: "menu.videoProcessingTool" }),
"videoProcessingTool",
<VideoCameraAddOutlined />
),
// getItem(
// intl.formatMessage({ id: "menu.videoProcessingTool" }),
// "videoProcessingTool",
// <VideoCameraAddOutlined />
// ),
];

const updateMenuWidth = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,9 @@ const BasicOperation = (props: TabPageProps) => {
} else if (videoInfo.imageDataList && videoInfo.imageDataList.length > 0) {
startgeneratingVideo(() => {
setTimeout(() => {
// console.log(new Date().valueOf());
method(videoInfo.imageDataList, (newImageDataList: ImageData[]) => {
// console.log(new Date().valueOf());
if (generatingVideoRef.current) {
imgDataListToChunks(newImageDataList, (videoChunks: Blob[]) => {
// console.log(new Date().valueOf());
exportVideo(videoChunks, videoInfo.name);
status.videoChunks = videoChunks;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const ShearPlate = () => {
]);
message.success(intl.formatMessage({ id: "common.saveSuccessfully" }));
} else {
console.error(intl.formatMessage({ id: "common.saveFailed" }));
message.error(intl.formatMessage({ id: "common.saveFailed" }));
}
};

Expand Down
174 changes: 87 additions & 87 deletions src/routes/routes.tsx
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
import React from "react";
import { RouteObject } from "react-router-dom";
import Home from "pages/Home";
import VisualDesign from "pages/html/VisualDesign";
import InteractiveDesign from "pages/html/InteractiveDesign";
import BackgroundEffect from "pages/html/BackgroundEffect";
import ComplexLayout from "pages/html/ComplexLayout";
import AppPageFrame from "pages/html/AppPageFrame";
import UtilitarianFunction from "pages/html/UtilitarianFunction";
import DynamicButtons from "pages/css/DynamicButtons";
import RichDynamicEffect from "pages/css/RichDynamicEffect";
import GenerateRegularPolygon from "pages/css/GenerateRegularPolygon";
import GenerateShadow from "pages/css/GenerateShadow";
import React from 'react';
import { RouteObject } from 'react-router-dom';
import Home from 'pages/Home';
import VisualDesign from 'pages/html/VisualDesign';
import InteractiveDesign from 'pages/html/InteractiveDesign';
import BackgroundEffect from 'pages/html/BackgroundEffect';
import ComplexLayout from 'pages/html/ComplexLayout';
import AppPageFrame from 'pages/html/AppPageFrame';
import UtilitarianFunction from 'pages/html/UtilitarianFunction';
import DynamicButtons from 'pages/css/DynamicButtons';
import RichDynamicEffect from 'pages/css/RichDynamicEffect';
import GenerateRegularPolygon from 'pages/css/GenerateRegularPolygon';
import GenerateShadow from 'pages/css/GenerateShadow';
// import MusicVisualization from "pages/css/MusicVisualization";
import SphereCollisionExample from "pages/canvas/SphereCollisionExample";
import DynamicClock from "pages/canvas/DynamicClock";
import Searchlight from "pages/canvas/Searchlight";
import GlobuleInteraction from "pages/canvas/GlobuleInteraction";
import KillPlanetGame from "pages/canvas/KillPlanetGame";
import FreeFallingBody from "pages/canvas/FreeFallingBody";
import CountDown from "pages/canvas/CountDown";
import ParticlesBg from "pages/canvas/ParticlesBg";
import RippleFloatOnTheWater from "pages/canvas/RippleFloatOnTheWater";
import FlowerBloom from "pages/canvas/FlowerBloom";
import CodeBgWall from "pages/canvas/CodeBgWall";
import WordDance from "pages/canvas/WordDance";
import Scratch from "pages/canvas/Scratch";
import MatchLine from "pages/canvas/MatchLine";
import AppPage3DFrame from "pages/threejs/AppPageFrame";
import CarShow from "pages/threejs/CarShow";
import RubiksCube from "pages/threejs/RubiksCube";
import ThrowDice from "pages/threejs/ThrowDice";
import MapDisplay from "pages/threejs/MapDisplay";
import EarthDisplay from "pages/threejs/EarthDisplay";
import HumanPostureDetection from "pages/AIApplication/HumanPostureDetection";
import NotBlockPeopleBarrage from "pages/AIApplication/NotBlockPeopleBarrage";
import ImageProcessingTool from "pages/ImageProcessingTool";
import VideoProcessingTool from "pages/VideoProcessingTool";
import Bar from "pages/echarts/Bar";
import Pie from "pages/echarts/Pie";
import Tree from "pages/echarts/Tree";
import SphereCollisionExample from 'pages/canvas/SphereCollisionExample';
import DynamicClock from 'pages/canvas/DynamicClock';
import Searchlight from 'pages/canvas/Searchlight';
import GlobuleInteraction from 'pages/canvas/GlobuleInteraction';
import KillPlanetGame from 'pages/canvas/KillPlanetGame';
import FreeFallingBody from 'pages/canvas/FreeFallingBody';
import CountDown from 'pages/canvas/CountDown';
import ParticlesBg from 'pages/canvas/ParticlesBg';
import RippleFloatOnTheWater from 'pages/canvas/RippleFloatOnTheWater';
import FlowerBloom from 'pages/canvas/FlowerBloom';
import CodeBgWall from 'pages/canvas/CodeBgWall';
import WordDance from 'pages/canvas/WordDance';
import Scratch from 'pages/canvas/Scratch';
import MatchLine from 'pages/canvas/MatchLine';
import AppPage3DFrame from 'pages/threejs/AppPageFrame';
import CarShow from 'pages/threejs/CarShow';
import RubiksCube from 'pages/threejs/RubiksCube';
import ThrowDice from 'pages/threejs/ThrowDice';
import MapDisplay from 'pages/threejs/MapDisplay';
import EarthDisplay from 'pages/threejs/EarthDisplay';
import HumanPostureDetection from 'pages/AIApplication/HumanPostureDetection';
import NotBlockPeopleBarrage from 'pages/AIApplication/NotBlockPeopleBarrage';
import ImageProcessingTool from 'pages/ImageProcessingTool';
// import VideoProcessingTool from "pages/VideoProcessingTool";
import Bar from 'pages/echarts/Bar';
import Pie from 'pages/echarts/Pie';
import Tree from 'pages/echarts/Tree';

export const contentRoutes: RouteObject[] = [
{
path: "/html",
path: '/html',
children: [
{
path: "/html/visualDesign",
path: '/html/visualDesign',
element: <VisualDesign />,
},
{
path: "/html/interactiveDesign",
path: '/html/interactiveDesign',
element: <InteractiveDesign />,
},
{
path: "/html/backgroundEffect",
path: '/html/backgroundEffect',
element: <BackgroundEffect />,
},
{
path: "/html/complexLayout",
path: '/html/complexLayout',
element: <ComplexLayout />,
},
{
path: "/html/appPageFrame",
path: '/html/appPageFrame',
element: <AppPageFrame />,
},
{
path: "/html/utilitarianFunction",
path: '/html/utilitarianFunction',
element: <UtilitarianFunction />,
},
],
},
{
path: "/css",
path: '/css',
children: [
{
path: "/css/dynamicButtons",
path: '/css/dynamicButtons',
element: <DynamicButtons />,
},
{
path: "/css/richDynamicEffect",
path: '/css/richDynamicEffect',
element: <RichDynamicEffect />,
},
{
path: "/css/generateRegularPolygon",
path: '/css/generateRegularPolygon',
element: <GenerateRegularPolygon />,
},
{
path: "/css/generateShadow",
path: '/css/generateShadow',
element: <GenerateShadow />,
},
// {
Expand All @@ -96,138 +96,138 @@ export const contentRoutes: RouteObject[] = [
],
},
{
path: "/canvas",
path: '/canvas',
children: [
{
path: "/canvas/sphereCollisionExample",
path: '/canvas/sphereCollisionExample',
element: <SphereCollisionExample />,
},
{
path: "/canvas/dynamicClock",
path: '/canvas/dynamicClock',
element: <DynamicClock />,
},
{
path: "/canvas/searchlight",
path: '/canvas/searchlight',
element: <Searchlight />,
},
{
path: "/canvas/globuleInteraction",
path: '/canvas/globuleInteraction',
element: <GlobuleInteraction />,
},
{
path: "/canvas/killPlanetGame",
path: '/canvas/killPlanetGame',
element: <KillPlanetGame />,
},
{
path: "/canvas/freeFallingBody",
path: '/canvas/freeFallingBody',
element: <FreeFallingBody />,
},
{
path: "/canvas/countDown",
path: '/canvas/countDown',
element: <CountDown />,
},
{
path: "/canvas/particlesBg",
path: '/canvas/particlesBg',
element: <ParticlesBg />,
},
{
path: "/canvas/rippleFloatOnTheWater",
path: '/canvas/rippleFloatOnTheWater',
element: <RippleFloatOnTheWater />,
},
{
path: "/canvas/flowerBloom",
path: '/canvas/flowerBloom',
element: <FlowerBloom />,
},
{
path: "/canvas/codeBgWall",
path: '/canvas/codeBgWall',
element: <CodeBgWall />,
},
{
path: "/canvas/wordDance",
path: '/canvas/wordDance',
element: <WordDance />,
},
{
path: "/canvas/scratch",
path: '/canvas/scratch',
element: <Scratch />,
},
{
path: "/canvas/matchLine",
path: '/canvas/matchLine',
element: <MatchLine />,
},
],
},
{
path: "/echarts",
path: '/echarts',
children: [
{
path: "/echarts/bar",
path: '/echarts/bar',
element: <Bar />,
},
{
path: "/echarts/pie",
path: '/echarts/pie',
element: <Pie />,
},
{
path: "/echarts/tree",
path: '/echarts/tree',
element: <Tree />,
},
],
},
{
path: "/threejs",
path: '/threejs',
children: [
{
path: "/threejs/threejsAppPageFrame",
path: '/threejs/threejsAppPageFrame',
element: <AppPage3DFrame />,
},
{
path: "/threejs/carShow",
path: '/threejs/carShow',
element: <CarShow />,
},
{
path: "/threejs/rubiksCube",
path: '/threejs/rubiksCube',
element: <RubiksCube />,
},
{
path: "/threejs/throwDice",
path: '/threejs/throwDice',
element: <ThrowDice />,
},
{
path: "/threejs/mapDisplay",
path: '/threejs/mapDisplay',
element: <MapDisplay />,
},
{
path: "/threejs/earthDisplay",
path: '/threejs/earthDisplay',
element: <EarthDisplay />,
},
],
},
{
path: "/AIApplication",
path: '/AIApplication',
children: [
{
path: "/AIApplication/humanPostureDetection",
path: '/AIApplication/humanPostureDetection',
element: <HumanPostureDetection />,
},
{
path: "/AIApplication/notBlockPeopleBarrage",
path: '/AIApplication/notBlockPeopleBarrage',
element: <NotBlockPeopleBarrage />,
},
],
},
{
path: "/imageProcessingTool",
path: '/imageProcessingTool',
element: <ImageProcessingTool />,
},
{
path: "/videoProcessingTool",
element: <VideoProcessingTool />,
},
// {
// path: "/videoProcessingTool",
// element: <VideoProcessingTool />,
// },
];

const routes: RouteObject[] = [
{
path: "/*",
path: '/*',
element: <Home />,
},
];
Expand Down

0 comments on commit f2e64db

Please sign in to comment.