| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- /* global QUnit */
- import { Line } from '../../../../src/objects/Line.js';
- import { Object3D } from '../../../../src/core/Object3D.js';
- import { Material } from '../../../../src/materials/Material.js';
- export default QUnit.module( 'Objects', () => {
- QUnit.module( 'Line', () => {
- // INHERITANCE
- QUnit.test( 'Extending', ( assert ) => {
- const line = new Line();
- assert.strictEqual(
- line instanceof Object3D, true,
- 'Line extends from Object3D'
- );
- } );
- // INSTANCING
- QUnit.test( 'Instancing', ( assert ) => {
- const object = new Line();
- assert.ok( object, 'Can instantiate a Line.' );
- } );
- // PROPERTIES
- QUnit.test( 'type', ( assert ) => {
- const object = new Line();
- assert.ok(
- object.type === 'Line',
- 'Line.type should be Line'
- );
- } );
- QUnit.todo( 'geometry', ( assert ) => {
- assert.ok( false, 'everything\'s gonna be alright' );
- } );
- QUnit.todo( 'material', ( assert ) => {
- assert.ok( false, 'everything\'s gonna be alright' );
- } );
- // PUBLIC
- QUnit.test( 'isLine', ( assert ) => {
- const object = new Line();
- assert.ok(
- object.isLine,
- 'Line.isLine should be true'
- );
- } );
- QUnit.todo( 'copy', ( assert ) => {
- assert.ok( false, 'everything\'s gonna be alright' );
- } );
- QUnit.test( 'copy/material', ( assert ) => {
- // Material arrays are cloned
- const mesh1 = new Line();
- mesh1.material = [ new Material() ];
- const copy1 = mesh1.clone();
- assert.notStrictEqual( mesh1.material, copy1.material );
- // Non arrays are not cloned
- const mesh2 = new Line();
- mesh1.material = new Material();
- const copy2 = mesh2.clone();
- assert.strictEqual( mesh2.material, copy2.material );
- } );
- QUnit.todo( 'computeLineDistances', ( assert ) => {
- assert.ok( false, 'everything\'s gonna be alright' );
- } );
- QUnit.todo( 'raycast', ( assert ) => {
- assert.ok( false, 'everything\'s gonna be alright' );
- } );
- QUnit.todo( 'updateMorphTargets', ( assert ) => {
- assert.ok( false, 'everything\'s gonna be alright' );
- } );
- QUnit.todo( 'clone', ( assert ) => {
- // inherited from Object3D, test instance specific behaviour.
- assert.ok( false, 'everything\'s gonna be alright' );
- } );
- } );
- } );
|