-
Notifications
You must be signed in to change notification settings - Fork 0
API References
Learning more about CaremJS API Referernces.
Used to request animation frame.
Parameter
-
tickHandle:function
- The tick handle for animation loop. Required
Return
Returns the animation ID.
Example
import {Tick} from '@bapquad/carem';
function Anim()
{
console.log(new Date());
return Tick(Anim);
}
let tickID = Anim();
Used to cancel animation frame request.
Parameter
-
animID:number
- The animation ID. Required
Return
Returns the animation ID.
Example
import (Tick, UnTick) from '@bapquad/carem'
let i=0;
function Anim()
{
console.log("playing");
if(i>=100)
{
UnTick(tickID);
}
i++;
return Tick(Anim);
}
let tickID = Anim();
Namespace Carem
has following classes allow you work with your games.
-
Layer
- Contains data elements and methods of manipulating layer data. -
Math
- Contains the functions about mathematics. -
Filter
- Contains the graphics filters. -
AssetManager
- Manages the project's asset such as sounds, images. -
Graphics
- Manipulates the graphics data of the element. -
SceneObject
- Manages the scene data of the element. -
SymbolArc
- Manipulates the arc symbol. -
SymbolCircle
- Manipulates the circle symbol. -
SymbolLine
- Manipulates the line symbol. -
SymbolOval
- Manipulates the oval symbol. -
SymbolPolygon
- Manipulates the polygon symbol. -
SymbolRect
- Manipulates the rectangle symbol. -
SymbolRoundRect
- Manipulates the rounded rectangle symbol. -
SymbolShape
- Manipulates the shape symbol. -
SymbolImage
- Manipulates the image symbol. -
SymbolText
- Manipulates the text symbol. -
Physics
- Makes physical laws for the game. -
WorldLimit
- Manipulates the world limit of the scene. -
Collision
- Manages and checks the object collision. -
Button
- Manipulates the button of the game scene. -
StaticSprite
- Manipulates the static sprites. -
AnimeSprite
- Manipulates the animation for the sprites. -
Scroller
- Manipulates the background scroller in the scenes. -
Particle
- Manipulates the particle effects. -
Tile
- Manipulates the tiles for the scene layout.
For using the constants, maybe you need to import them from the package.
How to use
By example, we need to use the CAREM_PATH_RECT
constant.
import {CAREM_PATH_RECT} from '@bapquad/carem'
console.log(CAREM_PATH_RECT);
So that, you can apply this usage for other constants.
Hold the 1000
value.
Hold the 1001
value.
Hold the 1002
value.
Hold the 1003
value.
Hold the 1004
value.
Hold the 1005
value.
Hold the 1006
value.
Hold the 1007
value.
Hold the 1008
value.
Hold the "TOP"
value.
Hold the "MIDDLE"
value.
Hold the "BOTTOM"
value.
Hold the "LEFT"
value.
Hold the "CENTER"
value.
Hold the "RIGHT"
value.
Hold the 0
value.
Hold the 1
value.
Hold the 0
value.
Hold the 1
value.
Hold the 2
value.
Hold the "butt"
value.
Hold the "butt"
value.
Hold the "round"
value.
Hold the "square"
value.
Hold the "miter"
value.
Hold the "miter"
value.
Hold the "bevel"
value.
Hold the "round"
value.
Hold the "repeat"
value.
Hold the "repeat-x"
value.
Hold the "repeat-y"
value.
Hold the "no-repeat"
value.
Hold the "top"
value.
Hold the "bottom"
value.
Hold the "middle"
value.
Hold the "alphabetic"
value.
Hold the "hanging"
value.
Hold the "start"
value.
Hold the "end"
value.
Hold the "left"
value.
Hold the "center"
value.
Hold the "right"
value.
Hold the "source-over"
value.
Hold the "source-atop"
value.
Hold the "source-in"
value.
Hold the "source-out"
value.
Hold the "destination-over"
value.
Hold the "destination-atop"
value.
Hold the "destination-in"
value.
Hold the "destination-out"
value.
Hold the "lighter"
value.
Hold the "copy"
value.
Hold the "xor"
value.
Hold the 0
value.
Hold the 1
value.
Hold the 0
value.
Hold the 1
value.
Hold the 2
value.
Hold the 3
value.
Hold the 4
value.
Hold the 5
value.
Hold the 0
value.
Hold the 1
value.
Hold the 2
value.
Hold the 3
value.
Hold the 0
value.
Hold the 1
value.
Hold the 0
value.
Hold the 1
value.
Hold the 0
value.
Hold the 1
value.
Hold the 0
value.