Skip to content

Commit fc51f3a

Browse files
committed
Updated log and added plugin readme
1 parent b25ff9e commit fc51f3a

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ Most of the updates were about documentation and module namespacing, however tho
116116
* fix inertia change in Body.setMass, closes #378 ([f7d1877](https://github.com/liabru/matter-js/commit/f7d1877)), closes [#378](https://github.com/liabru/matter-js/issues/378)
117117
* fix Vertices.chamfer radius argument, closes #467 ([3bceef4](https://github.com/liabru/matter-js/commit/3bceef4)), closes [#467](https://github.com/liabru/matter-js/issues/467)
118118

119+
### Camera 3D Plugin
120+
121+
Support for Camera 3D and Sprite 3D Game Objects have been removed from the core Phaser bundle and moved to an optional plugin.
122+
123+
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.
124+
119125
### New Features
120126

121127
* `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.

plugins/camera3d/readme.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Phaser 3 Camera 3D Plugin
2+
=========================
3+
4+
In Phaser 3.12 Camera 3D support was moved to its own external plugin.
5+
6+
There are two ways to use this in your games:
7+
8+
## 1. External Plugin
9+
10+
You can copy the `dist/camera3d.min.js` file to your project folder and preload it into Phaser:
11+
12+
```
13+
function preload ()
14+
{
15+
this.load.scenePlugin('Camera3DPlugin', 'plugins/camera3d.min.js', 'Camera3DPlugin', 'cameras3d');
16+
}
17+
```
18+
19+
Then you can use it like usual.
20+
21+
## 2. Bundled Plugin
22+
23+
If you prefer you can configure Phaser to include it when it builds it's dist files.
24+
25+
To do this you need to edit the webpack config files and change the following:
26+
27+
```
28+
"typeof PLUGIN_CAMERA3D": JSON.stringify(false)
29+
```
30+
31+
to
32+
33+
```
34+
"typeof PLUGIN_CAMERA3D": JSON.stringify(true)
35+
```
36+
37+
Then rebuild Phaser via webpack. The plugin will now be included by default and can be called from your game code.
38+
39+
## Building the External Plugin
40+
41+
If you wish to edit the plugin use the following files:
42+
43+
`src/Camera3DPlugin.js` is the entry point for the external plugin. Edit this file if you're loading the plugin at run-time. Once you have finished making your changes, run the command `npm run plugin.cam3d` from the command-line to build a new version of the external plugin with Webpack.
44+
45+
## Changing the Bundled Plugin
46+
47+
`src/index.js` is the entry point for the bundled plugin. In here you'll find the module exports that Phaser uses when including the plugin internally. The file `CameraManager.js` is the Scene System. All other files are shared between both the external and bundled versions of the plugin.

0 commit comments

Comments
 (0)