When a Sprite3D object is added to a Camera via Camera.add it is now added to the Display and Update Lists. Fix #3945

This commit is contained in:
Richard Davey 2018-08-23 15:53:33 +01:00
parent ca0322a511
commit 0e27dc33e4
4 changed files with 9 additions and 1 deletions

View file

@ -122,6 +122,8 @@ Support for Camera 3D and Sprite 3D Game Objects have been removed from the core
You can find the source for Camera 3D in the new `plugins/camera3d` folder, along with a README file explaining how to now use the plugin in your games. You can find the source for Camera 3D in the new `plugins/camera3d` folder, along with a README file explaining how to now use the plugin in your games.
* When a Sprite3D object is added to a Camera via `Camera.add` it is now added to the Display and Update Lists. Fix #3945 (thanks @vvega)
### New Features ### New Features
* `Camera.resolution` is a new read-only property that holds the current game config resolution that the camera is using. This is used internally for viewport calculations. * `Camera.resolution` is a new read-only property that holds the current game config resolution that the camera is using. This is used internally for viewport calculations.

View file

@ -6036,6 +6036,9 @@ var Camera = new Class({
{ {
this.children.set(sprite3D); this.children.set(sprite3D);
this.displayList.add(sprite3D.gameObject);
this.updateList.add(sprite3D.gameObject);
this.updateChildren(); this.updateChildren();
return sprite3D; return sprite3D;

File diff suppressed because one or more lines are too long

View file

@ -300,6 +300,9 @@ var Camera = new Class({
{ {
this.children.set(sprite3D); this.children.set(sprite3D);
this.displayList.add(sprite3D.gameObject);
this.updateList.add(sprite3D.gameObject);
this.updateChildren(); this.updateChildren();
return sprite3D; return sprite3D;