Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
fix(soba): rerun soba shape generators with ngIf
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Nov 24, 2021
1 parent 7c0ba91 commit 0c42ea0
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 18 deletions.
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/box/box.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-box-geometry [args]="args"></ngt-box-geometry>
<ngt-box-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-box-geometry>
<ng-template #withoutArgs>
<ngt-box-geometry></ngt-box-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/circle/circle.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-circle-geometry [args]="args"></ngt-circle-geometry>
<ngt-circle-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-circle-geometry>
<ng-template #withoutArgs>
<ngt-circle-geometry></ngt-circle-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/cone/cone.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-cone-geometry [args]="args"></ngt-cone-geometry>
<ngt-cone-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-cone-geometry>
<ng-template #withoutArgs>
<ngt-cone-geometry></ngt-cone-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/cylinder/cylinder.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-cylinder-geometry [args]="args"></ngt-cylinder-geometry>
<ngt-cylinder-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-cylinder-geometry>
<ng-template #withoutArgs>
<ngt-cylinder-geometry></ngt-cylinder-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-dodecahedron-geometry [args]="args"></ngt-dodecahedron-geometry>
<ngt-dodecahedron-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-dodecahedron-geometry>
<ng-template #withoutArgs>
<ngt-dodecahedron-geometry></ngt-dodecahedron-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/extrude/extrude.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-extrude-geometry [args]="args"></ngt-extrude-geometry>
<ngt-extrude-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-extrude-geometry>
<ng-template #withoutArgs>
<ngt-extrude-geometry></ngt-extrude-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-icosahedron-geometry [args]="args"></ngt-icosahedron-geometry>
<ngt-icosahedron-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-icosahedron-geometry>
<ng-template #withoutArgs>
<ngt-icosahedron-geometry></ngt-icosahedron-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/lathe/lathe.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-lathe-geometry [args]="args"></ngt-lathe-geometry>
<ngt-lathe-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-lathe-geometry>
<ng-template #withoutArgs>
<ngt-lathe-geometry></ngt-lathe-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-octahedron-geometry [args]="args"></ngt-octahedron-geometry>
<ngt-octahedron-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-octahedron-geometry>
<ng-template #withoutArgs>
<ngt-octahedron-geometry></ngt-octahedron-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import { ParametricGeometry } from 'three/examples/jsm/geometries/ParametricGeom
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-parametric-geometry [args]="args"></ngt-parametric-geometry>
<ngt-parametric-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-parametric-geometry>
<ng-template #withoutArgs>
<ngt-parametric-geometry></ngt-parametric-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/plane/plane.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-plane-geometry [args]="args"></ngt-plane-geometry>
<ngt-plane-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-plane-geometry>
<ng-template #withoutArgs>
<ngt-plane-geometry></ngt-plane-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-polyhedron-geometry [args]="args"></ngt-polyhedron-geometry>
<ngt-polyhedron-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-polyhedron-geometry>
<ng-template #withoutArgs>
<ngt-polyhedron-geometry></ngt-polyhedron-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/ring/ring.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-ring-geometry [args]="args"></ngt-ring-geometry>
<ngt-ring-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-ring-geometry>
<ng-template #withoutArgs>
<ngt-ring-geometry></ngt-ring-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/sphere/sphere.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-sphere-geometry [args]="args"></ngt-sphere-geometry>
<ngt-sphere-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-sphere-geometry>
<ng-template #withoutArgs>
<ngt-sphere-geometry></ngt-sphere-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-tetrahedron-geometry [args]="args"></ngt-tetrahedron-geometry>
<ngt-tetrahedron-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-tetrahedron-geometry>
<ng-template #withoutArgs>
<ngt-tetrahedron-geometry></ngt-tetrahedron-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-torus-knot-geometry [args]="args"></ngt-torus-knot-geometry>
<ngt-torus-knot-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-torus-knot-geometry>
<ng-template #withoutArgs>
<ngt-torus-knot-geometry></ngt-torus-knot-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/torus/torus.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-torus-geometry [args]="args"></ngt-torus-geometry>
<ngt-torus-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-torus-geometry>
<ng-template #withoutArgs>
<ngt-torus-geometry></ngt-torus-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down
5 changes: 4 additions & 1 deletion packages/soba/shapes/src/lib/tube/tube.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import * as THREE from 'three';
(animateReady)="animateReady.emit($event)"
[object3dController]="object3dController"
>
<ngt-tube-geometry [args]="args"></ngt-tube-geometry>
<ngt-tube-geometry *ngIf="args;else withoutArgs" [args]="args"></ngt-tube-geometry>
<ng-template #withoutArgs>
<ngt-tube-geometry></ngt-tube-geometry>
</ng-template>
<ng-content></ng-content>
</ngt-mesh>
`,
Expand Down

0 comments on commit 0c42ea0

Please sign in to comment.