dingoogle Posted September 13, 2018 Share Posted September 13, 2018 Hi guys, I'm a TypeScript user. I saw the source code of ArcRotateCamera, _bouncingBehavior is private and bouncingBehavior is readonly. How to set the values of transitionDuration, lowerRadiusTransitionRange, upperRadiusTransitionRange, autoTransitionRange? FramingBehavior and AutoRotationBehavior as well. Quote Link to comment Share on other sites More sharing options...
Gijs Posted September 13, 2018 Share Posted September 13, 2018 Hi, you can just set them on bouncingBehavior, those properties aren't read-only bghgary 1 Quote Link to comment Share on other sites More sharing options...
dingoogle Posted September 14, 2018 Author Share Posted September 14, 2018 17 hours ago, Gijs said: Hi, you can just set them on bouncingBehavior, those properties aren't read-only Please check babylon.arcRotateCamera.ts, "bouncingBehavior" only has a getter. And in babylon.d.ts file, class ArcRotateCamera, bouncingBehavior is marked by 'readonly' readonly bouncingBehavior: Nullable<BouncingBehavior>; Quote Link to comment Share on other sites More sharing options...
dingoogle Posted September 14, 2018 Author Share Posted September 14, 2018 19 hours ago, Gijs said: Hi, you can just set them on bouncingBehavior, those properties aren't read-only I got it. You're correct. bouncingBehavior is readyonly but its properties are not. Brilliant. I shouldn't create an instance of BouncingBehavior. Gijs and GameMonetize 2 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.