Best JavaScript code snippet using storybook-root
geometry.js
Source:geometry.js
...48 )49 );50 }51 var folder = gui.addFolder( 'THREE.BoxBufferGeometry' );52 folder.add( data, 'width', 1, 30 ).onChange( generateGeometry );53 folder.add( data, 'height', 1, 30 ).onChange( generateGeometry );54 folder.add( data, 'depth', 1, 30 ).onChange( generateGeometry );55 folder.add( data, 'widthSegments', 1, 10 ).step( 1 ).onChange( generateGeometry );56 folder.add( data, 'heightSegments', 1, 10 ).step( 1 ).onChange( generateGeometry );57 folder.add( data, 'depthSegments', 1, 10 ).step( 1 ).onChange( generateGeometry );58 generateGeometry();59 },60 BoxGeometry: function ( mesh ) {61 var data = {62 width: 15,63 height: 15,64 depth: 15,65 widthSegments: 1,66 heightSegments: 1,67 depthSegments: 168 };69 function generateGeometry() {70 updateGroupGeometry( mesh,71 new THREE.BoxGeometry(72 data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments73 )74 );75 }76 var folder = gui.addFolder( 'THREE.BoxGeometry' );77 folder.add( data, 'width', 1, 30 ).onChange( generateGeometry );78 folder.add( data, 'height', 1, 30 ).onChange( generateGeometry );79 folder.add( data, 'depth', 1, 30 ).onChange( generateGeometry );80 folder.add( data, 'widthSegments', 1, 10 ).step( 1 ).onChange( generateGeometry );81 folder.add( data, 'heightSegments', 1, 10 ).step( 1 ).onChange( generateGeometry );82 folder.add( data, 'depthSegments', 1, 10 ).step( 1 ).onChange( generateGeometry );83 generateGeometry();84 },85 CylinderBufferGeometry: function ( mesh ) {86 var data = {87 radiusTop: 5,88 radiusBottom: 5,89 height: 10,90 radialSegments: 8,91 heightSegments: 1,92 openEnded: false,93 thetaStart: 0,94 thetaLength: twoPi95 };96 function generateGeometry() {97 updateGroupGeometry( mesh,98 new THREE.CylinderBufferGeometry(99 data.radiusTop,100 data.radiusBottom,101 data.height,102 data.radialSegments,103 data.heightSegments,104 data.openEnded,105 data.thetaStart,106 data.thetaLength107 )108 );109 }110 var folder = gui.addFolder( 'THREE.CylinderBufferGeometry' );111 folder.add( data, 'radiusTop', 0, 30 ).onChange( generateGeometry );112 folder.add( data, 'radiusBottom', 0, 30 ).onChange( generateGeometry );113 folder.add( data, 'height', 1, 50 ).onChange( generateGeometry );114 folder.add( data, 'radialSegments', 3, 64 ).step( 1 ).onChange( generateGeometry );115 folder.add( data, 'heightSegments', 1, 64 ).step( 1 ).onChange( generateGeometry );116 folder.add( data, 'openEnded' ).onChange( generateGeometry );117 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );118 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );119 generateGeometry();120 },121 CylinderGeometry: function ( mesh ) {122 var data = {123 radiusTop: 5,124 radiusBottom: 5,125 height: 10,126 radialSegments: 8,127 heightSegments: 1,128 openEnded: false,129 thetaStart: 0,130 thetaLength: twoPi131 };132 function generateGeometry() {133 updateGroupGeometry( mesh,134 new THREE.CylinderGeometry(135 data.radiusTop,136 data.radiusBottom,137 data.height,138 data.radialSegments,139 data.heightSegments,140 data.openEnded,141 data.thetaStart,142 data.thetaLength143 )144 );145 }146 var folder = gui.addFolder( 'THREE.CylinderGeometry' );147 folder.add( data, 'radiusTop', 1, 30 ).onChange( generateGeometry );148 folder.add( data, 'radiusBottom', 1, 30 ).onChange( generateGeometry );149 folder.add( data, 'height', 1, 50 ).onChange( generateGeometry );150 folder.add( data, 'radialSegments', 3, 64 ).step( 1 ).onChange( generateGeometry );151 folder.add( data, 'heightSegments', 1, 64 ).step( 1 ).onChange( generateGeometry );152 folder.add( data, 'openEnded' ).onChange( generateGeometry );153 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );154 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );155 generateGeometry();156 },157 ConeBufferGeometry: function ( mesh ) {158 var data = {159 radius: 5,160 height: 10,161 radialSegments: 8,162 heightSegments: 1,163 openEnded: false,164 thetaStart: 0,165 thetaLength: twoPi166 };167 function generateGeometry() {168 updateGroupGeometry( mesh,169 new THREE.ConeBufferGeometry(170 data.radius,171 data.height,172 data.radialSegments,173 data.heightSegments,174 data.openEnded,175 data.thetaStart,176 data.thetaLength177 )178 );179 }180 var folder = gui.addFolder( 'THREE.ConeBufferGeometry' );181 folder.add( data, 'radius', 0, 30 ).onChange( generateGeometry );182 folder.add( data, 'height', 1, 50 ).onChange( generateGeometry );183 folder.add( data, 'radialSegments', 3, 64 ).step( 1 ).onChange( generateGeometry );184 folder.add( data, 'heightSegments', 1, 64 ).step( 1 ).onChange( generateGeometry );185 folder.add( data, 'openEnded' ).onChange( generateGeometry );186 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );187 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );188 generateGeometry();189 },190 ConeGeometry: function ( mesh ) {191 var data = {192 radius: 5,193 height: 10,194 radialSegments: 8,195 heightSegments: 1,196 openEnded: false,197 thetaStart: 0,198 thetaLength: twoPi199 };200 function generateGeometry() {201 updateGroupGeometry( mesh,202 new THREE.ConeGeometry(203 data.radius,204 data.height,205 data.radialSegments,206 data.heightSegments,207 data.openEnded,208 data.thetaStart,209 data.thetaLength210 )211 );212 }213 var folder = gui.addFolder( 'THREE.ConeGeometry' );214 folder.add( data, 'radius', 0, 30 ).onChange( generateGeometry );215 folder.add( data, 'height', 1, 50 ).onChange( generateGeometry );216 folder.add( data, 'radialSegments', 3, 64 ).step( 1 ).onChange( generateGeometry );217 folder.add( data, 'heightSegments', 1, 64 ).step( 1 ).onChange( generateGeometry );218 folder.add( data, 'openEnded' ).onChange( generateGeometry );219 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );220 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );221 generateGeometry();222 },223 CircleBufferGeometry: function ( mesh ) {224 var data = {225 radius: 10,226 segments: 32,227 thetaStart: 0,228 thetaLength: twoPi229 };230 function generateGeometry() {231 updateGroupGeometry( mesh,232 new THREE.CircleBufferGeometry(233 data.radius, data.segments, data.thetaStart, data.thetaLength234 )235 );236 }237 var folder = gui.addFolder( 'THREE.CircleBufferGeometry' );238 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );239 folder.add( data, 'segments', 0, 128 ).step( 1 ).onChange( generateGeometry );240 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );241 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );242 generateGeometry();243 },244 CircleGeometry: function ( mesh ) {245 var data = {246 radius: 10,247 segments: 32,248 thetaStart: 0,249 thetaLength: twoPi250 };251 function generateGeometry() {252 updateGroupGeometry( mesh,253 new THREE.CircleGeometry(254 data.radius, data.segments, data.thetaStart, data.thetaLength255 )256 );257 }258 var folder = gui.addFolder( 'THREE.CircleGeometry' );259 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );260 folder.add( data, 'segments', 0, 128 ).step( 1 ).onChange( generateGeometry );261 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );262 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );263 generateGeometry();264 },265 DodecahedronGeometry: function ( mesh ) {266 var data = {267 radius: 10,268 detail: 0269 };270 function generateGeometry() {271 updateGroupGeometry( mesh,272 new THREE.DodecahedronGeometry(273 data.radius, data.detail274 )275 );276 }277 var folder = gui.addFolder( 'THREE.DodecahedronGeometry' );278 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );279 folder.add( data, 'detail', 0, 5 ).step( 1 ).onChange( generateGeometry );280 generateGeometry();281 },282 DodecahedronBufferGeometry: function ( mesh ) {283 var data = {284 radius: 10,285 detail: 0286 };287 function generateGeometry() {288 updateGroupGeometry( mesh,289 new THREE.DodecahedronBufferGeometry(290 data.radius, data.detail291 )292 );293 }294 var folder = gui.addFolder( 'THREE.DodecahedronBufferGeometry' );295 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );296 folder.add( data, 'detail', 0, 5 ).step( 1 ).onChange( generateGeometry );297 generateGeometry();298 },299 IcosahedronGeometry: function ( mesh ) {300 var data = {301 radius: 10,302 detail: 0303 };304 function generateGeometry() {305 updateGroupGeometry( mesh,306 new THREE.IcosahedronGeometry(307 data.radius, data.detail308 )309 );310 }311 var folder = gui.addFolder( 'THREE.IcosahedronGeometry' );312 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );313 folder.add( data, 'detail', 0, 5 ).step( 1 ).onChange( generateGeometry );314 generateGeometry();315 },316 IcosahedronBufferGeometry: function ( mesh ) {317 var data = {318 radius: 10,319 detail: 0320 };321 function generateGeometry() {322 updateGroupGeometry( mesh,323 new THREE.IcosahedronBufferGeometry(324 data.radius, data.detail325 )326 );327 }328 var folder = gui.addFolder( 'THREE.IcosahedronBufferGeometry' );329 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );330 folder.add( data, 'detail', 0, 5 ).step( 1 ).onChange( generateGeometry );331 generateGeometry();332 },333 LatheBufferGeometry: function ( mesh ) {334 var points = [];335 for ( var i = 0; i < 10; i ++ ) {336 points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) );337 }338 var data = {339 segments: 12,340 phiStart: 0,341 phiLength: twoPi342 };343 function generateGeometry() {344 var geometry = new THREE.LatheBufferGeometry(345 points, data.segments, data.phiStart, data.phiLength346 );347 updateGroupGeometry( mesh, geometry );348 }349 var folder = gui.addFolder( 'THREE.LatheBufferGeometry' );350 folder.add( data, 'segments', 1, 30 ).step( 1 ).onChange( generateGeometry );351 folder.add( data, 'phiStart', 0, twoPi ).onChange( generateGeometry );352 folder.add( data, 'phiLength', 0, twoPi ).onChange( generateGeometry );353 generateGeometry();354 },355 LatheGeometry: function ( mesh ) {356 var points = [];357 for ( var i = 0; i < 10; i ++ ) {358 points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) );359 }360 var data = {361 segments: 12,362 phiStart: 0,363 phiLength: twoPi364 };365 function generateGeometry() {366 var geometry = new THREE.LatheGeometry(367 points, data.segments, data.phiStart, data.phiLength368 );369 updateGroupGeometry( mesh, geometry );370 }371 var folder = gui.addFolder( 'THREE.LatheGeometry' );372 folder.add( data, 'segments', 1, 30 ).step( 1 ).onChange( generateGeometry );373 folder.add( data, 'phiStart', 0, twoPi ).onChange( generateGeometry );374 folder.add( data, 'phiLength', 0, twoPi ).onChange( generateGeometry );375 generateGeometry();376 },377 OctahedronGeometry: function ( mesh ) {378 var data = {379 radius: 10,380 detail: 0381 };382 function generateGeometry() {383 updateGroupGeometry( mesh,384 new THREE.OctahedronGeometry(385 data.radius, data.detail386 )387 );388 }389 var folder = gui.addFolder( 'THREE.OctahedronGeometry' );390 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );391 folder.add( data, 'detail', 0, 5 ).step( 1 ).onChange( generateGeometry );392 generateGeometry();393 },394 OctahedronBufferGeometry: function ( mesh ) {395 var data = {396 radius: 10,397 detail: 0398 };399 function generateGeometry() {400 updateGroupGeometry( mesh,401 new THREE.OctahedronBufferGeometry(402 data.radius, data.detail403 )404 );405 }406 var folder = gui.addFolder( 'THREE.OctahedronBufferGeometry' );407 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );408 folder.add( data, 'detail', 0, 5 ).step( 1 ).onChange( generateGeometry );409 generateGeometry();410 },411 PlaneBufferGeometry: function ( mesh ) {412 var data = {413 width: 10,414 height: 10,415 widthSegments: 1,416 heightSegments: 1417 };418 function generateGeometry() {419 updateGroupGeometry( mesh,420 new THREE.PlaneBufferGeometry(421 data.width, data.height, data.widthSegments, data.heightSegments422 )423 );424 }425 var folder = gui.addFolder( 'THREE.PlaneBufferGeometry' );426 folder.add( data, 'width', 1, 30 ).onChange( generateGeometry );427 folder.add( data, 'height', 1, 30 ).onChange( generateGeometry );428 folder.add( data, 'widthSegments', 1, 30 ).step( 1 ).onChange( generateGeometry );429 folder.add( data, 'heightSegments', 1, 30 ).step( 1 ).onChange( generateGeometry );430 generateGeometry();431 },432 PlaneGeometry: function ( mesh ) {433 var data = {434 width: 10,435 height: 10,436 widthSegments: 1,437 heightSegments: 1438 };439 function generateGeometry() {440 updateGroupGeometry( mesh,441 new THREE.PlaneGeometry(442 data.width, data.height, data.widthSegments, data.heightSegments443 )444 );445 }446 var folder = gui.addFolder( 'THREE.PlaneGeometry' );447 folder.add( data, 'width', 1, 30 ).onChange( generateGeometry );448 folder.add( data, 'height', 1, 30 ).onChange( generateGeometry );449 folder.add( data, 'widthSegments', 1, 30 ).step( 1 ).onChange( generateGeometry );450 folder.add( data, 'heightSegments', 1, 30 ).step( 1 ).onChange( generateGeometry );451 generateGeometry();452 },453 RingBufferGeometry: function ( mesh ) {454 var data = {455 innerRadius: 5,456 outerRadius: 10,457 thetaSegments: 8,458 phiSegments: 8,459 thetaStart: 0,460 thetaLength: twoPi461 };462 function generateGeometry() {463 updateGroupGeometry( mesh,464 new THREE.RingBufferGeometry(465 data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength466 )467 );468 }469 var folder = gui.addFolder( 'THREE.RingBufferGeometry' );470 folder.add( data, 'innerRadius', 1, 30 ).onChange( generateGeometry );471 folder.add( data, 'outerRadius', 1, 30 ).onChange( generateGeometry );472 folder.add( data, 'thetaSegments', 1, 30 ).step( 1 ).onChange( generateGeometry );473 folder.add( data, 'phiSegments', 1, 30 ).step( 1 ).onChange( generateGeometry );474 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );475 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );476 generateGeometry();477 },478 RingGeometry: function ( mesh ) {479 var data = {480 innerRadius: 5,481 outerRadius: 10,482 thetaSegments: 8,483 phiSegments: 8,484 thetaStart: 0,485 thetaLength: twoPi486 };487 function generateGeometry() {488 updateGroupGeometry( mesh,489 new THREE.RingGeometry(490 data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength491 )492 );493 }494 var folder = gui.addFolder( 'THREE.RingGeometry' );495 folder.add( data, 'innerRadius', 1, 30 ).onChange( generateGeometry );496 folder.add( data, 'outerRadius', 1, 30 ).onChange( generateGeometry );497 folder.add( data, 'thetaSegments', 1, 30 ).step( 1 ).onChange( generateGeometry );498 folder.add( data, 'phiSegments', 1, 30 ).step( 1 ).onChange( generateGeometry );499 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );500 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );501 generateGeometry();502 },503 SphereBufferGeometry: function ( mesh ) {504 var data = {505 radius: 15,506 widthSegments: 8,507 heightSegments: 6,508 phiStart: 0,509 phiLength: twoPi,510 thetaStart: 0,511 thetaLength: Math.PI512 };513 function generateGeometry() {514 updateGroupGeometry( mesh,515 new THREE.SphereBufferGeometry(516 data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength517 )518 );519 }520 var folder = gui.addFolder( 'THREE.SphereBufferGeometry' );521 folder.add( data, 'radius', 1, 30 ).onChange( generateGeometry );522 folder.add( data, 'widthSegments', 3, 32 ).step( 1 ).onChange( generateGeometry );523 folder.add( data, 'heightSegments', 2, 32 ).step( 1 ).onChange( generateGeometry );524 folder.add( data, 'phiStart', 0, twoPi ).onChange( generateGeometry );525 folder.add( data, 'phiLength', 0, twoPi ).onChange( generateGeometry );526 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );527 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );528 generateGeometry();529 },530 SphereGeometry: function ( mesh ) {531 var data = {532 radius: 15,533 widthSegments: 8,534 heightSegments: 6,535 phiStart: 0,536 phiLength: twoPi,537 thetaStart: 0,538 thetaLength: Math.PI539 };540 function generateGeometry() {541 updateGroupGeometry( mesh,542 new THREE.SphereGeometry(543 data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength544 )545 );546 }547 var folder = gui.addFolder( 'THREE.SphereGeometry' );548 folder.add( data, 'radius', 1, 30 ).onChange( generateGeometry );549 folder.add( data, 'widthSegments', 3, 32 ).step( 1 ).onChange( generateGeometry );550 folder.add( data, 'heightSegments', 2, 32 ).step( 1 ).onChange( generateGeometry );551 folder.add( data, 'phiStart', 0, twoPi ).onChange( generateGeometry );552 folder.add( data, 'phiLength', 0, twoPi ).onChange( generateGeometry );553 folder.add( data, 'thetaStart', 0, twoPi ).onChange( generateGeometry );554 folder.add( data, 'thetaLength', 0, twoPi ).onChange( generateGeometry );555 generateGeometry();556 },557 TetrahedronGeometry: function ( mesh ) {558 var data = {559 radius: 10,560 detail: 0561 };562 function generateGeometry() {563 updateGroupGeometry( mesh,564 new THREE.TetrahedronGeometry(565 data.radius, data.detail566 )567 );568 }569 var folder = gui.addFolder( 'THREE.TetrahedronGeometry' );570 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );571 folder.add( data, 'detail', 0, 5 ).step( 1 ).onChange( generateGeometry );572 generateGeometry();573 },574 TetrahedronBufferGeometry: function ( mesh ) {575 var data = {576 radius: 10,577 detail: 0578 };579 function generateGeometry() {580 updateGroupGeometry( mesh,581 new THREE.TetrahedronBufferGeometry(582 data.radius, data.detail583 )584 );585 }586 var folder = gui.addFolder( 'THREE.TetrahedronBufferGeometry' );587 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );588 folder.add( data, 'detail', 0, 5 ).step( 1 ).onChange( generateGeometry );589 generateGeometry();590 },591 TextGeometry: function ( mesh ) {592 var data = {593 text: "TextGeometry",594 size: 5,595 height: 2,596 curveSegments: 12,597 font: "helvetiker",598 weight: "regular",599 bevelEnabled: false,600 bevelThickness: 1,601 bevelSize: 0.5,602 bevelSegments: 3603 };604 var fonts = [605 "helvetiker",606 "optimer",607 "gentilis",608 "droid/droid_serif"609 ];610 var weights = [611 "regular", "bold"612 ];613 function generateGeometry() {614 var loader = new THREE.FontLoader();615 loader.load( '../../examples/fonts/' + data.font + '_' + data.weight + '.typeface.json', function ( font ) {616 var geometry = new THREE.TextGeometry( data.text, {617 font: font,618 size: data.size,619 height: data.height,620 curveSegments: data.curveSegments,621 bevelEnabled: data.bevelEnabled,622 bevelThickness: data.bevelThickness,623 bevelSize: data.bevelSize,624 bevelSegments: data.bevelSegments625 } );626 geometry.center();627 updateGroupGeometry( mesh, geometry );628 } );629 }630 //Hide the wireframe631 mesh.children[ 0 ].visible = false;632 var folder = gui.addFolder( 'THREE.TextGeometry' );633 folder.add( data, 'text' ).onChange( generateGeometry );634 folder.add( data, 'size', 1, 30 ).onChange( generateGeometry );635 folder.add( data, 'height', 1, 20 ).onChange( generateGeometry );636 folder.add( data, 'curveSegments', 1, 20 ).step( 1 ).onChange( generateGeometry );637 folder.add( data, 'font', fonts ).onChange( generateGeometry );638 folder.add( data, 'weight', weights ).onChange( generateGeometry );639 folder.add( data, 'bevelEnabled' ).onChange( generateGeometry );640 folder.add( data, 'bevelThickness', 0.1, 3 ).onChange( generateGeometry );641 folder.add( data, 'bevelSize', 0.1, 3 ).onChange( generateGeometry );642 folder.add( data, 'bevelSegments', 0, 8 ).step( 1 ).onChange( generateGeometry );643 generateGeometry();644 },645 TextBufferGeometry: function ( mesh ) {646 var data = {647 text: "TextBufferGeometry",648 size: 5,649 height: 2,650 curveSegments: 12,651 font: "helvetiker",652 weight: "regular",653 bevelEnabled: false,654 bevelThickness: 1,655 bevelSize: 0.5,656 bevelSegments: 3657 };658 var fonts = [659 "helvetiker",660 "optimer",661 "gentilis",662 "droid/droid_serif"663 ];664 var weights = [665 "regular", "bold"666 ];667 function generateGeometry() {668 var loader = new THREE.FontLoader();669 loader.load( '../../examples/fonts/' + data.font + '_' + data.weight + '.typeface.json', function ( font ) {670 var geometry = new THREE.TextBufferGeometry( data.text, {671 font: font,672 size: data.size,673 height: data.height,674 curveSegments: data.curveSegments,675 bevelEnabled: data.bevelEnabled,676 bevelThickness: data.bevelThickness,677 bevelSize: data.bevelSize,678 bevelSegments: data.bevelSegments679 } );680 geometry.center();681 updateGroupGeometry( mesh, geometry );682 } );683 }684 //Hide the wireframe685 mesh.children[ 0 ].visible = false;686 var folder = gui.addFolder( 'THREE.TextBufferGeometry' );687 folder.add( data, 'text' ).onChange( generateGeometry );688 folder.add( data, 'size', 1, 30 ).onChange( generateGeometry );689 folder.add( data, 'height', 1, 20 ).onChange( generateGeometry );690 folder.add( data, 'curveSegments', 1, 20 ).step( 1 ).onChange( generateGeometry );691 folder.add( data, 'font', fonts ).onChange( generateGeometry );692 folder.add( data, 'weight', weights ).onChange( generateGeometry );693 folder.add( data, 'bevelEnabled' ).onChange( generateGeometry );694 folder.add( data, 'bevelThickness', 0.1, 3 ).onChange( generateGeometry );695 folder.add( data, 'bevelSize', 0.1, 3 ).onChange( generateGeometry );696 folder.add( data, 'bevelSegments', 0, 8 ).step( 1 ).onChange( generateGeometry );697 generateGeometry();698 },699 TorusBufferGeometry: function ( mesh ) {700 var data = {701 radius: 10,702 tube: 3,703 radialSegments: 16,704 tubularSegments: 100,705 arc: twoPi706 };707 function generateGeometry() {708 updateGroupGeometry( mesh,709 new THREE.TorusBufferGeometry(710 data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc711 )712 );713 }714 var folder = gui.addFolder( 'THREE.TorusBufferGeometry' );715 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );716 folder.add( data, 'tube', 0.1, 10 ).onChange( generateGeometry );717 folder.add( data, 'radialSegments', 2, 30 ).step( 1 ).onChange( generateGeometry );718 folder.add( data, 'tubularSegments', 3, 200 ).step( 1 ).onChange( generateGeometry );719 folder.add( data, 'arc', 0.1, twoPi ).onChange( generateGeometry );720 generateGeometry();721 },722 TorusGeometry: function ( mesh ) {723 var data = {724 radius: 10,725 tube: 3,726 radialSegments: 16,727 tubularSegments: 100,728 arc: twoPi729 };730 function generateGeometry() {731 updateGroupGeometry( mesh,732 new THREE.TorusGeometry(733 data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc734 )735 );736 }737 var folder = gui.addFolder( 'THREE.TorusGeometry' );738 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );739 folder.add( data, 'tube', 0.1, 10 ).onChange( generateGeometry );740 folder.add( data, 'radialSegments', 2, 30 ).step( 1 ).onChange( generateGeometry );741 folder.add( data, 'tubularSegments', 3, 200 ).step( 1 ).onChange( generateGeometry );742 folder.add( data, 'arc', 0.1, twoPi ).onChange( generateGeometry );743 generateGeometry();744 },745 TorusKnotBufferGeometry: function ( mesh ) {746 var data = {747 radius: 10,748 tube: 3,749 tubularSegments: 64,750 radialSegments: 8,751 p: 2,752 q: 3753 };754 function generateGeometry() {755 updateGroupGeometry( mesh,756 new THREE.TorusKnotBufferGeometry(757 data.radius, data.tube, data.tubularSegments, data.radialSegments,758 data.p, data.q759 )760 );761 }762 var folder = gui.addFolder( 'THREE.TorusKnotBufferGeometry' );763 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );764 folder.add( data, 'tube', 0.1, 10 ).onChange( generateGeometry );765 folder.add( data, 'tubularSegments', 3, 300 ).step( 1 ).onChange( generateGeometry );766 folder.add( data, 'radialSegments', 3, 20 ).step( 1 ).onChange( generateGeometry );767 folder.add( data, 'p', 1, 20 ).step( 1 ).onChange( generateGeometry );768 folder.add( data, 'q', 1, 20 ).step( 1 ).onChange( generateGeometry );769 generateGeometry();770 },771 TorusKnotGeometry: function ( mesh ) {772 var data = {773 radius: 10,774 tube: 3,775 tubularSegments: 64,776 radialSegments: 8,777 p: 2,778 q: 3779 };780 function generateGeometry() {781 updateGroupGeometry( mesh,782 new THREE.TorusKnotGeometry(783 data.radius, data.tube, data.tubularSegments, data.radialSegments,784 data.p, data.q785 )786 );787 }788 var folder = gui.addFolder( 'THREE.TorusKnotGeometry' );789 folder.add( data, 'radius', 1, 20 ).onChange( generateGeometry );790 folder.add( data, 'tube', 0.1, 10 ).onChange( generateGeometry );791 folder.add( data, 'tubularSegments', 3, 300 ).step( 1 ).onChange( generateGeometry );792 folder.add( data, 'radialSegments', 3, 20 ).step( 1 ).onChange( generateGeometry );793 folder.add( data, 'p', 1, 20 ).step( 1 ).onChange( generateGeometry );794 folder.add( data, 'q', 1, 20 ).step( 1 ).onChange( generateGeometry );795 generateGeometry();796 },797 ParametricBufferGeometry: function ( mesh ) {798 var data = {799 slices: 25,800 stacks: 25801 };802 function generateGeometry() {803 updateGroupGeometry( mesh,804 new THREE.ParametricBufferGeometry( THREE.ParametricGeometries.klein, data.slices, data.stacks )805 );806 }807 var folder = gui.addFolder( 'THREE.ParametricBufferGeometry' );808 folder.add( data, 'slices', 1, 100 ).step( 1 ).onChange( generateGeometry );809 folder.add( data, 'stacks', 1, 100 ).step( 1 ).onChange( generateGeometry );810 generateGeometry();811 },812 ParametricGeometry: function ( mesh ) {813 var data = {814 slices: 25,815 stacks: 25816 };817 function generateGeometry() {818 updateGroupGeometry( mesh,819 new THREE.ParametricGeometry( THREE.ParametricGeometries.klein, data.slices, data.stacks )820 );821 }822 var folder = gui.addFolder( 'THREE.ParametricGeometry' );823 folder.add( data, 'slices', 1, 100 ).step( 1 ).onChange( generateGeometry );824 folder.add( data, 'stacks', 1, 100 ).step( 1 ).onChange( generateGeometry );825 generateGeometry();826 },827 TubeGeometry: function ( mesh ) {828 var data = {829 segments: 20,830 radius: 2,831 radialSegments: 8832 };833 var path = new CustomSinCurve( 10 );834 function generateGeometry() {835 updateGroupGeometry( mesh,836 new THREE.TubeGeometry( path, data.segments, data.radius, data.radialSegments, false )837 );838 }839 var folder = gui.addFolder( 'THREE.TubeGeometry' );840 folder.add( data, 'segments', 1, 100 ).step( 1 ).onChange( generateGeometry );841 folder.add( data, 'radius', 1, 10 ).onChange( generateGeometry );842 folder.add( data, 'radialSegments', 1, 20 ).step( 1 ).onChange( generateGeometry );843 generateGeometry();844 },845 TubeBufferGeometry: function ( mesh ) {846 var data = {847 segments: 20,848 radius: 2,849 radialSegments: 8850 };851 var path = new CustomSinCurve( 10 );852 function generateGeometry() {853 updateGroupGeometry( mesh,854 new THREE.TubeBufferGeometry( path, data.segments, data.radius, data.radialSegments, false )855 );856 }857 var folder = gui.addFolder( 'THREE.TubeBufferGeometry' );858 folder.add( data, 'segments', 1, 100 ).step( 1 ).onChange( generateGeometry );859 folder.add( data, 'radius', 1, 10 ).onChange( generateGeometry );860 folder.add( data, 'radialSegments', 1, 20 ).step( 1 ).onChange( generateGeometry );861 generateGeometry();862 },863 ShapeGeometry: function ( mesh ) {864 var data = {865 segments: 12866 };867 function generateGeometry() {868 var geometry = new THREE.ShapeGeometry( heartShape, data.segments );869 geometry.center();870 updateGroupGeometry( mesh, geometry );871 }872 var folder = gui.addFolder( 'THREE.ShapeGeometry' );873 folder.add( data, 'segments', 1, 100 ).step( 1 ).onChange( generateGeometry );874 generateGeometry();875 },876 ShapeBufferGeometry: function ( mesh ) {877 var data = {878 segments: 12879 };880 function generateGeometry() {881 var geometry = new THREE.ShapeBufferGeometry( heartShape, data.segments );882 geometry.center();883 updateGroupGeometry( mesh, geometry );884 }885 var folder = gui.addFolder( 'THREE.ShapeBufferGeometry' );886 folder.add( data, 'segments', 1, 100 ).step( 1 ).onChange( generateGeometry );887 generateGeometry();888 },889 ExtrudeGeometry: function ( mesh ) {890 var data = {891 steps: 2,892 amount: 16,893 bevelEnabled: true,894 bevelThickness: 1,895 bevelSize: 1,896 bevelSegments: 1897 };898 var length = 12, width = 8;899 var shape = new THREE.Shape();900 shape.moveTo( 0, 0 );901 shape.lineTo( 0, width );902 shape.lineTo( length, width );903 shape.lineTo( length, 0 );904 shape.lineTo( 0, 0 );905 function generateGeometry() {906 var geometry = new THREE.ExtrudeGeometry( shape, data );907 geometry.center();908 updateGroupGeometry( mesh, geometry );909 }910 var folder = gui.addFolder( 'THREE.ExtrudeGeometry' );911 folder.add( data, 'steps', 1, 10 ).step( 1 ).onChange( generateGeometry );912 folder.add( data, 'amount', 1, 20 ).step( 1 ).onChange( generateGeometry );913 folder.add( data, 'bevelThickness', 1, 5 ).step( 1 ).onChange( generateGeometry );914 folder.add( data, 'bevelSize', 1, 5 ).step( 1 ).onChange( generateGeometry );915 folder.add( data, 'bevelSegments', 1, 5 ).step( 1 ).onChange( generateGeometry );916 generateGeometry();917 },918 ExtrudeBufferGeometry: function ( mesh ) {919 var data = {920 steps: 2,921 amount: 16,922 bevelEnabled: true,923 bevelThickness: 1,924 bevelSize: 1,925 bevelSegments: 1926 };927 var length = 12, width = 8;928 var shape = new THREE.Shape();929 shape.moveTo( 0, 0 );930 shape.lineTo( 0, width );931 shape.lineTo( length, width );932 shape.lineTo( length, 0 );933 shape.lineTo( 0, 0 );934 function generateGeometry() {935 var geometry = new THREE.ExtrudeBufferGeometry( shape, data );936 geometry.center();937 updateGroupGeometry( mesh, geometry );938 }939 var folder = gui.addFolder( 'THREE.ExtrudeBufferGeometry' );940 folder.add( data, 'steps', 1, 10 ).step( 1 ).onChange( generateGeometry );941 folder.add( data, 'amount', 1, 20 ).step( 1 ).onChange( generateGeometry );942 folder.add( data, 'bevelThickness', 1, 5 ).step( 1 ).onChange( generateGeometry );943 folder.add( data, 'bevelSize', 1, 5 ).step( 1 ).onChange( generateGeometry );944 folder.add( data, 'bevelSegments', 1, 5 ).step( 1 ).onChange( generateGeometry );945 generateGeometry();946 }947};948function chooseFromHash( mesh ) {949 var selectedGeometry = window.location.hash.substring( 1 ) || "TorusGeometry";950 if ( guis[ selectedGeometry ] !== undefined ) {951 guis[ selectedGeometry ]( mesh );952 }953 if ( selectedGeometry === 'TextGeometry' || selectedGeometry === 'TextBufferGeometry' ) {954 return { fixed: true };955 }956 //No configuration options957 return {};958}
DetailInfo.jsx
Source:DetailInfo.jsx
...25 rules={ { required: true } }26 render={ ({ field: { onChange, value } }) =>27 <TextFieldInput label="MaÌ khaÌch haÌng" className="w-full"28 onChange={ e => {29 onChange(e.target.value);30 } }31 value={ value }32 error={ errors?.code_customer?.type === 'required' ? 'MaÌ khaÌch haÌng không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />33 <Controller34 name={ 'fist_name' }35 control={ control }36 rules={ { required: true } }37 render={ ({ field: { onChange, value } }) =>38 <TextFieldInput label="HoÌ£ khaÌch haÌng" className="w-full"39 onChange={ e => {40 onChange(e.target.value);41 } }42 value={ value }43 error={ errors?.fist_name?.type === 'required' ? 'HoÌ£ khaÌch haÌng không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />44 <Controller45 name={ 'last_name' }46 control={ control }47 rules={ { required: true } }48 render={ ({ field: { onChange, value } }) =>49 <TextFieldInput label="Tên khaÌch haÌng" className="w-full"50 onChange={ e => {51 onChange(e.target.value);52 } }53 value={ value }54 error={ errors?.last_name?.type === 'required' ? 'Tên khaÌch haÌng không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />55 <Controller56 name={ 'user_customer' }57 control={ control }58 rules={ { required: true } }59 render={ ({ field: { onChange, value } }) =>60 <TextFieldInput label="TaÌi khoaÌn" className="w-full"61 onChange={ e => {62 onChange(e.target.value);63 } }64 value={ value }65 error={ errors?.user_customer?.type === 'required' ? 'TaÌi khoaÌn khaÌch haÌng không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />66 {67 isAdd &&68 <Controller69 name={ 'pass_employee' }70 control={ control }71 rules={ { required: true } }72 render={ ({ field: { onChange, value } }) =>73 <TextPassword className="w-full" multiline rows={ 3 } id="standard-multiline-static"74 onChange={ e => {75 onChange(e.target.value);76 } }77 value={ value }78 error={ errors?.pass_employee?.type === 'required' ? 'Mật khâÌu không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />79 }80 <div className="mt-3">81 <Controller82 name={ 'sex' }83 control={ control }84 rules={ {} }85 render={ ({ field: { onChange, value } }) =>86 <Sex87 onChange={ e => {88 onChange(e.target.value);89 } }90 value={ value } /> } />91 </div>92 <div className="flex items-end w-full">93 <DateSingle title="NgaÌy sinh" classNameTitle="w-1/4"94 onChange={ setForm }95 value={ form } keySearch="birthday"96 />97 </div>98 <Controller99 name={ 'phone_customer' }100 control={ control }101 rules={ { required: true } }102 render={ ({ field: { onChange, value } }) =>103 <TextFieldInput label="SÃ´Ì Äiện thoaÌ£i" className="w-full"104 onChange={ e => {105 onChange(e.target.value);106 } }107 value={ value }108 error={ errors?.phone_customer?.type === 'required' ? 'SÃ´Ì Äiện thoaÌ£i khaÌch haÌng không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />109 <Controller110 name={ 'email_customer' }111 control={ control }112 rules={ { required: true } }113 render={ ({ field: { onChange, value } }) =>114 <TextFieldInput label="Email" className="w-full"115 onChange={ e => {116 onChange(e.target.value);117 } }118 value={ value }119 error={ errors?.email_customer?.type === 'required' ? 'Email khaÌch haÌng không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />120 <div className="flex items-end w-full">121 <DateSingle title="NgaÌy taÌ£o" classNameTitle="w-1/4"122 onChange={ setForm }123 value={ form } keySearch="date_created"124 />125 </div>126 </div>127 <div>128 <Controller129 name={ 'address_customer' }130 control={ control }131 rules={ { required: true } }132 render={ ({ field: { onChange, value } }) =>133 <TextFieldInput label="Quê quaÌn" className="w-full"134 onChange={ e => {135 onChange(e.target.value);136 } }137 value={ value }138 error={ errors?.address_customer?.type === 'required' ? 'Quê quaÌn khaÌch haÌng không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />139 <Controller140 name={ 'hktt_customer' }141 control={ control }142 rules={ { required: true } }143 render={ ({ field: { onChange, value } }) =>144 <TextFieldInput label="Hộ khâÌu thÆ°Æ¡Ìng truÌ" className="w-full"145 onChange={ e => {146 onChange(e.target.value);147 } }148 value={ value }149 error={ errors?.hktt_customer?.type === 'required' ? 'HKTT khaÌch không ÄÆ°Æ¡Ì£c boÌ trôÌng!' : null } /> } />150 </div>151 </div>152 </div>153 <div>154 <h4 className="text-blue-500">Thông tin công ty</h4>155 <div>156 <div className="grid grid-cols-2 gap-4">157 <Controller158 name={ 'name_company' }159 control={ control }160 rules={ {} }161 render={ ({ field: { onChange, value } }) =>162 <TextFieldInput label="Tên công ty" className="w-full"163 onChange={ e => {164 onChange(e.target.value);165 } }166 value={ value }167 error={ null } /> } />168 <Controller169 name={ 'address_company' }170 control={ control }171 rules={ {} }172 render={ ({ field: { onChange, value } }) =>173 <TextFieldInput label="ÄiÌ£a chiÌ công ty" className="w-full"174 onChange={ e => {175 onChange(e.target.value);176 } }177 value={ value }178 error={ null } /> } />179 </div>180 <div className="grid grid-cols-3 gap-4">181 <Controller182 name={ 'code_company' }183 control={ control }184 rules={ {} }185 render={ ({ field: { onChange, value } }) =>186 <TextFieldInput label="MaÌ ÄÄng kyÌ công ty" className="w-full"187 onChange={ e => {188 onChange(e.target.value);189 } }190 value={ value }191 error={ null } /> } />192 <Controller193 name={ 'phone_company' }194 control={ control }195 rules={ {} }196 render={ ({ field: { onChange, value } }) =>197 <TextFieldInput label="SÃ´Ì Äiện thoaÌ£i công ty" className="w-full"198 onChange={ e => {199 onChange(e.target.value);200 } }201 value={ value }202 error={ null } /> } />203 <Controller204 name={ 'mail_company' }205 control={ control }206 rules={ {} }207 render={ ({ field: { onChange, value } }) =>208 <TextFieldInput label="Email công ty" className="w-full"209 onChange={ e => {210 onChange(e.target.value);211 } }212 value={ value }213 error={ null } /> } />214 </div>215 <Controller216 name={ 'node' }217 control={ control }218 rules={ {} }219 render={ ({ field: { onChange, value } }) =>220 <TextFieldInput label="Ghi chuÌ" className="w-full" multiline rows={ 3 } id="standard-multiline-static"221 onChange={ e => {222 onChange(e.target.value);223 } }224 value={ value }225 error={ null } /> } />226 </div>227 </div>228 </div>229 </>230 );231};232DetailInfo.propTypes = {233 setForm: PropTypes.func,234 form: PropTypes.object,235 isAdd: PropTypes.bool236};...
ControllerContainer.js
Source:ControllerContainer.js
...22import Tabs from './Tabs/Tabs';23import Tab from './Tabs/Tab';24class ControllerContainer extends React.PureComponent {25 onChange = (editorState) => {26 this.props.onChange(editorState);27 }28 shouldComponentUpdate(nextProps) {29 if (30 JSON.stringify(nextProps.inlineStyles) === JSON.stringify(this.props.inlineStyles) &&31 JSON.stringify(nextProps.blockStyle) === JSON.stringify(this.props.blockStyle) &&32 JSON.stringify(nextProps.blockTree) === JSON.stringify(this.props.blockTree)33 ) {34 return false;35 }36 return true;37 }38 handleClick = () => {39 const editorState = this.props.controller.editorState;40 this.onChange(EditorState.forceSelection(editorState, editorState.getSelection()));41 }42 render() {43 return (44 <div style={{zoom: 0.70}} onClick={this.handleClick}>45 <Tabs>46 <Tab label={"Home"}>47 <FontPicker fontFamily={this.props.inlineStyles.fontFamily} controller={this.props.controller} onChange={this.onChange}/>48 <FontSizePicker fontSize={this.props.inlineStyles.fontSize} controller={this.props.controller} onChange={this.onChange}/>49 <FontColorPicker color={this.props.inlineStyles.color} controller={this.props.controller} onChange={this.onChange}/>50 <HighlightColorPicker backgroundColor={this.props.inlineStyles.backgroundColor} controller={this.props.controller} onChange={this.onChange}/>51 <FontStyle styles={this.props.inlineStyles} controller={this.props.controller} onChange={this.onChange}/>52 <ParagraphAlign textAlign={this.props.blockStyle.style.textAlign} controller={this.props.controller} onChange={this.onChange}/>53 <Indent marginLeft={this.props.blockStyle.style.marginLeft} controller={this.props.controller} onChange={this.onChange}/>54 <OrderedList ol={this.props.blockTree['ol']} ul={this.props.blockTree['ul']} controller={this.props.controller} onChange={this.onChange}/>...
Using AI Code Generation
1import React, { Component } from 'react';2import { storiesOf } from '@storybook/react';3import { action } from '@storybook/addon-actions';4import { linkTo } from '@storybook/addon-links';5import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';6import { withNotes } from '@storybook/addon-notes';7import { withInfo } from '@storybook/addon-info';8import { withReadme } from 'storybook-readme';9import { Button, Welcome } from '@storybook/react/demo';10import { withOptions } from '@storybook/addon-options';11import { withBackgrounds } from '@storybook/addon-backgrounds';12import { checkA11y } from '@storybook/addon-a11y';13import { withViewport } from '@storybook/addon-viewport';14import Readme from './README.md';15import ButtonComponent from './button';16storiesOf('Button', module)17 .addDecorator(withKnobs)18 .addDecorator(withInfo)19 .addDecorator(withReadme(Readme))20 .addDecorator(withOptions({
Using AI Code Generation
1import { action } from '@storybook/addon-actions';2const onChange = action('onChange');3import test from './test';4storiesOf('test', module)5 .add('default', () => (6 <test onChange={onChange} />7 ));8import '@storybook/addon-actions/register';9import { action } from '@storybook/addon-actions';10const onClick = action('onClick');11import test from './test';12storiesOf('test', module)13 .add('default', () => (14 <test onClick={onClick} />15 ));16import '@storybook/addon-info/register';17import { action } from '@storybook/addon-actions';18const onChange = action('onChange');19import test from './test';20storiesOf('test', module)21 .add('default', () => (22 <test onChange={onChange} />23 ));24import '@storybook/addon-knobs/register';
Using AI Code Generation
1storiesOf('Button', module)2 .add('with text', () => (3 <Button onClick={action('clicked')}>Hello Button</Button>4 .add('with some emoji', () => (5 <Button onClick={action('clicked')}>😀 😎 👍 💯</Button>6 ));
Using AI Code Generation
1import { addons } from '@storybook/addons';2import { STORY_CHANGED } from '@storybook/core-events';3import { Channel } from '@storybook/channels';4export const onChange = (callback: (kind: string, story: string) => void) => {5 const channel = addons.getChannel() as Channel;6 channel.on(STORY_CHANGED, (id: string) => {7 const [kind, story] = id.split('--');8 callback(kind, story);9 });10};
Using AI Code Generation
1const handleChange = (value) => {2 console.log(value);3};4<Root onChange={handleChange} />5import { useRoot } from "storybook-root";6const Test = () => {7 const { root } = useRoot();8 return <div>{root}</div>;9};10MIT © [mohitk05](
Using AI Code Generation
1import { root } from 'storybook-root';2root.onChange((data) => {3 console.log('data', data);4});5### `root.onLoad()`6import { root } from 'storybook-root';7root.onLoad((data) => {8 console.log('data', data);9});10### `root.onUpdate()`11import { root } from 'storybook-root';12root.onUpdate((data) => {13 console.log('data', data);14});15### `root.onRemove()`16import { root } from 'storybook-root';17root.onRemove((data) => {18 console.log('data', data);19});20### `root.onAdd()`21import { root } from 'storybook-root';22root.onAdd((data) => {23 console.log('data', data);24});25### `root.onSelect()`26import { root } from 'storybook-root';27root.onSelect((data) => {28 console.log('data', data);29});30### `root.onDeselect()`31import { root } from 'storybook-root';32root.onDeselect((data) => {33 console.log('data', data);34});35### `root.onExpand()`
Using AI Code Generation
1const onChange = (value) => {2 console.log(value);3};4const storybook = document.querySelector('storybook-root');5import React from 'react';6import StorybookRoot from 'storybook-root';7const App = () => (8);9export default App;10import { Component } from '@angular/core';11import { StorybookRootComponent } from 'storybook-root';12@Component({13})14export class AppComponent {15 title = 'storybook-root';16 storybookName = 'storybook-root';17}18import StorybookRoot from 'storybook-root';19export default {20 components: {21 },22 data() {23 return {24 };
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!