Skip to content

Commit

Permalink
feat(inspectorCanvas): wDBInspector, MaterialInspector->didMount add …
Browse files Browse the repository at this point in the history
…tryCatch
  • Loading branch information
yyc-git committed May 25, 2019
1 parent 6eb7a9d commit 6ab8559
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
],

scopes: [
{ name: "imgCanvas" },
{ name: "inspectorCanvas" },
{ name: "asset-bundle" },
{ name: "script" },
{ name: "language" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ module Method = {
let didMount = (type_, materialComponent) => {
AssetTreeInspectorUtils.showInspectorCanvas();

StateInspectorEngineService.unsafeGetState()
|> MaterialInspectorEngineUtils.createMaterialSphereIntoInspectorCanvas(
type_,
materialComponent,
(StateEditorService.getState(), StateEngineService.unsafeGetState()),
)
|> StateLogicService.refreshInspectorEngineState;
Console.tryCatch(
() =>
StateInspectorEngineService.unsafeGetState()
|> MaterialInspectorEngineUtils.createMaterialSphereIntoInspectorCanvas(
type_,
materialComponent,
(
StateEditorService.getState(),
StateEngineService.unsafeGetState(),
),
)
|> StateLogicService.refreshInspectorEngineState,
e => Console.throwFatal(e) |> ignore,
);
};

let willUnmount = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ module Method = {
let didMount = wdbGameObject => {
AssetTreeInspectorUtils.showInspectorCanvas();

StateInspectorEngineService.unsafeGetState()
|> WDBInspectorEngineUtils.createWDBIntoInspectorCanvas(
wdbGameObject,
(StateEditorService.getState(), StateEngineService.unsafeGetState()),
)
|> StateLogicService.refreshInspectorEngineState;
Console.tryCatch(
() =>
StateInspectorEngineService.unsafeGetState()
|> WDBInspectorEngineUtils.createWDBIntoInspectorCanvas(
wdbGameObject,
(
StateEditorService.getState(),
StateEngineService.unsafeGetState(),
),
)
|> StateLogicService.refreshInspectorEngineState,
e => Console.throwFatal(e) |> ignore,
);
};

let willUnmount = () => {
Expand Down

0 comments on commit 6ab8559

Please sign in to comment.