Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
How to tween view.center in paper.js

So I'm trying to give the feel of smooth movement when reassigning the paper.view.center coordinates. The center object doesn't have a tweenTo() method. This is what I've tried using Tween.js:

let smooth = new TWEEN.Tween(paper.view.center).to({
    x: 650,
    y: 270
}, 900).easing(TWEEN.Easing.Cubic.Out).start();

Since it's a Point object reassigning the x and y values don't actually change the coordinates, because the proper way of reassiging it is to use another Point object (new paper.Point()). How could I tween the continuously new creation of a Point object?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I think that a simple way of achieving what you want is animating the active layer position.
Here's a sketch demonstrating a possible implementation.

const circle = new Path.Circle({
    center: view.center,
    radius: 50,
    fillColor: 'orange'
});
circle.clone().translate(100)

project.activeLayer.tweenTo(
    { position: { x: 50, y: 50 } },
    { duration: 700, easing: 'easeInOutQuad' }
);
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda