- j2Ds
- j2DsEngine ⏏
- .createLocal(id) ⇒
StorageManager
- .gameEngine(j2Ds)
- .gameStates :
Object
- .getAudioManager() ⇒
AudioHandler
- .getDOMManager() ⇒
Dom
- .getDeviceManager() ⇒
DeviceManager
- .getErrorManager() ⇒
ErrorManager
- .getFPSManager() ⇒
FpsManager
- .getGameStateManager() ⇒
Object
- .getIO() ⇒
InputHandler
- .getInfo() ⇒
Object
- .getLayerManager() ⇒
Layers
- .getMathManager() ⇒
MathUtil
.getPaintManager()- .getResourceManager() ⇒
ResourceManager
- .getSceneManager() ⇒
SceneManager
- .getTextureManager() ⇒
TextureUtil
- .getTimeManager() ⇒
TimeManager
- .getTouchIO() ⇒
TouchHandler
- .getTriggerManager() ⇒
TriggerManager
- .getViewManager() ⇒
ViewManager
- .runEngine(j2Ds)
- .setActiveEngine(engine)
- .setFrameLimit(fps)
- .setWindow(global)
- .start(engine, frameLimit)
- .stopEngine()
- .createLocal(id) ⇒
- j2DsEngine ⏏
j2DsEngine
Kind: Exported class
Properties
Name | Type |
---|---|
now | number |
dt | number |
stopAll | number |
frameLimit | number |
sceneStartTime | number |
sceneSkipTime | number |
engine | function |
ready | boolean |
window | Window |
canDeactivate | boolean |
Kind: instance method of j2DsEngine
Param | Type |
---|---|
id | string |
Kind: instance method of j2DsEngine
Param | Type |
---|---|
j2Ds | j2DsEngine |
Kind: instance property of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Deprecated
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Kind: instance method of j2DsEngine
Param | Type |
---|---|
j2Ds | j2DsEngine |
Kind: instance method of j2DsEngine
Param | Type |
---|---|
engine | function |
Kind: instance method of j2DsEngine
Param | Type |
---|---|
fps | number |
Kind: instance method of j2DsEngine
Param | Type |
---|---|
global | Window |
Kind: instance method of j2DsEngine
Param | Type |
---|---|
engine | function |
frameLimit | number |
Kind: instance method of j2DsEngine
- nodes/BaseNode
- .drawBox()
- .getAlpha() ⇒
*
|number
- .getBox(node) ⇒
Object
- .getBoxVertices(node) ⇒
Array.<{x: number, y: number}>
- .getDistance(id) ⇒
number
- .getDistanceXY(id) ⇒
Object
|Object
- .getLayer() ⇒
*
- .getPosition() ⇒
Object
|Object
- .getRotation() ⇒
number
|*
- .getSize() ⇒
*
- .isCollision(id) ⇒
boolean
- .isIntersect(node2) ⇒
*
- .isLookScene() ⇒
boolean
- .isOutScene() ⇒
Object
- .isPointInsideBox(vf, point) ⇒
boolean
- .isVisible() ⇒
boolean
|*
- .move(pos)
- .moveDir(speed)
- .moveTo(to, t)
- .resizeBox(offset, size)
- .rotateTo(to, t)
- .setAlpha(alpha)
- .setLayer(layer)
- .setParent(id)
- .setPosition(pos) ⇒
*
- .setRotation(angle)
- .setSize(size) ⇒
*
- .setVisible(visible)
- .turn(angle)
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Param |
---|
node |
Kind: instance method of nodes/BaseNode
Param | Type |
---|---|
node | BaseNode |
Kind: instance method of nodes/BaseNode
Param |
---|
id |
Kind: instance method of nodes/BaseNode
Param |
---|
id |
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Param |
---|
id |
Kind: instance method of nodes/BaseNode
Param |
---|
node2 |
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Param |
---|
vf |
point |
Kind: instance method of nodes/BaseNode
Kind: instance method of nodes/BaseNode
Param |
---|
pos |
Kind: instance method of nodes/BaseNode
Param |
---|
speed |
Kind: instance method of nodes/BaseNode
Param |
---|
to |
t |
Kind: instance method of nodes/BaseNode
Param |
---|
offset |
size |
Kind: instance method of nodes/BaseNode
Param |
---|
to |
t |
Kind: instance method of nodes/BaseNode
Param |
---|
alpha |
Kind: instance method of nodes/BaseNode
Param |
---|
layer |
Kind: instance method of nodes/BaseNode
Param |
---|
id |
Kind: instance method of nodes/BaseNode
Param |
---|
pos |
Kind: instance method of nodes/BaseNode
Param |
---|
angle |
Kind: instance method of nodes/BaseNode
Param |
---|
size |
Kind: instance method of nodes/BaseNode
Param |
---|
visible |
Kind: instance method of nodes/BaseNode
Param |
---|
angle |
- nodes/CircleNode
- CircleNode ⇐
nodes/BaseNode
⏏- new CircleNode(j2DsEngine, pos, radius, color)
- .draw()
- .drawBox()
- .getAlpha() ⇒
*
|number
- .getBox(node) ⇒
Object
- .getBoxVertices(node) ⇒
Array.<{x: number, y: number}>
- .getDistance(id) ⇒
number
- .getDistanceXY(id) ⇒
Object
|Object
- .getLayer() ⇒
*
- .getPosition() ⇒
Object
|Object
- .getRotation() ⇒
number
|*
- .getSize() ⇒
*
- .isCollision(id) ⇒
boolean
- .isIntersect(node2) ⇒
*
- .isLookScene() ⇒
boolean
- .isOutScene() ⇒
Object
- .isPointInsideBox(vf, point) ⇒
boolean
- .isVisible() ⇒
boolean
|*
- .move(pos)
- .moveDir(speed)
- .moveTo(to, t)
- .resizeBox(offset, size)
- .rotateTo(to, t)
- .setAlpha(alpha)
- .setLayer(layer)
- .setParent(id)
- .setPosition(pos) ⇒
*
- .setRotation(angle)
- .setSize(size) ⇒
*
- .setVisible(visible)
- .turn(angle)
- CircleNode ⇐
CircleNode ⇐ nodes/BaseNode
⏏
CircleNode
Kind: Exported class
Extends: nodes/BaseNode
Properties
Name | Type |
---|---|
color | string |
radius | number |
Примитивный узел для отрисовки круга.
Param | Type |
---|---|
j2DsEngine | j2DsEngine |
pos | Object |
radius | number |
color | string |
Метод для отрисовки узла
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Param |
---|
node |
Kind: instance method of CircleNode
Param | Type |
---|---|
node | BaseNode |
Kind: instance method of CircleNode
Param |
---|
id |
Kind: instance method of CircleNode
Param |
---|
id |
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Param |
---|
id |
Kind: instance method of CircleNode
Param |
---|
node2 |
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Param |
---|
vf |
point |
Kind: instance method of CircleNode
Kind: instance method of CircleNode
Param |
---|
pos |
Kind: instance method of CircleNode
Param |
---|
speed |
Kind: instance method of CircleNode
Param |
---|
to |
t |
Kind: instance method of CircleNode
Param |
---|
offset |
size |
Kind: instance method of CircleNode
Param |
---|
to |
t |
Kind: instance method of CircleNode
Param |
---|
alpha |
Kind: instance method of CircleNode
Param |
---|
layer |
Kind: instance method of CircleNode
Param |
---|
id |
Kind: instance method of CircleNode
Param |
---|
pos |
Kind: instance method of CircleNode
Param |
---|
angle |
Kind: instance method of CircleNode
Param |
---|
size |
Kind: instance method of CircleNode
Param |
---|
visible |
Kind: instance method of CircleNode
Param |
---|
angle |
- nodes/LineNode
- LineNode ⇐
nodes/BaseNode
⏏- new LineNode(j2DsEngine, pos, points, scale, color, width, fill, cFill)
- .draw()
- .drawBox()
- .getAlpha() ⇒
*
|number
- .getBox(node) ⇒
Object
- .getBoxVertices(node) ⇒
Array.<{x: number, y: number}>
- .getDistance(id) ⇒
number
- .getDistanceXY(id) ⇒
Object
|Object
- .getLayer() ⇒
*
- .getPosition() ⇒
Object
|Object
- .getRotation() ⇒
number
|*
- .getSize() ⇒
*
- .isCollision(id) ⇒
boolean
- .isIntersect(node2) ⇒
*
- .isLookScene() ⇒
boolean
- .isOutScene() ⇒
Object
- .isPointInsideBox(vf, point) ⇒
boolean
- .isVisible() ⇒
boolean
|*
- .move(pos)
- .moveDir(speed)
- .moveTo(to, t)
- .resizeBox(offset, size)
- .rotateTo(to, t)
- .setAlpha(alpha)
- .setLayer(layer)
- .setParent(id)
- .setPosition(pos) ⇒
*
- .setRotation(angle)
- .setSize(size) ⇒
*
- .setVisible(visible)
- .turn(angle)
- LineNode ⇐
LineNode ⇐ nodes/BaseNode
⏏
LineNode
Kind: Exported class
Extends: nodes/BaseNode
Properties
Name | Type |
---|---|
color | string |
points | Array.<Array.<number>> |
fill | boolean |
scale | number |
cFill | string |
lineWidth | number |
Примитивный узел для отрисовки линии.
Param | Type |
---|---|
j2DsEngine | j2DsEngine |
pos | Object |
points | Array.<Array.<number>> |
scale | number |
color | string |
width | number |
fill | boolean |
cFill | string |
Метод для отрисовки узла
Kind: instance method of LineNode
Kind: instance method of LineNode
Kind: instance method of LineNode
Kind: instance method of LineNode
Param |
---|
node |
Kind: instance method of LineNode
Param | Type |
---|---|
node | BaseNode |
Kind: instance method of LineNode
Param |
---|
id |
Kind: instance method of LineNode
Param |
---|
id |
Kind: instance method of LineNode
Kind: instance method of LineNode
Kind: instance method of LineNode
Kind: instance method of LineNode
Kind: instance method of LineNode
Param |
---|
id |
Kind: instance method of LineNode
Param |
---|
node2 |
Kind: instance method of LineNode
Kind: instance method of LineNode
Kind: instance method of LineNode
Param |
---|
vf |
point |
Kind: instance method of LineNode
Kind: instance method of LineNode
Param |
---|
pos |
Kind: instance method of LineNode
Param |
---|
speed |
Kind: instance method of LineNode
Param |
---|
to |
t |
Kind: instance method of LineNode
Param |
---|
offset |
size |
Kind: instance method of LineNode
Param |
---|
to |
t |
Kind: instance method of LineNode
Param |
---|
alpha |
Kind: instance method of LineNode
Param |
---|
layer |
Kind: instance method of LineNode
Param |
---|
id |
Kind: instance method of LineNode
Param |
---|
pos |
Kind: instance method of LineNode
Param |
---|
angle |
Kind: instance method of LineNode
Param |
---|
size |
Kind: instance method of LineNode
Param |
---|
visible |
Kind: instance method of LineNode
Param |
---|
angle |
- nodes/RectNode
- RectNode ⇐
nodes/BaseNode
⏏- new RectNode(j2DsEngine, pos, size, color)
- .draw()
- .drawBox()
- .getAlpha() ⇒
*
|number
- .getBox(node) ⇒
Object
- .getBoxVertices(node) ⇒
Array.<{x: number, y: number}>
- .getDistance(id) ⇒
number
- .getDistanceXY(id) ⇒
Object
|Object
- .getLayer() ⇒
*
- .getPosition() ⇒
Object
|Object
- .getRotation() ⇒
number
|*
- .getSize() ⇒
*
- .isCollision(id) ⇒
boolean
- .isIntersect(node2) ⇒
*
- .isLookScene() ⇒
boolean
- .isOutScene() ⇒
Object
- .isPointInsideBox(vf, point) ⇒
boolean
- .isVisible() ⇒
boolean
|*
- .move(pos)
- .moveDir(speed)
- .moveTo(to, t)
- .resizeBox(offset, size)
- .rotateTo(to, t)
- .setAlpha(alpha)
- .setLayer(layer)
- .setParent(id)
- .setPosition(pos) ⇒
*
- .setRotation(angle)
- .setSize(size) ⇒
*
- .setVisible(visible)
- .turn(angle)
- RectNode ⇐
RectNode ⇐ nodes/BaseNode
⏏
RectNode
Kind: Exported class
Extends: nodes/BaseNode
Properties
Name | Type |
---|---|
color | string |
Примитивный узел для отрисовки прямоугольника.
Param | Type |
---|---|
j2DsEngine | j2DsEngine |
pos | Object |
size | Object |
color | string |
Метод для отрисовки узла
Kind: instance method of RectNode
Kind: instance method of RectNode
Kind: instance method of RectNode
Kind: instance method of RectNode
Param |
---|
node |
Kind: instance method of RectNode
Param | Type |
---|---|
node | BaseNode |
Kind: instance method of RectNode
Param |
---|
id |
Kind: instance method of RectNode
Param |
---|
id |
Kind: instance method of RectNode
Kind: instance method of RectNode
Kind: instance method of RectNode
Kind: instance method of RectNode
Kind: instance method of RectNode
Param |
---|
id |
Kind: instance method of RectNode
Param |
---|
node2 |
Kind: instance method of RectNode
Kind: instance method of RectNode
Kind: instance method of RectNode
Param |
---|
vf |
point |
Kind: instance method of RectNode
Kind: instance method of RectNode
Param |
---|
pos |
Kind: instance method of RectNode
Param |
---|
speed |
Kind: instance method of RectNode
Param |
---|
to |
t |
Kind: instance method of RectNode
Param |
---|
offset |
size |
Kind: instance method of RectNode
Param |
---|
to |
t |
Kind: instance method of RectNode
Param |
---|
alpha |
Kind: instance method of RectNode
Param |
---|
layer |
Kind: instance method of RectNode
Param |
---|
id |
Kind: instance method of RectNode
Param |
---|
pos |
Kind: instance method of RectNode
Param |
---|
angle |
Kind: instance method of RectNode
Param |
---|
size |
Kind: instance method of RectNode
Param |
---|
visible |
Kind: instance method of RectNode
Param |
---|
angle |
- nodes/SpriteNode
- SpriteNode ⇐
nodes/BaseNode
⏏- new SpriteNode(j2DsEngine, pos, size, animation)
- .draw()
- .drawBox()
- .drawFrame(frame) ⇒
void
|Object
- .getAlpha() ⇒
*
|number
- .getBox(node) ⇒
Object
- .getBoxVertices(node) ⇒
Array.<{x: number, y: number}>
- .getDistance(id) ⇒
number
- .getDistanceXY(id) ⇒
Object
|Object
- .getLayer() ⇒
*
- .getPosition() ⇒
Object
|Object
- .getRotation() ⇒
number
|*
- .getSize() ⇒
*
- .isCollision(id) ⇒
boolean
- .isIntersect(node2) ⇒
*
- .isLookScene() ⇒
boolean
- .isOutScene() ⇒
Object
- .isPointInsideBox(vf, point) ⇒
boolean
- .isVisible() ⇒
boolean
|*
- .move(pos)
- .moveDir(speed)
- .moveTo(to, t)
- .resizeBox(offset, size)
- .rotateTo(to, t)
- .setAlpha(alpha)
- .setAnimation(animation)
- .setFlip(x, y)
- .setLayer(layer)
- .setParent(id)
- .setPosition(pos) ⇒
*
- .setRotation(angle)
- .setSize(size) ⇒
*
- .setVisible(visible)
- .turn(angle)
- SpriteNode ⇐
SpriteNode ⇐ nodes/BaseNode
⏏
SpriteNode
Kind: Exported class
Extends: nodes/BaseNode
Properties
Name | Type |
---|---|
tmpSpeed | number |
frame | number |
animation | Object |
flip | Object |
Примитивный узел для отрисовки спрайта.
Param | Type |
---|---|
j2DsEngine | j2DsEngine |
pos | Object |
size | Object |
animation | Object |
Метод для отрисовки узла
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Отрисовка одного кадра
Kind: instance method of SpriteNode
Param | Type |
---|---|
frame | number |
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Param |
---|
node |
Kind: instance method of SpriteNode
Param | Type |
---|---|
node | BaseNode |
Kind: instance method of SpriteNode
Param |
---|
id |
Kind: instance method of SpriteNode
Param |
---|
id |
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Param |
---|
id |
Kind: instance method of SpriteNode
Param |
---|
node2 |
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Param |
---|
vf |
point |
Kind: instance method of SpriteNode
Kind: instance method of SpriteNode
Param |
---|
pos |
Kind: instance method of SpriteNode
Param |
---|
speed |
Kind: instance method of SpriteNode
Param |
---|
to |
t |
Kind: instance method of SpriteNode
Param |
---|
offset |
size |
Kind: instance method of SpriteNode
Param |
---|
to |
t |
Kind: instance method of SpriteNode
Param |
---|
alpha |
Устанавливает анимацию
Kind: instance method of SpriteNode
Param | Type |
---|---|
animation | Object |
//TODO Добавить описание этой херни
Kind: instance method of SpriteNode
Param | Type |
---|---|
x | number |
y | number |
Kind: instance method of SpriteNode
Param |
---|
layer |
Kind: instance method of SpriteNode
Param |
---|
id |
Kind: instance method of SpriteNode
Param |
---|
pos |
Kind: instance method of SpriteNode
Param |
---|
angle |
Kind: instance method of SpriteNode
Param |
---|
size |
Kind: instance method of SpriteNode
Param |
---|
visible |
Kind: instance method of SpriteNode
Param |
---|
angle |
- nodes/TextNode
- TextNode ⇐
nodes/BaseNode
⏏- new TextNode(j2DsEngine, pos, text, sizePx, color, family, width, colorL)
- .draw()
- .drawBox()
.drawSimpleText(text, pos, color, colorL)- .getAlpha() ⇒
*
|number
- .getBox(node) ⇒
Object
- .getBoxVertices(node) ⇒
Array.<{x: number, y: number}>
- .getDistance(id) ⇒
number
- .getDistanceXY(id) ⇒
Object
|Object
- .getLayer() ⇒
*
- .getPosition() ⇒
Object
|Object
- .getRotation() ⇒
number
|*
- .getSize() ⇒
number
- .getText() ⇒
string
- .isCollision(id) ⇒
boolean
- .isIntersect(node2) ⇒
*
- .isLookScene() ⇒
boolean
- .isOutScene() ⇒
Object
- .isPointInsideBox(vf, point) ⇒
boolean
- .isVisible() ⇒
boolean
|*
- .move(pos)
- .moveDir(speed)
- .moveTo(to, t)
- .resizeBox(offset, size)
- .rotateTo(to, t)
- .setAlpha(alpha)
- .setLayer(layer)
- .setParent(id)
- .setPosition(pos) ⇒
*
- .setRotation(angle)
- .setSize(sizePx)
- .setText(text)
- .setVisible(visible)
- .turn(angle)
- TextNode ⇐
TextNode ⇐ nodes/BaseNode
⏏
TextNode
Kind: Exported class
Extends: nodes/BaseNode
Properties
Name | Type |
---|---|
vAlign | number |
hAlign | number |
color | string |
family | string |
sizePx | number |
lineWidth | number |
colorL | string |
font | string |
fullText | string |
maxWidth | number |
lines | Array.<string> |
Примитивный узел для отрисовки текста.
Param | Type |
---|---|
j2DsEngine | j2DsEngine |
pos | Object |
text | string |
sizePx | number |
color | string |
family | string |
width | number |
colorL | string |
Метод для отрисовки узла
Kind: instance method of TextNode
Kind: instance method of TextNode
Deprecated
Метод для быстрого изменения текста и его последующей отрисовки.
Kind: instance method of TextNode
Param | Type |
---|---|
text | string |
pos | Object |
color | string |
colorL | string |
Kind: instance method of TextNode
Kind: instance method of TextNode
Param |
---|
node |
Kind: instance method of TextNode
Param | Type |
---|---|
node | BaseNode |
Kind: instance method of TextNode
Param |
---|
id |
Kind: instance method of TextNode
Param |
---|
id |
Kind: instance method of TextNode
Kind: instance method of TextNode
Kind: instance method of TextNode
Возвращает текущий размер
Kind: instance method of TextNode
Overrides: getSize
Возвращает текст
Kind: instance method of TextNode
Kind: instance method of TextNode
Param |
---|
id |
Kind: instance method of TextNode
Param |
---|
node2 |
Kind: instance method of TextNode
Kind: instance method of TextNode
Kind: instance method of TextNode
Param |
---|
vf |
point |
Kind: instance method of TextNode
Kind: instance method of TextNode
Param |
---|
pos |
Kind: instance method of TextNode
Param |
---|
speed |
Kind: instance method of TextNode
Param |
---|
to |
t |
Kind: instance method of TextNode
Param |
---|
offset |
size |
Kind: instance method of TextNode
Param |
---|
to |
t |
Kind: instance method of TextNode
Param |
---|
alpha |
Kind: instance method of TextNode
Param |
---|
layer |
Kind: instance method of TextNode
Param |
---|
id |
Kind: instance method of TextNode
Param |
---|
pos |
Kind: instance method of TextNode
Param |
---|
angle |
Устанавливает размер текста
Kind: instance method of TextNode
Overrides: setSize
Param | Type |
---|---|
sizePx | number |
Устанавливает текст
Kind: instance method of TextNode
Param | Type |
---|---|
text | string |
Kind: instance method of TextNode
Param |
---|
visible |
Kind: instance method of TextNode
Param |
---|
angle |
MathUtil
Kind: global class
- utils/MathUtil
- new MathUtil()
- .is4VerticesIntersect(a, b) ⇒
boolean
- .isLineIntersect(a, b, c, d) ⇒
boolean
- .isPointInRect(a, b, c, d, p) ⇒
boolean
- .isPointInTriangle(pt, a, b, c) ⇒
boolean
- .rad(num) ⇒
number
- .random(min, max, omitZero) ⇒
number
- .rndColor(min, max, opacity) ⇒
string
- .v2f(x, y) ⇒
Object
- .v2i(x, y) ⇒
Object
Вспомогательный класс содержащий статичные методы для облегчения расчетов.
Проверка пересечения отрезков вершин двух фигур
Kind: static method of utils/MathUtil
Param | Type |
---|---|
a | Array.<{x: number, y: number}> |
b | Array.<{x: number, y: number}> |
Проверка пересечения отрезков
Kind: static method of utils/MathUtil
Param | Type | Description |
---|---|---|
a | Object |
Начальная точка первого отрезка |
b | Object |
Конечная точка первого отрезка |
c | Object |
Начальная точка второго отрезка |
d | Object |
Конечная точка второго отрезка |
Проверка принадлежности точки прямоугольнику
Kind: static method of utils/MathUtil
Param | Type | Description |
---|---|---|
a | Object |
1-я вершина прямоугольника |
b | Object |
2-я вершина прямоугольника |
c | Object |
3-я вершина прямоугольника |
d | Object |
4-я вершина прямоугольника |
p | Object |
Точка |
Проверка принадлежности точки треугольнику
Kind: static method of utils/MathUtil
Param | Type | Description |
---|---|---|
pt | Object |
Точка |
a | Object |
1-я вершина прямоугольника |
b | Object |
2-я вершина прямоугольника |
c | Object |
3-я вершина прямоугольника |
Приведение градусов в радианы
Kind: static method of utils/MathUtil
Param | Type | Description |
---|---|---|
num | number |
0..360 |
Случайное число
Kind: static method of utils/MathUtil
Param | Description |
---|---|
min | Минимальное |
max | Максимальное |
omitZero | Включая нуль? |
Случайный цвет
Kind: static method of utils/MathUtil
Returns: string
- rgba(0..256, 0..256, 0..256, 0.0 ~ 1.0)
Param | Type | Description |
---|---|---|
min | number |
0..256 |
max | number |
0..256 |
opacity | number |
0.0 ~ 1.0 |
Вектор
Kind: static method of utils/MathUtil
Param | Type |
---|---|
x | number |
y | number |
Целочисленный вектор
Kind: static method of utils/MathUtil
Param | Type |
---|---|
x | number |
y | number |
TextureUtil
Kind: global class
- utils/TextureUtil
- new TextureUtil()
- .createImageMap(width, height, callback) ⇒
Object
- .loadImageMap(path) ⇒
Object
- .templates :
Object
Вспомогательный класс содержащий методы для генерации текстур.
Создает карту текстур
Kind: instance method of utils/TextureUtil
Param | Type |
---|---|
width | number |
height | number |
callback | function |
Загружает из файла карту текстур
Kind: instance method of utils/TextureUtil
Param | Type |
---|---|
path | string |
Шаблоны
Kind: instance property of utils/TextureUtil
- .templates :
Object
Рисует эллипс
Kind: static method of templates
Param | Type |
---|---|
context | CanvasRenderingContext2D |
size | number |
color | string |
Рисует прямоугольник закрашенный
Kind: static method of templates
Param | Type |
---|---|
context | CanvasRenderingContext2D |
size | number |
color | string |
Рисует линейным градиентом
Kind: static method of templates
Param | Type |
---|---|
context | CanvasRenderingContext2D |
size | number |
colors | Array.<string> |
isHorizontal | boolean |
Рисует радиальным градиентом
Kind: static method of templates
Param | Type |
---|---|
context | CanvasRenderingContext2D |
size | Object |
pos1 | Object |
r1 | number |
pos2 | Object |
r2 | number |
colors | Array.<string> |
Рисует пустой прямоугольник
Kind: static method of templates
Param | Type |
---|---|
context | CanvasRenderingContext2D |
size | number |
color | string |
lineWidth | number |
Zlib. © 2015-2016 Нагель Петр