Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
//console.log('Sent state to peer %s.', pc.remotePeerId);
pc.send(JSON.stringify(state));
}
// Set the pose of the observer in the audio renderer.
var ar = audioRenderers[pc.remotePeerId]
var pr = peerRenderers[pc.remotePeerId];
if (ar && pr) {
ar.setPose(pose);
// Reflect your peer's audio level in the peer renderer.
pr.setPeerAudioLevel(ar.getLevel());
}
}
TWEEN.update();
rafID = requestAnimationFrame(render);
}
render() {
if (!this.renderer.autoClear) this.renderer.clear();
this.controls.update();
// this.CameraHelper.update();
TWEEN.update();
this.pinObj3D.children.forEach((item) => {
item.lookAt(this.controls.object.position);
})
this.octree.update();
this.renderer.render(this.scene, this.camera);
}
}
function animate(time) {
requestAnimationFrame(animate);
TWEEN.update(time);
}
function animate(time) {
requestAnimationFrame(animate);
TWEEN.update(time);
}
function animate(time) {
requestAnimationFrame(animate);
TWEEN.update(time);
}
function animate (time: number) {
TWEEN.update(time);
requestAnimationFrame(animate);
}
movieTweens.update = function(time) {
//move to tweens
var alpha = alphaTimeline.getAlpha(time * 1000);
if(revDots.visible){
revDots.force.alpha(alpha);
revDots.force.tick();
}
if(popDots.visible){
popDots.force.alpha(0.05);
popDots.force.tick();
}
TWEEN.update(time * 1000);
};
function update () {
animation.update();
if (animation.getAll().length) {
window.requestAnimationFrame(update);
}
}
animate(time) {
window.requestAnimationFrame(this.animate)
TWEEN.update();
},