File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,8 +21,22 @@ var Layer3DLight = new Class({
2121
2222 initialize :
2323
24- function Layer3DLight ( x , y , z )
24+ function Layer3DLight ( layer , x , y , z )
2525 {
26+ /**
27+ * The Layer3D instance this light belongs to.
28+ *
29+ * A light can only belong to a single Layer3D instance.
30+ *
31+ * You should consider this property as being read-only. You cannot move a
32+ * light to another Layer3D by simply changing it.
33+ *
34+ * @name Phaser.GameObjects.Layer3DLight#layer
35+ * @type {Phaser.GameObjects.Layer3D }
36+ * @since 3.50.0
37+ */
38+ this . layer = layer ;
39+
2640 /**
2741 * The position of the light in 3D space.
2842 *
@@ -262,6 +276,18 @@ var Layer3DLight = new Class({
262276 this . position . z = value ;
263277 }
264278
279+ } ,
280+
281+ /**
282+ * Destroy handler for this light.
283+ *
284+ * @method Phaser.GameObjects.Layer3DLight#destroy
285+ * @since 3.50.0
286+ */
287+ destroy : function ( )
288+ {
289+ this . layer = null ;
290+ this . position = null ;
265291 }
266292
267293} ) ;
You can’t perform that action at this time.
0 commit comments