{ "id": "gsap-104ab2595f9d", "sourceId": "gsap", "title": "Smooth Morph", "sourceUrl": "https://demos.gsap.com/demo/smooth-morph", "demoUrl": "https://codepen.io/GreenSock/pen/EaKLgKZ", "sourceStatus": "unresolved", "sourceReason": "Public page unavailable through web browsing", "sourceRevision": null, "sourceLicense": null, "originalDemoAcquired": false, "disposition": "ready_for_independent_study", "evidenceBasis": "catalog_linked_api", "studyId": "gsap-104ab2595f9d", "sharedStudyCanonicalId": null, "label": "Independently authored documentation study; original Pen unavailable", "catalogEvidence": { "localPath": "artifacts/full-import/gsap/remaining-docs/catalog-evidence.json", "sha256": "4f2a4f9aa64456b85b905b562b60d7733629b41026787b3057cba29e8b10de69", "bytes": 30117, "recordId": "gsap-104ab2595f9d" }, "sourceInputs": [ { "kind": "authored-study-specification", "localPath": "artifacts/full-import/gsap/remaining-docs/study-specs.json", "sha256": "cbb89331eda8783b5cf2f173b326b9195eeabfb223374fb60019161d9f46d4a6", "bytes": 52279, "recordId": "gsap-104ab2595f9d" }, { "kind": "official-catalog-metadata", "localPath": "artifacts/full-import/gsap/remaining-docs/catalog-evidence.json", "sha256": "4f2a4f9aa64456b85b905b562b60d7733629b41026787b3057cba29e8b10de69", "bytes": 30117, "recordId": "gsap-104ab2595f9d" }, { "kind": "official-documentation-evidence", "localPath": "artifacts/full-import/gsap/remaining-docs/official-documentation-evidence.json", "sha256": "bfa25f561e61c597569cf1bc0b3538e6dce4b9985a932775ceab41e665ca24a2", "bytes": 11430, "recordIds": [ "morph" ] }, { "kind": "original-library-source", "localPath": "artifacts/full-import/gsap/library/src/MorphSVGPlugin.js", "sha256": "ed1a050ea542e5f7918b079f1a9d7094baa7ca2eef4a03c9700fc975f330859b", "gitBlob": "16ca88dddb9dca68d6823e903e87685e031c6a39", "revision": "13e2b790546426a1a2e0e9b409f3f8dc6d6611f2", "sourcePath": "src/MorphSVGPlugin.js", "ranges": [ { "id": "morph-smooth-algorithm", "startLine": 313, "endLine": 358, "rangeSha256": "d08ccee1f9f199369d1841a5df57df4826791ac3b87b19b37c5e42d22346eec4" }, { "id": "morph-smooth-endpoint", "startLine": 675, "endLine": 692, "rangeSha256": "b8dd321271beb04d7e3b0f262dc6d550c6568185928a205cf5031ece19d5bab3" }, { "id": "morph-smooth-persist", "startLine": 751, "endLine": 758, "rangeSha256": "92edb130fcbc6c9674312874a4555a518d753bfe67e0df0e36570ceb8af399e4" } ] } ], "studiedPrinciple": "Explore how MorphSVG smooth point density, redraw, and persist affect a morph between independently authored outlines.", "namedApis": [ { "name": "gsap.to(path, {morphSVG:{shape, smooth:{points, redraw, persist}}})", "purpose": "Compare smoothing configurations on the same source/endpoint geometry.", "libraryEvidence": [ "morph-smooth-algorithm", "morph-smooth-endpoint", "morph-smooth-persist" ], "documentationEvidence": [ "morph" ], "minimumVersion": "3.14.0" } ], "implementationBrief": { "scene": "Two authored SVG outlines in a common viewBox: a simple source contour and a more detailed endpoint contour. Show a baseline morph alongside a configured smooth morph.", "controls": [ { "label": "Points", "type": "select", "action": "Choose a modest smoothing point value and rebuild from the original d strings." }, { "label": "Redraw", "type": "checkbox", "action": "Choose point redistribution or subdivision of existing segments." }, { "label": "Persist", "type": "checkbox", "action": "Choose whether the smoothed endpoint remains after completion." }, { "label": "Play / Progress", "type": "button and range", "action": "Run both comparison tweens together or inspect the same normalized progress." } ], "mechanismSteps": [ "Keep untouched source and endpoint d strings for every rebuild. Use the same shape pair and timing in the baseline and smoothed panels.", "Use morphSVG:{shape:endPath,smooth:{points,redraw,persist}} only in the configured panel. Keep the baseline free of smooth.", "Changing options kills owned tweens, restores original path strings, and constructs a new paused comparison at zero. Do not repeatedly smooth the already generated path.", "Explain that redraw:true redistributes anchors and may alter endpoint geometry; redraw:false inserts points into existing segments.", "When persist:false, inspect completion against the supplied endpoint string. When true, accept a smoothed endpoint rather than claiming byte-identical path data.", "Display the current option values and d-string length as a simple inspection aid. Do not present d-string length as an exact anchor count or performance measurement." ] }, "authoredDefaults": { "pointsOptions": [ 20, 40, 80 ], "points": 40, "redraw": true, "persist": false, "durationSeconds": 1.8, "ease": "none", "geometry": "new six-anchor contour to new twelve-anchor contour" }, "verificationRequired": [ "Each rebuild starts from the unchanged original d strings rather than the last generated morph output.", "With persist:false, completion restores the supplied endpoint; option changes produce no invalid path data.", "Baseline and configured panels receive identical original source/endpoint strings and normalized progress. Rendered endpoint geometry may differ with redraw:true and persist:true; do not require equal rendered geometry for that configuration.", "Inspect intermediate and final shapes for clipping at 320px and 1440px. Retain geometry/fidelity differences honestly.", "Static mode shows the source and destination outlines with configuration text." ], "unsupportedClaims": [ "Original composition, assets, timing, breakpoint behavior, and live interaction are not observable in captured frames. This brief does not establish visual fidelity or recover original code.", "Smoothing does not guarantee a better result for every path pair. Redraw can sacrifice fidelity and larger point counts can add work.", "Original path art, smooth values, duration, and visual result were not recovered." ], "dependencies": { "package": "gsap", "version": "3.15.0", "revision": "13e2b790546426a1a2e0e9b409f3f8dc6d6611f2", "repository": "https://github.com/greensock/GSAP", "plugins": [ "MorphSVGPlugin" ], "registration": "gsap.registerPlugin(MorphSVGPlugin) after loading core and those plugin scripts", "runtimeCandidates": [ { "path": "dist/gsap.js", "localPath": "artifacts/full-import/gsap/library/dist/gsap.js", "gitBlob": "ec5ffee3f099bc454f2f1c79cee6a55ba97e7400", "sha256": "01effe0e121c22ba0f885a3f091f3dc6d1f0d445c4fba37dcb298e314eca5cfb", "bytes": 179557 }, { "path": "dist/MorphSVGPlugin.js", "localPath": "artifacts/full-import/gsap/library/dist/MorphSVGPlugin.js", "gitBlob": "40531f708058713a7ad2942b74d0e1442c31431c", "sha256": "786b51ffe878fa747bb7e115815d438ec9113bde1303967172c34b129f5472ef", "bytes": 55989 } ], "license": { "name": "GSAP Standard 'No Charge' License (custom, not MIT)", "localPath": "artifacts/full-import/gsap/licenses/gsap-standard-license.html", "sha256": "bf8536e67b77db780f7db0c14a645f184f554bb19e938d1e52d58986e2f10528", "bytes": 6988, "url": "https://gsap.com/community/standard-license/" }, "originalDependencyVersionKnown": false }, "runtimeVerified": false, "implementationWritten": false }