mirror of
https://github.com/SamEyeBam/animate.git
synced 2026-03-22 22:47:32 +00:00
larry babby and threejs for glsl
This commit is contained in:
14
webGl/my-threejs-test/node_modules/shallow-copy/test/array.js
generated
vendored
Normal file
14
webGl/my-threejs-test/node_modules/shallow-copy/test/array.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
var copy = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('array', function (t) {
|
||||
t.plan(2);
|
||||
|
||||
var xs = [ 3, 4, 5, { f: 6, g: 7 } ];
|
||||
var dup = copy(xs);
|
||||
dup.unshift(1, 2);
|
||||
dup[5].g += 100;
|
||||
|
||||
t.deepEqual(xs, [ 3, 4, 5, { f: 6, g: 107 } ]);
|
||||
t.deepEqual(dup, [ 1, 2, 3, 4, 5, { f: 6, g: 107 } ]);
|
||||
});
|
||||
14
webGl/my-threejs-test/node_modules/shallow-copy/test/object.js
generated
vendored
Normal file
14
webGl/my-threejs-test/node_modules/shallow-copy/test/object.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
var copy = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('object', function (t) {
|
||||
t.plan(2);
|
||||
|
||||
var obj = { a: 3, b: 4, c: [5,6] };
|
||||
var dup = copy(obj);
|
||||
dup.b *= 111;
|
||||
dup.c.push(7);
|
||||
|
||||
t.deepEqual(obj, { a: 3, b: 4, c: [ 5, 6, 7 ] });
|
||||
t.deepEqual(dup, { a: 3, b: 444, c: [ 5, 6, 7 ] });
|
||||
});
|
||||
Reference in New Issue
Block a user