├── docs ├── .nojekyll ├── zh-cn │ ├── cli.md │ ├── dev-tool.md │ └── README.md ├── _navbar.md ├── index.html └── en-us │ └── README.md ├── _config.yml ├── demo ├── src │ ├── lite-design │ │ ├── common │ │ │ ├── utils │ │ │ │ └── .gitkeep │ │ │ ├── styles │ │ │ │ ├── theme.less │ │ │ │ └── base.less │ │ │ ├── imgs │ │ │ │ └── eden.png │ │ │ ├── fonts │ │ │ │ ├── ionicons.eot │ │ │ │ ├── ionicons.ttf │ │ │ │ └── ionicons.woff │ │ │ └── consts │ │ │ │ └── scene.ts │ │ ├── types │ │ │ ├── README.md │ │ │ ├── global.d.ts │ │ │ ├── assetsDefinition.d.ts │ │ │ └── types.ts │ │ ├── tests │ │ │ └── index.test.ts │ │ ├── models │ │ │ ├── entity │ │ │ │ ├── cube.ts │ │ │ │ ├── background.ts │ │ │ │ ├── adjustPoint.ts │ │ │ │ ├── clipPoint.ts │ │ │ │ ├── deletePoint.ts │ │ │ │ ├── rotatePoint.ts │ │ │ │ ├── scalePoint.ts │ │ │ │ ├── skewPoint.ts │ │ │ │ ├── skyBox.ts │ │ │ │ └── assembly.ts │ │ │ ├── index.ts │ │ │ └── domain │ │ │ │ └── scene.ts │ │ ├── views │ │ │ ├── scene │ │ │ │ ├── index.less │ │ │ │ ├── camera │ │ │ │ │ └── index.tsx │ │ │ │ ├── tempWorld │ │ │ │ │ └── index.ts │ │ │ │ └── modelsWorld │ │ │ │ │ ├── SkewPoint.ts │ │ │ │ │ ├── ScalePoint.ts │ │ │ │ │ ├── RotatePoint.ts │ │ │ │ │ ├── ClipBorder.ts │ │ │ │ │ ├── Assembly.ts │ │ │ │ │ ├── Cube.ts │ │ │ │ │ ├── ClipPoint.ts │ │ │ │ │ └── AdjustPoint.ts │ │ │ └── leftPanel │ │ │ │ └── index.less │ │ ├── commands │ │ │ ├── measure │ │ │ │ ├── domain.ts │ │ │ │ └── index.ts │ │ │ ├── default │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── utils │ │ │ ├── common.ts │ │ │ └── color.ts │ │ └── index.tsx │ ├── image-builder │ │ ├── types │ │ │ ├── README.md │ │ │ ├── global.d.ts │ │ │ ├── assetsDefinition.d.ts │ │ │ └── types.ts │ │ ├── common │ │ │ ├── styles │ │ │ │ ├── theme.less │ │ │ │ └── base.less │ │ │ ├── imgs │ │ │ │ └── eden.png │ │ │ ├── consts │ │ │ │ ├── view-entity.ts │ │ │ │ ├── color.ts │ │ │ │ ├── action.ts │ │ │ │ └── scene.ts │ │ │ └── utils │ │ │ │ ├── text.ts │ │ │ │ └── image.ts │ │ ├── models │ │ │ ├── index.ts │ │ │ └── entity │ │ │ │ └── frame.ts │ │ ├── views │ │ │ ├── rightPanel │ │ │ │ ├── attribute.tsx │ │ │ │ └── index.less │ │ │ ├── topBar │ │ │ │ └── index.less │ │ │ ├── world │ │ │ │ ├── snapLine │ │ │ │ │ └── index.ts │ │ │ │ ├── hintLine │ │ │ │ │ └── index.ts │ │ │ │ ├── rangeLine │ │ │ │ │ └── index.ts │ │ │ │ └── entity │ │ │ │ │ ├── index.ts │ │ │ │ │ └── frame │ │ │ │ │ └── index.ts │ │ │ └── bottomBar │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ ├── index.less │ │ └── commands │ │ │ ├── shared │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── default │ │ │ └── index.ts │ ├── data-flow │ │ ├── types │ │ │ └── enum.ts │ │ ├── math │ │ │ └── Point2d.ts │ │ ├── DisposerTest.tsx │ │ ├── domain │ │ │ ├── countertops.ts │ │ │ ├── line.ts │ │ │ └── point.ts │ │ ├── NormalPoint.tsx │ │ ├── Line.tsx │ │ └── Collection.tsx │ ├── 2d │ │ └── index.tsx │ └── 3d │ │ └── wireframe.tsx ├── .babelrc.js ├── index.html └── tsconfig.json ├── packages ├── turbox │ ├── README.md │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── src │ │ ├── __tests__ │ │ │ └── index.test.ts │ │ └── index.ts │ ├── tsconfig.json │ └── .npmignore ├── turbox2d │ ├── README.md │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── src │ │ ├── __tests__ │ │ │ └── index.test.ts │ │ └── index.ts │ ├── tsconfig.json │ └── .npmignore ├── turbox3d │ ├── README.md │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── src │ │ ├── __tests__ │ │ │ └── index.test.ts │ │ └── index.ts │ ├── tsconfig.json │ └── .npmignore ├── graphic-component-three │ ├── src │ │ ├── _utils │ │ │ ├── utils.ts │ │ │ └── README.md │ │ ├── axis3d │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── gizmo3d │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── arrow3d │ │ │ └── index.ts │ │ ├── cube │ │ │ └── index.ts │ │ ├── rect3d │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── wireframe │ │ │ └── index.ts │ │ ├── fat-line │ │ │ └── index.ts │ │ └── circle3d │ │ │ └── index.ts │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ └── .npmignore ├── design-engine │ ├── src │ │ ├── env-system │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── document-system │ │ │ └── README.md │ │ ├── entity-object │ │ │ └── README.md │ │ ├── measure-command │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── mount-system │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── renderPluginView.tsx │ │ │ └── ViewMounter.tsx │ │ ├── unit-system │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── collision-engine │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── free-draw-command │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── inference-engine │ │ │ └── README.md │ │ ├── placement-engine │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── assembly-entity-object │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── material-brush-command │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── rect-selection-command │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── material-drag-system │ │ │ └── README.md │ │ ├── hint-command │ │ │ └── README.md │ │ ├── load-system │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── space-engine │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── selection-command │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ └── domain.ts │ │ └── index.ts │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ └── .npmignore ├── graphic-component-pixi │ ├── src │ │ ├── _utils │ │ │ └── README.md │ │ ├── axis2d │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── dimension │ │ │ └── README.md │ │ ├── draw-utils │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── drawCircle.ts │ │ │ ├── drawPolygon.ts │ │ │ ├── drawLine.ts │ │ │ └── drawPath.ts │ │ ├── placement │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── gizmo2d │ │ │ └── README.md │ │ ├── arrow2d │ │ │ └── index.ts │ │ ├── grid2d │ │ │ └── index.ts │ │ ├── line2d │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── polygon │ │ │ └── index.ts │ │ ├── circle2d │ │ │ └── index.ts │ │ └── angle-dimension │ │ │ └── index.ts │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ └── .npmignore ├── command-manager │ ├── demo │ │ ├── interactors │ │ │ ├── index.ts │ │ │ ├── structure │ │ │ │ ├── index.ts │ │ │ │ ├── type.ts │ │ │ │ ├── DistributeCommandUnit.ts │ │ │ │ └── CommandUnit.ts │ │ │ └── ioc │ │ │ │ └── test.ts │ │ └── CommandDemo.ts │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── src │ │ ├── util.ts │ │ ├── index.ts │ │ ├── install.ts │ │ ├── manager.ts │ │ ├── compose.ts │ │ ├── create.ts │ │ ├── type.ts │ │ └── CommandManager.ts │ ├── tsconfig.json │ └── .npmignore ├── math │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── .npmignore │ ├── src │ │ ├── index.ts │ │ └── base │ │ │ └── Tolerance.ts │ └── CHANGELOG.md ├── shared │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── .npmignore │ └── src │ │ ├── __tests__ │ │ ├── lang.test.ts │ │ └── compose.test.ts │ │ ├── compose.ts │ │ ├── task.ts │ │ ├── decorator.ts │ │ ├── index.ts │ │ ├── type.ts │ │ ├── error.ts │ │ ├── uuid.ts │ │ ├── lang.ts │ │ ├── event.ts │ │ └── graphic.ts ├── event-manager │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── .npmignore │ └── src │ │ ├── interactive │ │ └── listener │ │ │ ├── utils.ts │ │ │ └── type.ts │ │ ├── index.ts │ │ └── keyboard │ │ └── type.ts ├── reactivity │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── src │ │ ├── utils │ │ │ └── common.ts │ │ ├── const │ │ │ ├── symbol.ts │ │ │ ├── config.ts │ │ │ └── enums.ts │ │ ├── middlewares │ │ │ ├── common.ts │ │ │ ├── mutation.ts │ │ │ ├── perf.ts │ │ │ └── effect.ts │ │ ├── index.ts │ │ └── core │ │ │ └── use.ts │ ├── tsconfig.json │ └── .npmignore ├── renderer-core │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── .npmignore │ └── src │ │ ├── common.ts │ │ ├── __tests__ │ │ └── render.test.ts │ │ ├── index.ts │ │ └── utils.ts ├── renderer-pixi │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── .npmignore │ └── src │ │ ├── index.ts │ │ └── Mesh2D │ │ └── Mesh2D.ts ├── renderer-three │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── .npmignore │ └── src │ │ ├── index.ts │ │ └── Mesh3D │ │ └── Mesh3D.ts └── reactivity-react │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── .npmignore │ └── src │ ├── index.ts │ ├── utils │ └── index.ts │ └── components │ └── ErrorBoundary.tsx ├── .eslintignore ├── plugins ├── turbox-snippets │ ├── .vscodeignore │ ├── images │ │ └── turbox.png │ ├── CHANGELOG.md │ └── package.json ├── turbox-dev-tool │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── src │ │ ├── index.ts │ │ └── fps-monitor │ │ │ ├── index.tsx │ │ │ └── fps.ts │ ├── .npmignore │ └── CHANGELOG.md └── turbox-hot-loader │ ├── .babelrc.js │ ├── jest.config.js │ ├── webpack.config.js │ ├── tsconfig.json │ ├── .npmignore │ └── src │ ├── index.ts │ └── utils │ └── index.ts ├── .prettierrc ├── pnpm-workspace.yaml ├── .vsce.template ├── typedoc.json ├── .npmrc ├── .editorconfig ├── .npmrc.template ├── .npmignore ├── .changeset ├── config.json └── README.md ├── .gitignore ├── jest.config.js ├── .babelrc.js ├── .travis.yml ├── tsconfig.json ├── LICENSE ├── README.zh-CN.md └── README.md /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /demo/src/lite-design/common/utils/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/turbox/README.md: -------------------------------------------------------------------------------- 1 | # 标准化通用项目 2 | -------------------------------------------------------------------------------- /packages/turbox2d/README.md: -------------------------------------------------------------------------------- 1 | # 标准化通用项目 2 | -------------------------------------------------------------------------------- /packages/turbox3d/README.md: -------------------------------------------------------------------------------- 1 | # 标准化通用项目 2 | -------------------------------------------------------------------------------- /demo/src/image-builder/types/README.md: -------------------------------------------------------------------------------- 1 | # 全局类型文件 2 | -------------------------------------------------------------------------------- /demo/src/lite-design/types/README.md: -------------------------------------------------------------------------------- 1 | # 全局类型文件 2 | -------------------------------------------------------------------------------- /packages/graphic-component-three/src/_utils/utils.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/design-engine/src/env-system/README.md: -------------------------------------------------------------------------------- 1 | # 环境系统 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | plugins/ 2 | node_modules/ 3 | demo/ 4 | *.js 5 | -------------------------------------------------------------------------------- /packages/design-engine/src/document-system/README.md: -------------------------------------------------------------------------------- 1 | # 文档系统 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/entity-object/README.md: -------------------------------------------------------------------------------- 1 | # 通用实体模型 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/measure-command/README.md: -------------------------------------------------------------------------------- 1 | # 测量指令 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/mount-system/README.md: -------------------------------------------------------------------------------- 1 | # 挂载容器系统 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/unit-system/README.md: -------------------------------------------------------------------------------- 1 | # 单位系统 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/collision-engine/README.md: -------------------------------------------------------------------------------- 1 | # 碰撞引擎 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/free-draw-command/README.md: -------------------------------------------------------------------------------- 1 | # 自由绘制指令 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/inference-engine/README.md: -------------------------------------------------------------------------------- 1 | # 吸附引擎 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/placement-engine/README.md: -------------------------------------------------------------------------------- 1 | # 摆放引擎 2 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/src/_utils/README.md: -------------------------------------------------------------------------------- 1 | # 公共工具函数 2 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/src/axis2d/README.md: -------------------------------------------------------------------------------- 1 | # 坐标轴 2d 控件 2 | -------------------------------------------------------------------------------- /packages/graphic-component-three/src/_utils/README.md: -------------------------------------------------------------------------------- 1 | # 公共工具函数 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/assembly-entity-object/README.md: -------------------------------------------------------------------------------- 1 | # 组合实体模型 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/material-brush-command/README.md: -------------------------------------------------------------------------------- 1 | # 材质刷指令 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/rect-selection-command/README.md: -------------------------------------------------------------------------------- 1 | # 框选指令 2 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/src/dimension/README.md: -------------------------------------------------------------------------------- 1 | # 尺寸线的图形控件 2 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/src/draw-utils/README.md: -------------------------------------------------------------------------------- 1 | # 图形绘制工具方法 2 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/src/placement/README.md: -------------------------------------------------------------------------------- 1 | # 六面、四角摆放的控件 2 | -------------------------------------------------------------------------------- /packages/graphic-component-three/src/axis3d/README.md: -------------------------------------------------------------------------------- 1 | # 坐标轴 3d 控件 2 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/src/gizmo2d/README.md: -------------------------------------------------------------------------------- 1 | # gizmo 对象旋转、平移、缩放控件 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/material-drag-system/README.md: -------------------------------------------------------------------------------- 1 | # 素材拖拽系统(for web 面板) 2 | -------------------------------------------------------------------------------- /packages/graphic-component-three/src/gizmo3d/README.md: -------------------------------------------------------------------------------- 1 | # gizmo 对象旋转、平移、缩放控件 2 | -------------------------------------------------------------------------------- /packages/design-engine/src/hint-command/README.md: -------------------------------------------------------------------------------- 1 | # 实体提示指令 2 | 3 | 实体的 hover 效果 4 | -------------------------------------------------------------------------------- /packages/design-engine/src/load-system/README.md: -------------------------------------------------------------------------------- 1 | # 资源加载系统 2 | 3 | 贴图、二进制文件、JSON 文件等 4 | -------------------------------------------------------------------------------- /plugins/turbox-snippets/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | -------------------------------------------------------------------------------- /packages/design-engine/src/space-engine/README.md: -------------------------------------------------------------------------------- 1 | # 内空引擎 2 | 3 | * 2d 内空 4 | * 3d 内空 5 | -------------------------------------------------------------------------------- /packages/design-engine/src/selection-command/README.md: -------------------------------------------------------------------------------- 1 | # 实体选择指令 2 | 3 | 包括整体选择、部件选择、多级选择、多选 4 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/src/arrow2d/index.ts: -------------------------------------------------------------------------------- 1 | export default class Arrow2d { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/graphic-component-three/src/arrow3d/index.ts: -------------------------------------------------------------------------------- 1 | export default class Arrow3d { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "arrowParens": "avoid" 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/image-builder/common/styles/theme.less: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: rgb(247, 245, 245); 3 | } 4 | -------------------------------------------------------------------------------- /demo/src/lite-design/common/styles/theme.less: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: rgb(247, 245, 245); 3 | } 4 | -------------------------------------------------------------------------------- /packages/design-engine/src/collision-engine/index.ts: -------------------------------------------------------------------------------- 1 | export default class CollisionEngine { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/design-engine/src/free-draw-command/index.ts: -------------------------------------------------------------------------------- 1 | export default class FreeDrawCommand { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/design-engine/src/measure-command/index.ts: -------------------------------------------------------------------------------- 1 | export default class MeasureCommand { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/command-manager/demo/interactors/index.ts: -------------------------------------------------------------------------------- 1 | // export * from './ioc'; 2 | export * from './structure'; 3 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/*' 3 | - 'plugins/*' 4 | link-workspace-packages: false 5 | -------------------------------------------------------------------------------- /packages/design-engine/src/material-brush-command/index.ts: -------------------------------------------------------------------------------- 1 | export default class MaterialBrushCommand { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/design-engine/src/rect-selection-command/index.ts: -------------------------------------------------------------------------------- 1 | export default class RectSelectionCommand { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/design-engine/src/unit-system/index.ts: -------------------------------------------------------------------------------- 1 | class UnitSystem { 2 | 3 | } 4 | 5 | export default UnitSystem; 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/tests/index.test.ts: -------------------------------------------------------------------------------- 1 | test('adds 1 + 2 to equal 3', () => { 2 | expect((1 + 2)).toBe(3); 3 | }); 4 | -------------------------------------------------------------------------------- /packages/design-engine/src/space-engine/index.ts: -------------------------------------------------------------------------------- 1 | class SpaceEngine { 2 | 3 | } 4 | 5 | export default SpaceEngine; 6 | -------------------------------------------------------------------------------- /.vsce.template: -------------------------------------------------------------------------------- 1 | { 2 | "publishers":[{ 3 | "name": "feifan-gff", 4 | "pat": "${AZURE_ACCESS_TOKEN}" 5 | }] 6 | } 7 | -------------------------------------------------------------------------------- /packages/math/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/common/imgs/eden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/turbox3d/turbox/HEAD/demo/src/lite-design/common/imgs/eden.png -------------------------------------------------------------------------------- /packages/design-engine/src/placement-engine/index.ts: -------------------------------------------------------------------------------- 1 | class PlacementEngine { 2 | 3 | } 4 | 5 | export default PlacementEngine; 6 | -------------------------------------------------------------------------------- /packages/math/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/shared/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox2d/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox3d/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /plugins/turbox-snippets/images/turbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/turbox3d/turbox/HEAD/plugins/turbox-snippets/images/turbox.png -------------------------------------------------------------------------------- /typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "includeVersion": true, 4 | "out": "./typedocs" 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/image-builder/common/imgs/eden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/turbox3d/turbox/HEAD/demo/src/image-builder/common/imgs/eden.png -------------------------------------------------------------------------------- /packages/design-engine/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/event-manager/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/math/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/reactivity/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/reactivity/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-core/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-pixi/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-three/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/shared/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox2d/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox3d/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /plugins/turbox-dev-tool/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /demo/src/data-flow/types/enum.ts: -------------------------------------------------------------------------------- 1 | export enum EPointType { 2 | NONE = 0, 3 | CIRCLE = 1, 4 | LINE = 2, 5 | CUT_CIRCLE = 3, 6 | } 7 | -------------------------------------------------------------------------------- /demo/src/lite-design/common/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/turbox3d/turbox/HEAD/demo/src/lite-design/common/fonts/ionicons.eot -------------------------------------------------------------------------------- /demo/src/lite-design/common/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/turbox3d/turbox/HEAD/demo/src/lite-design/common/fonts/ionicons.ttf -------------------------------------------------------------------------------- /packages/command-manager/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/command-manager/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/design-engine/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/event-manager/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/reactivity-react/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-core/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-pixi/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-three/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/shared/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox2d/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox3d/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /plugins/turbox-dev-tool/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /plugins/turbox-hot-loader/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /demo/src/image-builder/common/consts/view-entity.ts: -------------------------------------------------------------------------------- 1 | export const ItemSymbol = Symbol('item'); 2 | export const FrameSymbol = Symbol('frame'); 3 | -------------------------------------------------------------------------------- /demo/src/lite-design/common/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/turbox3d/turbox/HEAD/demo/src/lite-design/common/fonts/ionicons.woff -------------------------------------------------------------------------------- /packages/design-engine/src/selection-command/index.ts: -------------------------------------------------------------------------------- 1 | import { SelectionCommand } from './command'; 2 | 3 | export default SelectionCommand; 4 | -------------------------------------------------------------------------------- /packages/design-engine/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/event-manager/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/graphic-component-three/.babelrc.js: -------------------------------------------------------------------------------- 1 | const config = require('../../.babelrc.js'); 2 | 3 | module.exports = { 4 | ...config(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/reactivity-react/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/reactivity/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-core/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-pixi/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/renderer-three/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /plugins/turbox-dev-tool/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /plugins/turbox-hot-loader/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/common/styles/base.less: -------------------------------------------------------------------------------- 1 | // @import "normalize.css"; 2 | @import "./theme.less"; 3 | 4 | .body { 5 | font-size: 12px; 6 | } 7 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/cube.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject } from '@turbox3d/turbox'; 2 | 3 | export class CubeEntity extends EntityObject {} 4 | -------------------------------------------------------------------------------- /packages/command-manager/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/graphic-component-three/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../jest.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/reactivity-react/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/turbox/src/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('test', () => { 2 | it('test', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /packages/turbox2d/src/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('test', () => { 2 | it('test', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /packages/turbox3d/src/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('test', () => { 2 | it('test', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /plugins/turbox-hot-loader/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/graphic-component-three/webpack.config.js: -------------------------------------------------------------------------------- 1 | const config = require('../../webpack.config.js'); 2 | 3 | module.exports = { 4 | ...config, 5 | }; 6 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=true 2 | # enable-pre-post-scripts=true 3 | # link-workspace-packages=false 4 | # prefer-workspace-packages=true 5 | # save-workspace-protocol=true 6 | -------------------------------------------------------------------------------- /demo/src/image-builder/types/global.d.ts: -------------------------------------------------------------------------------- 1 | interface Window { 2 | // eslint-disable-next-line @typescript-eslint/naming-convention 3 | $$DEBUG: any; 4 | ColorThief: any; 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/types/global.d.ts: -------------------------------------------------------------------------------- 1 | interface Window { 2 | // eslint-disable-next-line @typescript-eslint/naming-convention 3 | $$DEMO_DEBUG: any; 4 | ColorThief: any; 5 | } 6 | -------------------------------------------------------------------------------- /packages/design-engine/src/load-system/index.ts: -------------------------------------------------------------------------------- 1 | import { loadJSON } from '@turbox3d/shared'; 2 | 3 | const LoadSystem = { 4 | loadJSON, 5 | }; 6 | 7 | export default LoadSystem; 8 | -------------------------------------------------------------------------------- /packages/reactivity/src/utils/common.ts: -------------------------------------------------------------------------------- 1 | import { Domain } from '../core/domain'; 2 | 3 | export function isDomain(value: any): boolean { 4 | return value instanceof Domain; 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/background.ts: -------------------------------------------------------------------------------- 1 | import { ProductEntity } from './product'; 2 | 3 | export class BackgroundEntity extends ProductEntity { 4 | name = 'background'; 5 | } 6 | -------------------------------------------------------------------------------- /packages/design-engine/src/assembly-entity-object/index.ts: -------------------------------------------------------------------------------- 1 | import EntityObject from '../entity-object/index'; 2 | 3 | export default class AssemblyEntityObject extends EntityObject { 4 | } 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/adjustPoint.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject, reactor } from '@turbox3d/turbox'; 2 | 3 | export class AdjustPointEntity extends EntityObject { 4 | @reactor radius = 10; 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/clipPoint.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject, reactor } from '@turbox3d/turbox'; 2 | 3 | export class ClipPointEntity extends EntityObject { 4 | @reactor radius = 10; 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/deletePoint.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject, reactor } from '@turbox3d/turbox'; 2 | 3 | export class DeletePointEntity extends EntityObject { 4 | @reactor radius = 10; 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/rotatePoint.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject, reactor } from '@turbox3d/turbox'; 2 | 3 | export class RotatePointEntity extends EntityObject { 4 | @reactor radius = 10; 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/scalePoint.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject, reactor } from '@turbox3d/turbox'; 2 | 3 | export class ScalePointEntity extends EntityObject { 4 | @reactor radius = 10; 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/skewPoint.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject, reactor } from '@turbox3d/turbox'; 2 | 3 | export class SkewPointEntity extends EntityObject { 4 | @reactor radius = 10; 5 | } 6 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/entity/skyBox.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject, reactor } from '@turbox3d/turbox'; 2 | 3 | export class SkyBoxEntity extends EntityObject { 4 | @reactor isShowAllFace = false; 5 | } 6 | -------------------------------------------------------------------------------- /packages/math/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/turbox/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/turbox2d/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/turbox3d/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /demo/src/image-builder/common/styles/base.less: -------------------------------------------------------------------------------- 1 | // @import "normalize.css"; 2 | @import "./theme.less"; 3 | 4 | .body { 5 | font-size: 12px; 6 | } 7 | 8 | * { 9 | box-sizing: border-box; 10 | } 11 | -------------------------------------------------------------------------------- /packages/design-engine/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/event-manager/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/reactivity/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/renderer-core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/renderer-pixi/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /demo/src/data-flow/math/Point2d.ts: -------------------------------------------------------------------------------- 1 | export default class Point2d { 2 | x: number; 3 | y: number; 4 | 5 | constructor(x: number, y: number) { 6 | this.x = x; 7 | this.y = y; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /docs/zh-cn/cli.md: -------------------------------------------------------------------------------- 1 | # turbox-cli 2 | [](https://travis-ci.com/github/turbox3d/turbox) 3 | 4 | ## 介绍 5 | turbox 的命令行工具 6 | -------------------------------------------------------------------------------- /packages/command-manager/demo/interactors/structure/index.ts: -------------------------------------------------------------------------------- 1 | export * from './CommandUnit'; 2 | export * from './Manager'; 3 | export * from './DistributeCommandUnit'; 4 | export * from './SequenceCommandUnit'; 5 | -------------------------------------------------------------------------------- /packages/command-manager/src/util.ts: -------------------------------------------------------------------------------- 1 | import { CommandManager } from './CommandManager'; 2 | 3 | export function isCommandManager(mgr: any): mgr is CommandManager { 4 | return mgr instanceof CommandManager; 5 | } 6 | -------------------------------------------------------------------------------- /packages/command-manager/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/reactivity-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/renderer-three/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /plugins/turbox-dev-tool/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /plugins/turbox-hot-loader/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/graphic-component-three/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "./typings", 5 | "outDir": "./ts" 6 | }, 7 | "include": ["src"] 8 | } 9 | -------------------------------------------------------------------------------- /plugins/turbox-dev-tool/src/index.ts: -------------------------------------------------------------------------------- 1 | import { FPSMonitorComponent } from './fps-monitor/index'; 2 | import { FPSMonitor } from './fps-monitor/fps'; 3 | 4 | export { 5 | FPSMonitorComponent, 6 | FPSMonitor 7 | }; 8 | -------------------------------------------------------------------------------- /docs/zh-cn/dev-tool.md: -------------------------------------------------------------------------------- 1 | # turbox-dev-tool 2 | [](https://travis-ci.com/github/turbox3d/turbox) 3 | 4 | ## 介绍 5 | turbox 的浏览器辅助开发工具 6 | -------------------------------------------------------------------------------- /.npmrc.template: -------------------------------------------------------------------------------- 1 | always-auth=true 2 | //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} 3 | registry=https://registry.npmjs.org/ 4 | sass_binary_site=https://npm.taobao.org/mirrors/node-sass 5 | lockfile=false 6 | link-workspace-packages=false 7 | -------------------------------------------------------------------------------- /packages/math/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /demo/src/image-builder/models/index.ts: -------------------------------------------------------------------------------- 1 | import { DocumentDomain } from './domain/document'; 2 | import { SceneDomain } from './domain/scene'; 3 | 4 | export const imageBuilderStore = { 5 | document: new DocumentDomain(), 6 | scene: new SceneDomain(), 7 | }; 8 | -------------------------------------------------------------------------------- /packages/reactivity/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/shared/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/turbox/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/turbox2d/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/turbox3d/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /docs/_navbar.md: -------------------------------------------------------------------------------- 1 | * Translations 2 | * [English](/en-us/) 3 | * [中文](/zh-cn/) 4 | 5 | * [Changelog](CHANGELOG.md) 6 | 7 | * [API List](https://turbox3d.github.io/turbox-type-doc/) 8 | 9 | * [Online Demo](https://codesandbox.io/s/turbox-demo-forked-48s2t) 10 | -------------------------------------------------------------------------------- /packages/command-manager/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/design-engine/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/event-manager/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/renderer-core/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/renderer-pixi/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/renderer-pixi/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Mesh2D } from './Mesh2D/Mesh2D'; 2 | import { Scene2D, Scene2DSymbol } from './Scene2D/index'; 3 | 4 | export * from '@turbox3d/renderer-core'; 5 | export { 6 | Mesh2D, 7 | Scene2D, 8 | Scene2DSymbol, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/renderer-three/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /plugins/turbox-dev-tool/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/graphic-component-three/src/axis3d/index.ts: -------------------------------------------------------------------------------- 1 | import { Mesh3D } from '@turbox3d/renderer-three'; 2 | import * as THREE from 'three'; 3 | 4 | /** 坐标轴 3d 控件 */ 5 | export default class Axis3d extends Mesh3D { 6 | protected view = new THREE.AxesHelper(5000); 7 | } 8 | -------------------------------------------------------------------------------- /packages/reactivity-react/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/renderer-three/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Mesh3D } from './Mesh3D/Mesh3D'; 2 | import { Scene3D, Scene3DSymbol } from './Scene3D/index'; 3 | 4 | export * from '@turbox3d/renderer-core'; 5 | export { 6 | Mesh3D, 7 | Scene3D, 8 | Scene3DSymbol, 9 | }; 10 | -------------------------------------------------------------------------------- /plugins/turbox-hot-loader/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/graphic-component-pixi/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /packages/graphic-component-three/.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Mac 9 | .DS_Store 10 | 11 | # git 12 | .git 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # npm and yarn 2 | npm-debug.log* 3 | node_modules 4 | .npmrc 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Mac 10 | .DS_Store 11 | 12 | # git 13 | .git 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | .history 19 | -------------------------------------------------------------------------------- /packages/design-engine/src/mount-system/index.ts: -------------------------------------------------------------------------------- 1 | import { EnvViewMounter } from './ViewMounter'; 2 | import { renderPluginView } from './renderPluginView'; 3 | 4 | const MountSystem = { 5 | EnvViewMounter, 6 | renderPluginView, 7 | }; 8 | 9 | export default MountSystem; 10 | -------------------------------------------------------------------------------- /demo/src/image-builder/common/consts/color.ts: -------------------------------------------------------------------------------- 1 | export const PRIMARY_COLOR = 0xFE2C55; 2 | export const RED = 0xff0000; 3 | export const GREEN = 0x00ff00; 4 | export const YELLOW = 0xffff00; 5 | export const BLUE = 0x0000ff; 6 | export const WHITE = 0xffffff; 7 | export const GRAY = 0xdddddd; 8 | export const BLACK = 0x000000; 9 | -------------------------------------------------------------------------------- /demo/src/image-builder/models/entity/frame.ts: -------------------------------------------------------------------------------- 1 | import { EntityObject, reactor } from '@turbox3d/turbox'; 2 | import { GRAY } from '../../common/consts/color'; 3 | 4 | export class FrameEntity extends EntityObject { 5 | @reactor imageData?: HTMLImageElement; 6 | @reactor resourceUrl = ''; 7 | @reactor bgColor = GRAY; 8 | } 9 | -------------------------------------------------------------------------------- /packages/command-manager/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Command } from './Command'; 2 | import { CommandManager } from './CommandManager'; 3 | import { isCommandManager } from './util'; 4 | import { SceneTool } from './type'; 5 | 6 | export { 7 | Command, 8 | CommandManager, 9 | isCommandManager, 10 | SceneTool, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/shared/src/__tests__/lang.test.ts: -------------------------------------------------------------------------------- 1 | import { isReserved, isSymbol } from '../lang'; 2 | 3 | describe('utils -> lang', () => { 4 | it('isReserved', () => { 5 | expect(isReserved('$global')).toBeTruthy(); 6 | }); 7 | 8 | it('isSymbol', () => { 9 | expect(isSymbol(Symbol('sss'))).toBeTruthy(); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/shared/src/compose.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * from redux compose 3 | */ 4 | export function compose(...funcs: any[]) { 5 | if (funcs.length === 0) { 6 | return arg => arg; 7 | } 8 | 9 | if (funcs.length === 1) { 10 | return funcs[0]; 11 | } 12 | 13 | return funcs.reduce((a, b) => (...args) => a(b(...args))); 14 | } 15 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": true, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "master", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .DS_Store 3 | .difflintfiles 4 | .idea 5 | lerna-debug.log* 6 | npm-debug.log* 7 | node_modules 8 | yarn-debug.log* 9 | yarn-error.log* 10 | lib 11 | dist 12 | es 13 | coverage 14 | ts 15 | typings 16 | .history 17 | pluginA 18 | pluginB 19 | packages/atom 20 | build 21 | typedocs 22 | pnpm-publish-summary.json 23 | -------------------------------------------------------------------------------- /demo/src/lite-design/models/index.ts: -------------------------------------------------------------------------------- 1 | import { ActionsDomain } from './domain/actions'; 2 | import { DocumentDomain } from './domain/document'; 3 | import { SceneDomain } from './domain/scene'; 4 | 5 | export const ldeStore = { 6 | document: new DocumentDomain(), 7 | actions: new ActionsDomain(), 8 | scene: new SceneDomain(), 9 | }; 10 | -------------------------------------------------------------------------------- /demo/src/lite-design/views/scene/index.less: -------------------------------------------------------------------------------- 1 | .fps-monitor { 2 | position: absolute; 3 | z-index: 100; 4 | top: 0; 5 | left: 0; 6 | background: rgba(0, 0, 0, 0.7); 7 | color: white; 8 | width: 70px; 9 | height: 20px; 10 | pointer-events: none; 11 | display: flex; 12 | justify-content: center; 13 | align-items: center; 14 | } 15 | -------------------------------------------------------------------------------- /packages/shared/src/task.ts: -------------------------------------------------------------------------------- 1 | class Task { 2 | static createTask(fn: Function, priority: number) { 3 | return new Task(fn, priority); 4 | } 5 | 6 | fn: Function; 7 | priority: number; 8 | 9 | constructor(fn: Function, priority: number) { 10 | this.fn = fn; 11 | this.priority = priority; 12 | } 13 | } 14 | 15 | export { Task }; 16 | -------------------------------------------------------------------------------- /packages/renderer-core/src/common.ts: -------------------------------------------------------------------------------- 1 | export const IdCustomType = 'renderer'; 2 | 3 | export enum NodeStatus { 4 | READY = 1, 5 | UPDATE = 2, 6 | UPDATE_INTERACTIVE = 4, 7 | UPDATE_CUSTOM_PROPS = 8, 8 | FAKE_UPDATE = 16, 9 | REMOVE = 32, 10 | CREATE = 64, 11 | } 12 | 13 | export enum NodeTag { 14 | COMPONENT = 1, 15 | SCENE = 2, 16 | MESH = 3, 17 | } 18 | -------------------------------------------------------------------------------- /demo/src/lite-design/commands/measure/domain.ts: -------------------------------------------------------------------------------- 1 | import { Domain, Vector3, reactor } from '@turbox3d/turbox'; 2 | 3 | export class MeasureDomain extends Domain { 4 | @reactor() start?: Vector3; 5 | @reactor() end?: Vector3; 6 | 7 | getLength() { 8 | if (this.end && this.start) { 9 | return this.end.subtracted(this.start).length; 10 | } 11 | return 0; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /demo/src/image-builder/views/rightPanel/attribute.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export function Attribute({ attribute }: { attribute: string }) { 4 | return ( 5 |
13 | {attribute} 14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/command-manager/demo/interactors/ioc/test.ts: -------------------------------------------------------------------------------- 1 | // import { Inject, Injectable } from './index'; 2 | 3 | // @Injectable() 4 | // class A { 5 | // log(str: string) { 6 | // console.log(str); 7 | // } 8 | // } 9 | 10 | // class B { 11 | // @Inject() a: A; 12 | 13 | // log() { 14 | // this.a.log('quan'); 15 | // } 16 | // } 17 | 18 | // const b = new B(); 19 | // b.log(); 20 | -------------------------------------------------------------------------------- /packages/shared/src/decorator.ts: -------------------------------------------------------------------------------- 1 | import { toObjectTypeString, stateDecoRegExp } from './lang'; 2 | 3 | export function quacksLikeADecorator(args: any[]): boolean { 4 | return (args.length === 2 || args.length === 3) && typeof args[1] === 'string'; 5 | } 6 | 7 | // prop could be decorated by @reactor 8 | export const canObserve = (value: any): boolean => stateDecoRegExp.test(toObjectTypeString(value)); 9 | -------------------------------------------------------------------------------- /demo/src/image-builder/common/consts/action.ts: -------------------------------------------------------------------------------- 1 | export enum Z_INDEX_ACTION { 2 | /** 置顶 */ 3 | TOP = 'top', 4 | /** 置底 */ 5 | BOTTOM = 'bottom', 6 | /** 下移 */ 7 | DECREASE = 'decrease', 8 | /** 上移 */ 9 | INCREASE = 'increase', 10 | } 11 | 12 | export enum MIRROR_ACTION { 13 | /** 左右镜像 */ 14 | LEFT_RIGHT = 'left_right', 15 | /** 上下镜像 */ 16 | TOP_BOTTOM = 'top_bottom', 17 | } 18 | -------------------------------------------------------------------------------- /packages/event-manager/src/interactive/listener/utils.ts: -------------------------------------------------------------------------------- 1 | import { Vec2 } from '@turbox3d/shared'; 2 | import { NativeEventSet } from '../type'; 3 | 4 | export function isMouseMoved(mouseDownInfo: Vec2, moveEvent: NativeEventSet, tolerance: number) { 5 | const dx = mouseDownInfo.x - moveEvent.clientX; 6 | const dy = mouseDownInfo.y - moveEvent.clientY; 7 | return dx * dx + dy * dy > tolerance * tolerance; 8 | } 9 | -------------------------------------------------------------------------------- /demo/src/image-builder/index.less: -------------------------------------------------------------------------------- 1 | .fps-monitor { 2 | position: absolute; 3 | z-index: 100; 4 | top: 0; 5 | left: 0; 6 | background: rgba(0, 0, 0, .7); 7 | color: #fff; 8 | width: 70px; 9 | height: 20px; 10 | pointer-events: none; 11 | display: flex; 12 | justify-content: center; 13 | align-items: center; 14 | } 15 | 16 | body { 17 | margin: 0; 18 | padding: 0; 19 | overflow: hidden; 20 | } 21 | -------------------------------------------------------------------------------- /packages/shared/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './uuid'; 2 | export * from './type'; 3 | export * from './task'; 4 | export * from './rafTask'; 5 | export * from './lang'; 6 | export * from './image'; 7 | export * from './graphic'; 8 | export * from './event'; 9 | export * from './error'; 10 | export * from './deep-merge'; 11 | export * from './decorator'; 12 | export * from './debounce'; 13 | export * from './compose'; 14 | export * from './common'; 15 | -------------------------------------------------------------------------------- /demo/src/lite-design/utils/common.ts: -------------------------------------------------------------------------------- 1 | export const coordinateStringToArray = (txt: string) => 2 | txt 3 | .slice(1, -1) 4 | .split(',') 5 | // eslint-disable-next-line @typescript-eslint/no-shadow 6 | .map(txt => parseFloat(txt.replace('{', '').replace('}', ''))); 7 | 8 | export async function wait(ms: number) { 9 | await new Promise{ 17 | apply(param: P) { 18 | // 19 | } 20 | 21 | active(param: P) { 22 | // 23 | } 24 | } 25 | 26 | type LifeCircleClass
= P extends {} ? IParamCommand
: INoParamCommand;
27 |
28 | export type CommandType = Omit () {
40 | return Command as any as IConstructorOf
4 |
4 |
|
31 |
32 | ## License
33 |
34 | [MIT](http://opensource.org/licenses/MIT)
35 |
36 | Copyright (c) 2020-present, Felix Koo
37 |
--------------------------------------------------------------------------------
/packages/graphic-component-three/src/fat-line/index.ts:
--------------------------------------------------------------------------------
1 | import { Mesh3D } from '@turbox3d/renderer-three';
2 | import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial.js';
3 | import { Line2 } from 'three/examples/jsm/lines/Line2.js';
4 | import { LineGeometry } from 'three/examples/jsm/lines/LineGeometry.js';
5 | import { Vec3 } from '@turbox3d/shared';
6 |
7 | interface IFatLineProps {
8 | position: Vec3;
9 | rotation: Vec3;
10 | linePositions: number[];
11 | dashed?: boolean;
12 | linewidth?: number;
13 | color?: number;
14 | dashScale?: number;
15 | dashSize?: number;
16 | gapSize?: number;
17 | looped?: boolean;
18 | }
19 |
20 | export default class FatLine extends Mesh3D
|
33 |
34 | ## 许可证
35 |
36 | [MIT](http://opensource.org/licenses/MIT)
37 |
38 | Copyright (c) 2020-present, Felix Koo
39 |
--------------------------------------------------------------------------------
/demo/src/data-flow/Collection.tsx:
--------------------------------------------------------------------------------
1 | import { Reactive } from '@turbox3d/reactivity-react';
2 | import React from 'react';
3 | import { cts } from './index';
4 |
5 | const Collection: React.FC<{}> = () => {
6 | console.log('Collection');
7 | for (const [key, value] of cts.countertops[0].myMap) {
8 | console.log(key, value);
9 | }
10 | return (
11 |
15 | {Array.from(cts.countertops[0].myMap).join()}
16 | {/* {cts.countertops[0].myMap.get(0)}
*/}
17 | {/* {cts.countertops[0].myMap.has(0) ? 'true' : 'false'}
*/}
18 | {cts.countertops[0].myMap.get(1)}
19 | {cts.countertops[0].myMap.has(1) ? 'true' : 'false'}
20 | {/* {cts.countertops[0].myMap.forEach((value, key) => {
21 | console.log(value, '...', key);
22 | })}
*/}
23 | {/* {cts.countertops[0].myMap.entries()}
*/}
24 | {/* {cts.countertops[0].myMap.keys()}
*/}
25 | {/* {cts.countertops[0].myMap.values()}
*/}
26 |
30 | {Array.from(cts.countertops[0].mySet).join()}
31 | {/* {cts.countertops[0].mySet.has(0) ? 'true' : 'false'}
*/}
32 | {/* {cts.countertops[0].mySet.has(1) ? 'true' : 'false'}
*/}
33 | {cts.countertops[0].mySet.has(1000) ? 'true' : 'false'}
34 | {/* {cts.countertops[0].mySet.forEach((value) => {
35 | console.log(value, '@@@');
36 | })}
*/}
37 | {/* {cts.countertops[0].mySet.entries()}
*/}
38 | {/* {cts.countertops[0].mySet.keys()}
*/}
39 | {/* {cts.countertops[0].mySet.values()}
*/}
40 |
5 | Turbox
14 |
15 | **Turbox**(涡轮)是适合大型生产力软件应用的前端框架,场景来源于复杂大型 3D 业务
16 |
17 | ## 生态系统
18 |
19 | | Project | Status | Description |
20 | |---------|--------|-------------|
21 | | turbox-cli | - | Project cli tool, include scaffolding |
22 | | turbox-dev-tool | - | Browser DevTools extension |
23 | | turbox-loader | - | Turbox loader for webpack |
24 | | turbox-snippets | [see marketplace](https://marketplace.visualstudio.com/items?itemName=feifan-gff.turbox-snippets) | Vscode snippet extension |
25 |
26 | ## 文档
27 |
28 | [中文文档](https://turbox3d.github.io/turbox/#/zh-cn/turbox)
29 |
30 | Visit [turbox official website](https://turbox3d.github.io/turbox/#/en-us/).
31 |
32 | ## 反馈
33 |
34 | | Github Issue | 微信群 |
35 | | --- | --- |
36 | | [turbox3d/turbox/issues](https://github.com/turbox3d/turbox/issues) |
|
37 |
38 | ## 许可证
39 |
40 | [MIT](http://opensource.org/licenses/MIT)
41 |
42 | Copyright (c) 2020-present, Felix Koo
43 |
--------------------------------------------------------------------------------
/demo/src/lite-design/views/scene/modelsWorld/ClipPoint.ts:
--------------------------------------------------------------------------------
1 | import { Reactive, Mesh3D, MathUtils, g } from '@turbox3d/turbox';
2 |
3 | import { RenderOrder } from '../../../common/consts/scene';
4 | import { ClipPointEntity } from '../../../models/entity/clipPoint';
5 | import { ldeStore } from '../../../models/index';
6 | import { Circle, Rect3d } from '../helper/index';
7 |
8 | interface IClipPointProps {
9 | model: ClipPointEntity;
10 | }
11 |
12 | @Reactive
13 | export class ClipPointViewEntity extends Mesh3D
5 | Turbox
14 |
15 | **Turbox** is a large-scale productivity application front-end framework.
16 |
17 | ## Ecosystem
18 |
19 | | Project | Status | Description |
20 | |---------|--------|-------------|
21 | | turbox-cli | - | Project cli tool, include scaffolding |
22 | | turbox-dev-tool | - | Browser DevTools extension |
23 | | turbox-loader | - | Turbox loader for webpack |
24 | | turbox-snippets | [see marketplace](https://marketplace.visualstudio.com/items?itemName=feifan-gff.turbox-snippets) | Vscode snippet extension |
25 |
26 | ## Documentation
27 |
28 | [中文文档](https://turbox3d.github.io/turbox/#/zh-cn/turbox)
29 |
30 | Visit [turbox official website](https://turbox3d.github.io/turbox/#/en-us/).
31 |
32 | ## Feedback
33 |
34 | | Github Issue | Wechat |
35 | | --- | --- |
36 | | [turbox3d/turbox/issues](https://github.com/turbox3d/turbox/issues) |
|
37 |
38 | ## License
39 |
40 | [MIT](http://opensource.org/licenses/MIT)
41 |
42 | Copyright (c) 2020-present, Felix Koo
43 |
--------------------------------------------------------------------------------