bounding sphere fix #572
@@ -41,13 +41,15 @@ const fileMenuConfig: EditorMenuConfig = {
|
|||||||
shortcutLabel: cmdOrCtrl() + ' Shift D',
|
shortcutLabel: cmdOrCtrl() + ' Shift D',
|
||||||
Component: (props) => {
|
Component: (props) => {
|
||||||
const { state, thunkDispatch, config } = props
|
const { state, thunkDispatch, config } = props
|
||||||
const {project} = useIdeContext()
|
const { project } = useIdeContext()
|
||||||
const handleStlDownload = makeStlDownloadHandler({
|
const handleStlDownload = makeStlDownloadHandler({
|
||||||
type: state.objectData?.type,
|
type: state.objectData?.type,
|
||||||
ideType: state.ideType,
|
ideType: state.ideType,
|
||||||
geometry: state.objectData?.data,
|
geometry: state.objectData?.data,
|
||||||
quality: state.objectData?.quality,
|
quality: state.objectData?.quality,
|
||||||
fileName: project? `${ project.title}.stl` : PullTitleFromFirstLine(state.code || ''),
|
fileName: project
|
||||||
|
? `${project.title}.stl`
|
||||||
|
: PullTitleFromFirstLine(state.code || ''),
|
||||||
thunkDispatch,
|
thunkDispatch,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -104,7 +106,11 @@ interface EditorMenuItemConfigBase {
|
|||||||
callback?: (...a: any[]) => void
|
callback?: (...a: any[]) => void
|
||||||
}
|
}
|
||||||
export interface EditorMenuItemConfig extends EditorMenuItemConfigBase {
|
export interface EditorMenuItemConfig extends EditorMenuItemConfigBase {
|
||||||
Component: React.FC<{config: EditorMenuItemConfigBase, state: State, thunkDispatch: any}>
|
Component: React.FC<{
|
||||||
|
config: EditorMenuItemConfigBase
|
||||||
|
state: State
|
||||||
|
thunkDispatch: any
|
||||||
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EditorMenuConfig {
|
export interface EditorMenuConfig {
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ export function Asset({
|
|||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const getBoundingSphere = () => {
|
const getBoundingSphere = () => {
|
||||||
if (dataType === 'geometry') {
|
if (dataType === 'geometry') {
|
||||||
|
if (!incomingGeo.boundingSphere && incomingGeo.computeBoundingSphere) {
|
||||||
|
incomingGeo.computeBoundingSphere()
|
||||||
|
}
|
||||||
return incomingGeo.boundingSphere
|
return incomingGeo.boundingSphere
|
||||||
}
|
}
|
||||||
const group = new THREE.Group()
|
const group = new THREE.Group()
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ const ProjectProfile = ({
|
|||||||
<KeyValue keyName="Updated on">
|
<KeyValue keyName="Updated on">
|
||||||
{new Date(project?.updatedAt).toDateString()}
|
{new Date(project?.updatedAt).toDateString()}
|
||||||
</KeyValue>
|
</KeyValue>
|
||||||
{project.forkedFrom && (
|
{project?.forkedFrom && (
|
||||||
<KeyValue keyName="Forked from">
|
<KeyValue keyName="Forked from">
|
||||||
<Link
|
<Link
|
||||||
className="pink-link"
|
className="pink-link"
|
||||||
|
|||||||
Reference in New Issue
Block a user