Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
2428e403
Commit
2428e403
authored
4 years ago
by
alja
Committed by
Sergey Linev
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Put makeGLRepresentation and replaceElement in try/catch block
parent
ef8f62ff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui5/eve7/lib/EveScene.js
+43
-37
43 additions, 37 deletions
ui5/eve7/lib/EveScene.js
with
43 additions
and
37 deletions
ui5/eve7/lib/EveScene.js
+
43
−
37
View file @
2428e403
...
...
@@ -31,34 +31,36 @@ sap.ui.define(['rootui5/eve7/lib/EveManager'], function(EveManager) {
// Render object creation / management
//==============================================================================
EveScene
.
prototype
.
makeGLRepresentation
=
function
(
elem
)
{
if
(
!
elem
.
render_data
)
return
null
;
EveScene
.
prototype
.
makeGLRepresentation
=
function
(
elem
)
{
if
(
!
elem
.
render_data
)
return
null
;
let
fname
=
elem
.
render_data
.
rnr_func
;
let
obj3d
=
this
.
creator
[
fname
](
elem
,
elem
.
render_data
);
try
{
let
fname
=
elem
.
render_data
.
rnr_func
;
let
obj3d
=
this
.
creator
[
fname
](
elem
,
elem
.
render_data
);
if
(
obj3d
)
{
// MT ??? why?, it can really be anything, even just container Object3D
obj3d
.
_typename
=
"
THREE.Mesh
"
;
if
(
obj3d
)
{
// MT ??? why?, it can really be anything, even just container Object3D
obj3d
.
_typename
=
"
THREE.Mesh
"
;
// add reference to a streamed eve element to obj3d
obj3d
.
eve_el
=
elem
;
// add reference to a streamed eve element to obj3d
obj3d
.
eve_el
=
elem
;
// SL: this is just identifier for highlight, required to show items on other places, set in creator
obj3d
.
geo_object
=
elem
.
fMasterId
||
elem
.
fElementId
;
obj3d
.
geo_name
=
elem
.
fName
;
// used for highlight
obj3d
.
scene
=
this
;
// required for get changes when highlight/selection is changed
// SL: this is just identifier for highlight, required to show items on other places, set in creator
obj3d
.
geo_object
=
elem
.
fMasterId
||
elem
.
fElementId
;
obj3d
.
geo_name
=
elem
.
fName
;
// used for highlight
obj3d
.
scene
=
this
;
// required for get changes when highlight/selection is changed
if
(
elem
.
render_data
.
matrix
)
{
obj3d
.
matrixAutoUpdate
=
false
;
obj3d
.
matrix
.
fromArray
(
elem
.
render_data
.
matrix
);
obj3d
.
updateMatrixWorld
(
true
);
}
if
(
elem
.
render_data
.
matrix
)
{
obj3d
.
matrixAutoUpdate
=
false
;
obj3d
.
matrix
.
fromArray
(
elem
.
render_data
.
matrix
);
obj3d
.
updateMatrixWorld
(
true
);
}
return
obj3d
;
return
obj3d
;
}
}
catch
(
e
)
{
console
.
error
(
"
makeGLRepresentation
"
,
e
);
}
}
...
...
@@ -197,28 +199,32 @@ sap.ui.define(['rootui5/eve7/lib/EveManager'], function(EveManager) {
if
(
el
.
fMasterId
)
this
.
mid2obj_map
.
set
(
el
.
fMasterId
,
obj3d
);
}
EveScene
.
prototype
.
replaceElement
=
function
(
el
)
{
if
(
!
this
.
glctrl
)
return
;
EveScene
.
prototype
.
replaceElement
=
function
(
el
)
{
if
(
!
this
.
glctrl
)
return
;
let
obj3d
=
this
.
getObj3D
(
el
.
fElementId
);
let
all_ancestor_children_visible
=
obj3d
.
all_ancestor_children_visible
;
let
visible
=
obj3d
.
visible
;
try
{
let
obj3d
=
this
.
getObj3D
(
el
.
fElementId
);
let
all_ancestor_children_visible
=
obj3d
.
all_ancestor_children_visible
;
let
visible
=
obj3d
.
visible
;
let
container
=
this
.
glctrl
.
getSceneContainer
(
"
scene
"
+
this
.
id
);
let
container
=
this
.
glctrl
.
getSceneContainer
(
"
scene
"
+
this
.
id
);
container
.
remove
(
obj3d
);
container
.
remove
(
obj3d
);
obj3d
=
this
.
makeGLRepresentation
(
el
);
obj3d
.
all_ancestor_children_visible
=
all_ancestor_children_visible
;
obj3d
.
visible
=
visible
;
container
.
add
(
obj3d
);
obj3d
=
this
.
makeGLRepresentation
(
el
);
obj3d
.
all_ancestor_children_visible
=
all_ancestor_children_visible
;
obj3d
.
visible
=
visible
;
container
.
add
(
obj3d
);
this
.
id2obj_map
.
set
(
el
.
fElementId
,
obj3d
);
if
(
el
.
fMasterId
)
this
.
mid2obj_map
.
set
(
el
.
fMasterId
,
obj3d
);
this
.
id2obj_map
.
set
(
el
.
fElementId
,
obj3d
);
if
(
el
.
fMasterId
)
this
.
mid2obj_map
.
set
(
el
.
fMasterId
,
obj3d
);
this
.
glctrl
.
viewer
.
render
();
this
.
glctrl
.
viewer
.
render
();
}
catch
(
e
)
{
console
.
error
(
"
replace element
"
,
e
);
}
}
EveScene
.
prototype
.
elementRemoved
=
function
()
...
...
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