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
da5ea861
Commit
da5ea861
authored
7 years ago
by
netpro2k
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
85a8dc2d
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/components/ik-controller.js
+0
-5
0 additions, 5 deletions
src/components/ik-controller.js
src/elements/a-gltf-entity.js
+6
-6
6 additions, 6 deletions
src/elements/a-gltf-entity.js
with
6 additions
and
11 deletions
src/components/ik-controller.js
+
0
−
5
View file @
da5ea861
...
...
@@ -7,21 +7,16 @@ AFRAME.registerComponent("ik-root", {
rightController
:
{
type
:
"
string
"
,
default
:
"
.right-controller
"
}
},
update
(
oldData
)
{
let
updated
=
false
;
if
(
this
.
data
.
camera
!==
oldData
.
camera
)
{
this
.
camera
=
this
.
el
.
querySelector
(
this
.
data
.
camera
);
updated
=
true
;
}
if
(
this
.
data
.
leftController
!==
oldData
.
leftController
)
{
this
.
leftController
=
this
.
el
.
querySelector
(
this
.
data
.
leftController
);
updated
=
true
;
}
if
(
this
.
data
.
rightController
!==
oldData
.
rightController
)
{
this
.
rightController
=
this
.
el
.
querySelector
(
this
.
data
.
rightController
);
updated
=
true
;
}
}
});
...
...
This diff is collapsed.
Click to expand it.
src/elements/a-gltf-entity.js
+
6
−
6
View file @
da5ea861
...
...
@@ -86,7 +86,8 @@ const inflateEntities = function(parentEl, node) {
node
.
rotation
.
setFromQuaternion
(
node
.
quaternion
,
"
YXZ
"
);
}
// Copy over transform to the THREE.Group and reset the actual transform of the Object3D
// Copy over the object's transform to the THREE.Group and reset the actual transform of the Object3D
// all updates to the object should be done through the THREE.Group wrapper
el
.
setAttribute
(
"
position
"
,
{
x
:
node
.
position
.
x
,
y
:
node
.
position
.
y
,
...
...
@@ -102,7 +103,6 @@ const inflateEntities = function(parentEl, node) {
y
:
node
.
scale
.
y
,
z
:
node
.
scale
.
z
});
node
.
matrixAutoUpdate
=
false
;
node
.
matrix
.
identity
();
...
...
@@ -197,7 +197,7 @@ AFRAME.registerElement("a-gltf-entity", {
// The code above and below this are from AEntity.prototype.load, we need to monkeypatch in gltf loading mid function
this
.
loadTemplates
();
await
this
.
set
Src
(
this
.
getAttribute
(
"
src
"
));
await
this
.
apply
Src
(
this
.
getAttribute
(
"
src
"
));
//
AFRAME
.
ANode
.
prototype
.
load
.
call
(
this
,
()
=>
{
...
...
@@ -226,7 +226,7 @@ AFRAME.registerElement("a-gltf-entity", {
}
},
set
Src
:
{
apply
Src
:
{
async
value
(
src
)
{
try
{
// If the src attribute is a selector, get the url from the asset item.
...
...
@@ -301,7 +301,7 @@ AFRAME.registerElement("a-gltf-entity", {
attributeChangedCallback
:
{
value
(
attr
,
oldVal
,
newVal
)
{
if
(
attr
===
"
src
"
)
{
this
.
set
Src
(
newVal
);
this
.
apply
Src
(
newVal
);
}
AFRAME
.
AEntity
.
prototype
.
attributeChangedCallback
.
call
(
this
,
attr
,
oldVal
,
newVal
);
}
...
...
@@ -310,7 +310,7 @@ AFRAME.registerElement("a-gltf-entity", {
setAttribute
:
{
value
(
attr
,
arg1
,
arg2
)
{
if
(
attr
===
"
src
"
)
{
this
.
set
Src
(
arg1
);
this
.
apply
Src
(
arg1
);
}
AFRAME
.
AEntity
.
prototype
.
setAttribute
.
call
(
this
,
attr
,
arg1
,
arg2
);
}
...
...
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