123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <meta name="description" content="">
- <meta name="author" content="">
- <title>Sanlih Entertainment Television</title>
- <!-- Custom fonts for this template-->
- <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
- <link
- href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
- rel="stylesheet">
- <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
- <!-- Custom styles for this template-->
- <link href="css/sb-admin-2.min.css" rel="stylesheet">
- <link href="css/custom.css" rel="stylesheet">
- <style>
- body {
- margin: 0;
- }
- </style>
- <script src="//unpkg.com/3d-force-graph"></script>
- <!--<script src="../../dist/3d-force-graph.js"></script>-->
- </head>
- <body>
- <nav class="navbar navbar-expand navbar-light bg-white topbar mb-2 static-top shadow">
- <!-- Sidebar - Brand -->
- <a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
- <div class="sidebar-brand-icon">
- <!-- <i class="fas fa-laugh-wink"></i> -->
- <img src="./img/iNEWS-logo.svg" width="120px" alt="">
- </div>
- <!-- <div class="sidebar-brand-text mx-3">TEXT-TO-CHART</div> -->
- </a>
- <!-- Sidebar Toggle (Topbar) -->
- <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
- <i class="fa fa-bars"></i>
- </button>
- <!-- Topbar Navbar -->
- <ul class="navbar-nav ml-auto">
- <!-- Nav Item - Search Dropdown (Visible Only XS) -->
- <li class="nav-item dropdown no-arrow d-sm-none">
- <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown"
- aria-haspopup="true" aria-expanded="false">
- <i class="fas fa-search fa-fw"></i>
- </a>
- <!-- Dropdown - Messages -->
- <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">
- <form class="form-inline mr-auto w-100 navbar-search">
- <div class="input-group">
- <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..."
- aria-label="Search" aria-describedby="basic-addon2">
- <div class="input-group-append">
- <button class="btn btn-primary" type="button">
- <i class="fas fa-search fa-sm"></i>
- </button>
- </div>
- </div>
- </form>
- </div>
- </li>
- <li class="nav-item"><a class="nav-link" href="./knowledge-graph.html">knowledge graph</a></li>
- <div class="topbar-divider d-sm-block"></div>
- <!-- Nav Item - User Information -->
- <li class="nav-item dropdown no-arrow">
- <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
- aria-haspopup="true" aria-expanded="false">
- <span class="mr-2 d-none d-lg-inline text-gray-600 small">User</span>
- <img class="img-profile rounded-circle" src="img/undraw_profile.svg">
- </a>
- </li>
- </ul>
- </nav>
- <div id="3d-graph"></div>
- <script type="importmap">{ "imports": { "three": "//unpkg.com/three/build/three.module.js" }}</script>
- <script type="module">
- import SpriteText from "//unpkg.com/three-spritetext/dist/three-spritetext.mjs";
- const Graph = ForceGraph3D()
- (document.getElementById('3d-graph'))
- .jsonUrl('./test.json')
- .nodeAutoColorBy('group')
- .nodeThreeObject(node => {
- const sprite = new SpriteText(node.id);
- sprite.material.depthWrite = false; // make sprite background transparent
- sprite.color = node.color;
- sprite.textHeight = 8;
- return sprite;
- });
- // Spread nodes a little wider
- Graph.d3Force('charge').strength(-120);
- </script>
- </body>
|