zlq4863947 Posted April 10, 2020 Share Posted April 10, 2020 I see the turningSpeed attribute on line 30 in this example. https://pixijs.io/examples/#/demos-basic/tinting.js But there is no description of it in the api. Where to see the description of this property ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 10, 2020 Share Posted April 10, 2020 Hello! It exists only in this particular demo. dude.turningSpeed = Math.random() - 0.8; ///... dude.direction += dude.turningSpeed * 0.01; dude.x += Math.sin(dude.direction) * dude.speed; dude.y += Math.cos(dude.direction) * dude.speed; dude.rotation = -dude.direction - Math.PI / 2; Compared to C# and Java, in JS you can just set the fields without them being part of API. Sometimes people make mistakes and reset a necessary private field with it Quote Link to comment Share on other sites More sharing options...
zlq4863947 Posted April 10, 2020 Author Share Posted April 10, 2020 Thank you very much for your answers. I found that I made a low-level mistake, this is just a custom attribute Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.