Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
238ac8ab
Commit
238ac8ab
authored
Aug 11, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds API docs to sprite Node and Node3D
parent
db8bdbe6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
node.dart
examples/game/lib/node.dart
+15
-0
node3d.dart
examples/game/lib/node3d.dart
+9
-0
No files found.
examples/game/lib/node.dart
View file @
238ac8ab
...
@@ -65,6 +65,9 @@ class Node {
...
@@ -65,6 +65,9 @@ class Node {
ActionController
_actions
;
ActionController
_actions
;
/// The [ActionController] associated with this node.
///
/// myNode.actions.run(myAction);
ActionController
get
actions
{
ActionController
get
actions
{
if
(
_actions
==
null
)
{
if
(
_actions
==
null
)
{
_actions
=
new
ActionController
();
_actions
=
new
ActionController
();
...
@@ -119,6 +122,9 @@ class Node {
...
@@ -119,6 +122,9 @@ class Node {
invalidateTransformMatrix
();
invalidateTransformMatrix
();
}
}
/// The skew along the x-axis of this node in degrees.
///
/// myNode.skewX = 45.0;
double
get
skewX
=>
_skewX
;
double
get
skewX
=>
_skewX
;
void
set
skewX
(
double
skewX
)
{
void
set
skewX
(
double
skewX
)
{
...
@@ -127,6 +133,9 @@ class Node {
...
@@ -127,6 +133,9 @@ class Node {
invalidateTransformMatrix
();
invalidateTransformMatrix
();
}
}
/// The skew along the y-axis of this node in degrees.
///
/// myNode.skewY = 45.0;
double
get
skewY
=>
_skewY
;
double
get
skewY
=>
_skewY
;
void
set
skewY
(
double
skewY
)
{
void
set
skewY
(
double
skewY
)
{
...
@@ -289,6 +298,9 @@ class Node {
...
@@ -289,6 +298,9 @@ class Node {
return
_transformMatrix
;
return
_transformMatrix
;
}
}
/// Computes the transformation matrix of this node. This method can be
/// overriden if a custom matrix is required. There is usually no reason to
/// call this method directly.
Matrix4
computeTransformMatrix
()
{
Matrix4
computeTransformMatrix
()
{
double
cx
,
sx
,
cy
,
sy
;
double
cx
,
sx
,
cy
,
sy
;
...
@@ -326,6 +338,9 @@ class Node {
...
@@ -326,6 +338,9 @@ class Node {
return
matrix
;
return
matrix
;
}
}
/// Invalidates the current transform matrix. If the [computeTransformMatrix]
/// method is overidden, this method should be called whenever a property
/// changes that affects the matrix.
void
invalidateTransformMatrix
()
{
void
invalidateTransformMatrix
()
{
_transformMatrix
=
null
;
_transformMatrix
=
null
;
_invalidateToBoxTransformMatrix
();
_invalidateToBoxTransformMatrix
();
...
...
examples/game/lib/node3d.dart
View file @
238ac8ab
part of
sprites
;
part of
sprites
;
/// An node that transforms its children using a 3D perspective projection. This
/// node type can be used to create 3D flips and other similar effects.
///
/// var myNode3D = new Node3D();
/// myNode3D.rotationY = 45.0;
/// myNode3D.addChild(new Sprite(myTexture));
class
Node3D
extends
Node
{
class
Node3D
extends
Node
{
double
_rotationX
=
0.0
;
double
_rotationX
=
0.0
;
/// The node's rotation around the x axis in degrees.
double
get
rotationX
=>
_rotationX
;
double
get
rotationX
=>
_rotationX
;
set
rotationX
(
double
rotationX
)
{
set
rotationX
(
double
rotationX
)
{
...
@@ -13,6 +20,7 @@ class Node3D extends Node {
...
@@ -13,6 +20,7 @@ class Node3D extends Node {
double
_rotationY
=
0.0
;
double
_rotationY
=
0.0
;
/// The node's rotation around the y axis in degrees.
double
get
rotationY
=>
_rotationY
;
double
get
rotationY
=>
_rotationY
;
set
rotationY
(
double
rotationY
)
{
set
rotationY
(
double
rotationY
)
{
...
@@ -22,6 +30,7 @@ class Node3D extends Node {
...
@@ -22,6 +30,7 @@ class Node3D extends Node {
double
_projectionDepth
=
500.0
;
double
_projectionDepth
=
500.0
;
/// The projection depth. Default value is 500.0.
double
get
projectionDepth
=>
_projectionDepth
;
double
get
projectionDepth
=>
_projectionDepth
;
set
projectionDepth
(
double
projectionDepth
)
{
set
projectionDepth
(
double
projectionDepth
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment