fixed documentation & threejs disparities
This commit is contained in:
parent
0595d2e5b9
commit
68c24b9cea
11 changed files with 19 additions and 20 deletions
4
dist/xrfragment.aframe.js
vendored
4
dist/xrfragment.aframe.js
vendored
|
|
@ -849,8 +849,8 @@ xrf.parseModel = function(model,url){
|
|||
// eval embedded XR fragments
|
||||
model.scene.traverse( (mesh) => xrf.eval.mesh(mesh,model) )
|
||||
// add animations
|
||||
model.clock = new THREE.Clock();
|
||||
model.mixer = new THREE.AnimationMixer(model.scene)
|
||||
model.clock = new xrf.THREE.Clock();
|
||||
model.mixer = new xrf.THREE.AnimationMixer(model.scene)
|
||||
model.animations.map( (anim) => model.mixer.clipAction( anim ).play() )
|
||||
model.render = function(){
|
||||
model.mixer.update( model.clock.getDelta() )
|
||||
|
|
|
|||
4
dist/xrfragment.three.js
vendored
4
dist/xrfragment.three.js
vendored
|
|
@ -849,8 +849,8 @@ xrf.parseModel = function(model,url){
|
|||
// eval embedded XR fragments
|
||||
model.scene.traverse( (mesh) => xrf.eval.mesh(mesh,model) )
|
||||
// add animations
|
||||
model.clock = new THREE.Clock();
|
||||
model.mixer = new THREE.AnimationMixer(model.scene)
|
||||
model.clock = new xrf.THREE.Clock();
|
||||
model.mixer = new xrf.THREE.AnimationMixer(model.scene)
|
||||
model.animations.map( (anim) => model.mixer.clipAction( anim ).play() )
|
||||
model.render = function(){
|
||||
model.mixer.update( model.clock.getDelta() )
|
||||
|
|
|
|||
4
dist/xrfragment.three.module.js
vendored
4
dist/xrfragment.three.module.js
vendored
|
|
@ -849,8 +849,8 @@ xrf.parseModel = function(model,url){
|
|||
// eval embedded XR fragments
|
||||
model.scene.traverse( (mesh) => xrf.eval.mesh(mesh,model) )
|
||||
// add animations
|
||||
model.clock = new THREE.Clock();
|
||||
model.mixer = new THREE.AnimationMixer(model.scene)
|
||||
model.clock = new xrf.THREE.Clock();
|
||||
model.mixer = new xrf.THREE.AnimationMixer(model.scene)
|
||||
model.animations.map( (anim) => model.mixer.clipAction( anim ).play() )
|
||||
model.render = function(){
|
||||
model.mixer.update( model.clock.getDelta() )
|
||||
|
|
|
|||
1
example/aframe/sandbox/example.gltf
Symbolic link
1
example/aframe/sandbox/example.gltf
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../assets/query.gltf
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../assets/example3.gltf
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../assets/href.gltf
|
||||
1
example/threejs/sandbox/example.gltf
Symbolic link
1
example/threejs/sandbox/example.gltf
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../assets/query.gltf
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../assets/example3.gltf
|
||||
|
|
@ -167,7 +167,7 @@
|
|||
|
||||
|
||||
setupConsole()
|
||||
setupUrlBar( $('input#uri'), xrfragment )
|
||||
setupUrlBar( $('input#uri'), XRF )
|
||||
|
||||
// GUI
|
||||
|
||||
|
|
|
|||
12
index.html
12
index.html
File diff suppressed because one or more lines are too long
|
|
@ -43,8 +43,8 @@ xrf.parseModel = function(model,url){
|
|||
// eval embedded XR fragments
|
||||
model.scene.traverse( (mesh) => xrf.eval.mesh(mesh,model) )
|
||||
// add animations
|
||||
model.clock = new THREE.Clock();
|
||||
model.mixer = new THREE.AnimationMixer(model.scene)
|
||||
model.clock = new xrf.THREE.Clock();
|
||||
model.mixer = new xrf.THREE.AnimationMixer(model.scene)
|
||||
model.animations.map( (anim) => model.mixer.clipAction( anim ).play() )
|
||||
model.render = function(){
|
||||
model.mixer.update( model.clock.getDelta() )
|
||||
|
|
@ -54,7 +54,7 @@ xrf.parseModel = function(model,url){
|
|||
|
||||
xrf.getLastModel = () => xrf.model.last
|
||||
|
||||
xrf.eval = function( url, model, flags ){ // evaluate local toplevel url
|
||||
xrf.eval = function( url, model, flags ){ // evaluate fragments in url
|
||||
let notice = false
|
||||
model = model || xrf.model
|
||||
let { THREE, camera } = xrf
|
||||
|
|
@ -79,7 +79,7 @@ xrf.eval.mesh = (mesh,model) => { // evaluate embedded fragments (metadata)
|
|||
}
|
||||
}
|
||||
|
||||
xrf.eval.fragment = (k, opts ) => {
|
||||
xrf.eval.fragment = (k, opts ) => { // evaluate one fragment
|
||||
// call native function (xrf/env.js e.g.), or pass it to user decorator
|
||||
let func = xrf.frag[k] || function(){}
|
||||
if( xrf[k] ) xrf[k]( func, opts.frag[k], opts)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue