Commit ebeb8e2d authored by Viktor Lidholt's avatar Viktor Lidholt

Moves sky sprites to its own package

parent 59817111
......@@ -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';
......@@ -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)
......
......@@ -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
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)
......
......@@ -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)
......
.DS_Store
.idea
.packages
.pub/
build/
packages
pubspec.lock
# 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).
part of sprites;
part of skysprites;
typedef void ActionCallback();
......
part of sprites;
part of skysprites;
Point _cardinalSplineAt(Point p0, Point p1, Point p2, Point p3, double tension, double t) {
double t2 = t * t;
......
part of sprites;
part of skysprites;
/// 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
......
part of sprites;
part of skysprites;
abstract class Constraint {
void preUpdate(Node node, double dt) {
......
......@@ -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 skysprites;
class ImageMap {
ImageMap(AssetBundle bundle) : _bundle = bundle;
......
part of sprites;
part of skysprites;
/// 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
......
part of sprites;
part of skysprites;
double convertDegrees2Radians(double degrees) => degrees * math.PI/180.8;
......
part of sprites;
part of skysprites;
/// 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.
......
part of sprites;
part of skysprites;
/// The super class of any [Node] that has a size.
///
......
......@@ -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 skysprites;
import 'dart:async';
import 'dart:convert';
......
part of sprites;
part of skysprites;
// 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
......
part of sprites;
part of skysprites;
enum SoundFadeMode {
crossFade,
......
part of sprites;
part of skysprites;
/// A Sprite is a [Node] that renders a bitmap image to the screen.
class Sprite extends NodeWithSize with SpritePaint {
......
part of sprites;
part of skysprites;
/// Options for setting up a [SpriteBox].
///
......
part of sprites;
part of skysprites;
/// A widget that uses a [SpriteBox] to render a sprite node tree to the screen.
class SpriteWidget extends OneChildRenderObjectWrapper {
......
part of sprites;
part of skysprites;
/// A sprite sheet packs a number of smaller images into a single large image.
///
......
part of sprites;
part of skysprites;
/// A texture represents a rectangular area of an image and is typically used to draw a sprite to the screen.
///
......
part of sprites;
part of skysprites;
math.Random _random = new math.Random();
......
part of sprites;
part of skysprites;
class VirtualJoystick extends NodeWithSize {
VirtualJoystick() : super(new Size(160.0, 160.0)) {
......
name: skysprites
description: A sprite toolkit built on top of Sky.
version: 0.0.1
dependencies:
sky: any
sky_tools: any
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment