当前位置: 首页 > news >正文

信誉好的广州外贸网站seo初级入门教程

信誉好的广州外贸网站,seo初级入门教程,cms网站怎么做,电商网站成品案例主角#xff1a;3D Force-Directed Graph 简介#xff1a;一个使用ThreeJS/WebGL进行3D渲染的Graph图库 GitHub: https://github.com/vasturiano/3d-force-graph Ps: 较为复杂或节点巨大时#xff0c;对GPUCPU消耗较大#xff0c;同量级节点对比下优于AntV G6和Echarts… 主角3D Force-Directed Graph 简介一个使用ThreeJS/WebGL进行3D渲染的Graph图库 GitHub: https://github.com/vasturiano/3d-force-graph Ps: 较为复杂或节点巨大时对GPUCPU消耗较大同量级节点对比下优于AntV G6和Echarts渲染 效果 环境 3d-force-graph: ^1.73.3next: 14.1.3react: ^18 目录 仅包含涉及到的文件 | - app|- page.tsx | - components|- ForceGraphW3D|- data.ts|- index.tsx实操 演示数据 由于效果展示的演示过于庞大以下仅展示基本数据结构 components/ForceGraphW3D/data.ts // 来源https://vasturiano.github.io/3d-force-graph/example/datasets/blocks.json export default {nodes: [ // 拥有的节点及扩展数据{id: 4062045,user: mbostock,description: Force-Directed Graph},// .....],links: [ // 建立节点关系根据nodes的id字段进行关联{source: 950642,target: 4062045},// .....] }创建EchartsGraph组件 components/ForceGraphW3D/index.tsx use client;import type {ConfigOptions, ForceGraph3DInstance} from 3d-force-graph; import React, {useEffect, useRef} from react; import ForceGraph3D from 3d-force-graph; import data from ./datatype Props {children?: React.ReactNode }const ForceGraph3DOptions: ConfigOptions {}let _forceGraph3D: ForceGraph3DInstance | undefined undefined; let _graph: ForceGraph3DInstance | undefined undefined;const ForceGraphW3D function (props: Props) {const containerRef useRefHTMLDivElement(null);const graphRef useRefHTMLDivElement(null);function graphInit(elm: HTMLDivElement) {if (!containerRef) return;// 只能在客户端模式下载入if (typeof window ! undefined) {// 构建实例化if (!_forceGraph3D) {_forceGraph3D ForceGraph3D(ForceGraph3DOptions);}// 绑定容器元素_graph _forceGraph3D(elm);// 实例配置_graph.width(containerRef.current?.offsetWidth || 800).height(containerRef.current?.offsetHeight || 800).graphData(data);}}useEffect(() {if (graphRef.current) {graphInit(graphRef.current);}}, [graphRef]);return (div ref{containerRef}div ref{graphRef}/div{props.children}/div) }export default ForceGraphW3D;页面调用 use client;import ForceGraphW3D from /component/ForceGraphW3D;const Page function () {return (div style{{width: 100%, height: 100%,overflow: hidden}}ForceGraphW3D //div); }export default Page;如果大家对其他实战实例感兴趣请在下面留言我会尽快更新。
http://www.zqtcl.cn/news/495046/

相关文章:

  • 做网站多少钱一年没有网站做cpa怎么赚钱
  • 二手房发布网站怎么做建站哪家好用兴田德润
  • 网站开发有几种深圳网站制作长沙
  • 为什么一个网站外链那么多公司团建活动
  • 公司门户网站建设策划书wordpress清空数据
  • 大兴专注高端网站建设交互设计留学
  • 想要黑掉一个网站 要怎么做网页设计师培训机构有吗
  • 做网站网站应该注意什么关于建设网站的会议纪要
  • 什么网站建设最简单做毕业设计实物的网站
  • 正规网站开发文案电商网站与企业网站区别
  • 襄阳做网站比较有实力的公司长沙出名的网站设计推广
  • 徐州网站设计师最便宜的购物平台
  • 网站域名和空间费用wordpress是是什么技术
  • 企业制作网站一般多少钱上海网站制作费用
  • 苏州住建网站什么叫关键词
  • 电商网站开发过程是什么推广整合营销
  • 网页建站软件网络市场调研的步骤
  • 自己做的网站怎样赚钱长沙专业做网站排名
  • 张家界做网站公司国内最先做弹幕的网站
  • 免费快速建站网站做网站用什么数据库
  • 哪有做课件赚钱的网站温州设计公司排名
  • 西安网站建设公司php大气企业网站
  • 天河公司网站建设内蒙古建设厅安全资料网站
  • 学习网站的建设怎么做网站建设作业
  • 做公司产品展示网站企业网盘源码
  • 南通做网站企业初中生代表性设计制作作品图片
  • php框架做网站好处网站后台模板免费下载
  • 新兴县建设局网站建筑工程网络计划技术
  • 住房和城乡建设部网站北京网站建设设计规划
  • 哪个网站做logo设计师网络营销心得体会800字