Separate each engines' codes to different individual packages#39
Merged
Conversation
dolow
commented
Jun 4, 2019
| } | ||
|
|
||
| if (args.listRuntimes) { | ||
| const runtimes = ExportManager.getRegisteredExporterRuntimes(); |
Contributor
Author
There was a problem hiding this comment.
Function for debugging became a little new feature.
| import * as Zlib from 'runtime/three/Zlib'; | ||
| import NURBSCurve from 'runtime/three/NURBSCurve'; | ||
| import TgaLoader from 'runtime/three/loaders/TgaLoader'; | ||
| import ThreeLoader from '../interface/ThreeLoader'; |
Contributor
Author
There was a problem hiding this comment.
To use THREE, refer ThreeLoader's threeRef static property instead of using imported three module, this is because to share the same three object among scripts.
dolow
commented
Jun 4, 2019
| "keywords": [], | ||
| "author": "Drecom Co.,Ltd.", | ||
| "devDependencies": { | ||
| "@drecom/scene-graph-mediator-cli": "file:../../scene-graph-mediator/client", |
Contributor
Author
There was a problem hiding this comment.
update package reference after npm release.
dolow
commented
Jun 4, 2019
|
|
||
| for (const [key, value] of resourceMap.entries()) { | ||
| const entity = value; | ||
| const it = resourceMap.entries(); |
Contributor
Author
There was a problem hiding this comment.
Fixed TypeScript transpile error.
Iterator object can not be iterated with for...of.
| args = parseArgs(); | ||
| } catch (e) { | ||
| console.log(e); | ||
| console.log(CliHelptext); |
Contributor
There was a problem hiding this comment.
There seems to be no opportunity for usage to be displayed.
Contributor
Author
There was a problem hiding this comment.
commander shows instruction with --help option.
$ ./bin/cli.js --help
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Separated engine specific codes to different module.
figure: workflow example / CocosCreator to PIXI.js

Added packages
scene-graph-pixi/runtimeas@drecom/scene-graph-pixi-rtscene-graph-three/runtimeas@drecom/scene-graph-three-rtscene-graph-unity/clientas@drecom/scene-graph-unity-cliscene-graph-cocos/clientas@drecom/scene-graph-cocos-cliAdded CircleCI job for each new package
Removed engine things from scene-graph-mediator-rt,cli
Changed module loading method
Each engine implementation is loaded with
requiredynamically before this PR.Ref:
scene-graph/packages/scene-graph-mediator/client/src/exporter/ExportManager.ts
Lines 24 to 38 in 4e15bb1
After this, each module registers itself to
ExportManager.Because export process is expected to be kicked from some GUI in the future, GUI should know which engine is available ahead of process running.
Files to review
Because there are bunch of artifacts, reviewers need instruction which files should be reviewd.
Test
Todo
scene-graph-cocos-animation/runtimetoscene-graph-cocos-animation-pixi/runtime.I'm not going to do it in this PR.