Toggle navigation
Toggle navigation
This project
Loading...
Sign in
arcs
/
arcs.js
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Yves Didier
2017-05-24 22:54:13 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5289b7e55f250d2ca52fb877fcaa637e50f5ec03
5289b7e5
1 parent
3ac3a2b4
added videotexture
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
components/arviewer.js
components/arviewer.js
View file @
5289b7e
...
...
@@ -58,8 +58,13 @@ arcs_module(
scene3d
.
add
(
_light
);
videoTexture
=
new
THREE
.
Texture
(
videoSource
);
if
(
THREE
.
VideoTexture
!==
undefined
)
{
console
.
log
(
"Using video texture since it is available"
);
videoTexture
=
new
THREE
.
VideoTexture
(
videoSource
);
}
else
{
console
.
log
(
"Falling back on simple texture"
);
videoTexture
=
new
THREE
.
Texture
(
videoSource
);
}
var
geometry
=
new
THREE
.
PlaneGeometry
(
1.0
,
1.0
,
0.0
);
var
material
=
new
THREE
.
MeshBasicMaterial
(
{
map
:
videoTexture
,
depthTest
:
false
,
depthWrite
:
false
}
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
material
);
...
...
Please
register
or
login
to post a comment