new OrthographicCamera(scene [, viewportWidth] [, viewportHeight])
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
scene |
Phaser.Scene | [description] |
||
viewportWidth |
integer |
<optional> |
0 | [description] |
viewportHeight |
integer |
<optional> |
0 | [description] |
- Since: 3.0.0
- Source: plugins/camera3d/src/OrthographicCamera.js (Line 14)
Extends
Members
-
near :number
-
[description]
Type:
- number
- Since: 3.0.0
- Default Value:
-
- 0
- Source: plugins/camera3d/src/OrthographicCamera.js (Line 69)
-
viewportHeight :integer
-
[description]
Type:
- integer
- Since: 3.0.0
- Source: plugins/camera3d/src/OrthographicCamera.js (Line 50)
-
viewportWidth :integer
-
[description]
Type:
- integer
- Since: 3.0.0
- Source: plugins/camera3d/src/OrthographicCamera.js (Line 41)
-
x :number
-
[description]
Type:
- number
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 1006)
-
y :number
-
[description]
Type:
- number
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 1026)
-
z :number
-
[description]
Type:
- number
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 1046)
-
zoom :number
-
[description]
Type:
- number
- Since: 3.0.0
- Source: plugins/camera3d/src/OrthographicCamera.js (Line 158)
Methods
-
add(sprite3D)
-
[description]
Parameters:
Name Type Description sprite3D
Phaser.GameObjects.Sprite3D [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 288)
Returns:
[description]
-
clear()
-
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 330)
Returns:
This Camera object.
-
create(x, y, z, key, frame [, visible])
-
[description]
Parameters:
Name Type Argument Default Description x
number [description]
y
number [description]
z
number [description]
key
string [description]
frame
string | number [description]
visible
boolean <optional>
true [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 363)
Returns:
[description]
-
createMultiple(quantity, key, frame [, visible])
-
[description]
Parameters:
Name Type Argument Default Description quantity
number [description]
key
string [description]
frame
string | number [description]
visible
boolean <optional>
true [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 396)
Returns:
[description]
- Type
- Array.<Phaser.GameObjects.Sprite3D>
-
createRect(size, spacing, key [, frame])
-
[description]
Parameters:
Name Type Argument Description size
number | Object [description]
spacing
number | Object [description]
key
string [description]
frame
string | number <optional>
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 434)
Returns:
[description]
- Type
- Array.<Phaser.GameObjects.Sprite3D>
-
destroy()
-
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 941)
-
getChildren()
-
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 350)
Returns:
[description]
- Type
- array
-
getPickRay(x [, y])
-
[description]
Parameters:
Name Type Argument Description x
number [description]
y
number <optional>
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 777)
Returns:
[description]
- Type
- RayDef
-
getPointSize(vec, size, out)
-
This is a utility function for canvas 3D rendering, which determines the "point size" of a camera-facing sprite billboard given its 3D world position (origin at center of sprite) and its world width and height in x/y.
We place into the output Vector2 the scaled width and height. If no
out
is specified, a new Vector2 will be created for convenience (this should be avoided in tight loops).Parameters:
Name Type Description vec
Phaser.Math.Vector2 The position of the 3D Sprite.
size
Phaser.Math.Vector2 The x and y dimensions.
out
Phaser.Math.Vector2 The result, scaled x and y dimensions.
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 879)
Returns:
[description]
- Type
- Phaser.Math.Vector2
-
lookAt(x [, y] [, z])
-
[description]
Parameters:
Name Type Argument Description x
number | object [description]
y
number <optional>
[description]
z
number <optional>
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 624)
Returns:
This Camera object.
-
project(vec, out)
-
[description]
Parameters:
Name Type Description vec
Phaser.Math.Vector3 [description]
out
Phaser.Math.Vector4 [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 703)
Returns:
[description]
- Type
- Phaser.Math.Vector4
-
randomCube( [scale] [, sprites])
-
[description]
Parameters:
Name Type Argument Default Description scale
number <optional>
1 [description]
sprites
Array.<Phaser.GameObjects.Sprite3D> <optional>
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 503)
Returns:
This Camera object.
-
randomSphere( [radius] [, sprites])
-
[description]
Parameters:
Name Type Argument Default Description radius
number <optional>
1 [description]
sprites
Array.<Phaser.GameObjects.Sprite3D> <optional>
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 480)
Returns:
This Camera object.
-
remove(child)
-
[description]
Parameters:
Name Type Description child
Phaser.GameObjects.GameObject [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 310)
Returns:
This Camera object.
-
rotate(radians, axis)
-
[description]
Parameters:
Name Type Description radians
number [description]
axis
Phaser.Math.Vector3 [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 661)
Returns:
This Camera object.
-
rotateAround(point, radians, axis)
-
[description]
Parameters:
Name Type Description point
Phaser.Math.Vector3 [description]
radians
number [description]
axis
Phaser.Math.Vector3 [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 680)
Returns:
This Camera object.
-
setPixelScale(value)
-
[description]
Parameters:
Name Type Description value
number [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 271)
Returns:
This Camera object.
-
setPosition(x, y, z)
-
[description]
Parameters:
Name Type Description x
number [description]
y
number [description]
z
number [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 235)
Returns:
This Camera object.
-
setScene(scene)
-
[description]
Parameters:
Name Type Description scene
Phaser.Scene [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 254)
Returns:
This Camera object.
-
setToOrtho(yDown [, viewportWidth] [, viewportHeight])
-
[description]
Parameters:
Name Type Argument Description yDown
number [description]
viewportWidth
number <optional>
[description]
viewportHeight
number <optional>
[description]
- Since: 3.0.0
- Source: plugins/camera3d/src/OrthographicCamera.js (Line 82)
Returns:
[description]
-
setViewport(width, height)
-
Sets the width and height of the viewport. Does not update any matrices.
Parameters:
Name Type Description width
number [description]
height
number [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 572)
Returns:
This Camera object.
-
setX(value)
-
[description]
Parameters:
Name Type Description value
number [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 955)
Returns:
This Camera object.
-
setY(value)
-
[description]
Parameters:
Name Type Description value
number [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 972)
Returns:
This Camera object.
-
setZ(value)
-
[description]
Parameters:
Name Type Description value
number [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 989)
Returns:
This Camera object.
-
transformChildren(mat4, sprites)
-
[description]
Parameters:
Name Type Description mat4
Phaser.Math.Matrix4 [description]
sprites
Array.<Phaser.GameObjects.Sprite3D> [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 549)
Returns:
This Camera object.
-
translate(x [, y] [, z])
-
Translates this camera by a specified Vector3 object or x, y, z parameters. Any undefined x y z values will default to zero, leaving that component unaffected. If you wish to set the camera position directly call setPosition instead.
Parameters:
Name Type Argument Description x
number | object [description]
y
number <optional>
[description]
z
number <optional>
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 591)
Returns:
This Camera object.
-
translateChildren(vec3, sprites)
-
[description]
Parameters:
Name Type Description vec3
Phaser.Math.Vector3 [description]
sprites
Array.<Phaser.GameObjects.Sprite3D> [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 526)
Returns:
This Camera object.
-
unproject(vec, out)
-
[description]
Parameters:
Name Type Description vec
Phaser.Math.Vector4 [description]
out
Phaser.Math.Vector3 [description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 757)
Returns:
[description]
- Type
- Phaser.Math.Vector3
-
update()
-
[description]
- Since: 3.0.0
- Overrides:
- Source: plugins/camera3d/src/OrthographicCamera.js (Line 111)
Returns:
[description]
-
updateBillboardMatrix()
-
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 838)
-
updateChildren()
-
[description]
- Since: 3.0.0
- Inherited From:
- Source: plugins/camera3d/src/Camera.js (Line 804)
Returns:
This Camera object.