Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:17:53+00:00 2026-06-12T01:17:53+00:00

I am working on a canvas project in Kinetic JS. I would like to

  • 0

I am working on a canvas project in Kinetic JS. I would like to know if there is a way of changing the scale of an object in the transitionTo method. Below is a simplified version of my code. I realise that you can do this by using the animate method but for reasons that would take a lot to explain i don’t want to do it this way.

window.onload = function() {
    var stage = new Kinetic.Stage({
        container: 'container',
        width: 1600,
        height: 1200
    });

        var layer = new Kinetic.Layer();
        var book = new Image();
    book.onload = function () {
        bookImg = new Kinetic.Image ({ x: 800, y: 680, image:book, name:book, offset: [85.5, 106], opacity: 0,});

        layer.add(bookImg);
        stage.add(layer);
    }
book.src = "images/book.png";

    setTimeout(function() {
       bookImg.transitionTo({ x: 800, y: 680, opacity: 1, duration: 4, });
    }, 1000);



};

So within that transition to i want to alter the scale of the object. So have the original scale as something like 0.5 going up to 1. However I can’t find any documentation to help.

Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:17:54+00:00Added an answer on June 12, 2026 at 1:17 am

    Use the scale property to change it from:

    bookImg = new Kinetic.Image({
       x: 100,
       y: 110,
       image: book,
       name: book,
       offset: [85.5, 106],
       opacity: 0,
       scale: { x:0.5, y:0.5 }
    

    });

    to:

    bookImg.transitionTo({
       x: 100,
       y: 110,
       opacity: 1,
       duration: 4,
       scale: { x:1, y:1 }
    

    });

    You can see it working here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with a Facebook Canvas App and I would like to only display
I have the following working code: ctx = document.getElementById(canvas).getContext('2d'); Is there any way to
I'm currently working on a JavaScript project that uses the HTML5 canvas as a
I am dynamically adding an image to a canvas object which was working for
Is there any JS library designed for working with canvas elements? I don't really
I have a small project I am working on HTML5 canvas and I wanted
I'm working on a HTML5 project with websockets and canvas, and I hit a
I am currently working on a project involving the canvas element and have come
I am working on a Facebook canvas application. I created a sample project using
I'm working on a SmartGWT project where I'd like my main navigation to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.