|
@@ -9,6 +9,7 @@ import { MeshBasicMaterial } from '../../../../src/materials/MeshBasicMaterial.j
|
|
|
import { Vector2 } from '../../../../src/math/Vector2.js';
|
|
|
import { Vector3 } from '../../../../src/math/Vector3.js';
|
|
|
import { DoubleSide } from '../../../../src/constants.js';
|
|
|
+import { Material } from '../../../../src/materials/Material.js';
|
|
|
|
|
|
export default QUnit.module( 'Objects', () => {
|
|
|
|
|
@@ -73,6 +74,23 @@ export default QUnit.module( 'Objects', () => {
|
|
|
|
|
|
} );
|
|
|
|
|
|
+ QUnit.test( 'copy/material', ( assert ) => {
|
|
|
+
|
|
|
+ // Material arrays are cloned
|
|
|
+ const mesh1 = new Mesh();
|
|
|
+ mesh1.material = [ new Material() ];
|
|
|
+
|
|
|
+ const copy1 = mesh1.clone();
|
|
|
+ assert.notStrictEqual( mesh1.material, copy1.material );
|
|
|
+
|
|
|
+ // Non arrays are not cloned
|
|
|
+ const mesh2 = new Mesh();
|
|
|
+ mesh1.material = new Material();
|
|
|
+ const copy2 = mesh2.clone();
|
|
|
+ assert.strictEqual( mesh2.material, copy2.material );
|
|
|
+
|
|
|
+ } );
|
|
|
+
|
|
|
QUnit.todo( 'updateMorphTargets', ( assert ) => {
|
|
|
|
|
|
assert.ok( false, 'everything\'s gonna be alright' );
|