
Reverse Scene Object Array
Downloads: 31
Download Description
reverses a Scene Object array
//
// ReverseSceneObjectArray.ts
// reverses a Scene Object[] array.
// Written by @Fusedthreed – https://FusedThreeD.com
//
@customNode()
export class ReverseSceneObjectArray extends BasicScriptNode {
@input()
objects: APJS.SceneObject[];
@output()
reversed: APJS.SceneObject[];
execute() {
if (!this.objects) {
this.reversed = [];
return;
}
this.reversed = [...this.objects].reverse();
}
}