Grid data structure
Bases: object
A Scene that takes two scenes and makes a transition between them
Called by CocosNode when the texture is already grabbed. The FrameBuffer will be unbound and the texture will be drawn
Parameters: |
|
---|
Binds the framebuffer to a texture and set a 2d projection before binding to prevent calculating a new texture
Initializes the grid creating both a vertex_list for an independent-tiled grid and creating also a vertex_list_indexed for a “united” (non independent tile) grid.
Parameters: |
|
---|
Determines whether the grid is active or not :type: bool
Bases: cocos.grid.GridBase
Grid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z
The vindexed ertex array will be built with:
self.vertex_list.vertices: x,y,z (floats)
self.vertex_list.tex_coords: x,y,z (floats)
self.vertex_list.colors: RGBA, with values from 0 - 255
Get the original vertex coordinate. The original vertices are the ones weren’t modified by the current action.
Parameters: |
|
---|---|
Return type: | (float, float, float) |
Get the current vertex coordinate
Parameters: |
|
---|---|
Return type: | (float, float, float) |
Set a vertex point is a certain value
Parameters: |
|
---|
Bases: cocos.grid.GridBase
TiledGrid3D is a 3D grid implementation. It differs from Grid3D in that the tiles can be separated from the grid.
The vertex array will be built with:
self.vertex_list.vertices: x,y,z (floats)
self.vertex_list.tex_coords: x,y (floats)
self.vertex_list.colors: RGBA, with values from 0 - 255
Get the 4-original tile coordinates.
Coordinates positions:
3 <-- 2
^
|
0 --> 1
Parameters: |
|
---|---|
Return type: | [ float, float, float, float, float, float, float, float, float, float, float, float ] |
Returns: | The 4 coordinates with the following order: x0, y0, z0, x1, y1, z1,...,x3, y3, z3 |
Get the current tile coordinates.
Coordinates positions:
3 <-- 2
^
|
0 --> 1
Parameters: |
|
---|---|
Return type: | [ float, float, float, float, float, float, float, float, float, float, float, float ] |
Returns: | The 4 coordinates with the following order: x0, y0, z0, x1, y1, z1,...,x3, y3, z3 |
Set the 4 tile coordinates
Coordinates positions:
3 <-- 2
^
|
0 --> 1
Parameters: |
|
---|