New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Add object multiple selection support for 3D printing #413
Feature: Add object multiple selection support for 3D printing #413
Conversation
src/app/widgets/PrintingVisualizer/VisualizerModelTransformation.jsx
Outdated
Show resolved
Hide resolved
1f9abca
to
5629972
Compare
src/app/flux/printing/index.js
Outdated
dispatch(actions.displayModel()); | ||
}, | ||
|
||
selectMultiModel: (selectedGroup) => (dispatch, getState) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest: implement and trigger refresh in modelgroup.js
src/app/flux/printing/index.js
Outdated
|
||
selectTargetModel: (model, isMultiSelect) => (dispatch, getState) => { | ||
const { modelGroup } = getState().printing; | ||
const modelState = modelGroup.selectModelById([model], isMultiSelect); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selecteModelById need an modelID, here is an array
getSelectedModel: () => (dispatch, getState) => { | ||
const { modelGroup } = getState().printing; | ||
return modelGroup.selectedModel; | ||
}, | ||
|
||
getSelectedModelArray: () => (dispatch, getState) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest: we can get modelGroup attributes in connected components directly
@@ -796,23 +837,23 @@ export const actions = { | |||
} | |||
}, | |||
|
|||
selectAllModels: () => (dispatch, getState) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest: modelState is deprecated, map modelGroup attributes to refresh components
@@ -17,6 +18,8 @@ import { | |||
MeshBasicMaterial, | |||
LineBasicMaterial | |||
} from 'three'; | |||
// import * as THREE from 'three'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
this.dispatchEvent(EVENTS.UPDATE); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
detach() { | ||
this.object = null; | ||
// this.object = new Group(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -677,7 +677,7 @@ class Visualizer extends Component { | |||
<Canvas | |||
ref={this.canvas} | |||
size={this.props.size} | |||
modelGroup={this.visualizerGroup} | |||
modelGroup={{ object: this.visualizerGroup }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid re-creation of temporary objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need fixes:
- rotation implementation
- context menu actions
- relation of
ModelGroup
andControls
- modelState
No description provided.