|
1 | 1 | import { Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';
|
2 | 2 | import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
|
3 |
| -import { NgtsLine, NgtsQuadraticBezierLine } from 'angular-three-soba/abstractions'; |
| 3 | +import { NgtsCubicBezierLine, NgtsLine, NgtsQuadraticBezierLine } from 'angular-three-soba/abstractions'; |
4 | 4 | import { NgtsOrbitControls } from 'angular-three-soba/controls';
|
5 | 5 | import * as THREE from 'three';
|
6 | 6 | import { GeometryUtils } from 'three-stdlib';
|
@@ -103,35 +103,35 @@ class QuadraticBezierLineStory {
|
103 | 103 | @Input() end = defaultQuadraticBezier.end;
|
104 | 104 | @Input() segments = defaultQuadraticBezier.segments;
|
105 | 105 | }
|
106 |
| -// |
107 |
| -// @Component({ |
108 |
| -// standalone: true, |
109 |
| -// template: ` |
110 |
| -// <ngts-cubic-bezier-line |
111 |
| -// [start]="start" |
112 |
| -// [end]="end" |
113 |
| -// [midA]="midA" |
114 |
| -// [midB]="midB" |
115 |
| -// [segments]="segments" |
116 |
| -// [color]="color" |
117 |
| -// [lineWidth]="lineWidth" |
118 |
| -// [dashed]="dashed" |
119 |
| -// /> |
120 |
| -// <ngts-orbit-controls [zoomSpeed]="0.5" /> |
121 |
| -// `, |
122 |
| -// imports: [NgtsCubicBezierLine, NgtsOrbitControls], |
123 |
| -// schemas: [CUSTOM_ELEMENTS_SCHEMA], |
124 |
| -// }) |
125 |
| -// class CubicBezierLineStory { |
126 |
| -// @Input() color = 'red'; |
127 |
| -// @Input() lineWidth = 3; |
128 |
| -// @Input() dashed = false; |
129 |
| -// @Input() start = defaultCubicBezier.start; |
130 |
| -// @Input() end = defaultCubicBezier.end; |
131 |
| -// @Input() midA = defaultCubicBezier.midA; |
132 |
| -// @Input() midB = defaultCubicBezier.midB; |
133 |
| -// @Input() segments = defaultCubicBezier.segments; |
134 |
| -// } |
| 106 | + |
| 107 | +@Component({ |
| 108 | + standalone: true, |
| 109 | + template: ` |
| 110 | + <ngts-cubic-bezier-line |
| 111 | + [start]="start" |
| 112 | + [end]="end" |
| 113 | + [midA]="midA" |
| 114 | + [midB]="midB" |
| 115 | + [segments]="segments" |
| 116 | + [color]="color" |
| 117 | + [lineWidth]="lineWidth" |
| 118 | + [dashed]="dashed" |
| 119 | + /> |
| 120 | + <ngts-orbit-controls [zoomSpeed]="0.5" /> |
| 121 | + `, |
| 122 | + imports: [NgtsCubicBezierLine, NgtsOrbitControls], |
| 123 | + schemas: [CUSTOM_ELEMENTS_SCHEMA], |
| 124 | +}) |
| 125 | +class CubicBezierLineStory { |
| 126 | + @Input() color = 'red'; |
| 127 | + @Input() lineWidth = 3; |
| 128 | + @Input() dashed = false; |
| 129 | + @Input() start = defaultCubicBezier.start; |
| 130 | + @Input() end = defaultCubicBezier.end; |
| 131 | + @Input() midA = defaultCubicBezier.midA; |
| 132 | + @Input() midB = defaultCubicBezier.midB; |
| 133 | + @Input() segments = defaultCubicBezier.segments; |
| 134 | +} |
135 | 135 |
|
136 | 136 | @Component({
|
137 | 137 | standalone: true,
|
@@ -189,25 +189,16 @@ export const VertexColors: StoryObj = {
|
189 | 189 | args: { color: 'red', dashed: false, lineWidth: 3 },
|
190 | 190 | };
|
191 | 191 |
|
192 |
| -// export const CubicBezierLine: StoryObj = { |
193 |
| -// render: (args) => ({ |
194 |
| -// props: { |
195 |
| -// story: CubicBezierLineStory, |
196 |
| -// options: makeCanvasOptions({ camera: { position: [0, 0, 17] }, controls: false }), |
197 |
| -// inputs: args, |
198 |
| -// }, |
199 |
| -// template: ` |
200 |
| -// <storybook-setup [story]="story" [options]="options" [inputs]="inputs" /> |
201 |
| -// `, |
202 |
| -// }), |
203 |
| -// args: { |
204 |
| -// ...defaultCubicBezier, |
205 |
| -// color: 'red', |
206 |
| -// lineWidth: 3, |
207 |
| -// dashed: false, |
208 |
| -// }, |
209 |
| -// }; |
210 |
| -// |
| 192 | +export const CubicBezierLine: StoryObj = { |
| 193 | + render: makeRenderFunction(CubicBezierLineStory, { camera: { position: [0, 0, 17] }, controls: false }), |
| 194 | + args: { |
| 195 | + ...defaultCubicBezier, |
| 196 | + color: 'red', |
| 197 | + lineWidth: 3, |
| 198 | + dashed: false, |
| 199 | + }, |
| 200 | +}; |
| 201 | + |
211 | 202 | export const QuadraticBezierLine: StoryObj = {
|
212 | 203 | render: makeRenderFunction(QuadraticBezierLineStory, { camera: { position: [0, 0, 17] }, controls: false }),
|
213 | 204 | args: {
|
|
0 commit comments