Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
Hubs
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
Container Registry
Model registry
Operate
Environments
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
ar-noc
Hubs
Commits
203ea7a9
Commit
203ea7a9
authored
6 years ago
by
johnshaughnessy
Browse files
Options
Downloads
Patches
Plain Diff
Enable media tools by default
parent
76adbab3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hub.js
+26
-28
26 additions, 28 deletions
src/hub.js
src/react-components/2d-hud.js
+5
-8
5 additions, 8 deletions
src/react-components/2d-hud.js
with
31 additions
and
36 deletions
src/hub.js
+
26
−
28
View file @
203ea7a9
...
...
@@ -309,38 +309,36 @@ const onReady = async () => {
spawnMediaInfrontOfPlayer
(
e
.
detail
);
});
if
(
qsTruthy
(
"
mediaTools
"
))
{
document
.
addEventListener
(
"
paste
"
,
e
=>
{
if
(
e
.
target
.
nodeName
===
"
INPUT
"
)
return
;
const
url
=
e
.
clipboardData
.
getData
(
"
text
"
);
const
files
=
e
.
clipboardData
.
files
&&
e
.
clipboardData
.
files
;
if
(
url
)
{
spawnMediaInfrontOfPlayer
(
url
);
}
else
{
for
(
const
file
of
files
)
{
spawnMediaInfrontOfPlayer
(
file
);
}
document
.
addEventListener
(
"
paste
"
,
e
=>
{
if
(
e
.
target
.
nodeName
===
"
INPUT
"
)
return
;
const
url
=
e
.
clipboardData
.
getData
(
"
text
"
);
const
files
=
e
.
clipboardData
.
files
&&
e
.
clipboardData
.
files
;
if
(
url
)
{
spawnMediaInfrontOfPlayer
(
url
);
}
else
{
for
(
const
file
of
files
)
{
spawnMediaInfrontOfPlayer
(
file
);
}
});
}
});
document
.
addEventListener
(
"
dragover
"
,
e
=>
{
e
.
preventDefault
();
});
document
.
addEventListener
(
"
dragover
"
,
e
=>
{
e
.
preventDefault
();
});
document
.
addEventListener
(
"
drop
"
,
e
=>
{
e
.
preventDefault
();
const
url
=
e
.
dataTransfer
.
getData
(
"
url
"
);
const
files
=
e
.
dataTransfer
.
files
;
if
(
url
)
{
spawnMediaInfrontOfPlayer
(
url
);
}
else
{
for
(
const
file
of
files
)
{
spawnMediaInfrontOfPlayer
(
file
);
}
document
.
addEventListener
(
"
drop
"
,
e
=>
{
e
.
preventDefault
();
const
url
=
e
.
dataTransfer
.
getData
(
"
url
"
);
const
files
=
e
.
dataTransfer
.
files
;
if
(
url
)
{
spawnMediaInfrontOfPlayer
(
url
);
}
else
{
for
(
const
file
of
files
)
{
spawnMediaInfrontOfPlayer
(
file
);
}
}
);
}
}
}
);
if
(
!
qsTruthy
(
"
offline
"
))
{
document
.
body
.
addEventListener
(
"
connected
"
,
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/react-components/2d-hud.js
+
5
−
8
View file @
203ea7a9
...
...
@@ -3,7 +3,6 @@ import PropTypes from "prop-types";
import
cx
from
"
classnames
"
;
import
styles
from
"
../assets/stylesheets/2d-hud.scss
"
;
import
qsTruthy
from
"
../utils/qs_truthy
"
;
const
TopHUD
=
({
muted
,
frozen
,
spacebubble
,
onToggleMute
,
onToggleFreeze
,
onToggleSpaceBubble
})
=>
(
<
div
className
=
{
cx
(
styles
.
container
,
styles
.
top
)}
>
...
...
@@ -40,13 +39,11 @@ TopHUD.propTypes = {
const
BottomHUD
=
({
onCreateObject
})
=>
(
<
div
className
=
{
cx
(
styles
.
container
,
styles
.
bottom
)}
>
{
qsTruthy
(
"
mediaTools
"
)
&&
(
<
div
className
=
{
cx
(
"
ui-interactive
"
,
styles
.
iconButton
,
styles
.
large
,
styles
.
createObject
)}
title
=
{
"
Create Object
"
}
onClick
=
{
onCreateObject
}
/
>
)}
<
div
className
=
{
cx
(
"
ui-interactive
"
,
styles
.
iconButton
,
styles
.
large
,
styles
.
createObject
)}
title
=
{
"
Create Object
"
}
onClick
=
{
onCreateObject
}
/
>
<
/div
>
);
...
...
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