DaymareOn / oolite

The main Oolite repository.
http://www.oolite.org
0 stars 0 forks source link

Having FOV accessible to JS #4

Closed DaymareOn closed 9 years ago

DaymareOn commented 9 years ago

Having FOV accessible to JS

DaymareOn commented 9 years ago

Fields : "rw:max field of view", "rw:min field of view", "rw:rate of change", "rw:initial field of view", "r:angle", "rw:field of view", "rw: requested field of view", "rw:isEnabled". The "requested field of view" would be subject to the "rate of change", and the "field of view" would be instantaneous.

DaymareOn commented 9 years ago

This comment is updated on the go along with the advance of the others.

Properties: Oolite.gameSettings.fov (read-only): game option fov, in degrees PlayerShip.viewFov (read/write): current view fov, in degrees

DaymareOn commented 9 years ago

This must not conflict with 2 other use cases:

DaymareOn commented 9 years ago

Fov for unusual width is set via game options, which allows to manage the wider angles. The smaller angles (2° telephoto...) are not used in game options, it would be unusable.

So... the equipment oxp should manage the different use cases arising, only it knows what should be done. What we can do to help is to provide the player chosen game options fov. I add it to the list before.

DaymareOn commented 9 years ago

In fact, the equipment script should check its own min/max angle of view. This should not be checked by the main code. I remove it from the fields.

DaymareOn commented 9 years ago

The equipment specific isFovEnabled() is useless. I remove it from the fields.

DaymareOn commented 9 years ago

Changed fields into methods.

DaymareOn commented 9 years ago

In fact, void: setRequestedAngleOfView(float angleOfView, float rateOfChange) is totally implementable in js with void: setAngleOfView(float angleOfView), so it's useless. I remove it from the methods.

DaymareOn commented 9 years ago

Fov (not game option fov) should be per view. I update the methods.

DaymareOn commented 9 years ago

Must be compatible with OOJSPlayerShip.setCustomView() So... Game option fov is accessible via OOJSOolite, and view fov should be accessible via OOJSPlayerShip. I update the info.

DaymareOn commented 9 years ago

Implemented through ab51fc359691c325577751771c04bcf3001627ef