{"id":1342,"date":"2024-11-15T15:58:44","date_gmt":"2024-11-15T20:58:44","guid":{"rendered":"https:\/\/stepinto.vision\/?p=1342"},"modified":"2024-11-15T15:58:44","modified_gmt":"2024-11-15T20:58:44","slug":"simultaneously-combine-gestures","status":"publish","type":"post","link":"https:\/\/stepinto.vision\/example-code\/simultaneously-combine-gestures\/","title":{"rendered":"Simultaneously Combine Gestures"},"content":{"rendered":"\n<p>An example of using SimultaneousGesture to create a Magnify + Rotate gesture.<\/p>\n\n\n\n<p>Another way to gestures is to use <code>simultaneously(with:)<\/code>. This time, how about we combine the <a href=\"https:\/\/stepinto.vision\/example-code\/improved-magnify-gesture\/\" data-type=\"post\" data-id=\"1275\">Magnify<\/a>  and <a href=\"https:\/\/stepinto.vision\/example-code\/rotate-gesture-3d-improved\/\" data-type=\"post\" data-id=\"1311\">Rotate<\/a> gestures into a new one?<\/p>\n\n\n\n<p>There are a number of ways to create gestures, but for this example I\u2019ll stick with the custom modifier pattern that we used in the previous examples. Notice that we call <code>RotateGesture3D<\/code>, the chain it with <code>.simultaneously()<\/code>, passing <code>MagnifyGesture<\/code>. We can unpack the data we need from the first and second properties on the gesture value.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#000000;--cbp-line-number-width:calc(2 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(0, 0, 0, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"struct Example014: View {\n    var body: some View {\n        RealityView { ... }\n        .modifier(ScaleAndRotateGesture())\n    }\n}\n\nstruct ScaleAndRotateGesture: ViewModifier {\n\n    @State var isActive: Bool = false\n    @State var initialScale: SIMD3&lt;Float&gt; = .init(repeating: 1.0)\n    @State var initialOrientation:simd_quatf = simd_quatf(\n        vector: .init(repeating: 0.0)\n    )\n\n    func body(content: Content) -&gt; some View {\n        content\n            .gesture(\n                RotateGesture3D(constrainedToAxis: .y)\n                    .simultaneously(with: MagnifyGesture())\n                    .targetedToAnyEntity()\n                    .onChanged { value in\n\n                        \/\/ Cache the entity's initial scale and orientation when the gesture starts\n                        if !isActive {\n                            isActive = true\n                            initialScale = value.entity.scale\n                            initialOrientation = value.entity.transform.rotation\n                        }\n\n                        \/\/ Get the rotationa and magnification values\n                        if let rotation = value.first?.rotation, let magnification = value.second?.magnification {\n\n\n                            \/\/ Handle rotation (see exaple 012)\n                            let rotationTransform = Transform(AffineTransform3D(rotation: rotation))\n                            value.entity.transform.rotation = initialOrientation * rotationTransform.rotation\n\n                            \/\/ Handle scale (see example 011)\n                            let magnificationF = Float(magnification) \/\/ convert from CGFloat to Float...\n                            let minScale: Float = 0.25\n                            let maxScale: Float = 3\n                            let newScaleX = min(max(initialScale.x * magnificationF, minScale), maxScale)\n                            let newScaleY = min(max(initialScale.y * magnificationF, minScale), maxScale)\n                            let newScaleZ = min(max(initialScale.z * magnificationF, minScale), maxScale)\n                            value.entity.setScale(\n                                .init(x: newScaleX, y: newScaleY, z: newScaleZ),\n                                relativeTo: value.entity.parent!\n                            )\n                        }\n\n                    }\n                    .onEnded { value in\n                        \/\/ Clean up when the gesture has ended\n                        isActive = false\n                        initialScale = .init(repeating: 1.0)\n                        initialOrientation = simd_quatf(\n                            vector: .init(repeating: 0.0)\n                        )\n\n                    }\n                )\n    }\n\n}\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">struct<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">Example014<\/span><span style=\"color: #000000\">: View {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0000FF\">var<\/span><span style=\"color: #000000\"> body: some View {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        RealityView { ... }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        .<\/span><span style=\"color: #795E26\">modifier<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">ScaleAndRotateGesture<\/span><span style=\"color: #000000\">())<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">struct<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">ScaleAndRotateGesture<\/span><span style=\"color: #000000\">: ViewModifier {<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0000FF\">@State<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">var<\/span><span style=\"color: #000000\"> isActive: <\/span><span style=\"color: #267F99\">Bool<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #0000FF\">false<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0000FF\">@State<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">var<\/span><span style=\"color: #000000\"> initialScale: SIMD3&lt;<\/span><span style=\"color: #267F99\">Float<\/span><span style=\"color: #000000\">&gt; = .<\/span><span style=\"color: #0000FF\">init<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">repeating<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #098658\">1.0<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0000FF\">@State<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">var<\/span><span style=\"color: #000000\"> initialOrientation:simd_quatf = <\/span><span style=\"color: #795E26\">simd_quatf<\/span><span style=\"color: #000000\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #795E26\">vector<\/span><span style=\"color: #000000\">: .<\/span><span style=\"color: #0000FF\">init<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">repeating<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #098658\">0.0<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    )<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0000FF\">func<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">body<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">content<\/span><span style=\"color: #000000\">: Content) -&gt; some View {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        content<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">            .<\/span><span style=\"color: #795E26\">gesture<\/span><span style=\"color: #000000\">(<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #000000\">                <\/span><span style=\"color: #795E26\">RotateGesture3D<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">constrainedToAxis<\/span><span style=\"color: #000000\">: .<\/span><span style=\"color: #001080\">y<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #000000\">                    .<\/span><span style=\"color: #795E26\">simultaneously<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">with<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #795E26\">MagnifyGesture<\/span><span style=\"color: #000000\">())<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                    .<\/span><span style=\"color: #795E26\">targetedToAnyEntity<\/span><span style=\"color: #000000\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                    .<\/span><span style=\"color: #001080\">onChanged<\/span><span style=\"color: #000000\"> { value <\/span><span style=\"color: #AF00DB\">in<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        <\/span><span style=\"color: #008000\">\/\/ Cache the entity&#39;s initial scale and orientation when the gesture starts<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        <\/span><span style=\"color: #AF00DB\">if<\/span><span style=\"color: #000000\"> !isActive {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            isActive = <\/span><span style=\"color: #0000FF\">true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            initialScale = value.<\/span><span style=\"color: #001080\">entity<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">scale<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            initialOrientation = value.<\/span><span style=\"color: #001080\">entity<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">transform<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">rotation<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        <\/span><span style=\"color: #008000\">\/\/ Get the rotationa and magnification values<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #000000\">                        <\/span><span style=\"color: #AF00DB\">if<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> rotation = value.<\/span><span style=\"color: #001080\">first<\/span><span style=\"color: #000000\">?.<\/span><span style=\"color: #001080\">rotation<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> magnification = value.<\/span><span style=\"color: #001080\">second<\/span><span style=\"color: #000000\">?.<\/span><span style=\"color: #001080\">magnification<\/span><span style=\"color: #000000\"> {<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #008000\">\/\/ Handle rotation (see exaple 012)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> rotationTransform = <\/span><span style=\"color: #795E26\">Transform<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">AffineTransform3D<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">rotation<\/span><span style=\"color: #000000\">: rotation))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            value.<\/span><span style=\"color: #001080\">entity<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">transform<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">rotation<\/span><span style=\"color: #000000\"> = initialOrientation * rotationTransform.<\/span><span style=\"color: #001080\">rotation<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #008000\">\/\/ Handle scale (see example 011)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> magnificationF = <\/span><span style=\"color: #267F99\">Float<\/span><span style=\"color: #000000\">(magnification) <\/span><span style=\"color: #008000\">\/\/ convert from CGFloat to Float...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> minScale: <\/span><span style=\"color: #267F99\">Float<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #098658\">0.25<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> maxScale: <\/span><span style=\"color: #267F99\">Float<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #098658\">3<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> newScaleX = <\/span><span style=\"color: #795E26\">min<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">max<\/span><span style=\"color: #000000\">(initialScale.<\/span><span style=\"color: #001080\">x<\/span><span style=\"color: #000000\"> * magnificationF, minScale), maxScale)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> newScaleY = <\/span><span style=\"color: #795E26\">min<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">max<\/span><span style=\"color: #000000\">(initialScale.<\/span><span style=\"color: #001080\">y<\/span><span style=\"color: #000000\"> * magnificationF, minScale), maxScale)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #0000FF\">let<\/span><span style=\"color: #000000\"> newScaleZ = <\/span><span style=\"color: #795E26\">min<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">max<\/span><span style=\"color: #000000\">(initialScale.<\/span><span style=\"color: #001080\">z<\/span><span style=\"color: #000000\"> * magnificationF, minScale), maxScale)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            value.<\/span><span style=\"color: #001080\">entity<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">setScale<\/span><span style=\"color: #000000\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                                .<\/span><span style=\"color: #0000FF\">init<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">x<\/span><span style=\"color: #000000\">: newScaleX, <\/span><span style=\"color: #795E26\">y<\/span><span style=\"color: #000000\">: newScaleY, <\/span><span style=\"color: #795E26\">z<\/span><span style=\"color: #000000\">: newScaleZ),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                                <\/span><span style=\"color: #795E26\">relativeTo<\/span><span style=\"color: #000000\">: value.<\/span><span style=\"color: #001080\">entity<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">parent<\/span><span style=\"color: #000000\">!<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                    .<\/span><span style=\"color: #001080\">onEnded<\/span><span style=\"color: #000000\"> { value <\/span><span style=\"color: #AF00DB\">in<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        <\/span><span style=\"color: #008000\">\/\/ Clean up when the gesture has ended<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        isActive = <\/span><span style=\"color: #0000FF\">false<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        initialScale = .<\/span><span style=\"color: #0000FF\">init<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">repeating<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #098658\">1.0<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        initialOrientation = <\/span><span style=\"color: #795E26\">simd_quatf<\/span><span style=\"color: #000000\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                            <\/span><span style=\"color: #795E26\">vector<\/span><span style=\"color: #000000\">: .<\/span><span style=\"color: #0000FF\">init<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">repeating<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #098658\">0.0<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                        )<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">                )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Video demo<\/p>\n\n\n\n\t\t<figure class=\"wp-block-jetpack-videopress jetpack-videopress-player\" style=\"\" >\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t<\/figure>\n\t\t","protected":false},"excerpt":{"rendered":"<p>An example of using SimultaneousGesture to create a Magnify + Rotate gesture.<\/p>\n","protected":false},"author":93705089,"featured_media":1343,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_EventAllDay":false,"_EventTimezone":"","_EventStartDate":"","_EventEndDate":"","_EventStartDateUTC":"","_EventEndDateUTC":"","_EventShowMap":false,"_EventShowMapLink":false,"_EventURL":"","_EventCost":"","_EventCostDescription":"","_EventCurrencySymbol":"","_EventCurrencyCode":"","_EventCurrencyPosition":"","_EventDateTimeSeparator":"","_EventTimeRangeSeparator":"","_EventOrganizerID":[],"_EventVenueID":[],"_OrganizerEmail":"","_OrganizerPhone":"","_OrganizerWebsite":"","_VenueAddress":"","_VenueCity":"","_VenueCountry":"","_VenueProvince":"","_VenueState":"","_VenueZip":"","_VenuePhone":"","_VenueURL":"","_VenueStateProvince":"","_VenueLat":"","_VenueLng":"","_VenueShowMap":false,"_VenueShowMapLink":false,"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[1365],"tags":[],"class_list":["post-1342","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-example-code"],"jetpack_publicize_connections":[],"taxonomy_info":{"category":[{"value":1365,"label":"Example Code"}]},"featured_image_src_large":["https:\/\/i0.wp.com\/stepinto.vision\/wp-content\/uploads\/2024\/11\/step-example-014-01.jpeg?fit=1024%2C768&ssl=1",1024,768,true],"author_info":{"display_name":"Joseph Simpson","author_link":"https:\/\/stepinto.vision\/author\/vrhermit\/"},"comment_info":0,"category_info":[{"term_id":1365,"name":"Example Code","slug":"example-code","term_group":0,"term_taxonomy_id":11,"taxonomy":"category","description":"Code snippets and examples of using common APIs throughout visionOS development","parent":0,"count":187,"filter":"raw","cat_ID":1365,"category_count":187,"category_description":"Code snippets and examples of using common APIs throughout visionOS development","cat_name":"Example Code","category_nicename":"example-code","category_parent":0}],"tag_info":false,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/stepinto.vision\/wp-content\/uploads\/2024\/11\/step-example-014-01.jpeg?fit=2732%2C2048&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/posts\/1342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/users\/93705089"}],"replies":[{"embeddable":true,"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/comments?post=1342"}],"version-history":[{"count":7,"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/posts\/1342\/revisions"}],"predecessor-version":[{"id":1351,"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/posts\/1342\/revisions\/1351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/media\/1343"}],"wp:attachment":[{"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/media?parent=1342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/categories?post=1342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stepinto.vision\/wp-json\/wp\/v2\/tags?post=1342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}