本地音频播放的3D可视化

电脑杂谈  发布时间:2020-04-23 12:18:54  来源:网络整理

可视化效果下载_音频可视化效果的音乐播放器_音频可视化效果

3D可视化本地音频播放效果. 单击左上角的按钮以选择本地音频. 加载几秒钟后音频可视化效果音频可视化效果,将出现3D立体音频播放效果. 这是非常酷,非常漂亮. 如果您未重新选择“音频文件将循环播放”,请选择接受.

3D可视化的本地音频播放效果

类别: html5>音频难度: 基本

可视化效果下载_音频可视化效果的音乐播放器_音频可视化效果

查看演示下载资源: 34个下载资源下载点: 30点

* {
  margin: 0;
  padding: 0;
}
body {
  /*   background: linear-gradient(-135deg, #FC656C, #11879E); */
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.color {
  background: linear-gradient(-45deg, #48dfda, #20a0a4);
}
.black {
  background: #000;
}
.wrapper .file {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 10px;
  box-sizing: border-box;
  border: 2px solid #fff;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  transition: opacity .4s;
  z-index: 2;
}
.wrapper .file:hover {
  opacity: .8;
}
.wrapper .file input {
  display: none;
}
.wrapper canvas {
  vertical-align: bottom;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

<div class="wrapper" id="wrapper">
  <label class="file" for="file">
    请选择本地音频文件
    <input id="file" type="file">
  </label>
</div>

音频可视化效果_音频可视化效果的音乐播放器_可视化效果下载

this.update = function () {
	var offset = new THREE.Vector3();
	// so camera.up is the orbit axis
	var quat = new THREE.Quaternion().setFromUnitVectors( object.up, new THREE.Vector3( 0, 1, 0 ) );
	var quatInverse = quat.clone().inverse();
	var lastPosition = new THREE.Vector3();
	var lastQuaternion = new THREE.Quaternion();
	return function update() {
		var position = scope.object.position;
		offset.copy( position ).sub( scope.target );
		// rotate offset to "y-axis-is-up" space
		offset.applyQuaternion( quat );
		// angle from z-axis around y-axis
		spherical.setFromVector3( offset );
		if ( scope.autoRotate && state === STATE.NONE ) {
			rotateLeft( getAutoRotationAngle() );
		}
		spherical.theta += sphericalDelta.theta;
		spherical.phi += sphericalDelta.phi;
		// restrict theta to be between desired limits
		spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) );
		// restrict phi to be between desired limits
		spherical.phi = Math.max( scope.minPolarAngle, Math.min( scope.maxPolarAngle, spherical.phi ) );
		spherical.makeSafe();
		spherical.radius *= scale;
		// restrict radius to be between desired limits
		spherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) );
		// move target to panned location
		scope.target.add( panOffset );
		offset.setFromSpherical( spherical );
		// rotate offset back to "camera-up-vector-is-up" space
		offset.applyQuaternion( quatInverse );
		position.copy( scope.target ).add( offset );
		scope.object.lookAt( scope.target );
		if ( scope.enableDamping === true ) {
			sphericalDelta.theta *= ( 1 - scope.dampingFactor );
			sphericalDelta.phi *= ( 1 - scope.dampingFactor );
		} else {
			sphericalDelta.set( 0, 0, 0 );
		}
		scale = 1;
		panOffset.set( 0, 0, 0 );
		// update condition is:
		// min(camera displacement, camera rotation in radians)^2 > EPS
		// using small-angle approximation cos(x/2) = 1 - x^2 / 8
		if ( zoomChanged ||
			lastPosition.distanceToSquared( scope.object.position ) > EPS ||
			8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ) {
			scope.dispatchEvent( changeEvent );
			lastPosition.copy( scope.object.position );
			lastQuaternion.copy( scope.object.quaternion );
			zoomChanged = false;
			return true;
		}
		return false;
	};
}();

添加内容并拖放已排序的列表

具有鼠标悬停效果的CSS响应价目表

音频可视化效果_音频可视化效果的音乐播放器_可视化效果下载

头像

系统启用了垃圾邮件自动识别注释机制,识别出自动标题,下载错误或资源问题,请联系全栈客服QQ 3007547952

本地音频播放的3D可视化

可视化效果下载_音频可视化效果的音乐播放器_音频可视化效果

我的信用余额: 0次下载次数: 34

所需积分: 30

版,积分不足,请充值或联系QQ1206995177手动充值

Pro,1元= 1火币. 整个网站的源代码都是火币资料,只能通过火币下载

充值方式: 充值或联系QQ1206995177手动充值

本地音频播放的3D可视化

在河流和湖泊中,帮助您的朋友减薪


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/bofangqi/article-185940-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 黑胡子
        黑胡子

        纯网时代下的新生代经济——给新生代偶像搭建了一个全方位展示其商业价值的平台

      • 万楚
        万楚

        但实际利率上浮不再设上限

        • 杉本沙织
          杉本沙织

          世界上你也算是大佬

      热点图片
      拼命载入中...