Commit 7662a30f authored by Adam Barth's avatar Adam Barth

Moves from vector_math to vector_math_64

* Moves from vector_math to vector_math_64
* Adds support for Float64List in Dart bindings
parent 4ebf26bf
...@@ -6,7 +6,7 @@ import 'dart:sky' as sky; ...@@ -6,7 +6,7 @@ import 'dart:sky' as sky;
import 'package:sky/rendering.dart'; import 'package:sky/rendering.dart';
import 'package:skysprites/skysprites.dart'; import 'package:skysprites/skysprites.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
part 'custom_actions.dart'; part 'custom_actions.dart';
part 'explosions.dart'; part 'explosions.dart';
......
import 'dart:math' as math; import 'dart:math' as math;
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
main() { main() {
runTest(); runTest();
......
...@@ -64,7 +64,7 @@ sky.Picture paint(sky.Rect paintBounds) { ...@@ -64,7 +64,7 @@ sky.Picture paint(sky.Rect paintBounds) {
sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
final double devicePixelRatio = sky.view.devicePixelRatio; final double devicePixelRatio = sky.view.devicePixelRatio;
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float64List deviceTransform = new Float64List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio ..[5] = devicePixelRatio
..[10] = 1.0 ..[10] = 1.0
......
...@@ -23,7 +23,7 @@ sky.Picture paint(sky.Rect paintBounds) { ...@@ -23,7 +23,7 @@ sky.Picture paint(sky.Rect paintBounds) {
sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
final double devicePixelRatio = sky.view.devicePixelRatio; final double devicePixelRatio = sky.view.devicePixelRatio;
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float64List deviceTransform = new Float64List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio ..[5] = devicePixelRatio
..[10] = 1.0 ..[10] = 1.0
......
...@@ -218,7 +218,7 @@ sky.Picture paint(sky.Rect paintBounds) { ...@@ -218,7 +218,7 @@ sky.Picture paint(sky.Rect paintBounds) {
sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
final double devicePixelRatio = sky.view.devicePixelRatio; final double devicePixelRatio = sky.view.devicePixelRatio;
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float64List deviceTransform = new Float64List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio ..[5] = devicePixelRatio
..[10] = 1.0 ..[10] = 1.0
......
...@@ -32,7 +32,7 @@ sky.Picture paint(sky.Rect paintBounds) { ...@@ -32,7 +32,7 @@ sky.Picture paint(sky.Rect paintBounds) {
new sky.Paint()..setShader(yellowBlue)); new sky.Paint()..setShader(yellowBlue));
// Scale x and y by 0.5. // Scale x and y by 0.5.
var scaleMatrix = new Float32List.fromList([ var scaleMatrix = new Float64List.fromList([
0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0,
0.0, 0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0,
......
...@@ -39,7 +39,7 @@ sky.Picture paint(sky.Rect paintBounds) { ...@@ -39,7 +39,7 @@ sky.Picture paint(sky.Rect paintBounds) {
sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
final double devicePixelRatio = sky.view.devicePixelRatio; final double devicePixelRatio = sky.view.devicePixelRatio;
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float64List deviceTransform = new Float64List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio ..[5] = devicePixelRatio
..[10] = 1.0 ..[10] = 1.0
......
...@@ -31,7 +31,7 @@ sky.Picture paint(sky.Rect paintBounds, double delta) { ...@@ -31,7 +31,7 @@ sky.Picture paint(sky.Rect paintBounds, double delta) {
sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
final double devicePixelRatio = sky.view.devicePixelRatio; final double devicePixelRatio = sky.view.devicePixelRatio;
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float64List deviceTransform = new Float64List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio ..[5] = devicePixelRatio
..[10] = 1.0 ..[10] = 1.0
......
...@@ -44,7 +44,7 @@ sky.Picture paint(sky.Rect paintBounds, double delta) { ...@@ -44,7 +44,7 @@ sky.Picture paint(sky.Rect paintBounds, double delta) {
sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
final double devicePixelRatio = sky.view.devicePixelRatio; final double devicePixelRatio = sky.view.devicePixelRatio;
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float64List deviceTransform = new Float64List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio ..[5] = devicePixelRatio
..[10] = 1.0 ..[10] = 1.0
......
...@@ -27,7 +27,7 @@ void beginFrame(double timeStamp) { ...@@ -27,7 +27,7 @@ void beginFrame(double timeStamp) {
// composite // composite
final double devicePixelRatio = sky.view.devicePixelRatio; final double devicePixelRatio = sky.view.devicePixelRatio;
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float64List deviceTransform = new Float64List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio ..[5] = devicePixelRatio
..[10] = 1.0 ..[10] = 1.0
......
...@@ -27,4 +27,4 @@ export 'package:sky/src/rendering/toggleable.dart'; ...@@ -27,4 +27,4 @@ export 'package:sky/src/rendering/toggleable.dart';
export 'package:sky/src/rendering/view.dart'; export 'package:sky/src/rendering/view.dart';
export 'package:sky/src/rendering/viewport.dart'; export 'package:sky/src/rendering/viewport.dart';
export 'package:vector_math/vector_math.dart' show Matrix4; export 'package:vector_math/vector_math_64.dart' show Matrix4;
...@@ -6,7 +6,7 @@ import 'dart:math' as math; ...@@ -6,7 +6,7 @@ import 'dart:math' as math;
import 'package:sky/src/rendering/box.dart'; import 'package:sky/src/rendering/box.dart';
import 'package:sky/src/rendering/object.dart'; import 'package:sky/src/rendering/object.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
/// Parent data for use with [RenderBlockBase] /// Parent data for use with [RenderBlockBase]
class BlockParentData extends BoxParentData with ContainerParentDataMixin<RenderBox> { } class BlockParentData extends BoxParentData with ContainerParentDataMixin<RenderBox> { }
......
...@@ -8,7 +8,7 @@ import 'dart:sky' as sky; ...@@ -8,7 +8,7 @@ import 'dart:sky' as sky;
import 'package:sky/painting.dart'; import 'package:sky/painting.dart';
import 'package:sky/src/rendering/debug.dart'; import 'package:sky/src/rendering/debug.dart';
import 'package:sky/src/rendering/object.dart'; import 'package:sky/src/rendering/object.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
export 'package:sky/painting.dart' show TextBaseline; export 'package:sky/painting.dart' show TextBaseline;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'dart:sky' as sky; import 'dart:sky' as sky;
import 'dart:sky' show Point, Offset, Size, Rect, Color, Paint, Path; import 'dart:sky' show Point, Offset, Size, Rect, Color, Paint, Path;
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
/// A composited layer /// A composited layer
/// ///
......
...@@ -11,7 +11,7 @@ import 'package:sky/src/rendering/debug.dart'; ...@@ -11,7 +11,7 @@ import 'package:sky/src/rendering/debug.dart';
import 'package:sky/src/rendering/hit_test.dart'; import 'package:sky/src/rendering/hit_test.dart';
import 'package:sky/src/rendering/layer.dart'; import 'package:sky/src/rendering/layer.dart';
import 'package:sky/src/rendering/node.dart'; import 'package:sky/src/rendering/node.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
export 'dart:sky' show Point, Offset, Size, Rect, Color, Paint, Path; export 'dart:sky' show Point, Offset, Size, Rect, Color, Paint, Path;
export 'package:sky/src/rendering/hit_test.dart' show HitTestTarget, HitTestEntry, HitTestResult; export 'package:sky/src/rendering/hit_test.dart' show HitTestTarget, HitTestEntry, HitTestResult;
......
...@@ -8,7 +8,7 @@ import 'package:sky/src/painting/box_painter.dart'; ...@@ -8,7 +8,7 @@ import 'package:sky/src/painting/box_painter.dart';
import 'package:sky/src/painting/text_style.dart'; import 'package:sky/src/painting/text_style.dart';
import 'package:sky/src/rendering/object.dart'; import 'package:sky/src/rendering/object.dart';
import 'package:sky/src/rendering/box.dart'; import 'package:sky/src/rendering/box.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
export 'package:sky/src/painting/box_painter.dart'; export 'package:sky/src/painting/box_painter.dart';
...@@ -256,10 +256,10 @@ class RenderOverflowBox extends RenderProxyBox { ...@@ -256,10 +256,10 @@ class RenderOverflowBox extends RenderProxyBox {
} }
String debugDescribeSettings(String prefix) { String debugDescribeSettings(String prefix) {
return '${super.debugDescribeSettings(prefix)}' + return '${super.debugDescribeSettings(prefix)}' +
'${prefix}minWidth: ${minWidth ?? "use parent minWidth constraint"}\n' + '${prefix}minWidth: ${minWidth ?? "use parent minWidth constraint"}\n' +
'${prefix}maxWidth: ${maxWidth ?? "use parent maxWidth constraint"}\n' + '${prefix}maxWidth: ${maxWidth ?? "use parent maxWidth constraint"}\n' +
'${prefix}minHeight: ${minHeight ?? "use parent minHeight constraint"}\n' + '${prefix}minHeight: ${minHeight ?? "use parent minHeight constraint"}\n' +
'${prefix}maxHeight: ${maxHeight ?? "use parent maxHeight constraint"}\n'; '${prefix}maxHeight: ${maxHeight ?? "use parent maxHeight constraint"}\n';
} }
} }
......
...@@ -8,7 +8,7 @@ import 'package:sky/animation.dart'; ...@@ -8,7 +8,7 @@ import 'package:sky/animation.dart';
import 'package:sky/src/rendering/layer.dart'; import 'package:sky/src/rendering/layer.dart';
import 'package:sky/src/rendering/object.dart'; import 'package:sky/src/rendering/object.dart';
import 'package:sky/src/rendering/box.dart'; import 'package:sky/src/rendering/box.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
/// The layout constraints for the root render object /// The layout constraints for the root render object
class ViewConstraints { class ViewConstraints {
......
...@@ -6,7 +6,7 @@ import 'dart:sky' as sky; ...@@ -6,7 +6,7 @@ import 'dart:sky' as sky;
import 'package:sky/src/rendering/object.dart'; import 'package:sky/src/rendering/object.dart';
import 'package:sky/src/rendering/box.dart'; import 'package:sky/src/rendering/box.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
/// The direction in which to scroll /// The direction in which to scroll
enum ScrollDirection { enum ScrollDirection {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'package:sky/animation.dart'; import 'package:sky/animation.dart';
import 'package:sky/src/widgets/basic.dart'; import 'package:sky/src/widgets/basic.dart';
import 'package:sky/src/widgets/framework.dart'; import 'package:sky/src/widgets/framework.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
export 'package:sky/animation.dart' show Direction; export 'package:sky/animation.dart' show Direction;
......
...@@ -52,4 +52,4 @@ export 'src/widgets/tool_bar.dart'; ...@@ -52,4 +52,4 @@ export 'src/widgets/tool_bar.dart';
export 'src/widgets/transitions.dart'; export 'src/widgets/transitions.dart';
export 'src/widgets/unique_component.dart'; export 'src/widgets/unique_component.dart';
export 'package:vector_math/vector_math.dart' show Matrix4; export 'package:vector_math/vector_math_64.dart' show Matrix4;
...@@ -17,7 +17,7 @@ import 'package:sky/painting.dart'; ...@@ -17,7 +17,7 @@ import 'package:sky/painting.dart';
import 'package:sky/rendering.dart'; import 'package:sky/rendering.dart';
import 'package:sky/services.dart'; import 'package:sky/services.dart';
import 'package:sky/widgets.dart'; import 'package:sky/widgets.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
part 'action.dart'; part 'action.dart';
part 'action_spline.dart'; part 'action_spline.dart';
......
...@@ -333,7 +333,7 @@ class SpriteBox extends RenderBox { ...@@ -333,7 +333,7 @@ class SpriteBox extends RenderBox {
canvas.concat(transformMatrix.storage); canvas.concat(transformMatrix.storage);
// Draw the sprite tree // Draw the sprite tree
Matrix4 totalMatrix = new Matrix4.fromFloat32List(canvas.getTotalMatrix()); Matrix4 totalMatrix = new Matrix4.fromFloat64List(canvas.getTotalMatrix());
_rootNode._visit(canvas, totalMatrix); _rootNode._visit(canvas, totalMatrix);
canvas.restore(); canvas.restore();
......
...@@ -2,7 +2,7 @@ import 'dart:sky' as sky; ...@@ -2,7 +2,7 @@ import 'dart:sky' as sky;
import 'dart:sky' show Rect, Color, Paint; import 'dart:sky' show Rect, Color, Paint;
import 'package:test/test.dart'; import 'package:test/test.dart';
import 'package:vector_math/vector_math.dart'; import 'package:vector_math/vector_math_64.dart';
void main() { void main() {
......
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