-
Notifications
You must be signed in to change notification settings - Fork 0
Math.Circle.API
A math class which is used for handling circles
Constructor for Circle class, uses the set function, to set the properties of the circle.
Name | Type | Description |
---|---|---|
x |
number | The x-coordinate for the center of the circle |
y |
number | The y-coordinate for the center of the circle |
radius |
number | The radius for the circle |
- Source:
Name | Type | Description |
---|---|---|
x |
number | The circle's horizontal position |
y |
number | The circle's vertical position |
radius |
number | The circle's radius |
-
Used for animating numeric properties of the owner of the function. Available easing functions are: "linear" "quadIn" "quadOut" "quadInOut" "powerIn" "powerOut" "powerInOut" "sinusInOut"
Name Type Description properties
object An object containing key-value pairs in the following format:
{ "[property name]": "[end value]" }
options
object An object containing key-value pairs for the animation's option:
{ "duraton": "[animation duration (in ms)]", "callback": "[callback function]", "easing": "[easing function to use]" }
- Inherited From:
- Source:
-
Checks whether or not the Circle contains another geometric object.
Name Type Description object
Math.Vector | Math.Line | Math.Circle | Math.Rectangle | Math.Polygon A geometric object to check
- Source:
True if the Rectangle contains the checked object, false if not
- Type
- boolean
-
copy() → {Math.Circle}
-
Copies the Circle object.
- Source:
A copy of the Circle object (which can be modified without changing the original object)
- Type
- Math.Circle
-
Fetches all current animations of the object.
- Inherited From:
- Source:
An array of all the current animations of the object
- Type
- Object[]
-
Calculates the area of the Circle.
- Source:
The area of the Circle
- Type
- number
-
Calculates the shortest distance from the Circle object to another geometric object
Name Type Description object
Math.Vector | Math.Line | Math.Circle | Math.Rectangle | Math.Polygon The object to calculate the distance to
- Source:
The distance
- Type
- number
-
Calculates the perimeter of the circle
- Source:
The perimeter of the Circle
- Type
- number
-
Checks whether or not the Circle intersects with another geometric object.
Name Type Description object
Math.Line | Math.Circle | Math.Rectangle | Math.Polygon A geometric object to check. Supported objects are
- Source:
True if the Circle intersects with the checked object, false if not
- Type
- boolean
-
Checks if the object is currently being animated.
- Inherited From:
- Source:
Whether or not the object is being animated
- Type
- boolean
-
move(x, y) → {Math.Circle}
-
Moves the Circle by adding a value to its x-coordinate and another value to its y-coordinate.
Name Type Description x
number The value to add to the x-coordinate (can be negative)
y
number The value to add to the y-coordinate (can be negative)
- Source:
The resulting Circle object (itself)
- Type
- Math.Circle
-
moveTo(x, y) → {Math.Circle}
-
Moves the Circle to a fixed position by setting its x- and y-coordinates.
Name Type Description x
number The x-coordinate of the position to move the Circle to
y
number The y-coordinate of the position to move the Circle to
- Source:
The resulting Circle object (itself)
- Type
- Math.Circle
-
Checks if a specific property is current being animated
- Inherited From:
- Source:
Whether or not the property is being animated
- Type
- boolean
-
scale(factor) → {Math.Circle}
-
Scales the Circle object by multiplying it radius with a factor. Please notice that, opposite to the Polygon and Line objects, the position of the Circle will not be changed by scaling it, since the center of the circle will not be scaled. Also: since ellipses are not supported yet, circles cannot be scaled with various factors horizontally and vertically, like the other geometric objects.
Name Type Description factor
number A factor with which to scale the Circle
- Source:
The resulting Circle object (itself)
- Type
- Math.Circle
-
set(x, y, radius) → {Math.Circle}
-
Sets the properties of the circle.
Name Type Description x
number The x-coordinate for the center of the circle
y
number The y-coordinate for the center of the circle
radius
number The radius for the circle
- Source:
The resulting Circle object (itself)
- Type
- Math.Circle
-
Stops all current animations of the object.
- Inherited From:
- Source:
Generated with wicked.
- Engine.Camera
- Engine.CustomLoop
- Engine.Loader
- Engine.Room
- Engine
- Input.Keyboard
- Input.Pointer
- Math.Circle
- Math.Line
- Math.Polygon
- Math.Rectangle
- Math.Vector
- Sound.Effect
- Sound.Music
- View.Child
- View.Circle
- View.Collidable
- View.Container
- View.GameObject
- View.Line
- View.Polygon
- View.Rectangle
- View.Sprite
- View.TextBlock
- global