1"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([["4954"],{99390(e,r,t){t.r(r),t.d(r,{metadata:()=>n,default:()=>p,frontMatter:()=>s,contentTitle:()=>l,toc:()=>c,assets:()=>a});var n=JSON.parse('{"id":"api-reference/core/linear-interpolator","title":"LinearInterpolator","description":"Performs simple linear interpolation between two view states. Implements TransitionInterpolator.","source":"@site/../docs/api-reference/core/linear-interpolator.md","sourceDirName":"api-reference/core","slug":"/api-reference/core/linear-interpolator","permalink":"/docs/api-reference/core/linear-interpolator","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/deck.gl/tree/master/website/../docs/api-reference/core/linear-interpolator.md","tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"OrbitController","permalink":"/docs/api-reference/core/orbit-controller"},"next":{"title":"FlyToInterpolator","permalink":"/docs/api-reference/core/fly-to-interpolator"}}'),o=t(74848),i=t(28453);let s={},l="LinearInterpolator",a={},c=[{value:"Constructor",id:"constructor",level:2},{value:"Source",id:"source",level:2}];function d(e){let r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"linearinterpolator",children:"LinearInterpolator"})}),"\n",(0,o.jsxs)(r.p,{children:["Performs simple linear interpolation between two view states. Implements ",(0,o.jsx)(r.a,{href:"/docs/api-reference/core/transition-interpolator",children:"TransitionInterpolator"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:["See ",(0,o.jsx)(r.a,{href:"/docs/developer-guide/animations-and-transitions#camera-transitions",children:"View State Transitions"})," for usage examples."]}),"\n",(0,o.jsx)(r.h2,{id:"constructor",children:"Constructor"}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-js",children:"import {LinearInterpolator} from '@deck.gl/core';\n\nnew LinearInterpolator({transitionProps: ['target', 'zoom']});\n"})}),"\n",(0,o.jsx)(r.p,{children:"Parameters:"}),"\n",(0,o.jsxs)(r.ul,{children:["\n",(0,o.jsxs)(r.li,{children:["options (object)","\n",(0,o.jsxs)(r.ul,{children:["\n",(0,o.jsxs)(r.li,{children:[(0,o.jsx)(r.code,{children:"transitionProps"})," (string[], optional) - Array of prop names that should be linearly interpolated. Default ",(0,o.jsx)(r.code,{children:"['longitude', 'latitude', 'zoom', 'bearing', 'pitch']"}),"."]}),"\n",(0,o.jsxs)(r.li,{children:[(0,o.jsx)(r.code,{children:"around"})," (number[2], optional) - A point to zoom/rotate around, ",(0,o.jsx)(r.code,{children:"[x, y]"})," in screen pixels. If provided, the location at this point will not move during the transition."]}),"\n",(0,o.jsxs)(r.li,{children:[(0,o.jsx)(r.code,{children:"makeViewport"})," (Function, optional) - Called to construct a ",(0,o.jsx)(r.a,{href:"/docs/api-reference/core/viewport",children:"viewport"}),", e.g. ",(0,o.jsx)(r.code,{children:"props => new WebMercatorViewport(props)"}),". Must be provided if ",(0,o.jsx)(r.code,{children:"around"})," is used."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"source",children:"Source"}),"\n",(0,o.jsx)(r.p,{children:(0,o.jsx)(r.a,{href:"https://github.com/visgl/deck.gl/tree/9.4-release/modules/core/src/transitions/linear-interpolator.ts",children:"modules/core/src/transitions/linear-interpolator.ts"})})]})}function p(e={}){let{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453(e,r,t){t.d(r,{R:()=>s,x:()=>l});var n=t(96540);let o={},i=n.createContext(o);function s(e){let r=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function l(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]); 2//# sourceMappingURL=6383b4a5.2614f3bf.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.