| OLD | NEW |
| 1 dart_library.library('sunflower/sunflower', null, /* Imports */[ | 1 dart_library.library('sunflower/sunflower', null, /* Imports */[ |
| 2 "dart/_runtime", | 2 "dart/_runtime", |
| 3 'sunflower/dom', | 3 'sunflower/dom', |
| 4 'dart/core', | 4 'dart/core', |
| 5 'dart/math', | 5 'dart/math', |
| 6 'sunflower/painter', | 6 'sunflower/painter', |
| 7 'sunflower/circle' | 7 'sunflower/circle' |
| 8 ], /* Lazy imports */[ | 8 ], /* Lazy imports */[ |
| 9 ], function(exports, dart, dom, core, math, painter, circle) { | 9 ], function(exports, dart, dom, core, math, painter, circle) { |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 let r = dart.notNull(math.sqrt(i)) * dart.notNull(SCALE_FACTOR); | 49 let r = dart.notNull(math.sqrt(i)) * dart.notNull(SCALE_FACTOR); |
| 50 let x = dart.notNull(centerX) + dart.notNull(r) * dart.notNull(math.cos(th
eta)); | 50 let x = dart.notNull(centerX) + dart.notNull(r) * dart.notNull(math.cos(th
eta)); |
| 51 let y = dart.notNull(centerY) - dart.notNull(r) * dart.notNull(math.sin(th
eta)); | 51 let y = dart.notNull(centerY) - dart.notNull(r) * dart.notNull(math.sin(th
eta)); |
| 52 new SunflowerSeed(x, y, SEED_RADIUS).draw(exports.context); | 52 new SunflowerSeed(x, y, SEED_RADIUS).draw(exports.context); |
| 53 } | 53 } |
| 54 exports.notes.textContent = `${exports.seeds} seeds`; | 54 exports.notes.textContent = `${exports.seeds} seeds`; |
| 55 } | 55 } |
| 56 dart.fn(draw, dart.void, []); | 56 dart.fn(draw, dart.void, []); |
| 57 class SunflowerSeed extends dart.mixin(circle.Circle, painter.CirclePainter) { | 57 class SunflowerSeed extends dart.mixin(circle.Circle, painter.CirclePainter) { |
| 58 SunflowerSeed(x, y, radius, color) { | 58 SunflowerSeed(x, y, radius, color) { |
| 59 if (color === void 0) | 59 if (color === void 0) color = null; |
| 60 color = null; | |
| 61 super.Circle(x, y, radius); | 60 super.Circle(x, y, radius); |
| 62 if (color != null) | 61 if (color != null) this.color = color; |
| 63 this.color = color; | |
| 64 } | 62 } |
| 65 } | 63 } |
| 66 dart.setSignature(SunflowerSeed, { | 64 dart.setSignature(SunflowerSeed, { |
| 67 constructors: () => ({SunflowerSeed: [SunflowerSeed, [core.num, core.num, co
re.num], [core.String]]}) | 65 constructors: () => ({SunflowerSeed: [SunflowerSeed, [core.num, core.num, co
re.num], [core.String]]}) |
| 68 }); | 66 }); |
| 69 // Exports: | 67 // Exports: |
| 70 exports.SEED_RADIUS = SEED_RADIUS; | 68 exports.SEED_RADIUS = SEED_RADIUS; |
| 71 exports.SCALE_FACTOR = SCALE_FACTOR; | 69 exports.SCALE_FACTOR = SCALE_FACTOR; |
| 72 exports.MAX_D = MAX_D; | 70 exports.MAX_D = MAX_D; |
| 73 exports.centerX = centerX; | 71 exports.centerX = centerX; |
| 74 exports.centerY = centerY; | 72 exports.centerY = centerY; |
| 75 exports.querySelector = querySelector; | 73 exports.querySelector = querySelector; |
| 76 exports.main = main; | 74 exports.main = main; |
| 77 exports.draw = draw; | 75 exports.draw = draw; |
| 78 exports.SunflowerSeed = SunflowerSeed; | 76 exports.SunflowerSeed = SunflowerSeed; |
| 79 }); | 77 }); |
| OLD | NEW |