-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
1384f61
commit 3469bc9
Showing
47 changed files
with
5,658 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
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 @@ | ||
export default { | ||
// more father 4 config: https://github.com/umijs/father-next/blob/master/docs/config.md | ||
esm: {}, | ||
}; |
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,26 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/npm-debug.log* | ||
/yarn-error.log | ||
/yarn.lock | ||
/package-lock.json | ||
|
||
# production | ||
/es | ||
/docs-dist | ||
|
||
# misc | ||
.DS_Store | ||
/coverage | ||
|
||
# umi | ||
.umi | ||
.umi-production | ||
.umi-test | ||
.env.local | ||
|
||
# ide | ||
/.vscode | ||
/.idea |
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,7 @@ | ||
**/*.svg | ||
**/*.ejs | ||
**/*.html | ||
package.json | ||
.umi | ||
.umi-production | ||
.umi-test |
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 @@ | ||
module.exports = require('@umijs/fabric').prettier; |
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,76 @@ | ||
import { defineConfig } from 'dumi'; | ||
|
||
export default defineConfig({ | ||
resolve: { includes: ['docs', 'src'] }, | ||
menus: { | ||
'/guide': [ | ||
{ | ||
title: '指南', | ||
children: [ | ||
{ | ||
title: '安装', | ||
path: '/guide/installation', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: '示例', | ||
children: [ | ||
{ | ||
title: '自定义背景色', | ||
path: '/guide/background', | ||
}, | ||
{ | ||
title: '获取截图', | ||
path: '/guide/snapshot', | ||
}, | ||
{ | ||
title: '旋转模型', | ||
path: '/guide/rotation', | ||
}, | ||
{ | ||
title: 'GLTF格式', | ||
path: '/guide/gltf', | ||
}, | ||
{ | ||
title: 'Collada格式', | ||
path: '/guide/collada', | ||
}, | ||
{ | ||
title: 'FBX格式', | ||
path: '/guide/fbx', | ||
}, | ||
{ | ||
title: 'OBJ格式', | ||
path: '/guide/obj', | ||
}, | ||
{ | ||
title: 'PLY格式', | ||
path: '/guide/ply', | ||
}, | ||
{ | ||
title: 'STL格式', | ||
path: '/guide/stl', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
navs: [ | ||
{ | ||
title: '指南', | ||
path: '/guide', | ||
}, | ||
{ | ||
title: 'GitHub', | ||
path: 'https://github.com/umijs/dumi', | ||
}, | ||
], | ||
publicPath: './', | ||
history: { type: 'hash' }, | ||
title: 'react-3d-model', | ||
favicon: './3d.png', | ||
logo: './3d.png', | ||
outputPath: 'docs-dist', | ||
mode: 'site', | ||
}); |
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,20 @@ | ||
--- | ||
hero: | ||
title: react-3d-model | ||
desc: react-3d-model site example | ||
actions: | ||
- text: Getting Started | ||
link: /guide | ||
footer: Open-source MIT Licensed | Copyright © 2022<br /> | ||
--- | ||
|
||
```tsx | ||
import React from 'react'; | ||
import Model from 'react-3d-model'; | ||
|
||
export default () => ( | ||
<div style={{ maxWidth: 800, width: '100%', height: 400, margin: 'auto' }}> | ||
<Model.FBX src="./Samba%20Dancing.fbx" /> | ||
</div> | ||
); | ||
``` |
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,51 @@ | ||
{ | ||
"private": true, | ||
"name": "react-3d-model", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"start": "dumi dev", | ||
"docs:build": "dumi build", | ||
"docs:deploy": "gh-pages -d docs-dist", | ||
"build": "father build", | ||
"deploy": "npm run docs:build && npm run docs:deploy", | ||
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"", | ||
"test": "umi-test", | ||
"test:coverage": "umi-test --coverage", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"module": "dist/esm/index.js", | ||
"typings": "dist/esm/index.d.ts", | ||
"gitHooks": { | ||
"pre-commit": "lint-staged" | ||
}, | ||
"lint-staged": { | ||
"*.{js,jsx,less,md,json}": [ | ||
"prettier --write" | ||
], | ||
"*.ts?(x)": [ | ||
"prettier --parser=typescript --write" | ||
] | ||
}, | ||
"dependencies": { | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"three": "^0.135.0" | ||
}, | ||
"devDependencies": { | ||
"@testing-library/jest-dom": "^5.15.1", | ||
"@testing-library/react": "^13.0.0", | ||
"@types/jest": "^27.0.3", | ||
"@types/three": "^0.144.0", | ||
"@umijs/fabric": "^2.8.1", | ||
"@umijs/test": "^3.0.5", | ||
"dumi": "^1.1.0", | ||
"father": "^4.0.0-rc.2", | ||
"gh-pages": "^3.0.0", | ||
"lint-staged": "^10.0.7", | ||
"prettier": "^2.2.1", | ||
"yorkie": "^2.0.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.