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
bcb25ad3
Commit
bcb25ad3
authored
6 years ago
by
Greg Fodor
Browse files
Options
Downloads
Patches
Plain Diff
Remove persistence cod
parent
d5687de2
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
src/scene-entry-manager.js
+0
-32
0 additions, 32 deletions
src/scene-entry-manager.js
with
0 additions
and
32 deletions
src/scene-entry-manager.js
+
0
−
32
View file @
bcb25ad3
...
...
@@ -211,38 +211,6 @@ export default class SceneEntryManager {
spawnMediaInfrontOfPlayer
(
e
.
detail
,
contentOrigin
);
});
this
.
scene
.
addEventListener
(
"
object_pinned
"
,
e
=>
{
const
el
=
e
.
detail
.
el
;
if
(
!
NAF
.
utils
.
isMine
(
el
))
return
;
// Construct a GLTF node from this entity
const
object3D
=
el
.
object3D
;
const
components
=
el
.
components
;
const
networkId
=
components
.
networked
.
data
.
networkId
;
const
gltfComponents
=
{};
const
gltfNode
=
{
name
:
networkId
,
extensions
:
{
HUBS_components
:
gltfComponents
}
};
// Adapted from three.js GLTFExporter
const
equalArray
=
(
x
,
y
)
=>
x
.
length
===
y
.
length
&&
x
.
every
((
v
,
i
)
=>
v
===
y
[
i
]);
const
rotation
=
object3D
.
quaternion
.
toArray
();
const
position
=
object3D
.
position
.
toArray
();
const
scale
=
object3D
.
scale
.
toArray
();
if
(
!
equalArray
(
rotation
,
[
0
,
0
,
0
,
1
]))
gltfNode
.
rotation
=
rotation
;
if
(
!
equalArray
(
position
,
[
0
,
0
,
0
]))
gltfNode
.
translation
=
position
;
if
(
!
equalArray
(
scale
,
[
1
,
1
,
1
]))
gltfNode
.
scale
=
scale
;
if
(
components
[
"
media-loader
"
])
{
gltfComponents
.
media
=
{
src
:
components
[
"
media-loader
"
].
data
.
src
,
networkId
};
}
});
this
.
scene
.
addEventListener
(
"
object_unpinned
"
,
e
=>
{
const
el
=
e
.
detail
.
el
;
if
(
!
NAF
.
utils
.
isMine
(
el
))
return
;
});
this
.
scene
.
addEventListener
(
"
object_spawned
"
,
e
=>
{
this
.
hubChannel
.
sendObjectSpawnedEvent
(
e
.
detail
.
objectType
);
});
...
...
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