├── analysis_options.yaml
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── loader.css
├── manifest.json
└── index.html
├── asset
└── remixicon.ttf
├── macos
├── Runner
│ ├── Configs
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ ├── Warnings.xcconfig
│ │ └── AppInfo.xcconfig
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ ├── app_icon_64.png
│ │ │ ├── app_icon_1024.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Release.entitlements
│ ├── DebugProfile.entitlements
│ ├── MainFlutterWindow.swift
│ ├── Info.plist
│ └── Base.lproj
│ │ └── MainMenu.xib
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
├── Podfile.lock
└── Podfile
├── screenshot
├── perlin_noise.png
├── perlin_noise2.png
└── perlin_noise3.png
├── lib
├── noise_orbit
│ ├── model
│ │ ├── stroke_cap.dart
│ │ ├── color_palette.dart
│ │ └── polygone_type.dart
│ ├── controller
│ │ ├── noise_orbit_controller_provider.dart
│ │ ├── noise_orbit_controller.dart
│ │ └── noise_orbit_state.dart
│ ├── tool
│ │ ├── width_slider.dart
│ │ ├── height_slider.dart
│ │ ├── frequency_slider.dart
│ │ ├── distortion_slider.dart
│ │ ├── stroke_width_factor_slider.dart
│ │ ├── radius_size_factor_slider.dart
│ │ ├── circle_spacing_factor_slider.dart
│ │ ├── point_mode_dropdown.dart
│ │ ├── polygone_type_dropdown.dart
│ │ ├── stroke_cap_dropdown.dart
│ │ ├── color_palette_dropdown.dart
│ │ └── noise_orbit_configuration.dart
│ ├── noise_orbit.dart
│ ├── util
│ │ └── noise_orbit_color_palette.dart
│ └── painter
│ │ └── noise_orbit_painter.dart
├── shared
│ ├── style
│ │ └── app_icons.dart
│ └── widget
│ │ ├── tool_constraints.dart
│ │ ├── configuration_modal.dart
│ │ ├── base_slider.dart
│ │ └── base_dropdown.dart
├── judgy_voronoi_diagram
│ ├── painter
│ │ └── judgy_voronoi_diagram_painter.dart
│ └── judgy_voronoi_diagram.dart
└── main.dart
├── pubspec.yaml
├── README.md
├── .gitignore
├── LICENSE
├── .github
└── workflows
│ └── build_web.yml
├── .metadata
└── pubspec.lock
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:lint/analysis_options.yaml
2 |
3 | linter:
4 | rules:
5 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/web/favicon.png
--------------------------------------------------------------------------------
/asset/remixicon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/asset/remixicon.ttf
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/screenshot/perlin_noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/screenshot/perlin_noise.png
--------------------------------------------------------------------------------
/screenshot/perlin_noise2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/screenshot/perlin_noise2.png
--------------------------------------------------------------------------------
/screenshot/perlin_noise3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/screenshot/perlin_noise3.png
--------------------------------------------------------------------------------
/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pierre-Monier/flutter_cool_visuals/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/lib/noise_orbit/model/stroke_cap.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | enum NoiseOrbitStrokeCap {
4 | round(StrokeCap.round),
5 | square(StrokeCap.butt);
6 |
7 | const NoiseOrbitStrokeCap(this.value);
8 | final StrokeCap value;
9 | }
10 |
--------------------------------------------------------------------------------
/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/shared/style/app_icons.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | @immutable
4 | class AppIcons {
5 | const AppIcons._();
6 |
7 | static const fontFamily = 'Remix Icon';
8 |
9 | static const github = IconData(0xEDCA, fontFamily: fontFamily);
10 | static const twitter = IconData(0xF23A, fontFamily: fontFamily);
11 | }
12 |
--------------------------------------------------------------------------------
/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import url_launcher_macos
9 |
10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
11 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
12 | }
13 |
--------------------------------------------------------------------------------
/lib/judgy_voronoi_diagram/painter/judgy_voronoi_diagram_painter.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class JudgyVoronoiDiagramPainter extends CustomPainter {
4 | @override
5 | void paint(Canvas canvas, Size size) {
6 | // TODO: implement paint
7 | }
8 |
9 | @override
10 | bool shouldRepaint(covariant CustomPainter oldDelegate) {
11 | return false;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/noise_orbit/model/color_palette.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ColorPalette {
4 | const ColorPalette({
5 | required this.name,
6 | required this.backgroundColor,
7 | required this.colors,
8 | required this.brightness,
9 | });
10 |
11 | final String name;
12 | final Color backgroundColor;
13 | final List colors;
14 | final Brightness brightness;
15 | }
16 |
--------------------------------------------------------------------------------
/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lib/judgy_voronoi_diagram/judgy_voronoi_diagram.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/judgy_voronoi_diagram/painter/judgy_voronoi_diagram_painter.dart';
3 |
4 | class JudgyVoronoiDiagram extends StatelessWidget {
5 | const JudgyVoronoiDiagram({super.key});
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return CustomPaint(
10 | painter: JudgyVoronoiDiagramPainter(),
11 | );
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/web/loader.css:
--------------------------------------------------------------------------------
1 | html {
2 | height: 100%;
3 | }
4 | body {
5 | background-color: #d8d3ce;
6 | height: 100%;
7 | display: flex;
8 | justify-content: center;
9 | align-items: center;
10 | }
11 |
12 | #loading {
13 | border: 16px solid #f7cac9;
14 | border-top: 16px solid #000000;
15 | border-radius: 50%;
16 | width: 120px;
17 | height: 120px;
18 | animation: spin 1s cubic-bezier(.42, 0, 1, 1) infinite;
19 | }
20 |
21 | @keyframes spin {
22 | 0% { transform: rotate(0deg); }
23 | 100% { transform: rotate(360deg); }
24 | }
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_canvart
2 | description: A new Flutter project.
3 |
4 | publish_to: "none"
5 |
6 | version: 1.0.0+1
7 |
8 | environment:
9 | sdk: ">=2.17.6 <3.0.0"
10 |
11 | dependencies:
12 | cupertino_icons: ^1.0.2
13 | fast_noise: ^1.0.1
14 | flutter:
15 | sdk: flutter
16 | url_launcher: ^6.1.5
17 |
18 | dev_dependencies:
19 | flutter_test:
20 | sdk: flutter
21 |
22 | lint: ^1.10.0
23 |
24 | flutter:
25 | uses-material-design: true
26 | fonts:
27 | - family: Remix Icon
28 | fonts:
29 | - asset: asset/remixicon.ttf
30 |
--------------------------------------------------------------------------------
/lib/shared/widget/tool_constraints.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ToolConstraints extends StatelessWidget {
4 | const ToolConstraints({super.key, required this.child});
5 |
6 | final Widget child;
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return LayoutBuilder(
11 | builder: (context, constraints) {
12 | return SizedBox(
13 | width: constraints.maxWidth / 2,
14 | child: Padding(
15 | padding: const EdgeInsets.all(8.0),
16 | child: child,
17 | ),
18 | );
19 | },
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = flutter_canvart
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterCanvart
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/macos/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - FlutterMacOS (1.0.0)
3 | - url_launcher_macos (0.0.1):
4 | - FlutterMacOS
5 |
6 | DEPENDENCIES:
7 | - FlutterMacOS (from `Flutter/ephemeral`)
8 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
9 |
10 | EXTERNAL SOURCES:
11 | FlutterMacOS:
12 | :path: Flutter/ephemeral
13 | url_launcher_macos:
14 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
15 |
16 | SPEC CHECKSUMS:
17 | FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
18 | url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
19 |
20 | PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
21 |
22 | COCOAPODS: 1.11.2
23 |
--------------------------------------------------------------------------------
/lib/noise_orbit/controller/noise_orbit_controller_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 |
5 | class NoiseOrbitControllerProvider extends InheritedWidget {
6 | NoiseOrbitControllerProvider({required super.child});
7 |
8 | final NoiseOrbitController controller = NoiseOrbitController();
9 |
10 | NoiseOrbitState get state => controller.value;
11 |
12 | @override
13 | bool updateShouldNotify(covariant NoiseOrbitControllerProvider oldWidget) {
14 | return false;
15 | }
16 |
17 | static NoiseOrbitControllerProvider of(BuildContext context) {
18 | return context
19 | .dependOnInheritedWidgetOfExactType()!;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter cool visuals
2 |
3 | [](https://pub.dev/packages/lint)
4 |
5 | Collection of cool visuals, from generative art to mobile app UI. [Here is the web version](https://pierre-monier.github.io/flutter_cool_visuals/#/)
6 |
7 | ## Perlin Noise Orbit
8 |
9 | Some fun with the perlin noise algorithm
10 |
11 | The web version has some performance limitation, if you want to push it to the max, **you should use the desktop version**
12 |
13 | 
14 |
15 | 
16 |
17 | 
18 |
--------------------------------------------------------------------------------
/lib/shared/widget/configuration_modal.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class ConfigurationModal extends StatelessWidget {
6 | const ConfigurationModal({super.key, required this.child});
7 |
8 | final Widget child;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | final modalBottomSheetHeight = MediaQuery.of(context).size.height / 2;
13 |
14 | return SizedBox(
15 | height: modalBottomSheetHeight,
16 | child: SingleChildScrollView(
17 | child: ConstrainedBox(
18 | constraints: BoxConstraints(
19 | minHeight: modalBottomSheetHeight + 1,
20 | ),
21 | child: BackdropFilter(
22 | filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
23 | child: child,
24 | ),
25 | ),
26 | ),
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Web related
36 | lib/generated_plugin_registrant.dart
37 |
38 | # Symbolication related
39 | app.*.symbols
40 |
41 | # Obfuscation related
42 | app.*.map.json
43 |
44 | # Android Studio will place build artifacts here
45 | /android/app/debug
46 | /android/app/profile
47 | /android/app/release
48 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flutter_canvart",
3 | "short_name": "flutter_canvart",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/width_slider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/shared/widget/base_slider.dart';
5 |
6 | class WidthSlider extends StatelessWidget {
7 | const WidthSlider({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final noiseOrbitController =
12 | NoiseOrbitControllerProvider.of(context).controller;
13 |
14 | return ValueListenableBuilder(
15 | valueListenable: noiseOrbitController,
16 | builder: (context, noiseOrbitState, child) {
17 | return BaseSlider(
18 | label: "Width",
19 | data: SliderData(
20 | max: noiseOrbitController.maxWidth,
21 | min: noiseOrbitController.minWidth,
22 | value: noiseOrbitState.width,
23 | onChanged: noiseOrbitController.onWidthChanged,
24 | ),
25 | );
26 | },
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/height_slider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/shared/widget/base_slider.dart';
5 |
6 | class HeightSlider extends StatelessWidget {
7 | const HeightSlider({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final noiseOrbitController =
12 | NoiseOrbitControllerProvider.of(context).controller;
13 |
14 | return ValueListenableBuilder(
15 | valueListenable: noiseOrbitController,
16 | builder: (context, noiseOrbitState, child) {
17 | return BaseSlider(
18 | label: "Height",
19 | data: SliderData(
20 | max: noiseOrbitController.maxHeight,
21 | min: noiseOrbitController.minHeight,
22 | value: noiseOrbitState.height,
23 | onChanged: noiseOrbitController.onHeightChanged,
24 | ),
25 | );
26 | },
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Pierre Monier
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.github/workflows/build_web.yml:
--------------------------------------------------------------------------------
1 | name: Flutter Web
2 | on:
3 | workflow_dispatch:
4 | push:
5 | branches:
6 | - master
7 | jobs:
8 | build:
9 | name: Build Web
10 | env:
11 | my_secret: ${{secrets.commit_secret}}
12 | runs-on: ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v1
15 | - uses: subosito/flutter-action@v2
16 | with:
17 | channel: 'stable'
18 | - run: flutter config --enable-web
19 | - run: flutter pub get
20 | - run: flutter build web --release
21 | - run: |
22 | cd build/web
23 | git init
24 | git config --global user.email pierre.monier.dev@gmail.com
25 | git config --global user.name Pierre-Monier
26 | git status
27 | # change this remote url for examle your remote url is https://github.com/onatcipli/flutter_web.git then the following:
28 | git remote add origin https://${{secrets.commit_secret}}@github.com/Pierre-Monier/flutter_cool_visuals.git
29 | git checkout -b gh-pages
30 | git add --all
31 | git commit -m "update"
32 | git push origin gh-pages -f
33 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/frequency_slider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/shared/widget/base_slider.dart';
5 |
6 | class FrequencySlider extends StatelessWidget {
7 | const FrequencySlider({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final noiseOrbitController =
12 | NoiseOrbitControllerProvider.of(context).controller;
13 |
14 | return ValueListenableBuilder(
15 | valueListenable: noiseOrbitController,
16 | builder: (context, noiseOrbitState, child) {
17 | return BaseSlider(
18 | label: "Pelerin Noise Frequency",
19 | data: SliderData(
20 | max: noiseOrbitController.maxFrequency,
21 | min: noiseOrbitController.minFrequency,
22 | value: noiseOrbitState.frequency,
23 | onChanged: noiseOrbitController.onFrequencyChanged,
24 | ),
25 | );
26 | },
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/distortion_slider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/shared/widget/base_slider.dart';
5 |
6 | class DistortionSlider extends StatelessWidget {
7 | const DistortionSlider({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final noiseOrbitController =
12 | NoiseOrbitControllerProvider.of(context).controller;
13 |
14 | return ValueListenableBuilder(
15 | valueListenable: noiseOrbitController,
16 | builder: (context, noiseOrbitState, child) {
17 | return BaseSlider(
18 | label: "Pelerin Noise Distortion",
19 | data: SliderData(
20 | max: noiseOrbitController.maxDistortion,
21 | min: noiseOrbitController.minDistortion,
22 | value: noiseOrbitState.distortion,
23 | onChanged: noiseOrbitController.onDistortionChanged,
24 | ),
25 | );
26 | },
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/shared/widget/base_slider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/shared/widget/tool_constraints.dart';
3 |
4 | @immutable
5 | class SliderData {
6 | const SliderData({
7 | required this.min,
8 | required this.max,
9 | required this.value,
10 | required this.onChanged,
11 | });
12 |
13 | final double min;
14 | final double max;
15 | final double value;
16 | final void Function(double) onChanged;
17 | }
18 |
19 | class BaseSlider extends StatelessWidget {
20 | const BaseSlider({super.key, required this.label, required this.data});
21 |
22 | final String label;
23 | final SliderData data;
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return ToolConstraints(
28 | child: Column(
29 | crossAxisAlignment: CrossAxisAlignment.start,
30 | children: [
31 | Text(label),
32 | const SizedBox(height: 8.0),
33 | Slider(
34 | min: data.min,
35 | max: data.max,
36 | value: data.value,
37 | onChanged: data.onChanged,
38 | ),
39 | ],
40 | ),
41 | );
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/stroke_width_factor_slider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/shared/widget/base_slider.dart';
5 |
6 | class StrokeWidthFactorSlider extends StatelessWidget {
7 | const StrokeWidthFactorSlider({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final noiseOrbitController =
12 | NoiseOrbitControllerProvider.of(context).controller;
13 |
14 | return ValueListenableBuilder(
15 | valueListenable: noiseOrbitController,
16 | builder: (context, noiseOrbitState, child) {
17 | return BaseSlider(
18 | label: "Stroke Width",
19 | data: SliderData(
20 | max: noiseOrbitController.maxStrokeWidth,
21 | min: noiseOrbitController.minStrokeWidth,
22 | value: noiseOrbitState.strokeWidth,
23 | onChanged: noiseOrbitController.onStrokeWidthChanged,
24 | ),
25 | );
26 | },
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/radius_size_factor_slider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/shared/widget/base_slider.dart';
5 |
6 | class RadiusSizeFactorSlider extends StatelessWidget {
7 | const RadiusSizeFactorSlider({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final noiseOrbitController =
12 | NoiseOrbitControllerProvider.of(context).controller;
13 |
14 | return ValueListenableBuilder(
15 | valueListenable: noiseOrbitController,
16 | builder: (context, noiseOrbitState, child) {
17 | return BaseSlider(
18 | label: "Center Radius",
19 | data: SliderData(
20 | max: noiseOrbitController.maxRadiusSizeFactor,
21 | min: noiseOrbitController.minRadiusSizeFactor,
22 | value: noiseOrbitState.radiusSizeFactor,
23 | onChanged: noiseOrbitController.onRadiusSizeFactorChanged,
24 | ),
25 | );
26 | },
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/circle_spacing_factor_slider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/shared/widget/base_slider.dart';
5 |
6 | class CircleSpacingFactorSlider extends StatelessWidget {
7 | const CircleSpacingFactorSlider({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final noiseOrbitController =
12 | NoiseOrbitControllerProvider.of(context).controller;
13 |
14 | return ValueListenableBuilder(
15 | valueListenable: noiseOrbitController,
16 | builder: (context, noiseOrbitState, child) {
17 | return BaseSlider(
18 | label: "Shape repetition",
19 | data: SliderData(
20 | max: noiseOrbitController.maxCircleSpacingFactor,
21 | min: noiseOrbitController.minCircleSpacingFactor,
22 | value: noiseOrbitState.circleSpacingFactor,
23 | onChanged: noiseOrbitController.onCircleSpacingFactorChanged,
24 | ),
25 | );
26 | },
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/noise_orbit/model/polygone_type.dart:
--------------------------------------------------------------------------------
1 | enum PolygoneType {
2 | cirlcle(18),
3 | perfectCircle(100),
4 | line(2),
5 | triangle(3),
6 | square(4),
7 | pentagon(5),
8 | hexagon(6),
9 | heptagon(7),
10 | octagon(8),
11 | nonagon(9),
12 | decagon(10),
13 | hendecagon(11),
14 | dodecagon(12);
15 |
16 | const PolygoneType(this.value);
17 | final int value;
18 | }
19 |
20 | extension PolygoneTypeExtension on PolygoneType {
21 | String get name {
22 | switch (this) {
23 | case PolygoneType.cirlcle:
24 | return "Circle";
25 | case PolygoneType.perfectCircle:
26 | return "Perfect Circle (use a lot of ressources)";
27 | case PolygoneType.line:
28 | return "Line";
29 | case PolygoneType.triangle:
30 | return "Triangle";
31 | case PolygoneType.square:
32 | return "Square";
33 | case PolygoneType.pentagon:
34 | return "Pentagon";
35 | case PolygoneType.hexagon:
36 | return "Hexagon";
37 | case PolygoneType.heptagon:
38 | return "Heptagon";
39 | case PolygoneType.octagon:
40 | return "Octagon";
41 | case PolygoneType.nonagon:
42 | return "Nonagon";
43 | case PolygoneType.decagon:
44 | return "Decagon";
45 | case PolygoneType.hendecagon:
46 | return "Hendecagon";
47 | case PolygoneType.dodecagon:
48 | return "Dodecagon";
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/shared/widget/base_dropdown.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/shared/widget/tool_constraints.dart';
3 |
4 | @immutable
5 | class DropdownData {
6 | const DropdownData({
7 | required this.value,
8 | required this.onChanged,
9 | required this.items,
10 | required this.textColor,
11 | required this.backgroundColor,
12 | });
13 |
14 | final T value;
15 | final void Function(T?) onChanged;
16 | final List> items;
17 | final Color textColor;
18 | final Color backgroundColor;
19 | }
20 |
21 | class BaseDropdown extends StatelessWidget {
22 | const BaseDropdown({
23 | super.key,
24 | required this.label,
25 | required this.data,
26 | });
27 |
28 | final String label;
29 | final DropdownData data;
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | return ToolConstraints(
34 | child: Column(
35 | crossAxisAlignment: CrossAxisAlignment.stretch,
36 | children: [
37 | Text(label),
38 | DropdownButton(
39 | style: DefaultTextStyle.of(context)
40 | .style
41 | .copyWith(color: data.textColor),
42 | dropdownColor: data.backgroundColor,
43 | value: data.value,
44 | items: data.items,
45 | onChanged: data.onChanged,
46 | isExpanded: true,
47 | ),
48 | ],
49 | ),
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.11'
2 |
3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5 |
6 | project 'Runner', {
7 | 'Debug' => :debug,
8 | 'Profile' => :release,
9 | 'Release' => :release,
10 | }
11 |
12 | def flutter_root
13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 | unless File.exist?(generated_xcode_build_settings_path)
15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 | end
17 |
18 | File.foreach(generated_xcode_build_settings_path) do |line|
19 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 | return matches[1].strip if matches
21 | end
22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23 | end
24 |
25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26 |
27 | flutter_macos_podfile_setup
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 | use_modular_headers!
32 |
33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34 | end
35 |
36 | post_install do |installer|
37 | installer.pods_project.targets.each do |target|
38 | flutter_additional_macos_build_settings(target)
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/point_mode_dropdown.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
5 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
6 | import 'package:flutter_canvart/shared/widget/base_dropdown.dart';
7 |
8 | class PointModeDropdown extends StatelessWidget {
9 | const PointModeDropdown({super.key});
10 |
11 | List> _getItems() {
12 | final items = PointMode.values
13 | .map(
14 | (pointMode) => DropdownMenuItem(
15 | value: pointMode,
16 | child: Text(pointMode.name),
17 | ),
18 | )
19 | .toList();
20 |
21 | return items;
22 | }
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | final noiseOrbitController =
27 | NoiseOrbitControllerProvider.of(context).controller;
28 | return ValueListenableBuilder(
29 | valueListenable: noiseOrbitController,
30 | builder: (context, noiseOrbitState, child) {
31 | return BaseDropdown(
32 | label: "Draw mode",
33 | data: DropdownData(
34 | items: _getItems(),
35 | value: noiseOrbitState.pointMode,
36 | onChanged: noiseOrbitController.onPointModeChanged,
37 | textColor: noiseOrbitController.textColor,
38 | backgroundColor: noiseOrbitController.backgroundColor,
39 | ),
40 | );
41 | },
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/polygone_type_dropdown.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/noise_orbit/model/polygone_type.dart';
5 | import 'package:flutter_canvart/shared/widget/base_dropdown.dart';
6 |
7 | class PolygonTypeDropdown extends StatelessWidget {
8 | const PolygonTypeDropdown({super.key});
9 |
10 | List> _getItems() {
11 | final items = PolygoneType.values
12 | .map(
13 | (pointMode) => DropdownMenuItem(
14 | value: pointMode,
15 | child: Text(pointMode.name),
16 | ),
17 | )
18 | .toList();
19 |
20 | return items;
21 | }
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | final noiseOrbitController =
26 | NoiseOrbitControllerProvider.of(context).controller;
27 |
28 | return ValueListenableBuilder(
29 | valueListenable: noiseOrbitController,
30 | builder: (context, noiseOrbitState, child) {
31 | return BaseDropdown(
32 | label: "Shape",
33 | data: DropdownData(
34 | items: _getItems(),
35 | value: noiseOrbitState.polygonType,
36 | onChanged: noiseOrbitController.onPolygoneTypeChanged,
37 | textColor: noiseOrbitController.textColor,
38 | backgroundColor: noiseOrbitController.backgroundColor,
39 | ),
40 | );
41 | },
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/stroke_cap_dropdown.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/noise_orbit/model/stroke_cap.dart';
5 | import 'package:flutter_canvart/shared/widget/base_dropdown.dart';
6 |
7 | class StrokeCapDropdown extends StatelessWidget {
8 | const StrokeCapDropdown({super.key});
9 |
10 | List> _getItems() {
11 | final items = NoiseOrbitStrokeCap.values
12 | .map(
13 | (pointMode) => DropdownMenuItem(
14 | value: pointMode,
15 | child: Text(pointMode.name),
16 | ),
17 | )
18 | .toList();
19 |
20 | return items;
21 | }
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | final noiseOrbitController =
26 | NoiseOrbitControllerProvider.of(context).controller;
27 |
28 | return ValueListenableBuilder(
29 | valueListenable: noiseOrbitController,
30 | builder: (context, noiseOrbitState, child) {
31 | return BaseDropdown(
32 | label: "Stroke Cap",
33 | data: DropdownData(
34 | items: _getItems(),
35 | value: noiseOrbitState.strokeCap,
36 | onChanged: noiseOrbitController.onStrokeCapChanged,
37 | textColor: noiseOrbitController.textColor,
38 | backgroundColor: noiseOrbitController.backgroundColor,
39 | ),
40 | );
41 | },
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/noise_orbit/noise_orbit.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:math';
3 |
4 | import 'package:fast_noise/fast_noise.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
7 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
8 | import 'package:flutter_canvart/noise_orbit/painter/noise_orbit_painter.dart';
9 |
10 | class NoiseOrbit extends StatefulWidget {
11 | const NoiseOrbit({super.key});
12 |
13 | @override
14 | State createState() => _NoiseOrbitState();
15 | }
16 |
17 | class _NoiseOrbitState extends State {
18 | int animation = 0;
19 | final seed = Random().nextInt(2048);
20 |
21 | @override
22 | void initState() {
23 | super.initState();
24 | Timer.periodic(const Duration(milliseconds: 8), (timer) {
25 | setState(() {
26 | animation = timer.tick;
27 | });
28 | });
29 | }
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | final noiseOrbitController =
34 | NoiseOrbitControllerProvider.of(context).controller;
35 |
36 | return ValueListenableBuilder(
37 | valueListenable: noiseOrbitController,
38 | builder: (context, noiseOrbitState, child) {
39 | return CustomPaint(
40 | painter: NoiseOrbitPainter(
41 | noiseOrbitState: noiseOrbitState,
42 | animation: animation,
43 | perlinNoise: PerlinNoise(
44 | seed: seed,
45 | frequency: noiseOrbitState.frequency,
46 | ),
47 | ),
48 | );
49 | },
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/color_palette_dropdown.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
4 | import 'package:flutter_canvart/noise_orbit/model/color_palette.dart';
5 | import 'package:flutter_canvart/noise_orbit/util/noise_orbit_color_palette.dart';
6 | import 'package:flutter_canvart/shared/widget/base_dropdown.dart';
7 |
8 | class ColorPaletteDropdown extends StatelessWidget {
9 | const ColorPaletteDropdown({super.key});
10 |
11 | List> _getItems() {
12 | final items = noiseOrbitcolorPalettes
13 | .map(
14 | (colorPalette) => DropdownMenuItem(
15 | value: colorPalette,
16 | child: Text(colorPalette.name),
17 | ),
18 | )
19 | .toList();
20 |
21 | return items;
22 | }
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | final noiseOrbitController =
27 | NoiseOrbitControllerProvider.of(context).controller;
28 | return ValueListenableBuilder(
29 | valueListenable: noiseOrbitController,
30 | builder: (context, noiseOrbitState, child) {
31 | return BaseDropdown(
32 | label: "Color Palette",
33 | data: DropdownData(
34 | items: _getItems(),
35 | value: noiseOrbitState.colorPalette,
36 | onChanged: noiseOrbitController.onColorPaletteChange,
37 | textColor: noiseOrbitController.textColor,
38 | backgroundColor: noiseOrbitController.backgroundColor,
39 | ),
40 | );
41 | },
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
17 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
18 | - platform: android
19 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
20 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
21 | - platform: ios
22 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
23 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
24 | - platform: linux
25 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
26 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
27 | - platform: macos
28 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
29 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
30 | - platform: web
31 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
32 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
33 | - platform: windows
34 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
35 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | flutter_canvart
33 |
34 |
35 |
36 |
40 |
41 |
42 |
43 |
44 |
45 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/lib/noise_orbit/tool/noise_orbit_configuration.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
5 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
6 | import 'package:flutter_canvart/noise_orbit/tool/circle_spacing_factor_slider.dart';
7 | import 'package:flutter_canvart/noise_orbit/tool/color_palette_dropdown.dart';
8 | import 'package:flutter_canvart/noise_orbit/tool/distortion_slider.dart';
9 | import 'package:flutter_canvart/noise_orbit/tool/frequency_slider.dart';
10 | import 'package:flutter_canvart/noise_orbit/tool/height_slider.dart';
11 | import 'package:flutter_canvart/noise_orbit/tool/point_mode_dropdown.dart';
12 | import 'package:flutter_canvart/noise_orbit/tool/polygone_type_dropdown.dart';
13 | import 'package:flutter_canvart/noise_orbit/tool/radius_size_factor_slider.dart';
14 | import 'package:flutter_canvart/noise_orbit/tool/stroke_cap_dropdown.dart';
15 | import 'package:flutter_canvart/noise_orbit/tool/stroke_width_factor_slider.dart';
16 | import 'package:flutter_canvart/noise_orbit/tool/width_slider.dart';
17 |
18 | class NoiseOrbitConfiguration extends StatelessWidget {
19 | const NoiseOrbitConfiguration({super.key});
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | final noiseOrbitController =
24 | NoiseOrbitControllerProvider.of(context).controller;
25 |
26 | return ValueListenableBuilder(
27 | valueListenable: noiseOrbitController,
28 | builder: (context, noiseOrbitState, child) {
29 | return DefaultTextStyle(
30 | style: TextStyle(color: noiseOrbitController.textColor),
31 | child: Wrap(
32 | children: [
33 | const WidthSlider(),
34 | const HeightSlider(),
35 | const RadiusSizeFactorSlider(),
36 | const CircleSpacingFactorSlider(),
37 | const FrequencySlider(),
38 | const DistortionSlider(),
39 | const StrokeWidthFactorSlider(),
40 | const PolygonTypeDropdown(),
41 | const PointModeDropdown(),
42 | const ColorPaletteDropdown(),
43 | if (noiseOrbitState.pointMode != PointMode.polygon)
44 | const StrokeCapDropdown(),
45 | ],
46 | ),
47 | );
48 | },
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/noise_orbit/util/noise_orbit_color_palette.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/model/color_palette.dart';
3 |
4 | final noiseOrbitcolorPalettes = [
5 | const ColorPalette(
6 | name: "Smooth Grey",
7 | backgroundColor: Color(0xFFd8d3ce),
8 | colors: [
9 | Color(0xFF081912),
10 | Color(0xFF6cc445),
11 | Color(0xFF263f33),
12 | Color(0xFF426655),
13 | Color(0xFF426655),
14 | ],
15 | brightness: Brightness.light,
16 | ),
17 | const ColorPalette(
18 | name: "Dark Green",
19 | backgroundColor: Color(0xFF031c06),
20 | colors: [
21 | Color(0xFF1f7722),
22 | Color(0xFF6cc445),
23 | Color(0xFF033904),
24 | Color(0xFF92cc73),
25 | ],
26 | brightness: Brightness.dark,
27 | ),
28 | const ColorPalette(
29 | name: "Night City",
30 | backgroundColor: Color(0xFF071d25),
31 | colors: [
32 | Color(0xFF053749),
33 | Color(0xFF0f407a),
34 | Color(0xFF209ba9),
35 | Color(0xFFc30a55),
36 | Color(0xFF6690b0),
37 | Color(0xFF771343),
38 | Color(0xFFe16099),
39 | ],
40 | brightness: Brightness.dark,
41 | ),
42 | const ColorPalette(
43 | name: "Smooth beige",
44 | backgroundColor: Color(0xFFcbb8a8),
45 | colors: [
46 | Color(0xFF1d2b2f),
47 | Color(0xFFa1a3b0),
48 | Color(0xFF4c605f),
49 | Color(0xFFc29350),
50 | Color(0xFF748a8b),
51 | ],
52 | brightness: Brightness.light,
53 | ),
54 | const ColorPalette(
55 | name: "Dark Orange",
56 | backgroundColor: Color(0xFF07151c),
57 | colors: [
58 | Color(0xFF054f4c),
59 | Color(0xFFf49904),
60 | Color(0xFF123a3c),
61 | Color(0xFFf5ab35),
62 | Color(0xFFf27802),
63 | ],
64 | brightness: Brightness.dark,
65 | ),
66 | const ColorPalette(
67 | name: "Light red",
68 | backgroundColor: Color(0xFFf39c7c),
69 | colors: [
70 | Color(0xFF658f96),
71 | Color(0xFFec5e35),
72 | Color(0xFF3b5a5f),
73 | Color(0xFFa10102),
74 | Color(0xFF3b5a5f),
75 | Color(0xFF050402),
76 | ],
77 | brightness: Brightness.dark,
78 | ),
79 | const ColorPalette(
80 | name: "Sugar Pink",
81 | backgroundColor: Color(0xFFf582b8),
82 | colors: [
83 | Color(0xFF6de6e3),
84 | Color(0xFF9beae2),
85 | Color(0xFFf4bad5),
86 | Color(0xFFf5e4a2),
87 | Color(0xFFb6b9ee),
88 | Color(0xFF999cdb),
89 | ],
90 | brightness: Brightness.light,
91 | ),
92 | ];
93 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_controller_provider.dart';
3 | import 'package:flutter_canvart/noise_orbit/noise_orbit.dart';
4 | import 'package:flutter_canvart/noise_orbit/tool/noise_orbit_configuration.dart';
5 | import 'package:flutter_canvart/shared/style/app_icons.dart';
6 | import 'package:flutter_canvart/shared/widget/configuration_modal.dart';
7 | import 'package:url_launcher/url_launcher.dart';
8 |
9 | void main() {
10 | runApp(const MyApp());
11 | }
12 |
13 | class MyApp extends StatelessWidget {
14 | const MyApp({super.key});
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | return NoiseOrbitControllerProvider(
19 | child: MaterialApp(
20 | debugShowCheckedModeBanner: false,
21 | theme: ThemeData(
22 | colorSchemeSeed: const Color(0xFFf7cac9),
23 | sliderTheme: SliderThemeData(
24 | overlayShape: SliderComponentShape.noOverlay,
25 | ),
26 | ),
27 | home: const MyHomePage(),
28 | ),
29 | );
30 | }
31 | }
32 |
33 | class MyHomePage extends StatelessWidget {
34 | const MyHomePage({super.key});
35 |
36 | void openLink(String path) {
37 | final uri = Uri.parse(path);
38 | launchUrl(uri, mode: LaunchMode.externalApplication);
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | return Scaffold(
44 | appBar: AppBar(
45 | title: const Text("Perlin Noise Orbit"),
46 | actions: [
47 | IconButton(
48 | onPressed: () {
49 | openLink("https://twitter.com/pierremonier9");
50 | },
51 | icon: const Icon(AppIcons.twitter),
52 | ),
53 | IconButton(
54 | onPressed: () {
55 | openLink("https://github.com/Pierre-Monier/flutter_cool_visuals");
56 | },
57 | icon: const Icon(AppIcons.github),
58 | ),
59 | ],
60 | ),
61 | body: const SizedBox.expand(
62 | child: NoiseOrbit(),
63 | ),
64 | floatingActionButton: FloatingActionButton.extended(
65 | onPressed: () {
66 | showModalBottomSheet(
67 | context: context,
68 | barrierColor: Colors.transparent,
69 | backgroundColor: Colors.transparent,
70 | builder: (context) {
71 | return const ConfigurationModal(
72 | child: NoiseOrbitConfiguration(),
73 | );
74 | },
75 | );
76 | },
77 | icon: const Icon(Icons.edit),
78 | label: const Text("Edit"),
79 | ),
80 | );
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/lib/noise_orbit/controller/noise_orbit_controller.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
5 | import 'package:flutter_canvart/noise_orbit/model/color_palette.dart';
6 | import 'package:flutter_canvart/noise_orbit/model/polygone_type.dart';
7 | import 'package:flutter_canvart/noise_orbit/model/stroke_cap.dart';
8 | import 'package:flutter_canvart/noise_orbit/util/noise_orbit_color_palette.dart';
9 |
10 | class NoiseOrbitController extends ValueNotifier {
11 | NoiseOrbitController()
12 | : super(
13 | NoiseOrbitState.initial(
14 | colorPalette: noiseOrbitcolorPalettes.first,
15 | ),
16 | );
17 |
18 | void onRadiusSizeFactorChanged(double radiusSizeFactor) {
19 | value = value.copyWith(radiusSizeFactor: radiusSizeFactor);
20 | }
21 |
22 | void onCircleSpacingFactorChanged(double circleSpacingFactor) {
23 | value = value.copyWith(circleSpacingFactor: circleSpacingFactor);
24 | }
25 |
26 | void onFrequencyChanged(double frequency) {
27 | value = value.copyWith(frequency: frequency);
28 | }
29 |
30 | void onStrokeWidthChanged(double strokeWidth) {
31 | value = value.copyWith(strokeWidth: strokeWidth);
32 | }
33 |
34 | void onDistortionChanged(double distortion) {
35 | value = value.copyWith(distortion: distortion);
36 | }
37 |
38 | void onWidthChanged(double width) {
39 | value = value.copyWith(width: width);
40 | }
41 |
42 | void onHeightChanged(double height) {
43 | value = value.copyWith(height: height);
44 | }
45 |
46 | void onPolygoneTypeChanged(PolygoneType? polygonType) {
47 | value = value.copyWith(polygonType: polygonType);
48 | }
49 |
50 | void onPointModeChanged(PointMode? pointMode) {
51 | value = value.copyWith(pointMode: pointMode);
52 | }
53 |
54 | void onColorPaletteChange(ColorPalette? colorPalette) {
55 | value = value.copyWith(colorPalette: colorPalette);
56 | }
57 |
58 | void onStrokeCapChanged(NoiseOrbitStrokeCap? strokeCap) {
59 | value = value.copyWith(strokeCap: strokeCap);
60 | }
61 |
62 | double get minFrequency => 0.0001;
63 | double get maxFrequency => 0.0025;
64 | double get minRadiusSizeFactor => .008;
65 | double get maxRadiusSizeFactor => .8;
66 | double get minCircleSpacingFactor => 0.5;
67 | double get maxCircleSpacingFactor => 50.0;
68 | double get minStrokeWidth => 0.1;
69 | double get maxStrokeWidth => 25.0;
70 | double get minDistortion => 0.0;
71 | double get maxDistortion => 150.0;
72 | double get minWidth => .1;
73 | double get maxWidth => .75;
74 | double get minHeight => .1;
75 | double get maxHeight => .75;
76 |
77 | Color get textColor => value.colorPalette.brightness == Brightness.light
78 | ? Colors.black
79 | : Colors.white;
80 | Color get backgroundColor => value.colorPalette.brightness == Brightness.light
81 | ? Colors.white
82 | : Colors.black;
83 | }
84 |
--------------------------------------------------------------------------------
/lib/noise_orbit/controller/noise_orbit_state.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_canvart/noise_orbit/model/color_palette.dart';
5 | import 'package:flutter_canvart/noise_orbit/model/polygone_type.dart';
6 | import 'package:flutter_canvart/noise_orbit/model/stroke_cap.dart';
7 |
8 | @immutable
9 | class NoiseOrbitState {
10 | const NoiseOrbitState({
11 | required this.radiusSizeFactor,
12 | required this.circleSpacingFactor,
13 | required this.frequency,
14 | required this.strokeWidth,
15 | required this.distortion,
16 | required this.width,
17 | required this.height,
18 | required this.polygonType,
19 | required this.pointMode,
20 | required this.colorPalette,
21 | required this.strokeCap,
22 | });
23 |
24 | factory NoiseOrbitState.initial({required ColorPalette colorPalette}) =>
25 | NoiseOrbitState(
26 | radiusSizeFactor: _initialRadiusSizeFactor,
27 | circleSpacingFactor: _initialCircleSpacingFactor,
28 | frequency: _initialFrequency,
29 | strokeWidth: _initialStrokeWidth,
30 | distortion: _initialDistortion,
31 | width: _initialWidth,
32 | height: _initialHeight,
33 | polygonType: _initialPolygoneType,
34 | pointMode: _initialPointMode,
35 | colorPalette: colorPalette,
36 | strokeCap: _initialStrokeCap,
37 | );
38 |
39 | static const _initialFrequency = .0007;
40 | static const _initialRadiusSizeFactor = .08;
41 | static const _initialCircleSpacingFactor = 10.0;
42 | static const _initialDistortion = 20.0;
43 | static const _initialStrokeWidth = 1.0;
44 | static const _initialWidth = .25;
45 | static const _initialHeight = .25;
46 | static const _initialPolygoneType = PolygoneType.cirlcle;
47 | static const _initialPointMode = PointMode.polygon;
48 | static const _initialStrokeCap = NoiseOrbitStrokeCap.square;
49 |
50 | final double frequency;
51 | final double radiusSizeFactor;
52 | final double circleSpacingFactor;
53 | final double strokeWidth;
54 | final double distortion;
55 | final double width;
56 | final double height;
57 | final PolygoneType polygonType;
58 | final PointMode pointMode;
59 | final ColorPalette colorPalette;
60 | final NoiseOrbitStrokeCap strokeCap;
61 |
62 | NoiseOrbitState copyWith({
63 | double? radiusSizeFactor,
64 | double? circleSpacingFactor,
65 | double? frequency,
66 | double? strokeWidth,
67 | double? distortion,
68 | double? width,
69 | double? height,
70 | PolygoneType? polygonType,
71 | PointMode? pointMode,
72 | ColorPalette? colorPalette,
73 | NoiseOrbitStrokeCap? strokeCap,
74 | }) =>
75 | NoiseOrbitState(
76 | radiusSizeFactor: radiusSizeFactor ?? this.radiusSizeFactor,
77 | circleSpacingFactor: circleSpacingFactor ?? this.circleSpacingFactor,
78 | frequency: frequency ?? this.frequency,
79 | strokeWidth: strokeWidth ?? this.strokeWidth,
80 | distortion: distortion ?? this.distortion,
81 | width: width ?? this.width,
82 | height: height ?? this.height,
83 | polygonType: polygonType ?? this.polygonType,
84 | pointMode: pointMode ?? this.pointMode,
85 | colorPalette: colorPalette ?? this.colorPalette,
86 | strokeCap: strokeCap ?? this.strokeCap,
87 | );
88 | }
89 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/lib/noise_orbit/painter/noise_orbit_painter.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:fast_noise/fast_noise.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter_canvart/noise_orbit/controller/noise_orbit_state.dart';
6 |
7 | class NoiseOrbitPainter extends CustomPainter {
8 | const NoiseOrbitPainter({
9 | required this.perlinNoise,
10 | required this.animation,
11 | required this.noiseOrbitState,
12 | });
13 |
14 | final PerlinNoise perlinNoise;
15 | final int animation;
16 | final NoiseOrbitState noiseOrbitState;
17 |
18 | @override
19 | void paint(Canvas canvas, Size size) {
20 | canvas.drawPaint(
21 | Paint()..color = noiseOrbitState.colorPalette.backgroundColor,
22 | );
23 | final points = >[];
24 | final radiusSize = size.width * noiseOrbitState.radiusSizeFactor;
25 |
26 | for (var radius = radiusSize;
27 | radius < size.width;
28 | radius += radiusSize / noiseOrbitState.circleSpacingFactor) {
29 | points.add(
30 | _getCirclesData(
31 | size: size,
32 | radius: radius,
33 | ),
34 | );
35 | }
36 |
37 | final center = _getCenter(originCircle: points.first);
38 |
39 | var i = 0;
40 |
41 | for (final circlePoints in points) {
42 | final paint = Paint()
43 | ..color = noiseOrbitState.colorPalette.colors[i]
44 | ..strokeCap = noiseOrbitState.strokeCap.value
45 | ..filterQuality = FilterQuality.high
46 | ..strokeWidth = noiseOrbitState.strokeWidth;
47 |
48 | final distoredPoints = _getDistordedPoints(
49 | amountToNudge: noiseOrbitState.distortion,
50 | origin: center,
51 | points: circlePoints,
52 | );
53 |
54 | canvas.drawPoints(noiseOrbitState.pointMode, distoredPoints, paint);
55 |
56 | if (i < noiseOrbitState.colorPalette.colors.length - 1) {
57 | i++;
58 | } else {
59 | i = 0;
60 | }
61 | }
62 | }
63 |
64 | List _getCirclesData({
65 | required Size size,
66 | required double radius,
67 | }) {
68 | final radiansPerStep = pi * 2 / noiseOrbitState.polygonType.value;
69 | final points = [];
70 |
71 | for (var theta = 0.0; theta <= pi * 2; theta += radiansPerStep) {
72 | final x = size.width / 2 + radius * noiseOrbitState.width * cos(theta);
73 | final y = size.height / 2 + radius * noiseOrbitState.height * sin(theta);
74 |
75 | points.add(Offset(x, y));
76 | }
77 |
78 | return points;
79 | }
80 |
81 | List _getDistordedPoints({
82 | required List points,
83 | required Offset origin,
84 | required double amountToNudge,
85 | }) {
86 | return points.map((point) {
87 | final x = point.dx;
88 | final y = point.dy;
89 | final distance = sqrt(pow(x - origin.dx, 2) + pow(y - origin.dy, 2));
90 |
91 | double noiseFn(double x, double y) {
92 | final noiseX = x + distance * 10;
93 | final noiseY = y + distance * 10;
94 | return perlinNoise.getPerlin3(
95 | noiseX,
96 | noiseY,
97 | animation.toDouble(),
98 | );
99 | }
100 |
101 | final theta = noiseFn(x, y) * pi * 2;
102 |
103 | final newX = x + (amountToNudge * cos(theta));
104 | final newY = y + (amountToNudge * sin(theta));
105 |
106 | return Offset(newX, newY);
107 | }).toList();
108 | }
109 |
110 | Offset _getCenter({required List originCircle}) {
111 | final x = originCircle.map((point) => point.dx).reduce((a, b) => a + b) /
112 | originCircle.length;
113 | final y = originCircle.map((point) => point.dy).reduce((a, b) => a + b) /
114 | originCircle.length;
115 |
116 | return Offset(x, y);
117 | }
118 |
119 | @override
120 | bool shouldRepaint(covariant NoiseOrbitPainter oldDelegate) {
121 | return oldDelegate.animation != animation;
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.8.2"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.2.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.3.1"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.16.0"
46 | cupertino_icons:
47 | dependency: "direct main"
48 | description:
49 | name: cupertino_icons
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.0.5"
53 | fake_async:
54 | dependency: transitive
55 | description:
56 | name: fake_async
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.3.0"
60 | fast_noise:
61 | dependency: "direct main"
62 | description:
63 | name: fast_noise
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.0.1"
67 | fixnum:
68 | dependency: transitive
69 | description:
70 | name: fixnum
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.0.1"
74 | flutter:
75 | dependency: "direct main"
76 | description: flutter
77 | source: sdk
78 | version: "0.0.0"
79 | flutter_test:
80 | dependency: "direct dev"
81 | description: flutter
82 | source: sdk
83 | version: "0.0.0"
84 | flutter_web_plugins:
85 | dependency: transitive
86 | description: flutter
87 | source: sdk
88 | version: "0.0.0"
89 | js:
90 | dependency: transitive
91 | description:
92 | name: js
93 | url: "https://pub.dartlang.org"
94 | source: hosted
95 | version: "0.6.4"
96 | lint:
97 | dependency: "direct dev"
98 | description:
99 | name: lint
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.10.0"
103 | matcher:
104 | dependency: transitive
105 | description:
106 | name: matcher
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "0.12.11"
110 | material_color_utilities:
111 | dependency: transitive
112 | description:
113 | name: material_color_utilities
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "0.1.4"
117 | meta:
118 | dependency: transitive
119 | description:
120 | name: meta
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.7.0"
124 | path:
125 | dependency: transitive
126 | description:
127 | name: path
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.8.1"
131 | plugin_platform_interface:
132 | dependency: transitive
133 | description:
134 | name: plugin_platform_interface
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "2.1.3"
138 | sky_engine:
139 | dependency: transitive
140 | description: flutter
141 | source: sdk
142 | version: "0.0.99"
143 | source_span:
144 | dependency: transitive
145 | description:
146 | name: source_span
147 | url: "https://pub.dartlang.org"
148 | source: hosted
149 | version: "1.8.2"
150 | stack_trace:
151 | dependency: transitive
152 | description:
153 | name: stack_trace
154 | url: "https://pub.dartlang.org"
155 | source: hosted
156 | version: "1.10.0"
157 | stream_channel:
158 | dependency: transitive
159 | description:
160 | name: stream_channel
161 | url: "https://pub.dartlang.org"
162 | source: hosted
163 | version: "2.1.0"
164 | string_scanner:
165 | dependency: transitive
166 | description:
167 | name: string_scanner
168 | url: "https://pub.dartlang.org"
169 | source: hosted
170 | version: "1.1.0"
171 | term_glyph:
172 | dependency: transitive
173 | description:
174 | name: term_glyph
175 | url: "https://pub.dartlang.org"
176 | source: hosted
177 | version: "1.2.0"
178 | test_api:
179 | dependency: transitive
180 | description:
181 | name: test_api
182 | url: "https://pub.dartlang.org"
183 | source: hosted
184 | version: "0.4.9"
185 | url_launcher:
186 | dependency: "direct main"
187 | description:
188 | name: url_launcher
189 | url: "https://pub.dartlang.org"
190 | source: hosted
191 | version: "6.1.5"
192 | url_launcher_android:
193 | dependency: transitive
194 | description:
195 | name: url_launcher_android
196 | url: "https://pub.dartlang.org"
197 | source: hosted
198 | version: "6.0.19"
199 | url_launcher_ios:
200 | dependency: transitive
201 | description:
202 | name: url_launcher_ios
203 | url: "https://pub.dartlang.org"
204 | source: hosted
205 | version: "6.0.17"
206 | url_launcher_linux:
207 | dependency: transitive
208 | description:
209 | name: url_launcher_linux
210 | url: "https://pub.dartlang.org"
211 | source: hosted
212 | version: "3.0.1"
213 | url_launcher_macos:
214 | dependency: transitive
215 | description:
216 | name: url_launcher_macos
217 | url: "https://pub.dartlang.org"
218 | source: hosted
219 | version: "3.0.1"
220 | url_launcher_platform_interface:
221 | dependency: transitive
222 | description:
223 | name: url_launcher_platform_interface
224 | url: "https://pub.dartlang.org"
225 | source: hosted
226 | version: "2.1.0"
227 | url_launcher_web:
228 | dependency: transitive
229 | description:
230 | name: url_launcher_web
231 | url: "https://pub.dartlang.org"
232 | source: hosted
233 | version: "2.0.13"
234 | url_launcher_windows:
235 | dependency: transitive
236 | description:
237 | name: url_launcher_windows
238 | url: "https://pub.dartlang.org"
239 | source: hosted
240 | version: "3.0.1"
241 | vector_math:
242 | dependency: transitive
243 | description:
244 | name: vector_math
245 | url: "https://pub.dartlang.org"
246 | source: hosted
247 | version: "2.1.2"
248 | sdks:
249 | dart: ">=2.17.6 <3.0.0"
250 | flutter: ">=2.10.0"
251 |
--------------------------------------------------------------------------------
/macos/Runner/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 51;
7 | objects = {
8 |
9 | /* Begin PBXAggregateTarget section */
10 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
11 | isa = PBXAggregateTarget;
12 | buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
13 | buildPhases = (
14 | 33CC111E2044C6BF0003C045 /* ShellScript */,
15 | );
16 | dependencies = (
17 | );
18 | name = "Flutter Assemble";
19 | productName = FLX;
20 | };
21 | /* End PBXAggregateTarget section */
22 |
23 | /* Begin PBXBuildFile section */
24 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
25 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
26 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
27 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
28 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
29 | 8B2607CFA548370EE3D6EE94 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 219DE481948BF4BE0E2D2978 /* Pods_Runner.framework */; };
30 | /* End PBXBuildFile section */
31 |
32 | /* Begin PBXContainerItemProxy section */
33 | 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
34 | isa = PBXContainerItemProxy;
35 | containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
36 | proxyType = 1;
37 | remoteGlobalIDString = 33CC111A2044C6BA0003C045;
38 | remoteInfo = FLX;
39 | };
40 | /* End PBXContainerItemProxy section */
41 |
42 | /* Begin PBXCopyFilesBuildPhase section */
43 | 33CC110E2044A8840003C045 /* Bundle Framework */ = {
44 | isa = PBXCopyFilesBuildPhase;
45 | buildActionMask = 2147483647;
46 | dstPath = "";
47 | dstSubfolderSpec = 10;
48 | files = (
49 | );
50 | name = "Bundle Framework";
51 | runOnlyForDeploymentPostprocessing = 0;
52 | };
53 | /* End PBXCopyFilesBuildPhase section */
54 |
55 | /* Begin PBXFileReference section */
56 | 0138CDF4DA4FF124292AEBCD /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
57 | 219DE481948BF4BE0E2D2978 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
58 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
59 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
60 | 33CC10ED2044A3C60003C045 /* flutter_canvart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flutter_canvart.app; sourceTree = BUILT_PRODUCTS_DIR; };
61 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
62 | 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
63 | 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
64 | 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; };
65 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; };
66 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; };
67 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; };
68 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; };
69 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
70 | 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
71 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
72 | 69A844A223326E44D2CC611F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
73 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
74 | 91418A70CA9C4B4B730E2DB5 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
76 | /* End PBXFileReference section */
77 |
78 | /* Begin PBXFrameworksBuildPhase section */
79 | 33CC10EA2044A3C60003C045 /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | 8B2607CFA548370EE3D6EE94 /* Pods_Runner.framework in Frameworks */,
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | /* End PBXFrameworksBuildPhase section */
88 |
89 | /* Begin PBXGroup section */
90 | 33BA886A226E78AF003329D5 /* Configs */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
94 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
95 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
96 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
97 | );
98 | path = Configs;
99 | sourceTree = "";
100 | };
101 | 33CC10E42044A3C60003C045 = {
102 | isa = PBXGroup;
103 | children = (
104 | 33FAB671232836740065AC1E /* Runner */,
105 | 33CEB47122A05771004F2AC0 /* Flutter */,
106 | 33CC10EE2044A3C60003C045 /* Products */,
107 | D73912EC22F37F3D000D13A0 /* Frameworks */,
108 | B7498908BE0FD8626004B9C5 /* Pods */,
109 | );
110 | sourceTree = "";
111 | };
112 | 33CC10EE2044A3C60003C045 /* Products */ = {
113 | isa = PBXGroup;
114 | children = (
115 | 33CC10ED2044A3C60003C045 /* flutter_canvart.app */,
116 | );
117 | name = Products;
118 | sourceTree = "";
119 | };
120 | 33CC11242044D66E0003C045 /* Resources */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 33CC10F22044A3C60003C045 /* Assets.xcassets */,
124 | 33CC10F42044A3C60003C045 /* MainMenu.xib */,
125 | 33CC10F72044A3C60003C045 /* Info.plist */,
126 | );
127 | name = Resources;
128 | path = ..;
129 | sourceTree = "";
130 | };
131 | 33CEB47122A05771004F2AC0 /* Flutter */ = {
132 | isa = PBXGroup;
133 | children = (
134 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
135 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
136 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
137 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
138 | );
139 | path = Flutter;
140 | sourceTree = "";
141 | };
142 | 33FAB671232836740065AC1E /* Runner */ = {
143 | isa = PBXGroup;
144 | children = (
145 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
146 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
147 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
148 | 33E51914231749380026EE4D /* Release.entitlements */,
149 | 33CC11242044D66E0003C045 /* Resources */,
150 | 33BA886A226E78AF003329D5 /* Configs */,
151 | );
152 | path = Runner;
153 | sourceTree = "";
154 | };
155 | B7498908BE0FD8626004B9C5 /* Pods */ = {
156 | isa = PBXGroup;
157 | children = (
158 | 69A844A223326E44D2CC611F /* Pods-Runner.debug.xcconfig */,
159 | 91418A70CA9C4B4B730E2DB5 /* Pods-Runner.release.xcconfig */,
160 | 0138CDF4DA4FF124292AEBCD /* Pods-Runner.profile.xcconfig */,
161 | );
162 | name = Pods;
163 | path = Pods;
164 | sourceTree = "";
165 | };
166 | D73912EC22F37F3D000D13A0 /* Frameworks */ = {
167 | isa = PBXGroup;
168 | children = (
169 | 219DE481948BF4BE0E2D2978 /* Pods_Runner.framework */,
170 | );
171 | name = Frameworks;
172 | sourceTree = "";
173 | };
174 | /* End PBXGroup section */
175 |
176 | /* Begin PBXNativeTarget section */
177 | 33CC10EC2044A3C60003C045 /* Runner */ = {
178 | isa = PBXNativeTarget;
179 | buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
180 | buildPhases = (
181 | 22640E5EE657FC9027C95589 /* [CP] Check Pods Manifest.lock */,
182 | 33CC10E92044A3C60003C045 /* Sources */,
183 | 33CC10EA2044A3C60003C045 /* Frameworks */,
184 | 33CC10EB2044A3C60003C045 /* Resources */,
185 | 33CC110E2044A8840003C045 /* Bundle Framework */,
186 | 3399D490228B24CF009A79C7 /* ShellScript */,
187 | C10A2229BE391F59B774B270 /* [CP] Embed Pods Frameworks */,
188 | );
189 | buildRules = (
190 | );
191 | dependencies = (
192 | 33CC11202044C79F0003C045 /* PBXTargetDependency */,
193 | );
194 | name = Runner;
195 | productName = Runner;
196 | productReference = 33CC10ED2044A3C60003C045 /* flutter_canvart.app */;
197 | productType = "com.apple.product-type.application";
198 | };
199 | /* End PBXNativeTarget section */
200 |
201 | /* Begin PBXProject section */
202 | 33CC10E52044A3C60003C045 /* Project object */ = {
203 | isa = PBXProject;
204 | attributes = {
205 | LastSwiftUpdateCheck = 0920;
206 | LastUpgradeCheck = 1300;
207 | ORGANIZATIONNAME = "";
208 | TargetAttributes = {
209 | 33CC10EC2044A3C60003C045 = {
210 | CreatedOnToolsVersion = 9.2;
211 | LastSwiftMigration = 1100;
212 | ProvisioningStyle = Automatic;
213 | SystemCapabilities = {
214 | com.apple.Sandbox = {
215 | enabled = 1;
216 | };
217 | };
218 | };
219 | 33CC111A2044C6BA0003C045 = {
220 | CreatedOnToolsVersion = 9.2;
221 | ProvisioningStyle = Manual;
222 | };
223 | };
224 | };
225 | buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
226 | compatibilityVersion = "Xcode 9.3";
227 | developmentRegion = en;
228 | hasScannedForEncodings = 0;
229 | knownRegions = (
230 | en,
231 | Base,
232 | );
233 | mainGroup = 33CC10E42044A3C60003C045;
234 | productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
235 | projectDirPath = "";
236 | projectRoot = "";
237 | targets = (
238 | 33CC10EC2044A3C60003C045 /* Runner */,
239 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
240 | );
241 | };
242 | /* End PBXProject section */
243 |
244 | /* Begin PBXResourcesBuildPhase section */
245 | 33CC10EB2044A3C60003C045 /* Resources */ = {
246 | isa = PBXResourcesBuildPhase;
247 | buildActionMask = 2147483647;
248 | files = (
249 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
250 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
251 | );
252 | runOnlyForDeploymentPostprocessing = 0;
253 | };
254 | /* End PBXResourcesBuildPhase section */
255 |
256 | /* Begin PBXShellScriptBuildPhase section */
257 | 22640E5EE657FC9027C95589 /* [CP] Check Pods Manifest.lock */ = {
258 | isa = PBXShellScriptBuildPhase;
259 | buildActionMask = 2147483647;
260 | files = (
261 | );
262 | inputFileListPaths = (
263 | );
264 | inputPaths = (
265 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
266 | "${PODS_ROOT}/Manifest.lock",
267 | );
268 | name = "[CP] Check Pods Manifest.lock";
269 | outputFileListPaths = (
270 | );
271 | outputPaths = (
272 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
273 | );
274 | runOnlyForDeploymentPostprocessing = 0;
275 | shellPath = /bin/sh;
276 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
277 | showEnvVarsInLog = 0;
278 | };
279 | 3399D490228B24CF009A79C7 /* ShellScript */ = {
280 | isa = PBXShellScriptBuildPhase;
281 | buildActionMask = 2147483647;
282 | files = (
283 | );
284 | inputFileListPaths = (
285 | );
286 | inputPaths = (
287 | );
288 | outputFileListPaths = (
289 | );
290 | outputPaths = (
291 | );
292 | runOnlyForDeploymentPostprocessing = 0;
293 | shellPath = /bin/sh;
294 | shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
295 | };
296 | 33CC111E2044C6BF0003C045 /* ShellScript */ = {
297 | isa = PBXShellScriptBuildPhase;
298 | buildActionMask = 2147483647;
299 | files = (
300 | );
301 | inputFileListPaths = (
302 | Flutter/ephemeral/FlutterInputs.xcfilelist,
303 | );
304 | inputPaths = (
305 | Flutter/ephemeral/tripwire,
306 | );
307 | outputFileListPaths = (
308 | Flutter/ephemeral/FlutterOutputs.xcfilelist,
309 | );
310 | outputPaths = (
311 | );
312 | runOnlyForDeploymentPostprocessing = 0;
313 | shellPath = /bin/sh;
314 | shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
315 | };
316 | C10A2229BE391F59B774B270 /* [CP] Embed Pods Frameworks */ = {
317 | isa = PBXShellScriptBuildPhase;
318 | buildActionMask = 2147483647;
319 | files = (
320 | );
321 | inputFileListPaths = (
322 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
323 | );
324 | name = "[CP] Embed Pods Frameworks";
325 | outputFileListPaths = (
326 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
327 | );
328 | runOnlyForDeploymentPostprocessing = 0;
329 | shellPath = /bin/sh;
330 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
331 | showEnvVarsInLog = 0;
332 | };
333 | /* End PBXShellScriptBuildPhase section */
334 |
335 | /* Begin PBXSourcesBuildPhase section */
336 | 33CC10E92044A3C60003C045 /* Sources */ = {
337 | isa = PBXSourcesBuildPhase;
338 | buildActionMask = 2147483647;
339 | files = (
340 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
341 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
342 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
343 | );
344 | runOnlyForDeploymentPostprocessing = 0;
345 | };
346 | /* End PBXSourcesBuildPhase section */
347 |
348 | /* Begin PBXTargetDependency section */
349 | 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
350 | isa = PBXTargetDependency;
351 | target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
352 | targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
353 | };
354 | /* End PBXTargetDependency section */
355 |
356 | /* Begin PBXVariantGroup section */
357 | 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
358 | isa = PBXVariantGroup;
359 | children = (
360 | 33CC10F52044A3C60003C045 /* Base */,
361 | );
362 | name = MainMenu.xib;
363 | path = Runner;
364 | sourceTree = "";
365 | };
366 | /* End PBXVariantGroup section */
367 |
368 | /* Begin XCBuildConfiguration section */
369 | 338D0CE9231458BD00FA5F75 /* Profile */ = {
370 | isa = XCBuildConfiguration;
371 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
372 | buildSettings = {
373 | ALWAYS_SEARCH_USER_PATHS = NO;
374 | CLANG_ANALYZER_NONNULL = YES;
375 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
376 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
377 | CLANG_CXX_LIBRARY = "libc++";
378 | CLANG_ENABLE_MODULES = YES;
379 | CLANG_ENABLE_OBJC_ARC = YES;
380 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
381 | CLANG_WARN_BOOL_CONVERSION = YES;
382 | CLANG_WARN_CONSTANT_CONVERSION = YES;
383 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
384 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
385 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
386 | CLANG_WARN_EMPTY_BODY = YES;
387 | CLANG_WARN_ENUM_CONVERSION = YES;
388 | CLANG_WARN_INFINITE_RECURSION = YES;
389 | CLANG_WARN_INT_CONVERSION = YES;
390 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
391 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
392 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
393 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
394 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
395 | CODE_SIGN_IDENTITY = "-";
396 | COPY_PHASE_STRIP = NO;
397 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
398 | ENABLE_NS_ASSERTIONS = NO;
399 | ENABLE_STRICT_OBJC_MSGSEND = YES;
400 | GCC_C_LANGUAGE_STANDARD = gnu11;
401 | GCC_NO_COMMON_BLOCKS = YES;
402 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
403 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
404 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
405 | GCC_WARN_UNUSED_FUNCTION = YES;
406 | GCC_WARN_UNUSED_VARIABLE = YES;
407 | MACOSX_DEPLOYMENT_TARGET = 10.11;
408 | MTL_ENABLE_DEBUG_INFO = NO;
409 | SDKROOT = macosx;
410 | SWIFT_COMPILATION_MODE = wholemodule;
411 | SWIFT_OPTIMIZATION_LEVEL = "-O";
412 | };
413 | name = Profile;
414 | };
415 | 338D0CEA231458BD00FA5F75 /* Profile */ = {
416 | isa = XCBuildConfiguration;
417 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
418 | buildSettings = {
419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
420 | CLANG_ENABLE_MODULES = YES;
421 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
422 | CODE_SIGN_STYLE = Automatic;
423 | COMBINE_HIDPI_IMAGES = YES;
424 | INFOPLIST_FILE = Runner/Info.plist;
425 | LD_RUNPATH_SEARCH_PATHS = (
426 | "$(inherited)",
427 | "@executable_path/../Frameworks",
428 | );
429 | PROVISIONING_PROFILE_SPECIFIER = "";
430 | SWIFT_VERSION = 5.0;
431 | };
432 | name = Profile;
433 | };
434 | 338D0CEB231458BD00FA5F75 /* Profile */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | CODE_SIGN_STYLE = Manual;
438 | PRODUCT_NAME = "$(TARGET_NAME)";
439 | };
440 | name = Profile;
441 | };
442 | 33CC10F92044A3C60003C045 /* Debug */ = {
443 | isa = XCBuildConfiguration;
444 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
445 | buildSettings = {
446 | ALWAYS_SEARCH_USER_PATHS = NO;
447 | CLANG_ANALYZER_NONNULL = YES;
448 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
449 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
450 | CLANG_CXX_LIBRARY = "libc++";
451 | CLANG_ENABLE_MODULES = YES;
452 | CLANG_ENABLE_OBJC_ARC = YES;
453 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
454 | CLANG_WARN_BOOL_CONVERSION = YES;
455 | CLANG_WARN_CONSTANT_CONVERSION = YES;
456 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
457 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
458 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
459 | CLANG_WARN_EMPTY_BODY = YES;
460 | CLANG_WARN_ENUM_CONVERSION = YES;
461 | CLANG_WARN_INFINITE_RECURSION = YES;
462 | CLANG_WARN_INT_CONVERSION = YES;
463 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
464 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
465 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
466 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
467 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
468 | CODE_SIGN_IDENTITY = "-";
469 | COPY_PHASE_STRIP = NO;
470 | DEBUG_INFORMATION_FORMAT = dwarf;
471 | ENABLE_STRICT_OBJC_MSGSEND = YES;
472 | ENABLE_TESTABILITY = YES;
473 | GCC_C_LANGUAGE_STANDARD = gnu11;
474 | GCC_DYNAMIC_NO_PIC = NO;
475 | GCC_NO_COMMON_BLOCKS = YES;
476 | GCC_OPTIMIZATION_LEVEL = 0;
477 | GCC_PREPROCESSOR_DEFINITIONS = (
478 | "DEBUG=1",
479 | "$(inherited)",
480 | );
481 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
482 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
483 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
484 | GCC_WARN_UNUSED_FUNCTION = YES;
485 | GCC_WARN_UNUSED_VARIABLE = YES;
486 | MACOSX_DEPLOYMENT_TARGET = 10.11;
487 | MTL_ENABLE_DEBUG_INFO = YES;
488 | ONLY_ACTIVE_ARCH = YES;
489 | SDKROOT = macosx;
490 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
491 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
492 | };
493 | name = Debug;
494 | };
495 | 33CC10FA2044A3C60003C045 /* Release */ = {
496 | isa = XCBuildConfiguration;
497 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
498 | buildSettings = {
499 | ALWAYS_SEARCH_USER_PATHS = NO;
500 | CLANG_ANALYZER_NONNULL = YES;
501 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
502 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
503 | CLANG_CXX_LIBRARY = "libc++";
504 | CLANG_ENABLE_MODULES = YES;
505 | CLANG_ENABLE_OBJC_ARC = YES;
506 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
507 | CLANG_WARN_BOOL_CONVERSION = YES;
508 | CLANG_WARN_CONSTANT_CONVERSION = YES;
509 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
510 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
511 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
512 | CLANG_WARN_EMPTY_BODY = YES;
513 | CLANG_WARN_ENUM_CONVERSION = YES;
514 | CLANG_WARN_INFINITE_RECURSION = YES;
515 | CLANG_WARN_INT_CONVERSION = YES;
516 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
517 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
518 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
519 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
520 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
521 | CODE_SIGN_IDENTITY = "-";
522 | COPY_PHASE_STRIP = NO;
523 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
524 | ENABLE_NS_ASSERTIONS = NO;
525 | ENABLE_STRICT_OBJC_MSGSEND = YES;
526 | GCC_C_LANGUAGE_STANDARD = gnu11;
527 | GCC_NO_COMMON_BLOCKS = YES;
528 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
529 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
530 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
531 | GCC_WARN_UNUSED_FUNCTION = YES;
532 | GCC_WARN_UNUSED_VARIABLE = YES;
533 | MACOSX_DEPLOYMENT_TARGET = 10.11;
534 | MTL_ENABLE_DEBUG_INFO = NO;
535 | SDKROOT = macosx;
536 | SWIFT_COMPILATION_MODE = wholemodule;
537 | SWIFT_OPTIMIZATION_LEVEL = "-O";
538 | };
539 | name = Release;
540 | };
541 | 33CC10FC2044A3C60003C045 /* Debug */ = {
542 | isa = XCBuildConfiguration;
543 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
544 | buildSettings = {
545 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
546 | CLANG_ENABLE_MODULES = YES;
547 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
548 | CODE_SIGN_STYLE = Automatic;
549 | COMBINE_HIDPI_IMAGES = YES;
550 | INFOPLIST_FILE = Runner/Info.plist;
551 | LD_RUNPATH_SEARCH_PATHS = (
552 | "$(inherited)",
553 | "@executable_path/../Frameworks",
554 | );
555 | PROVISIONING_PROFILE_SPECIFIER = "";
556 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
557 | SWIFT_VERSION = 5.0;
558 | };
559 | name = Debug;
560 | };
561 | 33CC10FD2044A3C60003C045 /* Release */ = {
562 | isa = XCBuildConfiguration;
563 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
564 | buildSettings = {
565 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
566 | CLANG_ENABLE_MODULES = YES;
567 | CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
568 | CODE_SIGN_STYLE = Automatic;
569 | COMBINE_HIDPI_IMAGES = YES;
570 | INFOPLIST_FILE = Runner/Info.plist;
571 | LD_RUNPATH_SEARCH_PATHS = (
572 | "$(inherited)",
573 | "@executable_path/../Frameworks",
574 | );
575 | PROVISIONING_PROFILE_SPECIFIER = "";
576 | SWIFT_VERSION = 5.0;
577 | };
578 | name = Release;
579 | };
580 | 33CC111C2044C6BA0003C045 /* Debug */ = {
581 | isa = XCBuildConfiguration;
582 | buildSettings = {
583 | CODE_SIGN_STYLE = Manual;
584 | PRODUCT_NAME = "$(TARGET_NAME)";
585 | };
586 | name = Debug;
587 | };
588 | 33CC111D2044C6BA0003C045 /* Release */ = {
589 | isa = XCBuildConfiguration;
590 | buildSettings = {
591 | CODE_SIGN_STYLE = Automatic;
592 | PRODUCT_NAME = "$(TARGET_NAME)";
593 | };
594 | name = Release;
595 | };
596 | /* End XCBuildConfiguration section */
597 |
598 | /* Begin XCConfigurationList section */
599 | 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
600 | isa = XCConfigurationList;
601 | buildConfigurations = (
602 | 33CC10F92044A3C60003C045 /* Debug */,
603 | 33CC10FA2044A3C60003C045 /* Release */,
604 | 338D0CE9231458BD00FA5F75 /* Profile */,
605 | );
606 | defaultConfigurationIsVisible = 0;
607 | defaultConfigurationName = Release;
608 | };
609 | 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
610 | isa = XCConfigurationList;
611 | buildConfigurations = (
612 | 33CC10FC2044A3C60003C045 /* Debug */,
613 | 33CC10FD2044A3C60003C045 /* Release */,
614 | 338D0CEA231458BD00FA5F75 /* Profile */,
615 | );
616 | defaultConfigurationIsVisible = 0;
617 | defaultConfigurationName = Release;
618 | };
619 | 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
620 | isa = XCConfigurationList;
621 | buildConfigurations = (
622 | 33CC111C2044C6BA0003C045 /* Debug */,
623 | 33CC111D2044C6BA0003C045 /* Release */,
624 | 338D0CEB231458BD00FA5F75 /* Profile */,
625 | );
626 | defaultConfigurationIsVisible = 0;
627 | defaultConfigurationName = Release;
628 | };
629 | /* End XCConfigurationList section */
630 | };
631 | rootObject = 33CC10E52044A3C60003C045 /* Project object */;
632 | }
633 |
--------------------------------------------------------------------------------