Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
f90751aa
You need to sign in or sign up before continuing.
Commit
f90751aa
authored
6 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
fix repr boundingsphere update
parent
6fba929a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mol-canvas3d/canvas3d.ts
+0
-1
0 additions, 1 deletion
src/mol-canvas3d/canvas3d.ts
src/mol-gl/scene.ts
+2
-2
2 additions, 2 deletions
src/mol-gl/scene.ts
src/mol-repr/structure/units-visual.ts
+4
-1
4 additions, 1 deletion
src/mol-repr/structure/units-visual.ts
with
6 additions
and
4 deletions
src/mol-canvas3d/canvas3d.ts
+
0
−
1
View file @
f90751aa
...
@@ -295,7 +295,6 @@ namespace Canvas3D {
...
@@ -295,7 +295,6 @@ namespace Canvas3D {
if
(
oldRO
)
{
if
(
oldRO
)
{
SetUtils
.
difference
(
newRO
,
oldRO
).
forEach
(
o
=>
scene
.
add
(
o
))
SetUtils
.
difference
(
newRO
,
oldRO
).
forEach
(
o
=>
scene
.
add
(
o
))
SetUtils
.
difference
(
oldRO
,
newRO
).
forEach
(
o
=>
scene
.
remove
(
o
))
SetUtils
.
difference
(
oldRO
,
newRO
).
forEach
(
o
=>
scene
.
remove
(
o
))
scene
.
update
()
}
else
{
}
else
{
repr
.
renderObjects
.
forEach
(
o
=>
scene
.
add
(
o
))
repr
.
renderObjects
.
forEach
(
o
=>
scene
.
add
(
o
))
}
}
...
...
This diff is collapsed.
Click to expand it.
src/mol-gl/scene.ts
+
2
−
2
View file @
f90751aa
...
@@ -38,12 +38,12 @@ function calculateBoundingSphere(renderableMap: Map<RenderObject, Renderable<Ren
...
@@ -38,12 +38,12 @@ function calculateBoundingSphere(renderableMap: Map<RenderObject, Renderable<Ren
boundaryHelper
.
reset
(
0.1
);
boundaryHelper
.
reset
(
0.1
);
renderableMap
.
forEach
(
r
=>
{
renderableMap
.
forEach
(
r
=>
{
if
(
!
r
.
state
.
visible
||
!
r
.
boundingSphere
.
radius
)
return
;
if
(
!
r
.
boundingSphere
.
radius
)
return
;
boundaryHelper
.
boundaryStep
(
r
.
boundingSphere
.
center
,
r
.
boundingSphere
.
radius
);
boundaryHelper
.
boundaryStep
(
r
.
boundingSphere
.
center
,
r
.
boundingSphere
.
radius
);
});
});
boundaryHelper
.
finishBoundaryStep
();
boundaryHelper
.
finishBoundaryStep
();
renderableMap
.
forEach
(
r
=>
{
renderableMap
.
forEach
(
r
=>
{
if
(
!
r
.
state
.
visible
||
!
r
.
boundingSphere
.
radius
)
return
;
if
(
!
r
.
boundingSphere
.
radius
)
return
;
boundaryHelper
.
extendStep
(
r
.
boundingSphere
.
center
,
r
.
boundingSphere
.
radius
);
boundaryHelper
.
extendStep
(
r
.
boundingSphere
.
center
,
r
.
boundingSphere
.
radius
);
});
});
...
...
This diff is collapsed.
Click to expand it.
src/mol-repr/structure/units-visual.ts
+
4
−
1
View file @
f90751aa
...
@@ -161,12 +161,15 @@ export function UnitsVisual<P extends UnitsParams>(builder: UnitsVisualGeometryB
...
@@ -161,12 +161,15 @@ export function UnitsVisual<P extends UnitsParams>(builder: UnitsVisualGeometryB
// console.log('update geometry')
// console.log('update geometry')
if
(
newGeometry
)
{
if
(
newGeometry
)
{
ValueCell
.
update
(
renderObject
.
values
.
drawCount
,
Geometry
.
getDrawCount
(
newGeometry
))
ValueCell
.
update
(
renderObject
.
values
.
drawCount
,
Geometry
.
getDrawCount
(
newGeometry
))
updateBoundingSphere
(
renderObject
.
values
,
newGeometry
)
}
else
{
}
else
{
throw
new
Error
(
'
expected geometry to be given
'
)
throw
new
Error
(
'
expected geometry to be given
'
)
}
}
}
}
if
(
updateState
.
updateTransform
||
updateState
.
createGeometry
)
{
updateBoundingSphere
(
renderObject
.
values
,
newGeometry
||
geometry
)
}
if
(
updateState
.
updateSize
)
{
if
(
updateState
.
updateSize
)
{
// not all geometries have size data, so check here
// not all geometries have size data, so check here
if
(
'
uSize
'
in
renderObject
.
values
)
{
if
(
'
uSize
'
in
renderObject
.
values
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment