0
    <div id="demo"></div>
    <script src="../../js/lib/three/three.min.js"></script>
    <!-- <script src="../../js/lib/three/three.module.js"></script> -->
    <script src="../../js/lib/three/renderers/CanvasRenderer.js"></script>
    <script src="../../js/lib/three/renderers/Projector.js"></script>
    <script src="./bg.js"></script>

bg.js

var camera;
var scene;
var renderer;
camera = new THREE.Camera(75, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 10000);
camera.position.z = 1000;
scene = new THREE.Scene();
renderer = new THREE.CanvasRenderer();
renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
var material = new THREE.ParticleCircleMaterial(0x097bdb, 1);

然后控制台出错:

Uncaught TypeError: THREE.ParticleCircleMaterial is not a constructor

这个ParticleCircleMaterial 是还需要额外引入什么东西吗?没有搜到相关内容,望知情人士解答

2018-01-19 提问
1 个回答
1

没见过ParticleCircleMaterial ,如果你指的是 ParticleBasicMaterial 或 ParticleSystemMaterial,那么这两种材质都已经废弃了,取而代之的是PointsMaterial

three.js更新得挺快的,如果按照老的教程找不到某些东西,可以查看废弃特性列表,看看是不是已废弃了,

撰写答案

推广链接