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
32aa4628
Commit
32aa4628
authored
Aug 25, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #835 from vlidholt/master
Moves sky sprites to its own package
parents
556ebb93
ebeb8e2d
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
48 additions
and
26 deletions
+48
-26
game_demo.dart
examples/game/lib/game_demo.dart
+1
-1
main.dart
examples/game/lib/main.dart
+1
-1
pubspec.yaml
examples/game/pubspec.yaml
+3
-0
test_drawatlas.dart
examples/game/test_drawatlas.dart
+1
-2
test_performance.dart
examples/game/test_performance.dart
+1
-2
.gitignore
packages/flutter_sprites/.gitignore
+7
-0
README.md
packages/flutter_sprites/README.md
+8
-0
action.dart
packages/flutter_sprites/lib/action.dart
+1
-1
action_spline.dart
packages/flutter_sprites/lib/action_spline.dart
+1
-1
color_secuence.dart
packages/flutter_sprites/lib/color_secuence.dart
+1
-1
constraint.dart
packages/flutter_sprites/lib/constraint.dart
+1
-1
image_map.dart
packages/flutter_sprites/lib/image_map.dart
+1
-1
layer.dart
packages/flutter_sprites/lib/layer.dart
+1
-1
node.dart
packages/flutter_sprites/lib/node.dart
+1
-1
node3d.dart
packages/flutter_sprites/lib/node3d.dart
+1
-1
node_with_size.dart
packages/flutter_sprites/lib/node_with_size.dart
+1
-1
particle_system.dart
packages/flutter_sprites/lib/particle_system.dart
+1
-1
skysprites.dart
packages/flutter_sprites/lib/skysprites.dart
+1
-1
sound.dart
packages/flutter_sprites/lib/sound.dart
+1
-1
sound_manager.dart
packages/flutter_sprites/lib/sound_manager.dart
+1
-1
sprite.dart
packages/flutter_sprites/lib/sprite.dart
+1
-1
sprite_box.dart
packages/flutter_sprites/lib/sprite_box.dart
+1
-1
sprite_widget.dart
packages/flutter_sprites/lib/sprite_widget.dart
+1
-1
spritesheet.dart
packages/flutter_sprites/lib/spritesheet.dart
+1
-1
texture.dart
packages/flutter_sprites/lib/texture.dart
+1
-1
util.dart
packages/flutter_sprites/lib/util.dart
+1
-1
virtual_joystick.dart
packages/flutter_sprites/lib/virtual_joystick.dart
+1
-1
pubspec.yaml
packages/flutter_sprites/pubspec.yaml
+6
-0
No files found.
examples/game/lib/game_demo.dart
View file @
32aa4628
...
...
@@ -3,9 +3,9 @@ library game;
import
'dart:async'
;
import
'dart:math'
as
math
;
import
'dart:sky'
as
sky
;
import
'sprites.dart'
;
import
'package:sky/rendering/object.dart'
;
import
'package:sky/widgets/framework.dart'
;
import
'package:skysprites/skysprites.dart'
;
part
'game_demo_node.dart'
;
examples/game/lib/main.dart
View file @
32aa4628
...
...
@@ -14,9 +14,9 @@ import 'package:sky/widgets/navigator.dart';
import
'package:sky/widgets/framework.dart'
;
import
'package:sky/widgets/title.dart'
;
import
'package:sky/widgets/theme.dart'
;
import
'package:skysprites/skysprites.dart'
;
import
'game_demo.dart'
;
import
'sprites.dart'
;
AssetBundle
_initBundle
(
)
{
if
(
rootBundle
!=
null
)
...
...
examples/game/pubspec.yaml
View file @
32aa4628
...
...
@@ -2,8 +2,11 @@ name: asteroids
dependencies
:
sky
:
any
sky_tools
:
any
skysprites
:
any
dependency_overrides
:
material_design_icons
:
path
:
../../sky/packages/material_design_icons
sky
:
path
:
../../sky/packages/sky
skysprites
:
path
:
../../skysprites
examples/game/test_drawatlas.dart
View file @
32aa4628
import
'lib/sprites.dart'
;
import
'dart:sky'
;
import
'package:sky/mojo/asset_bundle.dart'
;
...
...
@@ -7,6 +5,7 @@ import 'package:sky/rendering/object.dart';
import
'package:sky/theme/colors.dart'
as
colors
;
import
'package:sky/widgets/basic.dart'
;
import
'package:sky/widgets.dart'
;
import
'package:skysprites/skysprites.dart'
;
AssetBundle
_initBundle
(
)
{
if
(
rootBundle
!=
null
)
...
...
examples/game/test_performance.dart
View file @
32aa4628
...
...
@@ -5,8 +5,7 @@ import 'package:sky/mojo/asset_bundle.dart';
import
'package:sky/rendering/object.dart'
;
import
'package:sky/theme/colors.dart'
as
colors
;
import
'package:sky/widgets.dart'
;
import
'lib/sprites.dart'
;
import
'package:skysprites/skysprites.dart'
;
AssetBundle
_initBundle
(
)
{
if
(
rootBundle
!=
null
)
...
...
packages/flutter_sprites/.gitignore
0 → 100644
View file @
32aa4628
.DS_Store
.idea
.packages
.pub/
build/
packages
pubspec.lock
packages/flutter_sprites/README.md
0 → 100644
View file @
32aa4628
# skysprites
A minimal Sky project.
## Getting Started
For help getting started with Sky, view our online
[
documentation
](
https://github.com/domokit/sky_engine/blob/master/sky/packages/sky/README.md
)
.
examples/game
/lib/action.dart
→
packages/flutter_sprites
/lib/action.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
typedef
void
ActionCallback
(
);
...
...
examples/game
/lib/action_spline.dart
→
packages/flutter_sprites
/lib/action_spline.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
Point
_cardinalSplineAt
(
Point
p0
,
Point
p1
,
Point
p2
,
Point
p3
,
double
tension
,
double
t
)
{
double
t2
=
t
*
t
;
...
...
examples/game
/lib/color_secuence.dart
→
packages/flutter_sprites
/lib/color_secuence.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// A sequence of colors representing a gradient or a color transition over
/// time. The sequence is represented by a list of [colors] and a list of
...
...
examples/game
/lib/constraint.dart
→
packages/flutter_sprites
/lib/constraint.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
abstract
class
Constraint
{
void
preUpdate
(
Node
node
,
double
dt
)
{
...
...
examples/game
/lib/image_map.dart
→
packages/flutter_sprites
/lib/image_map.dart
View file @
32aa4628
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of
sprites
;
part of
s
kys
prites
;
class
ImageMap
{
ImageMap
(
AssetBundle
bundle
)
:
_bundle
=
bundle
;
...
...
examples/game
/lib/layer.dart
→
packages/flutter_sprites
/lib/layer.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// A [Node] that provides an intermediate rendering surface in the sprite
/// rendering tree. A [Layer] can be used to change the opacity, color, or to
...
...
examples/game
/lib/node.dart
→
packages/flutter_sprites
/lib/node.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
double
convertDegrees2Radians
(
double
degrees
)
=>
degrees
*
math
.
PI
/
180.8
;
...
...
examples/game
/lib/node3d.dart
→
packages/flutter_sprites
/lib/node3d.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// 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.
...
...
examples/game
/lib/node_with_size.dart
→
packages/flutter_sprites
/lib/node_with_size.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// The super class of any [Node] that has a size.
///
...
...
examples/game
/lib/particle_system.dart
→
packages/flutter_sprites
/lib/particle_system.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
class
_Particle
{
Vector2
pos
;
...
...
examples/game/lib/
sprites.dart
→
packages/flutter_sprites/lib/sky
sprites.dart
View file @
32aa4628
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library
sprites
;
library
s
kys
prites
;
import
'dart:async'
;
import
'dart:convert'
;
...
...
examples/game
/lib/sound.dart
→
packages/flutter_sprites
/lib/sound.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
// TODO: The sound effects should probably use Android's SoundPool instead of
// MediaPlayer as it is more efficient and flexible for playing back sound effects
...
...
examples/game
/lib/sound_manager.dart
→
packages/flutter_sprites
/lib/sound_manager.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
enum
SoundFadeMode
{
crossFade
,
...
...
examples/game
/lib/sprite.dart
→
packages/flutter_sprites
/lib/sprite.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// A Sprite is a [Node] that renders a bitmap image to the screen.
class
Sprite
extends
NodeWithSize
with
SpritePaint
{
...
...
examples/game
/lib/sprite_box.dart
→
packages/flutter_sprites
/lib/sprite_box.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// Options for setting up a [SpriteBox].
///
...
...
examples/game
/lib/sprite_widget.dart
→
packages/flutter_sprites
/lib/sprite_widget.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// A widget that uses a [SpriteBox] to render a sprite node tree to the screen.
class
SpriteWidget
extends
OneChildRenderObjectWrapper
{
...
...
examples/game
/lib/spritesheet.dart
→
packages/flutter_sprites
/lib/spritesheet.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// A sprite sheet packs a number of smaller images into a single large image.
///
...
...
examples/game
/lib/texture.dart
→
packages/flutter_sprites
/lib/texture.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
/// A texture represents a rectangular area of an image and is typically used to draw a sprite to the screen.
///
...
...
examples/game
/lib/util.dart
→
packages/flutter_sprites
/lib/util.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
math
.
Random
_random
=
new
math
.
Random
();
...
...
examples/game
/lib/virtual_joystick.dart
→
packages/flutter_sprites
/lib/virtual_joystick.dart
View file @
32aa4628
part of
sprites
;
part of
s
kys
prites
;
class
VirtualJoystick
extends
NodeWithSize
{
VirtualJoystick
()
:
super
(
new
Size
(
160.0
,
160.0
))
{
...
...
packages/flutter_sprites/pubspec.yaml
0 → 100644
View file @
32aa4628
name
:
skysprites
description
:
A sprite toolkit built on top of Sky.
version
:
0.0.1
dependencies
:
sky
:
any
sky_tools
:
any
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