-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
3,698 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: LuisEnMarroquin/[email protected] | ||
with: | ||
SSHKEY: ${{ secrets.CC_GA }} # ----- BEGIN RSA PRIVATE KEY----- ... | ||
- run: ssh -T [email protected] || true | ||
- run: git submodule update --init --recursive | ||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
|
||
|
@@ -32,7 +36,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: LuisEnMarroquin/[email protected] | ||
with: | ||
SSHKEY: ${{ secrets.CC_GA }} # ----- BEGIN RSA PRIVATE KEY----- ... | ||
- run: ssh -T [email protected] || true | ||
- run: git submodule update --init --recursive | ||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,10 @@ jobs: | |
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: LuisEnMarroquin/[email protected] | ||
with: | ||
SSHKEY: ${{ secrets.CC_GA }} # ----- BEGIN RSA PRIVATE KEY----- ... | ||
- run: ssh -T [email protected] || true | ||
- uses: actions/checkout@v3 | ||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
|
@@ -40,7 +44,14 @@ jobs: | |
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: LuisEnMarroquin/[email protected] | ||
with: | ||
SSHKEY: ${{ secrets.CC_GA }} # ----- BEGIN RSA PRIVATE KEY----- ... | ||
- run: ssh -T [email protected] || true | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
ssh-key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkAa2Y049BCOYn0m2IINqBTjO18HtiOia4QRDkmClCy4/fQLcPsmQ7C7cE3TDGFNbIcm17jl3wQXCd8y1SBi6iWhcHXskI+HCtzN/NASBstljcuhx6gll3xjFhWj2XN2zwmpLzOVsCj7K34N8FRmEaPcrB3D0pKg89qO3SCPETFAwuzLFWsPzXWtDL6O90qbO1AGg2vQrucRvvIiQ2IOg8eMidXszgVi8kanfuh4zVRn+NINpNZMYFabkj6HfbGX9QyRyOS2cznKCG8MXIbIJiK9jTR0Yd0/WaUHRk69fBB0p5zhhVsrMvBAM/RjLKg1ePgJctYPTFPJMc59/MwCB3 cc_ga" | ||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
[submodule "packages/skboa"] | ||
path = packages/skvm/skboa | ||
url = [email protected]:chain-web/boa.git | ||
|
||
[submodule "configs"] | ||
path = packages/private_configs | ||
url = [email protected]:chain-web/private_configs.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type PrivateConfigs = { | ||
mapboxToken: string; | ||
mapboxStyle: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: 'Dev Log 2023-07' | ||
description: '' | ||
--- | ||
|
||
### 7-10~7-14 | ||
|
||
- [x] 创建了 land app 工程,用来做地图游戏开发 | ||
- [x] 用私有的 repo: private_configs 来存储私有的配置文件,比如 mapbox token | ||
- [x] 加入 mapbox + deck.gl + h3-js 的格子地图 | ||
- [x] 调研、学习 deck.gl [怎么结合 mapbox 使用](https://deck.gl/docs/get-started/using-with-map) | ||
- [x] 最开始想用 deck.gl 的 HexagonLayer 来实现大量格子渲染,但是发现这个 layer 不太灵活,最后选择了用 polygon Layer + h3-js 来实现(从 HexagonLayer 精简而来),最终只用来测试,还没实际用起来 | ||
- [x] 用 mapboxOverlay + deck.gl 来实现了地图上添加 deck.gl 的图层,最终选用了这个方案 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { SKChain } from 'skchain'; | ||
|
||
const createChain = () => { | ||
const chain = new SKChain(); | ||
return chain; | ||
}; | ||
|
||
export const chain = createChain(); | ||
|
||
export const chainState = chain.chainState; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/land_app/src/pages/mainWindow/components/Tabbar/index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.tabbar-box { | ||
.ant-tabs-nav { | ||
margin-top: 0px; | ||
padding: 10px 36px; | ||
} | ||
.tabbar-item-box { | ||
height: calc(100vh - 80px); | ||
position: relative; | ||
overflow: hidden; | ||
} | ||
} | ||
|
||
#map-container { | ||
width: 100%; | ||
height: 100%; | ||
} |
88 changes: 88 additions & 0 deletions
88
packages/land_app/src/pages/mainWindow/components/Tabbar/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import { Button, Modal, Tabs } from 'antd'; | ||
import { useActor } from '@xstate/react'; | ||
import { useState } from 'react'; | ||
// import GridDrawer from '../GridDrawer'; | ||
import './index.scss'; | ||
// import { Contract as CtrClass } from '../../contract/index'; | ||
// import CtrCode from '../../contract/index.contract'; | ||
// import { DeployContract } from '../../../test/components/contract/DeployContract'; | ||
// import { TestContract } from '../../../test/components/contract/TestContract'; | ||
// import { contractAddressKey } from '../../contract/mapContract'; | ||
import { chainState } from '../../../../chain/skchain'; | ||
|
||
const TabPane = Tabs.TabPane; // TODO use item config | ||
// const DeployContractComp = DeployContract(CtrClass, CtrCode); | ||
// const TestContractComp = TestContract(CtrClass, CtrCode); | ||
export default function Tabbar() { | ||
const [showNodeModal, setshowNodeModal] = useState(true); | ||
return ( | ||
<div className="tabbar-box"> | ||
<Tabs tabPosition={'bottom'} defaultActiveKey="home"> | ||
<TabPane forceRender tab="home" key="home" className="tabbar-item-box"> | ||
{/* <Button | ||
onClick={async () => { | ||
const data = mapDb.trans.toArray(); | ||
console.log(data); | ||
}} | ||
> | ||
getMapDb | ||
</Button> */} | ||
{/* <Button | ||
onClick={async () => { | ||
const data = await mapDb.trans | ||
.where('ts') | ||
.below(Date.now()) | ||
.delete(); | ||
console.log('delete', data); | ||
}} | ||
> | ||
clear mapDb.trans | ||
</Button> */} | ||
{/* <Button | ||
onClick={() => { | ||
setshowNodeModal(true); | ||
}} | ||
style={{ float: 'right' }} | ||
> | ||
node | ||
</Button> */} | ||
<div | ||
style={{ | ||
visibility: chainState.started ? 'visible' : 'hidden', | ||
}} | ||
id="map-container" | ||
/> | ||
{/* <GridDrawer /> */} | ||
{/* <Modal | ||
visible={showNodeModal} | ||
onCancel={() => { | ||
setshowNodeModal(false); | ||
}} | ||
style={{ top: 0 }} | ||
maskClosable={false} | ||
footer={null} | ||
> | ||
<DeployContractComp | ||
onSuccess={(trans) => { | ||
localStorage.setItem(contractAddressKey, trans.recipient.did); | ||
}} | ||
/> | ||
<TestContractComp /> | ||
</Modal> */} | ||
</TabPane> | ||
{/* <TabPane | ||
forceRender | ||
style={{ overflow: 'auto' }} | ||
className="tabbar-item-box" | ||
tab="node" | ||
key="node" | ||
> | ||
</TabPane> */} | ||
<TabPane forceRender className="tabbar-item-box" tab="mine" key="mine"> | ||
mine | ||
</TabPane> | ||
</Tabs> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.