立方体内粒子运动效果

代码语言:html

所属分类:三维

代码描述:立方体内粒子运动效果

代码标签: 运动 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
*{
    margin: 0;
    padding: 0;
}

html,body{
    overflow: hidden;
}
</style>

</head>
<body translate="no">
<div id="webgl"></div>

<script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/three.110.js"></script>
<script src="http://repo.bfw.wiki/bfwrepo/js/OrbitControls.js"></script>
<script id="rendered-js">
class Camera {
  constructor() {
    this.fovy = 60;
    this.aspect = window.innerWidth / window.innerHeight;
    this.near = .1;
    this.far = 30;
    this.x = 0;
    this.y = 4;
    this.z = 8;
    this.lookAt = new THREE.Vector3(0, 0, 0);
  }}


class PointLight {
  constructor() {
    this.color = 0xffffff;
    this.intensity = 1;
    this.x = 5;
    this.y = 5;
    this.z = 10;
  }}


class AmbientLight {
  constructor() {
    this.color = 0xffffff;
    this.intensity = .2;
  }}


class Material {
  constructor() {
    this.color = 0xffffff;
    this.color02 = 0x74afcb;
    this.color03 = 0x1579c1;
  }}


class Renderer {
  constructor() {
    this.clearcolor = 0x2a.........完整代码请登录后点击上方下载按钮下载查看

网友评论0