Re: Re-Render the screen

16 views
Skip to first unread message

Sam Reid

unread,
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 <bearp...@gmail.com> 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 } );

model.sliderProperty.link( 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 developing-interactive-simu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/developing-interactive-simulations-in-html5/bcf59547-f387-4b11-93ee-a827f6c6a0c3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages