Browse Source

updates for r132

Gregg Tavares 4 years ago
parent
commit
0ccb964822

+ 1 - 4
threejs/lessons/ja/threejs-optimize-lots-of-objects-animated.md

@@ -307,7 +307,6 @@ showFileInfo(fileInfos, fileInfos[0]);
 +});
 +const material = new THREE.MeshBasicMaterial({
 +  vertexColors: true,
-+  morphTargets: true,
 +});
 +const mesh = new THREE.Mesh(baseGeometry, material);
 +scene.add(mesh);
@@ -344,7 +343,7 @@ showFileInfo(fileInfos, fileInfos[0]);
 
 ```js
 import * as THREE from './resources/three/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 +import {TWEEN} from './resources/threejs/r131/examples/jsm/libs/tween.min.js';
 ```
@@ -497,7 +496,6 @@ baseGeometry.morphAttributes.position = geometries.map((geometry, ndx) => {
 +});
 const material = new THREE.MeshBasicMaterial({
   vertexColors: true,
-  morphTargets: true,
 });
 ```
 
@@ -555,7 +553,6 @@ void main() {
 ```js
 const material = new THREE.MeshBasicMaterial({
   vertexColors: true,
-  morphTargets: true,
 });
 +const vertexShaderReplacements = [
 +  {

+ 1 - 1
threejs/lessons/ja/threejs-optimize-lots-of-objects.md

@@ -387,7 +387,7 @@ function addBoxes(file) {
 また `BufferGeometryUtils` も含める必要があります。
 
 ```js
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 ```
 
 少なくとも私のマシンでは毎秒60フレームになりました。

+ 1 - 4
threejs/lessons/kr/threejs-optimize-lots-of-objects-animated.md

@@ -281,8 +281,7 @@ showFileInfo(fileInfos, fileInfos[0]);
 +});
 +const material = new THREE.MeshBasicMaterial({
 +  vertexColors: true,
-+  morphTargets: true,
-+});
+++});
 +const mesh = new THREE.Mesh(baseGeometry, material);
 +scene.add(mesh);
 
@@ -462,7 +461,6 @@ baseGeometry.morphAttributes.position = geometries.map((geometry, ndx) => {
 +});
 const material = new THREE.MeshBasicMaterial({
   vertexColors: true,
-  morphTargets: true,
 });
 ```
 
@@ -515,7 +513,6 @@ void main() {
 ```js
 const material = new THREE.MeshBasicMaterial({
   vertexColors: true,
-  morphTargets: true,
 });
 +const vertexShaderReplacements = [
 +  {

+ 1 - 1
threejs/lessons/resources/threejs-voxel-geometry.js

@@ -1,5 +1,5 @@
 import * as THREE from '../../resources/threejs/r131/build/three.module.js';
-import {BufferGeometryUtils} from '../../resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from '../../resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {threejsLessonUtils} from './threejs-lesson-utils.js';
 
 {

+ 1 - 2
threejs/lessons/ru/threejs-optimize-lots-of-objects-animated.md

@@ -326,7 +326,6 @@ showFileInfo(fileInfos, fileInfos[0]);
 +});
 +const material = new THREE.MeshBasicMaterial({
 +  vertexColors: true,
-+  morphTargets: true,
 +});
 +const mesh = new THREE.Mesh(baseGeometry, material);
 +scene.add(mesh);
@@ -367,7 +366,7 @@ showFileInfo(fileInfos, fileInfos[0]);
 
 ```js
 import * as THREE from './resources/three/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 +import {TWEEN} from './resources/threejs/r131/examples/jsm/libs/tween.min.js';
 ```

+ 1 - 1
threejs/lessons/ru/threejs-optimize-lots-of-objects.md

@@ -413,7 +413,7 @@ function addBoxes(file) {
 Нам также нужно включить `BufferGeometryUtils` 
 
 ```js
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 ```
 
 И теперь, по крайней мере на моей машине, я получаю 60 кадров в секунду 

+ 1 - 4
threejs/lessons/threejs-optimize-lots-of-objects-animated.md

@@ -332,7 +332,6 @@ and setup morphtargets
 +});
 +const material = new THREE.MeshBasicMaterial({
 +  vertexColors: true,
-+  morphTargets: true,
 +});
 +const mesh = new THREE.Mesh(baseGeometry, material);
 +scene.add(mesh);
@@ -374,7 +373,7 @@ We need to include the library
 
 ```js
 import * as THREE from './resources/three/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 +import {TWEEN} from './resources/threejs/r131/examples/jsm/libs/tween.min.js';
 ```
@@ -535,7 +534,6 @@ baseGeometry.morphAttributes.position = geometries.map((geometry, ndx) => {
 +});
 const material = new THREE.MeshBasicMaterial({
   vertexColors: true,
-  morphTargets: true,
 });
 ```
 
@@ -593,7 +591,6 @@ To do that we'll make a simple array of replacements and apply them in `Material
 ```js
 const material = new THREE.MeshBasicMaterial({
   vertexColors: true,
-  morphTargets: true,
 });
 +const vertexShaderReplacements = [
 +  {

+ 1 - 1
threejs/lessons/threejs-optimize-lots-of-objects.md

@@ -429,7 +429,7 @@ them into a single mesh.
 We also need to include the `BufferGeometryUtils`
 
 ```js
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 ```
 
 And now, at least on my machine, I get 60 frames per second

+ 0 - 2
threejs/lessons/zh_cn/threejs-optimize-lots-of-objects-animated.md

@@ -284,7 +284,6 @@ showFileInfo(fileInfos, fileInfos[0]);
 +});
 +const material = new THREE.MeshBasicMaterial({
 +  vertexColors: true,
-+  morphTargets: true,
 +});
 +const mesh = new THREE.Mesh(baseGeometry, material);
 +scene.add(mesh);
@@ -519,7 +518,6 @@ void main() {
 ```js
 const material = new THREE.MeshBasicMaterial({
   vertexColors: true,
-  morphTargets: true,
 });
 +const vertexShaderReplacements = [
 +  {

+ 1 - 1
threejs/lessons/zh_cn/threejs-optimize-lots-of-objects.md

@@ -369,7 +369,7 @@ function addBoxes(file) {
 别忘了引入`BufferGeometryUtils`
 
 ```js
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 ```
 
 现在, 至少在我的机器上, 可以跑到60帧每秒了

+ 1 - 1
threejs/threejs-lots-of-objects-animated.html

@@ -43,7 +43,7 @@
   </body>
 <script type="module">
 import * as THREE from './resources/threejs/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 import {TWEEN} from './resources/threejs/r131/examples/jsm/libs/tween.module.min.js';
 

+ 1 - 1
threejs/threejs-lots-of-objects-merged-vertexcolors.html

@@ -22,7 +22,7 @@
   </body>
 <script type="module">
 import * as THREE from './resources/threejs/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 
 function main() {

+ 1 - 1
threejs/threejs-lots-of-objects-merged.html

@@ -22,7 +22,7 @@
   </body>
 <script type="module">
 import * as THREE from './resources/threejs/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 
 function main() {

+ 1 - 2
threejs/threejs-lots-of-objects-morphtargets-w-colors.html

@@ -43,7 +43,7 @@
   </body>
 <script type="module">
 import * as THREE from './resources/threejs/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 import {TWEEN} from './resources/threejs/r131/examples/jsm/libs/tween.module.min.js';
 
@@ -317,7 +317,6 @@ function main() {
     });
     const material = new THREE.MeshBasicMaterial({
       vertexColors: true,
-      morphTargets: true,
     });
     const vertexShaderReplacements = [
       {

+ 1 - 2
threejs/threejs-lots-of-objects-morphtargets.html

@@ -43,7 +43,7 @@
   </body>
 <script type="module">
 import * as THREE from './resources/threejs/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 import {TWEEN} from './resources/threejs/r131/examples/jsm/libs/tween.module.min.js';
 
@@ -311,7 +311,6 @@ function main() {
     });
     const material = new THREE.MeshBasicMaterial({
       vertexColors: true,
-      morphTargets: true,
     });
     const mesh = new THREE.Mesh(baseGeometry, material);
     scene.add(mesh);

+ 1 - 1
threejs/threejs-lots-of-objects-multiple-data-sets.html

@@ -43,7 +43,7 @@
   </body>
 <script type="module">
 import * as THREE from './resources/threejs/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 
 function main() {

+ 1 - 1
threejs/threejs-voxel-geometry-merged.html

@@ -22,7 +22,7 @@
   </body>
 <script type="module">
 import * as THREE from './resources/threejs/r131/build/three.module.js';
-import {BufferGeometryUtils} from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
+import * as BufferGeometryUtils from './resources/threejs/r131/examples/jsm/utils/BufferGeometryUtils.js';
 import {OrbitControls} from './resources/threejs/r131/examples/jsm/controls/OrbitControls.js';
 
 function main() {