Re: Re-Render the screen

Skip to first unread message

Sam Reid

Nov 11, 2022, 1:25:18 AM11/11/22
to Polar Bear, Developing Interactive Simulations in HTML5
Perhaps the Circle doesn't know the 'g' value has changed?  Maybe try CircleShape.fill = new Color(255,colourvalue,0) and see if that works?

On Wed, Nov 9, 2022 at 10:34 AM Polar Bear <> wrote:
Hello, I am confused on why my screen is not re rendering. 

My code looks like . 
const colourval = new Color( 255, 0, 0 );

const CircleShape = new Circle( 50, { fill: colourval } ); colourvalue => {
colourval.g = colourvalue ;
} );
this.addChild( CircleShape );

My model.sliderProperty colour value goes from 0-255, and the colourval changes when I move my slider across from one side to the other, similar to the estimation simulation. However, when I move my slider, the CircleShape colour fill does not change, and I am confused as to why. 

Any sort of help is appreciated, thank you. 

You received this message because you are subscribed to the Google Groups "Developing Interactive Simulations in HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages