2020-07-07 11:35:08 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as System from "~/components/system";
|
2020-06-22 14:00:51 +03:00
|
|
|
|
2020-07-07 11:35:08 +03:00
|
|
|
import GLRenderer from "~/components/three/GLRenderer";
|
|
|
|
import SystemPage from "~/components/system/SystemPage";
|
|
|
|
import ViewSourceLink from "~/components/system/ViewSourceLink";
|
2020-07-21 03:56:14 +03:00
|
|
|
import CodeBlock from "~/components/system/CodeBlock";
|
2020-06-22 14:00:51 +03:00
|
|
|
|
|
|
|
export default class SystemPageGlobe extends React.Component {
|
|
|
|
render() {
|
|
|
|
return (
|
2020-07-07 11:35:08 +03:00
|
|
|
<SystemPage
|
|
|
|
title="SDS: Globe"
|
|
|
|
description="..."
|
2020-07-21 02:48:10 +03:00
|
|
|
url="https://slate.host/system/globe"
|
2020-07-07 11:35:08 +03:00
|
|
|
>
|
2020-06-22 14:15:04 +03:00
|
|
|
<System.H1>
|
2020-07-01 10:31:55 +03:00
|
|
|
Globe <ViewSourceLink file="system/globe.js" />
|
2020-06-22 14:15:04 +03:00
|
|
|
</System.H1>
|
2020-06-22 14:00:51 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-07-07 11:35:08 +03:00
|
|
|
<System.P>
|
|
|
|
The Globe component is used to show peers and file transfers on the
|
|
|
|
Filecoin network.
|
|
|
|
</System.P>
|
2020-06-22 14:00:51 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-07-03 19:38:44 +03:00
|
|
|
<br />
|
|
|
|
<System.H2>Imports</System.H2>
|
2020-06-24 05:02:55 +03:00
|
|
|
<hr />
|
|
|
|
<br />
|
2020-07-03 19:38:44 +03:00
|
|
|
<System.P>
|
2020-07-07 11:35:08 +03:00
|
|
|
Import React and the GLRenderer Components. Unfortunately the
|
|
|
|
GLRenderer is not usable outside of this application.
|
2020-07-03 19:38:44 +03:00
|
|
|
</System.P>
|
|
|
|
<br />
|
|
|
|
<br />
|
2020-07-21 03:56:14 +03:00
|
|
|
<CodeBlock>
|
2020-07-28 23:27:53 +03:00
|
|
|
{`import * as React from "react";
|
|
|
|
import GLRenderer from "~/components/three/GLRenderer";`}
|
2020-07-21 03:56:14 +03:00
|
|
|
</CodeBlock>
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
2020-07-03 19:38:44 +03:00
|
|
|
<br />
|
|
|
|
<System.H2>Usage</System.H2>
|
|
|
|
<hr />
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
2020-07-29 06:05:21 +03:00
|
|
|
<System.P>
|
|
|
|
Declare the Globe component. Specify{" "}
|
|
|
|
<System.CodeText>countries</System.CodeText> to be true to include
|
|
|
|
markers for each country.
|
|
|
|
</System.P>
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
2020-07-21 03:56:14 +03:00
|
|
|
<CodeBlock>
|
2020-07-07 11:35:08 +03:00
|
|
|
{`class ExampleOne extends React.Component {
|
2020-07-28 23:27:53 +03:00
|
|
|
render() {
|
2020-07-29 06:05:21 +03:00
|
|
|
return (
|
|
|
|
<React.Fragment>
|
|
|
|
<GLRenderer width={768} height={480} />
|
|
|
|
<GLRenderer countries width={768} height={480} />
|
|
|
|
</React.Fragment>
|
|
|
|
);
|
2020-07-28 23:27:53 +03:00
|
|
|
}
|
2020-07-07 11:35:08 +03:00
|
|
|
}`}
|
2020-07-21 03:56:14 +03:00
|
|
|
</CodeBlock>
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<System.H2>Output</System.H2>
|
|
|
|
<hr />
|
|
|
|
<br />
|
2020-06-22 14:00:51 +03:00
|
|
|
<GLRenderer width={768} height={480} />
|
2020-07-29 06:05:21 +03:00
|
|
|
<GLRenderer countries width={768} height={480} />
|
2020-06-22 14:00:51 +03:00
|
|
|
</SystemPage>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|