Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
疯人忠
Cvat
提交
8b13a2c4
C
Cvat
项目概览
疯人忠
/
Cvat
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Cvat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
8b13a2c4
编写于
12月 05, 2022
作者:
B
Boris Sekachev
提交者:
GitHub
12月 05, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
3D Performance issue fixed: Multiple selection the same object or null (#5411)
Related #3438
上级
c49fe700
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
43 deletion
+19
-43
CHANGELOG.md
CHANGELOG.md
+1
-0
cvat-canvas3d/package.json
cvat-canvas3d/package.json
+1
-1
cvat-canvas3d/src/typescript/canvas3dController.ts
cvat-canvas3d/src/typescript/canvas3dController.ts
+1
-6
cvat-canvas3d/src/typescript/canvas3dModel.ts
cvat-canvas3d/src/typescript/canvas3dModel.ts
+0
-8
cvat-canvas3d/src/typescript/canvas3dView.ts
cvat-canvas3d/src/typescript/canvas3dView.ts
+16
-28
未找到文件。
CHANGELOG.md
浏览文件 @
8b13a2c4
...
...
@@ -85,6 +85,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428)
-
Added force logout on CVAT app start if token is missing (
<https://github.com/opencv/cvat/pull/5331>
)
-
Drawing issues on 3D canvas (
<https://github.com/opencv/cvat/pull/5410>
)
-
Missed token with using social account authentication (
<https://github.com/opencv/cvat/pull/5344>
)
-
The same object on 3D scene or
`null`
selected each click (PERFORMANCE) (
<https://github.com/opencv/cvat/pull/5411>
)
-
An exception when run export for an empty task (
<https://github.com/opencv/cvat/pull/5396>
)
-
Fixed FBRS serverless function runtime error on images with alpha channel (
<https://github.com/opencv/cvat/pull/5384>
)
-
Attaching manifest with custom name (
<https://github.com/opencv/cvat/pull/5377>
)
...
...
cvat-canvas3d/package.json
浏览文件 @
8b13a2c4
{
"name"
:
"cvat-canvas3d"
,
"version"
:
"0.0.
4
"
,
"version"
:
"0.0.
5
"
,
"description"
:
"Part of Computer Vision Annotation Tool which presents its canvas3D library"
,
"main"
:
"src/canvas3d.ts"
,
"scripts"
:
{
...
...
cvat-canvas3d/src/typescript/canvas3dController.ts
浏览文件 @
8b13a2c4
...
...
@@ -4,14 +4,13 @@
// SPDX-License-Identifier: MIT
import
{
Canvas3dModel
,
Mode
,
DrawData
,
ActiveElement
,
FocusData
,
GroupData
,
Configuration
,
Canvas3dModel
,
Mode
,
DrawData
,
ActiveElement
,
GroupData
,
Configuration
,
}
from
'
./canvas3dModel
'
;
export
interface
Canvas3dController
{
readonly
drawData
:
DrawData
;
readonly
activeElement
:
ActiveElement
;
readonly
selected
:
any
;
readonly
focused
:
FocusData
;
readonly
groupData
:
GroupData
;
readonly
configuration
:
Configuration
;
readonly
imageIsDeleted
:
boolean
;
...
...
@@ -46,10 +45,6 @@ export class Canvas3dControllerImpl implements Canvas3dController {
return
this
.
model
.
data
.
selected
;
}
public
get
focused
():
any
{
return
this
.
model
.
data
.
focusData
;
}
public
get
imageIsDeleted
():
any
{
return
this
.
model
.
imageIsDeleted
;
}
...
...
cvat-canvas3d/src/typescript/canvas3dModel.ts
浏览文件 @
8b13a2c4
...
...
@@ -62,10 +62,6 @@ export enum MouseInteraction {
HOVER
=
'
hover
'
,
}
export
interface
FocusData
{
clientID
:
string
|
null
;
}
export
interface
ShapeProperties
{
opacity
:
number
;
outlined
:
boolean
;
...
...
@@ -113,7 +109,6 @@ export interface Canvas3dDataModel {
exception
:
Error
|
null
;
objects
:
any
[];
groupedObjects
:
any
[];
focusData
:
FocusData
;
selected
:
any
;
shapeProperties
:
ShapeProperties
;
groupData
:
GroupData
;
...
...
@@ -169,9 +164,6 @@ export class Canvas3dModelImpl extends MasterImpl implements Canvas3dModel {
},
mode
:
Mode
.
IDLE
,
exception
:
null
,
focusData
:
{
clientID
:
null
,
},
groupData
:
{
enabled
:
false
,
grouped
:
[],
...
...
cvat-canvas3d/src/typescript/canvas3dView.ts
浏览文件 @
8b13a2c4
...
...
@@ -225,13 +225,13 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
const
canvasFrontView
=
this
.
views
.
front
.
renderer
.
domElement
;
canvasPerspectiveView
.
addEventListener
(
'
contextmenu
'
,
(
e
:
MouseEvent
):
void
=>
{
if
(
this
.
controller
.
focused
.
clientID
!==
null
)
{
if
(
this
.
model
.
data
.
activeElement
.
clientID
!==
null
)
{
this
.
dispatchEvent
(
new
CustomEvent
(
'
canvas.contextmenu
'
,
{
bubbles
:
false
,
cancelable
:
true
,
detail
:
{
clientID
:
Number
(
this
.
controller
.
focused
.
clientID
),
clientID
:
Number
(
this
.
model
.
data
.
activeElement
.
clientID
),
clientX
:
e
.
clientX
,
clientY
:
e
.
clientY
,
},
...
...
@@ -335,15 +335,18 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
if
(
intersects
.
length
===
0
)
{
this
.
setHelperVisibility
(
false
);
}
this
.
dispatchEvent
(
new
CustomEvent
(
'
canvas.selected
'
,
{
bubbles
:
false
,
cancelable
:
true
,
detail
:
{
clientID
:
intersects
.
length
!==
0
?
Number
(
intersects
[
0
].
object
.
name
)
:
null
,
},
}),
);
const
intersectedClientID
=
intersects
[
0
]?.
object
?.
name
||
null
;
if
(
this
.
model
.
data
.
activeElement
.
clientID
!==
intersectedClientID
)
{
this
.
dispatchEvent
(
new
CustomEvent
(
'
canvas.selected
'
,
{
bubbles
:
false
,
cancelable
:
true
,
detail
:
{
clientID
:
typeof
intersectedClientID
===
'
string
'
?
+
intersectedClientID
:
null
,
},
}),
);
}
}
});
...
...
@@ -356,7 +359,7 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
this
.
views
.
perspective
.
scene
.
children
[
0
].
children
,
false
,
);
if
(
intersects
.
length
!==
0
||
this
.
controller
.
focused
.
clientID
!==
null
)
{
if
(
intersects
.
length
!==
0
||
this
.
model
.
data
.
activeElement
.
clientID
!==
null
)
{
this
.
setDefaultZoom
();
}
else
{
const
{
x
,
y
,
z
}
=
this
.
action
.
frameCoordinates
;
...
...
@@ -1261,14 +1264,12 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
const
intersects
=
renderer
.
intersectObjects
(
children
,
false
);
if
(
intersects
.
length
!==
0
)
{
const
clientID
=
intersects
[
0
].
object
.
name
;
if
(
clientID
===
undefined
||
clientID
===
''
||
this
.
model
.
data
.
focusData
.
clientID
===
clientID
)
{
if
(
clientID
===
undefined
||
clientID
===
''
||
this
.
model
.
data
.
activeElement
.
clientID
===
clientID
)
{
return
;
}
if
(
!
this
.
action
.
selectable
)
return
;
this
.
resetColor
();
const
object
=
this
.
views
.
perspective
.
scene
.
getObjectByName
(
clientID
);
if
(
object
===
undefined
)
return
;
this
.
model
.
data
.
focusData
.
clientID
=
clientID
;
this
.
dispatchEvent
(
new
CustomEvent
(
'
canvas.selected
'
,
{
bubbles
:
false
,
...
...
@@ -1278,23 +1279,10 @@ export class Canvas3dViewImpl implements Canvas3dView, Listener {
},
}),
);
}
else
if
(
this
.
model
.
data
.
focusData
.
clientID
!==
null
)
{
this
.
resetColor
();
this
.
model
.
data
.
focusData
.
clientID
=
null
;
}
}
};
private
resetColor
():
void
{
this
.
model
.
data
.
objects
.
forEach
((
object
:
any
):
void
=>
{
const
{
clientID
}
=
object
;
const
target
=
this
.
views
.
perspective
.
scene
.
getObjectByName
(
String
(
clientID
));
if
(
target
)
{
((
target
as
THREE
.
Mesh
).
material
as
THREE
.
MeshBasicMaterial
).
color
.
set
((
target
as
any
).
originalColor
);
}
});
}
public
render
():
void
{
Object
.
keys
(
this
.
views
).
forEach
((
view
:
string
):
void
=>
{
const
viewType
=
this
.
views
[
view
as
keyof
Views
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录