renaming to Thermion
4
examples/flutter/example/.fvm/fvm_config.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"flutterSdkVersion": "3.16.0-0.2.pre",
|
||||
"flavors": {}
|
||||
}
|
||||
30
examples/flutter/example/.gitattributes
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
assets/lit_opaque_43.uberz filter=lfs diff=lfs merge=lfs -text
|
||||
assets/BusterDrone filter=lfs diff=lfs merge=lfs -text
|
||||
assets/FlightHelmet filter=lfs diff=lfs merge=lfs -text
|
||||
assets/lit_opaque_32.uberz filter=lfs diff=lfs merge=lfs -text
|
||||
windows/lib/**/*.* filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/12_Settonemappingtolinear.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/3_loadIBL.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/6_zoomin.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/13_Movecameratoasset.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/14_movecamerato.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/7_rotate.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/9_transformtounitcube.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/0_fresh.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/10_setshapespositionto.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/2_loadskybox.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/4_Renderingfalse.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/8_pan.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/11_Disablefrustumculling.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/15_setcameratofirstcamerainshapesGLB.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/1_createviewerdefaultubershader.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/5_loadshapesGLB.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/16_resize.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/3_loadskybox.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/4_loadIBL.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/19_resize.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/17_resize.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/2_Renderingfalse.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/18_resize.png filter=lfs diff=lfs merge=lfs -text
|
||||
integration_test/goldens/ios/diffs filter=lfs diff=lfs merge=lfs -text
|
||||
50
examples/flutter/example/.gitignore
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
|
||||
/android/.cxx/**/*
|
||||
|
||||
# fvm
|
||||
.fvm/flutter_sdk
|
||||
30
examples/flutter/example/.metadata
Normal file
@@ -0,0 +1,30 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "12d54de962782853206992fedce29723fcb4a95b"
|
||||
channel: "master"
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: 12d54de962782853206992fedce29723fcb4a95b
|
||||
base_revision: 12d54de962782853206992fedce29723fcb4a95b
|
||||
- platform: macos
|
||||
create_revision: 12d54de962782853206992fedce29723fcb4a95b
|
||||
base_revision: 12d54de962782853206992fedce29723fcb4a95b
|
||||
|
||||
# User provided section
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
||||
21
examples/flutter/example/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# thermion_flutter_example
|
||||
|
||||
Demonstrates how to use the thermion_flutter plugin.
|
||||
|
||||
## Linux
|
||||
|
||||
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/lib64/pkgconfig/
|
||||
export CPLUS_INCLUDE_PATH=/usr/include/gtk-3.0/:/usr/include/pango-1.0/:/usr/include/harfbuzz:/usr/include/cairo/:/usr/include/gdk-pixbuf-2.0/:/usr/include/atk-1.0/
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
|
||||
|
||||
For help getting started with Flutter, view our
|
||||
[online documentation](https://flutter.dev/docs), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
29
examples/flutter/example/analysis_options.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at
|
||||
# https://dart-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
13
examples/flutter/example/android/.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
51
examples/flutter/example/android/app/build.gradle
Normal file
@@ -0,0 +1,51 @@
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "app.polyvox.example"
|
||||
compileSdkVersion 34
|
||||
ndkVersion "25.2.9519653"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "app.polyvox.example"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdk = 30
|
||||
targetSdk = 31
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig = signingConfigs.debug
|
||||
shrinkResources false
|
||||
minifyEnabled false
|
||||
}
|
||||
debug {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'net.java.dev.jna:jna:5.10.0@aar'
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@@ -0,0 +1,45 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="example"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
<!-- Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
@@ -0,0 +1,5 @@
|
||||
package app.polyvox.example
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity()
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
|
After Width: | Height: | Size: 544 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
18
examples/flutter/example/android/build.gradle
Normal file
@@ -0,0 +1,18 @@
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = "../build"
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
3
examples/flutter/example/android/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
5
examples/flutter/example/android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
|
||||
25
examples/flutter/example/android/settings.gradle
Normal file
@@ -0,0 +1,25 @@
|
||||
pluginManagement {
|
||||
def flutterSdkPath = {
|
||||
def properties = new Properties()
|
||||
file("local.properties").withInputStream { properties.load(it) }
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
return flutterSdkPath
|
||||
}()
|
||||
|
||||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "7.3.0" apply false
|
||||
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
1
examples/flutter/example/assets
Symbolic link
@@ -0,0 +1 @@
|
||||
../../assets
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ec2a9627f23ffe07750323c25afa78c6c7fcb7d26b5ed36d119363ced0b60f29
|
||||
size 258304
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:53256c9443c6d36edfb8c1234711173c847126e888d714151ae026c57495fe6b
|
||||
size 1875814
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b0c715cadbf84c2161099e8373a404c7d6dbb093faf4157aa0e0aa3825c28217
|
||||
size 1868778
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:56a431b561db7038ad7fe92d025fc2fe2806dfa2cf68c29a0380c3cbd2b66fb5
|
||||
size 1742539
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:14193a392baf348f77895ca7bfb8cee160407c762d03c01bf1f7b5b771a9b1ab
|
||||
size 2282401
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:77badd0b2a59122949e497297052064c403006272daa4488db43e492d60093e2
|
||||
size 1959141
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bdf63e19e5a992f2c848cf71b55ceddf8930d6a9368c9b3adcc13e7c478c7146
|
||||
size 1889777
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:651c19434ae3753488eb840695955b98db9d66a20b79bee1e21b3384c2358025
|
||||
size 1609541
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f11462c0fdf30d101b6ed6c430734adcf6451818f3c7824126c8423014836773
|
||||
size 2060944
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:beb941d33777ad2e1d6ef3704ba6a63b3a5608ca885a516a1c9e807a31b533fc
|
||||
size 1608407
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2bcae11fd2eb593c419a62731e1799f7340408b28ad56575fab5f79db608ae17
|
||||
size 2062339
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dc3b3c5e0678a5b71728cea8961925e6c0fb44a59340aa2d77d4ea92a24cc7d6
|
||||
size 316763
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6dbbb518a86c546f188134c1d369762664f188dd6b9a38ec13963b6187cb4b25
|
||||
size 1456648
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2d7951418e5875da7c7ed8dea482dbf1cbe81a42b47d255db7f1b6e11c16a193
|
||||
size 1876507
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80cd11f5be75012cfdf953569e409a355826ca23af35feba41aac78f0e3d35d8
|
||||
size 1874857
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e605bb18426ea657b9352ecca51f0b55daac904b15dba3afdcffc412a445548a
|
||||
size 1941423
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c026e8723922a6c56ab8e28f99a29805c53627ff5a659971590c95d89d7ac6bd
|
||||
size 1940845
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fffa285edd2c5474e16475cafc67d2519e000b74178ce1a0f8d88229827cfabf
|
||||
size 1937116
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1db7a2f831d83e75e42dfe4f0547e9ed1f171152f45103e8f250d2b52ee3a8e1
|
||||
size 1937776
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:00c70e7e77b98e4e72d0dde82482066096ebd502d25cccfada9cb87de332ecac
|
||||
size 1941844
|
||||
@@ -0,0 +1,190 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:thermion_flutter/filament/widgets/filament_widget.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:integration_test/integration_test.dart';
|
||||
import '../lib/main.dart' as app;
|
||||
|
||||
void main() {
|
||||
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized()
|
||||
as IntegrationTestWidgetsFlutterBinding;
|
||||
|
||||
late String platformIdentifier;
|
||||
if (Platform.isIOS) {
|
||||
platformIdentifier = "ios";
|
||||
} else if (Platform.isAndroid) {
|
||||
platformIdentifier = "android";
|
||||
} else if (Platform.isMacOS) {
|
||||
platformIdentifier = "macos";
|
||||
} else if (Platform.isWindows) {
|
||||
platformIdentifier = "windows";
|
||||
} else if (Platform.isLinux) {
|
||||
platformIdentifier = "linux";
|
||||
} else {
|
||||
throw Exception("Unexpected platform");
|
||||
}
|
||||
|
||||
int _counter = 0;
|
||||
|
||||
Future _snapshot(WidgetTester tester, String label, [int seconds = 0]) async {
|
||||
await tester.pumpAndSettle(Duration(milliseconds: 16));
|
||||
for (int i = 0; i < seconds; i++) {
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
await tester.pumpAndSettle(Duration(milliseconds: 16));
|
||||
}
|
||||
await tester.pumpAndSettle(Duration(milliseconds: 16));
|
||||
var screenshotPath = '$platformIdentifier/${_counter}_$label';
|
||||
if (Platform.isIOS) {
|
||||
// this is currently hanging on Android
|
||||
// see https://github.com/flutter/flutter/issues/127306
|
||||
// it is also not yet implemented on Windows or MacOS
|
||||
await binding.convertFlutterSurfaceToImage();
|
||||
final bytes = await binding.takeScreenshot(screenshotPath);
|
||||
}
|
||||
_counter++;
|
||||
}
|
||||
|
||||
Future tap(WidgetTester tester, String label, [int seconds = 0]) async {
|
||||
var target = find.text(label, skipOffstage: false);
|
||||
|
||||
if (!target.hasFound) {
|
||||
print("Couldn't find target, waiting 100ms");
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
target = find.text(label);
|
||||
}
|
||||
|
||||
await tester.tap(target.first);
|
||||
await _snapshot(tester, label.replaceAll(RegExp("[ -:]"), ""), seconds);
|
||||
}
|
||||
|
||||
Future<void> pumpUntilFound(
|
||||
WidgetTester tester,
|
||||
Finder finder, {
|
||||
Duration timeout = const Duration(seconds: 30),
|
||||
}) async {
|
||||
bool timerDone = false;
|
||||
final timer = Timer(
|
||||
timeout, () => throw TimeoutException("Pump until has timed out"));
|
||||
while (timerDone != true) {
|
||||
await tester.pump();
|
||||
|
||||
final found = tester.any(finder);
|
||||
if (found) {
|
||||
timerDone = true;
|
||||
}
|
||||
}
|
||||
timer.cancel();
|
||||
}
|
||||
|
||||
testWidgets('test', (WidgetTester tester) async {
|
||||
app.main();
|
||||
await pumpUntilFound(tester, find.byType(app.ExampleWidget));
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await _snapshot(tester, "fresh");
|
||||
|
||||
await tap(tester, "Controller / Viewer");
|
||||
await tap(tester, "Create ThermionFlutterPlugin (default ubershader)");
|
||||
await tap(tester, "Controller / Viewer");
|
||||
await tap(tester, "Create FilamentViewer",
|
||||
4); // on older devices this may take a while, so let's insert a length delay
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Rendering");
|
||||
await tap(tester, "Set continuous rendering to true");
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Assets");
|
||||
await tap(tester, "Shapes");
|
||||
await tap(tester, "Load GLB");
|
||||
|
||||
await tester.pump();
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Assets");
|
||||
await tap(tester, "Load skybox", 1);
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Assets");
|
||||
await tap(tester, "Load IBL", 1);
|
||||
|
||||
final Offset pointerLocation =
|
||||
tester.getCenter(find.byType(FilamentWidget));
|
||||
TestPointer testPointer = TestPointer(1, PointerDeviceKind.mouse);
|
||||
|
||||
// scroll/zoom
|
||||
testPointer.hover(pointerLocation);
|
||||
await tester.sendEventToBinding(testPointer.scroll(const Offset(0.0, 1.0)));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.sendEventToBinding(testPointer.scroll(const Offset(0.0, 1.0)));
|
||||
await tester.pumpAndSettle();
|
||||
await _snapshot(tester, "zoomin");
|
||||
|
||||
// rotate
|
||||
testPointer =
|
||||
TestPointer(1, PointerDeviceKind.mouse, null, kTertiaryButton);
|
||||
testPointer.hover(pointerLocation);
|
||||
await tester.sendEventToBinding(testPointer.down(pointerLocation));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.sendEventToBinding(
|
||||
testPointer.move(pointerLocation + Offset(10.0, 10.0)));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.sendEventToBinding(
|
||||
testPointer.move(pointerLocation + Offset(20.0, 20.0)));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.sendEventToBinding(testPointer.up());
|
||||
|
||||
await _snapshot(tester, "rotate", 2);
|
||||
|
||||
// pan
|
||||
testPointer = TestPointer(1, PointerDeviceKind.mouse, null, kPrimaryButton);
|
||||
testPointer.hover(pointerLocation);
|
||||
await tester.sendEventToBinding(testPointer.down(pointerLocation));
|
||||
await tester
|
||||
.sendEventToBinding(testPointer.move(pointerLocation + Offset(0, 1.0)));
|
||||
|
||||
for (int i = 0; i < 60; i++) {
|
||||
await tester.sendEventToBinding(testPointer
|
||||
.move(pointerLocation + Offset(i.toDouble() * 2, i.toDouble() * 2)));
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
await tester.sendEventToBinding(testPointer.up());
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await _snapshot(tester, "pan");
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Assets");
|
||||
await tap(tester, "Shapes");
|
||||
await tap(tester, "Transform to unit cube");
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Assets");
|
||||
await tap(tester, "Shapes");
|
||||
await tap(tester, "Set position to 1, 1, -1");
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Camera");
|
||||
await tap(tester, "Disable frustum culling");
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Rendering");
|
||||
await tap(tester, "Set tone mapping to linear");
|
||||
|
||||
await tap(tester, "Scene");
|
||||
await tap(tester, "Camera");
|
||||
await tap(tester, 'Set to first camera in last added asset');
|
||||
|
||||
await tap(tester, "Move to last added asset");
|
||||
await tap(tester, "Move to 1, 1, -1");
|
||||
|
||||
await tap(tester, 'Toggle viewport size', 1);
|
||||
await tap(tester, 'Toggle viewport size', 1);
|
||||
await tap(tester, 'Toggle viewport size', 1);
|
||||
});
|
||||
}
|
||||
34
examples/flutter/example/ios/.gitignore
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
||||
26
examples/flutter/example/ios/Flutter/AppFrameworkInfo.plist
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>12.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
2
examples/flutter/example/ios/Flutter/Debug.xcconfig
Normal file
@@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
2
examples/flutter/example/ios/Flutter/Release.xcconfig
Normal file
@@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
44
examples/flutter/example/ios/Podfile
Normal file
@@ -0,0 +1,44 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
platform :ios, '13.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
use_modular_headers!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
target 'RunnerTests' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
end
|
||||
end
|
||||
35
examples/flutter/example/ios/Podfile.lock
Normal file
@@ -0,0 +1,35 @@
|
||||
PODS:
|
||||
- Flutter (1.0.0)
|
||||
- integration_test (0.0.1):
|
||||
- Flutter
|
||||
- path_provider_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- thermion_flutter (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- integration_test (from `.symlinks/plugins/integration_test/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- thermion_flutter (from `.symlinks/plugins/thermion_flutter/ios`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
integration_test:
|
||||
:path: ".symlinks/plugins/integration_test/ios"
|
||||
path_provider_foundation:
|
||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
thermion_flutter:
|
||||
:path: ".symlinks/plugins/thermion_flutter/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
thermion_flutter: dd8d01cb3b3e6e9a612f5a1061a96be1e1c2f659
|
||||
|
||||
PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
730
examples/flutter/example/ios/Runner.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,730 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
18BA9BAB0A3151C581637BC5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 913673949B5C862688BEB411 /* Pods_Runner.framework */; };
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
44B597F813CB15F7F7362D7F /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E559449EFA9688E4362535A /* Pods_RunnerTests.framework */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
||||
remoteInfo = Runner;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
24862DEBD358E9187AF1957F /* 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 = "<group>"; };
|
||||
28E01474E257DCB9E5A9F16D /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
34F6152C42E578942239D66E /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
3E559449EFA9688E4362535A /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
71B8727E9D9717E2EC7D0632 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
913673949B5C862688BEB411 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
C4E435CCE2B189B896F861F8 /* 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 = "<group>"; };
|
||||
FA604CE866685A80B2F7D1EA /* 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 = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
18BA9BAB0A3151C581637BC5 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
E5F93109740F1CF8EAB7C740 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
44B597F813CB15F7F7362D7F /* Pods_RunnerTests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||
);
|
||||
path = RunnerTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3762816736B339B0521FA963 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA604CE866685A80B2F7D1EA /* Pods-Runner.debug.xcconfig */,
|
||||
C4E435CCE2B189B896F861F8 /* Pods-Runner.release.xcconfig */,
|
||||
24862DEBD358E9187AF1957F /* Pods-Runner.profile.xcconfig */,
|
||||
34F6152C42E578942239D66E /* Pods-RunnerTests.debug.xcconfig */,
|
||||
28E01474E257DCB9E5A9F16D /* Pods-RunnerTests.release.xcconfig */,
|
||||
71B8727E9D9717E2EC7D0632 /* Pods-RunnerTests.profile.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
3762816736B339B0521FA963 /* Pods */,
|
||||
F604EC48BBC88B9D456C52C9 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F604EC48BBC88B9D456C52C9 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
913673949B5C862688BEB411 /* Pods_Runner.framework */,
|
||||
3E559449EFA9688E4362535A /* Pods_RunnerTests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||
buildPhases = (
|
||||
966EE0BC7D8B7994F46B60D0 /* [CP] Check Pods Manifest.lock */,
|
||||
331C807D294A63A400263BE5 /* Sources */,
|
||||
331C807F294A63A400263BE5 /* Resources */,
|
||||
E5F93109740F1CF8EAB7C740 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
||||
);
|
||||
name = RunnerTests;
|
||||
productName = RunnerTests;
|
||||
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
F7EDF8FA795C5CA2175B4CDF /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
ED098149A1804FAFC41C252E /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
331C8080294A63A400263BE5 = {
|
||||
CreatedOnToolsVersion = 14.0;
|
||||
TestTargetID = 97C146ED1CF9000F007C117D;
|
||||
};
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
331C8080294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
331C807F294A63A400263BE5 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
966EE0BC7D8B7994F46B60D0 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
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";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
ED098149A1804FAFC41C252E /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
F7EDF8FA795C5CA2175B4CDF /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
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";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
331C807D294A63A400263BE5 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 97C146ED1CF9000F007C117D /* Runner */;
|
||||
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = TM2B4SJXNJ;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "app.flutter-filament.example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
331C8088294A63A400263BE5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 34F6152C42E578942239D66E /* Pods-RunnerTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
331C8089294A63A400263BE5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 28E01474E257DCB9E5A9F16D /* Pods-RunnerTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
331C808A294A63A400263BE5 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 71B8727E9D9717E2EC7D0632 /* Pods-RunnerTests.profile.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = TM2B4SJXNJ;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "app.flutter-filament.example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = TM2B4SJXNJ;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "app.flutter-filament.example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
331C8088294A63A400263BE5 /* Debug */,
|
||||
331C8089294A63A400263BE5 /* Release */,
|
||||
331C808A294A63A400263BE5 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
||||
7
examples/flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
||||
BuildableName = "RunnerTests.xctest"
|
||||
BlueprintName = "RunnerTests"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
10
examples/flutter/example/ios/Runner.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
13
examples/flutter/example/ios/Runner/AppDelegate.swift
Normal file
@@ -0,0 +1,13 @@
|
||||
import Flutter
|
||||
import UIKit
|
||||
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 704 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 586 B |
|
After Width: | Height: | Size: 862 B |
|
After Width: | Height: | Size: 862 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 762 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
23
examples/flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
examples/flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
examples/flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
examples/flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
5
examples/flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
49
examples/flutter/example/ios/Runner/Info.plist
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Example</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>example</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
12
examples/flutter/example/ios/RunnerTests/RunnerTests.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
import Flutter
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class RunnerTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// If you add code to the Runner application, consider adding tests here.
|
||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||
}
|
||||
|
||||
}
|
||||
139
examples/flutter/example/lib/camera_matrix_overlay.dart
Normal file
@@ -0,0 +1,139 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
import 'package:vector_math/vector_math_64.dart' as v;
|
||||
import 'package:thermion_dart/thermion_dart/abstract_filament_viewer.dart';
|
||||
|
||||
class CameraMatrixOverlay extends StatefulWidget {
|
||||
final AbstractFilamentViewer controller;
|
||||
final bool showProjectionMatrices;
|
||||
|
||||
const CameraMatrixOverlay(
|
||||
{super.key,
|
||||
required this.controller,
|
||||
required this.showProjectionMatrices});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _CameraMatrixOverlayState();
|
||||
}
|
||||
|
||||
class _CameraMatrixOverlayState extends State<CameraMatrixOverlay> {
|
||||
Timer? _cameraTimer;
|
||||
String? _cameraPosition;
|
||||
String? _cameraRotation;
|
||||
|
||||
String? _cameraProjectionMatrix;
|
||||
String? _cameraCullingProjectionMatrix;
|
||||
|
||||
void _tick(Timer timer) async {
|
||||
var cameraPosition = await widget.controller.getCameraPosition();
|
||||
var cameraRotation = await widget.controller.getCameraRotation();
|
||||
|
||||
_cameraPosition =
|
||||
"${cameraPosition.storage.map((v) => v.toStringAsFixed(2))}";
|
||||
_cameraRotation =
|
||||
"${cameraRotation.storage.map((v) => v.toStringAsFixed(2))}";
|
||||
|
||||
if (widget.showProjectionMatrices) {
|
||||
var projMatrix = await widget.controller.getCameraProjectionMatrix();
|
||||
var cullingMatrix =
|
||||
await widget.controller.getCameraCullingProjectionMatrix();
|
||||
|
||||
_cameraProjectionMatrix =
|
||||
projMatrix.storage.map((v) => v.toStringAsFixed(2)).join(",");
|
||||
_cameraCullingProjectionMatrix =
|
||||
cullingMatrix.storage.map((v) => v.toStringAsFixed(2)).join(",");
|
||||
_getFrustum();
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void _updateTimer() async {
|
||||
_cameraTimer?.cancel();
|
||||
await widget.controller.initialized;
|
||||
}
|
||||
|
||||
v.Frustum? _frustum;
|
||||
|
||||
void _getFrustum() async {
|
||||
_frustum = await widget.controller.getCameraFrustum();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_updateTimer();
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(CameraMatrixOverlay oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_cameraTimer?.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.5),
|
||||
borderRadius: BorderRadius.circular(29)),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Text("Camera : $_cameraPosition $_cameraRotation",
|
||||
style:
|
||||
const TextStyle(color: Colors.white, fontSize: 10)),
|
||||
// widget.showProjectionMatrices
|
||||
// ? Text("Projection matrix : $_cameraProjectionMatrix",
|
||||
// style: const TextStyle(color: Colors.white, fontSize: 12))
|
||||
// : Container(),
|
||||
// widget.showProjectionMatrices
|
||||
// ? Text("Culling matrix : $_cameraCullingProjectionMatrix",
|
||||
// style: const TextStyle(color: Colors.white, fontSize: 12))
|
||||
// : Container(),
|
||||
widget.showProjectionMatrices
|
||||
? const Text("Frustum matrix",
|
||||
style: TextStyle(color: Colors.white, fontSize: 10))
|
||||
: Container()
|
||||
] +
|
||||
(_frustum == null
|
||||
? []
|
||||
: [
|
||||
_frustum!.plane0,
|
||||
_frustum!.plane1,
|
||||
_frustum!.plane2,
|
||||
_frustum!.plane3,
|
||||
_frustum!.plane4,
|
||||
_frustum!.plane5
|
||||
]
|
||||
.map((plane) => Row(
|
||||
children: [
|
||||
plane.normal.x,
|
||||
plane.normal.y,
|
||||
plane.normal.z,
|
||||
plane.constant
|
||||
]
|
||||
.map((v) => Text(
|
||||
v.toStringAsFixed(2) + " ",
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 10),
|
||||
textAlign: TextAlign.center,
|
||||
))
|
||||
.cast<Widget>()
|
||||
.toList()))
|
||||
.cast<Widget>()
|
||||
.toList())));
|
||||
}
|
||||
}
|
||||
37
examples/flutter/example/lib/example_viewport.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:thermion_flutter/filament/widgets/camera/entity_controller_mouse_widget.dart';
|
||||
import 'package:thermion_flutter/filament/widgets/camera/gestures/filament_gesture_detector.dart';
|
||||
import 'package:thermion_flutter/filament/widgets/filament_widget.dart';
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
import 'package:thermion_dart/thermion_dart/entities/entity_transform_controller.dart';
|
||||
|
||||
|
||||
class ExampleViewport extends StatelessWidget {
|
||||
final ThermionFlutterPlugin? controller;
|
||||
final EntityTransformController? entityTransformController;
|
||||
final EdgeInsets padding;
|
||||
final FocusNode keyboardFocusNode;
|
||||
|
||||
const ExampleViewport(
|
||||
{super.key,
|
||||
required this.controller,
|
||||
required this.padding,
|
||||
required this.keyboardFocusNode,
|
||||
this.entityTransformController});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return controller != null
|
||||
? Padding(
|
||||
padding: padding,
|
||||
child: EntityTransformMouseControllerWidget(
|
||||
transformController: entityTransformController,
|
||||
child: FilamentGestureDetector(
|
||||
showControlOverlay: true,
|
||||
controller: controller!.viewer,
|
||||
child: FilamentWidget(
|
||||
plugin: controller!,
|
||||
))))
|
||||
: Container();
|
||||
}
|
||||
}
|
||||
203
examples/flutter/example/lib/main.dart
Normal file
@@ -0,0 +1,203 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:thermion_flutter/filament/widgets/debug/entity_list_widget.dart';
|
||||
import 'package:thermion_flutter_example/camera_matrix_overlay.dart';
|
||||
import 'package:thermion_flutter_example/menus/controller_menu.dart';
|
||||
import 'package:thermion_flutter_example/example_viewport.dart';
|
||||
import 'package:thermion_dart/thermion_dart/entities/entity_transform_controller.dart';
|
||||
import 'package:thermion_flutter_example/menus/scene_menu.dart';
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
import 'package:thermion_flutter_example/picker_result_widget.dart';
|
||||
|
||||
|
||||
const loadDefaultScene = bool.hasEnvironment('--load-default-scene');
|
||||
|
||||
void main() async {
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(
|
||||
useMaterial3: true,
|
||||
textTheme: const TextTheme(
|
||||
labelLarge: TextStyle(fontSize: 12),
|
||||
displayMedium: TextStyle(fontSize: 12),
|
||||
headlineMedium: const TextStyle(fontSize: 12),
|
||||
titleMedium: TextStyle(fontSize: 12),
|
||||
bodyLarge: TextStyle(fontSize: 14),
|
||||
bodyMedium: TextStyle(fontSize: 12))),
|
||||
// showPerformanceOverlay: true,
|
||||
home: const Scaffold(
|
||||
backgroundColor: Color(0x00000000),
|
||||
body: ExampleWidget()));
|
||||
}
|
||||
}
|
||||
|
||||
class ExampleWidget extends StatefulWidget {
|
||||
const ExampleWidget({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return ExampleWidgetState();
|
||||
}
|
||||
}
|
||||
|
||||
enum MenuType { controller, assets, camera, misc }
|
||||
|
||||
class ExampleWidgetState extends State<ExampleWidget> {
|
||||
final _plugin = ThermionFlutterPlugin();
|
||||
|
||||
EdgeInsets _viewportMargin = EdgeInsets.zero;
|
||||
|
||||
// these are all the options that can be set via the menu
|
||||
// we store them here
|
||||
static bool rendering = false;
|
||||
static bool recording = false;
|
||||
static int framerate = 60;
|
||||
static bool postProcessing = false;
|
||||
static bool antiAliasingMsaa = false;
|
||||
static bool antiAliasingTaa = false;
|
||||
static bool antiAliasingFxaa = false;
|
||||
static bool frustumCulling = true;
|
||||
|
||||
static double zoomSpeed = 0.01;
|
||||
static double orbitSpeedX = 0.01;
|
||||
static double orbitSpeedY = 0.01;
|
||||
|
||||
static bool hasSkybox = false;
|
||||
static bool coneHidden = false;
|
||||
|
||||
static bool loop = false;
|
||||
static final showProjectionMatrices = ValueNotifier<bool>(false);
|
||||
|
||||
late StreamSubscription _listener;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_listener.cancel();
|
||||
}
|
||||
|
||||
EntityTransformController? _transformController;
|
||||
|
||||
final _sharedFocusNode = FocusNode();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
future: _plugin.initialized,
|
||||
builder: (_, AsyncSnapshot<bool> initialized) {
|
||||
var isInitialized = initialized.data == true;
|
||||
|
||||
return Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
if (isInitialized)
|
||||
Positioned.fill(
|
||||
child: ExampleViewport(
|
||||
controller: isInitialized ? _plugin : null,
|
||||
entityTransformController: _transformController,
|
||||
padding: _viewportMargin,
|
||||
keyboardFocusNode: _sharedFocusNode),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 30,
|
||||
left: 0,
|
||||
right: 10,
|
||||
height: 30,
|
||||
child: Container(
|
||||
height: 30,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
color: Colors.white.withOpacity(0.25),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
ControllerMenu(
|
||||
sharedFocusNode: _sharedFocusNode,
|
||||
controller: _plugin,
|
||||
onToggleViewport: () {
|
||||
setState(() {
|
||||
_viewportMargin =
|
||||
(_viewportMargin == EdgeInsets.zero)
|
||||
? const EdgeInsets.all(30)
|
||||
: EdgeInsets.zero;
|
||||
});
|
||||
},
|
||||
onControllerDestroyed: () {},
|
||||
onControllerCreated: () {}),
|
||||
SceneMenu(
|
||||
sharedFocusNode: _sharedFocusNode,
|
||||
controller: _plugin,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
await _plugin.viewer.loadGlb(
|
||||
'assets/shapes/shapes.glb',
|
||||
numInstances: 1);
|
||||
},
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: const Text("shapes.glb"))),
|
||||
const SizedBox(width: 5),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
await _plugin.viewer.loadGlb('assets/1.glb');
|
||||
},
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: const Text("1.glb"))),
|
||||
const SizedBox(width: 5),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
await _plugin.viewer.loadGlb('assets/2.glb');
|
||||
},
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: const Text("2.glb"))),
|
||||
const SizedBox(width: 5),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
await _plugin.viewer.loadGlb('assets/3.glb');
|
||||
},
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: const Text("3.glb"))),
|
||||
Expanded(child: Container()),
|
||||
]))),
|
||||
if (isInitialized) ...[
|
||||
Positioned(top:10, left:10, width:200, height:200, child:Container(
|
||||
child:EntityListWidget(controller: _plugin.viewer))),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(top: 10, left: 20, right: 20),
|
||||
// child: ValueListenableBuilder(
|
||||
// valueListenable: showProjectionMatrices,
|
||||
// builder: (ctx, value, child) => CameraMatrixOverlay(
|
||||
// controller: _plugin.viewer, showProjectionMatrices: value)),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment: Alignment.topRight,
|
||||
// child: PickerResultWidget(controller: _plugin.viewer),
|
||||
// )
|
||||
]
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
263
examples/flutter/example/lib/menus/asset_submenu.dart
Normal file
@@ -0,0 +1,263 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
import 'package:animation_tools_dart/animation_tools_dart.dart';
|
||||
import 'package:thermion_flutter_example/main.dart';
|
||||
import 'package:vector_math/vector_math_64.dart' as v;
|
||||
import 'package:thermion_dart/thermion_dart/abstract_filament_viewer.dart';
|
||||
|
||||
class AssetSubmenu extends StatefulWidget {
|
||||
final ThermionFlutterPlugin controller;
|
||||
const AssetSubmenu({super.key, required this.controller});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _AssetSubmenuState();
|
||||
}
|
||||
|
||||
class _AssetSubmenuState extends State<AssetSubmenu> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
Widget _shapesSubmenu() {
|
||||
var children = [
|
||||
MenuItemButton(
|
||||
closeOnActivate: false,
|
||||
onPressed: () async {
|
||||
var entity = await widget.controller.viewer.getChildEntity(
|
||||
widget.controller.viewer.scene.listEntities().last, "Cylinder");
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Center(
|
||||
child: Container(
|
||||
color: Colors.white, child: Text(entity.toString())));
|
||||
});
|
||||
},
|
||||
child: const Text('Find Cylinder entity by name')),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
widget.controller.viewer.setPosition(
|
||||
widget.controller.viewer.scene.listEntities().last,
|
||||
1.0,
|
||||
1.0,
|
||||
-1.0);
|
||||
},
|
||||
child: const Text('Set position to 1, 1, -1'),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
final color = Colors.purple;
|
||||
widget.controller.viewer.setMaterialColor(
|
||||
widget.controller.viewer.scene.listEntities().last,
|
||||
"Cone",
|
||||
0,
|
||||
color.red / 255.0,
|
||||
color.green / 255.0,
|
||||
color.blue / 255.0,
|
||||
1.0);
|
||||
},
|
||||
child: const Text("Set cone material color to purple")),
|
||||
];
|
||||
|
||||
return SubmenuButton(menuChildren: children, child: const Text("Shapes"));
|
||||
}
|
||||
|
||||
Widget _geometrySubmenu() {
|
||||
return SubmenuButton(
|
||||
menuChildren: [
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
var verts = [
|
||||
-1.0,
|
||||
0.0,
|
||||
-1.0,
|
||||
-1.0,
|
||||
0.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0,
|
||||
-1.0,
|
||||
];
|
||||
var indices = [0, 1, 2, 2, 3, 0];
|
||||
var geom = await widget.controller.viewer.createGeometry(
|
||||
verts, indices,
|
||||
materialPath: "asset://assets/solidcolor.filamat");
|
||||
},
|
||||
child: const Text("Quad")),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await widget.controller.viewer.createGeometry([
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
], [
|
||||
0,
|
||||
1
|
||||
], primitiveType: PrimitiveType.LINES);
|
||||
},
|
||||
child: const Text("Line"))
|
||||
],
|
||||
child: const Text("Custom Geometry"),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SubmenuButton(
|
||||
menuChildren: [
|
||||
_shapesSubmenu(),
|
||||
_geometrySubmenu(),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await widget.controller.viewer.addLight(
|
||||
LightType.DIRECTIONAL, 6500, 100000, 0, 1, 0, 0, -1, 0);
|
||||
},
|
||||
child: const Text("Add directional light"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await widget.controller.viewer.addLight(
|
||||
LightType.POINT, 6500, 100000, 0, 1, 0, 0, -1, 0,
|
||||
falloffRadius: 1.0);
|
||||
},
|
||||
child: const Text("Add point light"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await widget.controller.viewer.addLight(
|
||||
LightType.SPOT, 6500, 1000000, 0, 0, 0, 0, 1, 0,
|
||||
spotLightConeInner: 0.1,
|
||||
spotLightConeOuter: 0.4,
|
||||
falloffRadius: 100.0);
|
||||
},
|
||||
child: const Text("Add spot light"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await widget.controller.viewer.clearLights();
|
||||
},
|
||||
child: const Text("Clear lights"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
final color = const Color(0xAA73C9FA);
|
||||
widget.controller.viewer.setBackgroundColor(color.red / 255.0,
|
||||
color.green / 255.0, color.blue / 255.0, 1.0);
|
||||
},
|
||||
child: const Text("Set background color")),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer
|
||||
.setBackgroundImage('assets/background.ktx');
|
||||
},
|
||||
child: const Text("Load background image")),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer.setBackgroundImage(
|
||||
'assets/background.ktx',
|
||||
fillHeight: true);
|
||||
},
|
||||
child: const Text("Load background image (fill height)")),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
if (ExampleWidgetState.hasSkybox) {
|
||||
widget.controller.viewer.removeSkybox();
|
||||
} else {
|
||||
widget.controller.viewer
|
||||
.loadSkybox('assets/default_env/default_env_skybox.ktx');
|
||||
}
|
||||
ExampleWidgetState.hasSkybox = !ExampleWidgetState.hasSkybox;
|
||||
},
|
||||
child: Text(ExampleWidgetState.hasSkybox
|
||||
? 'Remove skybox'
|
||||
: 'Load skybox')),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer
|
||||
.loadIbl('assets/default_env/default_env_ibl.ktx');
|
||||
},
|
||||
child: const Text('Load IBL')),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer.removeIbl();
|
||||
},
|
||||
child: const Text('Remove IBL')),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await widget.controller.viewer.clearEntities();
|
||||
},
|
||||
child: const Text('Clear assets')),
|
||||
],
|
||||
child: const Text("Assets"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// _item(() async {
|
||||
// var frameData = Float32List.fromList(
|
||||
// List<double>.generate(120, (i) => i / 120).expand((x) {
|
||||
// var vals = List<double>.filled(7, x);
|
||||
// vals[3] = 1.0;
|
||||
// // vals[4] = 0;
|
||||
// vals[5] = 0;
|
||||
// vals[6] = 0;
|
||||
// return vals;
|
||||
// }).toList());
|
||||
|
||||
// widget.controller!.setBoneAnimation(
|
||||
// _shapes!,
|
||||
// BoneAnimationData(
|
||||
// "Bone.001", ["Cube.001"], frameData, 1000.0 / 60.0));
|
||||
// // ,
|
||||
// // "Bone.001",
|
||||
// // "Cube.001",
|
||||
// // BoneTransform([Vec3(x: 0, y: 0.0, z: 0.0)],
|
||||
// // [Quaternion(x: 1, y: 1, z: 1, w: 1)]));
|
||||
// }, 'construct bone animation'),
|
||||
|
||||
// _item(() async {
|
||||
// var morphs = await widget.controller!
|
||||
// .getMorphTargetNames(_shapes!, "Cylinder");
|
||||
// final animation = AnimationBuilder(
|
||||
// availableMorphs: morphs,
|
||||
// framerate: 30,
|
||||
// meshName: "Cylinder")
|
||||
// .setDuration(4)
|
||||
// .setMorphTargets(["Key 1", "Key 2"])
|
||||
// .interpolateMorphWeights(0, 4, 0, 1)
|
||||
// .build();
|
||||
// widget.controller!.setMorphAnimationData(_shapes!, animation);
|
||||
// }, "animate cylinder morph weights #1 and #2"),
|
||||
// _item(() async {
|
||||
// var morphs = await widget.controller!
|
||||
// .getMorphTargetNames(_shapes!, "Cylinder");
|
||||
// final animation = AnimationBuilder(
|
||||
// availableMorphs: morphs,
|
||||
// framerate: 30,
|
||||
// meshName: "Cylinder")
|
||||
// .setDuration(4)
|
||||
// .setMorphTargets(["Key 3", "Key 4"])
|
||||
// .interpolateMorphWeights(0, 4, 0, 1)
|
||||
// .build();
|
||||
// widget.controller!.setMorphAnimationData(_shapes!, animation);
|
||||
// }, "animate cylinder morph weights #3 and #4"),
|
||||
// _item(() async {
|
||||
// var morphs = await widget.controller!
|
||||
// .getMorphTargetNames(_shapes!, "Cube");
|
||||
// final animation = AnimationBuilder(
|
||||
// availableMorphs: morphs, framerate: 30, meshName: "Cube")
|
||||
// .setDuration(4)
|
||||
// .setMorphTargets(["Key 1", "Key 2"])
|
||||
// .interpolateMorphWeights(0, 4, 0, 1)
|
||||
// .build();
|
||||
// widget.controller!.setMorphAnimationData(_shapes!, animation);
|
||||
// }, "animate shapes morph weights #1 and #2"),
|
||||
224
examples/flutter/example/lib/menus/camera_submenu.dart
Normal file
@@ -0,0 +1,224 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vector_math/vector_math_64.dart' as v;
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
import 'package:thermion_dart/thermion_dart/abstract_filament_viewer.dart';
|
||||
import 'package:thermion_flutter_example/main.dart';
|
||||
|
||||
class CameraSubmenu extends StatefulWidget {
|
||||
final ThermionFlutterPlugin controller;
|
||||
const CameraSubmenu({super.key, required this.controller});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _CameraSubmenuState();
|
||||
}
|
||||
|
||||
class _CameraSubmenuState extends State<CameraSubmenu> {
|
||||
double? _near;
|
||||
double? _far;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.controller.viewer.initialized.then((_) {
|
||||
widget.controller.viewer.getCameraCullingNear().then((v) {
|
||||
_near = v;
|
||||
widget.controller.viewer.getCameraCullingFar().then((v) {
|
||||
_far = v;
|
||||
setState(() {});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
final _menuController = MenuController();
|
||||
|
||||
List<Widget> _cameraMenu() {
|
||||
return [
|
||||
MenuItemButton(
|
||||
closeOnActivate: false,
|
||||
onPressed: () async {
|
||||
ExampleWidgetState.showProjectionMatrices.value =
|
||||
!ExampleWidgetState.showProjectionMatrices.value;
|
||||
print("Set to ${ExampleWidgetState.showProjectionMatrices}");
|
||||
},
|
||||
child: Text(
|
||||
'${ExampleWidgetState.showProjectionMatrices.value ? "Hide" : "Display"} camera frustum',
|
||||
style: TextStyle(
|
||||
fontWeight: ExampleWidgetState.showProjectionMatrices.value
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal),
|
||||
),
|
||||
),
|
||||
SubmenuButton(
|
||||
menuChildren: [1.0, 7.0, 14.0, 28.0, 56.0]
|
||||
.map((v) => MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer.setCameraFocalLength(v);
|
||||
},
|
||||
child: Text(
|
||||
v.toStringAsFixed(2),
|
||||
),
|
||||
))
|
||||
.toList(),
|
||||
child: const Text("Set camera focal length")),
|
||||
SubmenuButton(
|
||||
menuChildren: [0.05, 0.1, 1.0, 10.0, 100.0]
|
||||
.map((v) => MenuItemButton(
|
||||
onPressed: () {
|
||||
_near = v;
|
||||
print("Setting camera culling to $_near $_far!");
|
||||
|
||||
widget.controller.viewer.setCameraCulling(_near!, _far!);
|
||||
},
|
||||
child: Text(
|
||||
v.toStringAsFixed(2),
|
||||
),
|
||||
))
|
||||
.toList(),
|
||||
child: const Text("Set near")),
|
||||
SubmenuButton(
|
||||
menuChildren: [5.0, 50.0, 500.0, 1000.0, 100000.0]
|
||||
.map((v) => MenuItemButton(
|
||||
onPressed: () {
|
||||
_far = v;
|
||||
print("Setting camera culling to $_near! $_far");
|
||||
widget.controller.viewer.setCameraCulling(_near!, _far!);
|
||||
},
|
||||
child: Text(
|
||||
v.toStringAsFixed(2),
|
||||
),
|
||||
))
|
||||
.toList(),
|
||||
child: const Text("Set far")),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
widget.controller.viewer.setCameraPosition(1.0, 1.0, -1.0);
|
||||
},
|
||||
child: const Text('Set position to 1, 1, -1 (leave rotation as-is)'),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
widget.controller.viewer.setCameraPosition(0.0, 0.0, 0.0);
|
||||
widget.controller.viewer.setCameraRotation(
|
||||
v.Quaternion.axisAngle(v.Vector3(0, 0.0, 1.0), 0.0));
|
||||
},
|
||||
child: const Text('Move to 0,0,0, facing towards 0,0,-1'),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer.setCameraRotation(
|
||||
v.Quaternion.axisAngle(v.Vector3(0, 1, 0), pi / 4));
|
||||
},
|
||||
child: const Text("Rotate camera 45 degrees around y axis"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.frustumCulling =
|
||||
!ExampleWidgetState.frustumCulling;
|
||||
widget.controller.viewer
|
||||
.setViewFrustumCulling(ExampleWidgetState.frustumCulling);
|
||||
},
|
||||
child: Text(
|
||||
"${ExampleWidgetState.frustumCulling ? "Disable" : "Enable"} frustum culling"),
|
||||
),
|
||||
MenuItemButton(
|
||||
closeOnActivate: false,
|
||||
onPressed: () async {
|
||||
var projMatrix =
|
||||
await widget.controller.viewer.getCameraProjectionMatrix();
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
return Center(
|
||||
child: Container(
|
||||
height: 100,
|
||||
width: 300,
|
||||
color: Colors.white,
|
||||
child: Text(projMatrix.storage
|
||||
.map((v) => v.toStringAsFixed(2))
|
||||
.join(","))));
|
||||
});
|
||||
},
|
||||
child: const Text("Get projection matrix")),
|
||||
SubmenuButton(
|
||||
menuChildren: ManipulatorMode.values.map((mm) {
|
||||
return MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer.setCameraManipulatorOptions(
|
||||
mode: mm,
|
||||
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
||||
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
||||
zoomSpeed: ExampleWidgetState.zoomSpeed);
|
||||
},
|
||||
child: Text(
|
||||
mm.name,
|
||||
style: TextStyle(
|
||||
// fontWeight: ExampleWidgetState.cameraManipulatorMode == mm
|
||||
// ? FontWeight.bold
|
||||
// : FontWeight.normal
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
child: const Text("Manipulator mode")),
|
||||
SubmenuButton(
|
||||
menuChildren: [0.01, 0.1, 1.0, 10.0, 100.0].map((speed) {
|
||||
return MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.zoomSpeed = speed;
|
||||
widget.controller.viewer.setCameraManipulatorOptions(
|
||||
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
||||
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
||||
zoomSpeed: ExampleWidgetState.zoomSpeed);
|
||||
},
|
||||
child: Text(
|
||||
speed.toString(),
|
||||
style: TextStyle(
|
||||
fontWeight:
|
||||
(speed - ExampleWidgetState.zoomSpeed).abs() < 0.0001
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
child: const Text("Zoom speed")),
|
||||
SubmenuButton(
|
||||
menuChildren: [0.001, 0.01, 0.1, 1.0].map((speed) {
|
||||
return MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.orbitSpeedX = speed;
|
||||
ExampleWidgetState.orbitSpeedY = speed;
|
||||
widget.controller.viewer.setCameraManipulatorOptions(
|
||||
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
||||
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
||||
zoomSpeed: ExampleWidgetState.zoomSpeed);
|
||||
},
|
||||
child: Text(
|
||||
speed.toString(),
|
||||
style: TextStyle(
|
||||
fontWeight:
|
||||
(speed - ExampleWidgetState.orbitSpeedX).abs() < 0.0001
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
child: const Text("Orbit speed (X & Y)"))
|
||||
];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// if (_near == null || _far == null) {
|
||||
// return Container();
|
||||
// }
|
||||
return SubmenuButton(
|
||||
controller: _menuController,
|
||||
menuChildren: _cameraMenu(),
|
||||
child: const Text("Camera"),
|
||||
);
|
||||
}
|
||||
}
|
||||
106
examples/flutter/example/lib/menus/controller_menu.dart
Normal file
@@ -0,0 +1,106 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
|
||||
class ControllerMenu extends StatefulWidget {
|
||||
final ThermionFlutterPlugin controller;
|
||||
final void Function() onToggleViewport;
|
||||
final void Function() onControllerCreated;
|
||||
final void Function() onControllerDestroyed;
|
||||
final FocusNode sharedFocusNode;
|
||||
|
||||
|
||||
ControllerMenu(
|
||||
{required this.controller,
|
||||
required this.onControllerCreated,
|
||||
required this.onControllerDestroyed,
|
||||
required this.sharedFocusNode,
|
||||
required this.onToggleViewport});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _ControllerMenuState();
|
||||
}
|
||||
|
||||
class _ControllerMenuState extends State<ControllerMenu> {
|
||||
void _createController({String? uberArchivePath}) async {
|
||||
widget.controller.initialize(uberArchivePath: uberArchivePath);
|
||||
widget.onControllerCreated();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(ControllerMenu oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
}
|
||||
|
||||
bool _initialized = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var items = <Widget>[];
|
||||
if (!_initialized) {
|
||||
items.addAll([
|
||||
MenuItemButton(
|
||||
child:
|
||||
const Text("Create ThermionFlutterPlugin (default ubershader)"),
|
||||
onPressed: () {
|
||||
_createController();
|
||||
},
|
||||
),
|
||||
MenuItemButton(
|
||||
child: const Text(
|
||||
"Create ThermionFlutterPlugin (custom ubershader - lit opaque only)"),
|
||||
onPressed: () {
|
||||
_createController(
|
||||
uberArchivePath: Platform.isWindows
|
||||
? "assets/lit_opaque_32.uberz"
|
||||
: Platform.isMacOS
|
||||
? "assets/lit_opaque_43.uberz"
|
||||
: Platform.isIOS
|
||||
? "assets/lit_opaque_43.uberz"
|
||||
: "assets/lit_opaque_43_gles.uberz");
|
||||
},
|
||||
)
|
||||
]);
|
||||
} else {
|
||||
items.addAll([
|
||||
MenuItemButton(
|
||||
child: const Text("Destroy viewer"),
|
||||
onPressed: () async {
|
||||
widget.controller.dispose();
|
||||
widget.onControllerDestroyed();
|
||||
setState(() {});
|
||||
},
|
||||
)
|
||||
]);
|
||||
}
|
||||
return MenuAnchor(
|
||||
childFocusNode: widget.sharedFocusNode,
|
||||
menuChildren: items +
|
||||
[
|
||||
TextButton(
|
||||
child: const Text("Toggle viewport size"),
|
||||
onPressed: widget.onToggleViewport,
|
||||
)
|
||||
],
|
||||
builder:
|
||||
(BuildContext context, MenuController controller, Widget? child) {
|
||||
return TextButton(
|
||||
onPressed: () {
|
||||
if (controller.isOpen) {
|
||||
controller.close();
|
||||
} else {
|
||||
controller.open();
|
||||
}
|
||||
},
|
||||
child: const Text("Controller / Viewer"),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
95
examples/flutter/example/lib/menus/rendering_submenu.dart
Normal file
@@ -0,0 +1,95 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
import 'package:thermion_flutter_example/main.dart';
|
||||
import 'package:thermion_dart/thermion_dart/abstract_filament_viewer.dart';
|
||||
|
||||
class RenderingSubmenu extends StatefulWidget {
|
||||
final ThermionFlutterPlugin controller;
|
||||
|
||||
const RenderingSubmenu({super.key, required this.controller});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _RenderingSubmenuState();
|
||||
}
|
||||
|
||||
class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SubmenuButton(
|
||||
menuChildren: [
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer.render();
|
||||
},
|
||||
child: const Text("Render single frame"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.rendering = !ExampleWidgetState.rendering;
|
||||
widget.controller.viewer.setRendering(ExampleWidgetState.rendering);
|
||||
},
|
||||
child: Text(
|
||||
"Set continuous rendering to ${!ExampleWidgetState.rendering}"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.framerate =
|
||||
ExampleWidgetState.framerate == 60 ? 30 : 60;
|
||||
widget.controller.viewer.setFrameRate(ExampleWidgetState.framerate);
|
||||
},
|
||||
child: Text(
|
||||
"Toggle framerate (currently ${ExampleWidgetState.framerate}) "),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
widget.controller.viewer.setToneMapping(ToneMapper.LINEAR);
|
||||
},
|
||||
child: const Text("Set tone mapping to linear"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.postProcessing =
|
||||
!ExampleWidgetState.postProcessing;
|
||||
widget.controller.viewer
|
||||
.setPostProcessing(ExampleWidgetState.postProcessing);
|
||||
},
|
||||
child: Text(
|
||||
"${ExampleWidgetState.postProcessing ? "Disable" : "Enable"} postprocessing"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.antiAliasingMsaa =
|
||||
!ExampleWidgetState.antiAliasingMsaa;
|
||||
widget.controller.viewer.setAntiAliasing(
|
||||
ExampleWidgetState.antiAliasingMsaa,
|
||||
ExampleWidgetState.antiAliasingFxaa,
|
||||
ExampleWidgetState.antiAliasingTaa);
|
||||
},
|
||||
child: Text(
|
||||
"${ExampleWidgetState.antiAliasingMsaa ? "Disable" : "Enable"} MSAA antialiasing"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.antiAliasingFxaa =
|
||||
!ExampleWidgetState.antiAliasingFxaa;
|
||||
widget.controller.viewer.setAntiAliasing(
|
||||
ExampleWidgetState.antiAliasingMsaa,
|
||||
ExampleWidgetState.antiAliasingFxaa,
|
||||
ExampleWidgetState.antiAliasingTaa);
|
||||
},
|
||||
child: Text(
|
||||
"${ExampleWidgetState.antiAliasingFxaa ? "Disable" : "Enable"} FXAA antialiasing"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.recording = !ExampleWidgetState.recording;
|
||||
widget.controller.viewer.setRecording(ExampleWidgetState.recording);
|
||||
},
|
||||
child: Text(
|
||||
"Turn recording ${ExampleWidgetState.recording ? "OFF" : "ON"}) "),
|
||||
),
|
||||
],
|
||||
child: const Text("Rendering"),
|
||||
);
|
||||
}
|
||||
}
|
||||
62
examples/flutter/example/lib/menus/scene_menu.dart
Normal file
@@ -0,0 +1,62 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
import 'package:thermion_flutter_example/menus/asset_submenu.dart';
|
||||
import 'package:thermion_flutter_example/menus/camera_submenu.dart';
|
||||
import 'package:thermion_flutter_example/menus/rendering_submenu.dart';
|
||||
|
||||
class SceneMenu extends StatefulWidget {
|
||||
final ThermionFlutterPlugin? controller;
|
||||
final FocusNode sharedFocusNode;
|
||||
|
||||
const SceneMenu(
|
||||
{super.key, required this.controller, required this.sharedFocusNode});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return _SceneMenuState();
|
||||
}
|
||||
}
|
||||
|
||||
class _SceneMenuState extends State<SceneMenu> {
|
||||
@override
|
||||
void didUpdateWidget(SceneMenu oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (widget.controller != null &&
|
||||
(widget.controller != oldWidget.controller)) {
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MenuAnchor(
|
||||
onClose: () {},
|
||||
childFocusNode: widget.sharedFocusNode,
|
||||
menuChildren: widget.controller == null
|
||||
? []
|
||||
: <Widget>[
|
||||
RenderingSubmenu(
|
||||
controller: widget.controller!,
|
||||
),
|
||||
AssetSubmenu(controller: widget.controller!),
|
||||
CameraSubmenu(
|
||||
controller: widget.controller!,
|
||||
),
|
||||
],
|
||||
builder:
|
||||
(BuildContext context, MenuController controller, Widget? child) {
|
||||
return TextButton(
|
||||
onPressed: () {
|
||||
if (controller.isOpen) {
|
||||
controller.close();
|
||||
} else {
|
||||
controller.open();
|
||||
}
|
||||
},
|
||||
child: const Text("Scene"),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
20
examples/flutter/example/lib/picker_result_widget.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:thermion_dart/thermion_dart/abstract_filament_viewer.dart';
|
||||
|
||||
class PickerResultWidget extends StatelessWidget {
|
||||
final AbstractFilamentViewer controller;
|
||||
|
||||
const PickerResultWidget({required this.controller, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return StreamBuilder(
|
||||
stream: controller.pickResult.map((result) {
|
||||
return controller.getNameForEntity(result.entity);
|
||||
}),
|
||||
builder: (ctx, snapshot) => snapshot.data == null
|
||||
? Container()
|
||||
: Text(snapshot.data!,
|
||||
style: const TextStyle(color: Colors.green, fontSize: 24)));
|
||||
}
|
||||
}
|
||||
1
examples/flutter/example/linux/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
flutter/ephemeral
|
||||
141
examples/flutter/example/linux/CMakeLists.txt
Normal file
@@ -0,0 +1,141 @@
|
||||
# Project-level configuration.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
# The name of the executable created for the application. Change this to change
|
||||
# the on-disk name of your application.
|
||||
set(BINARY_NAME "thermion_flutter_example")
|
||||
# The unique GTK application identifier for this application. See:
|
||||
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||
set(APPLICATION_ID "app.polyvox.thermion_flutter")
|
||||
|
||||
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||
# versions of CMake.
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
# Load bundled libraries from the lib/ directory relative to the binary.
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
|
||||
|
||||
# Root filesystem for cross-building.
|
||||
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
|
||||
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
endif()
|
||||
|
||||
# Define build configuration options.
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE
|
||||
STRING "Flutter build mode" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"Debug" "Profile" "Release")
|
||||
endif()
|
||||
|
||||
# Compilation settings that should be applied to most targets.
|
||||
#
|
||||
# Be cautious about adding new options here, as plugins use this function by
|
||||
# default. In most cases, you should add new options to specific targets instead
|
||||
# of modifying this function.
|
||||
function(APPLY_STANDARD_SETTINGS TARGET)
|
||||
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
||||
target_compile_options(${TARGET} PRIVATE -Wall -Werror -Wno-unused-function -Wno-unused-variable)
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
||||
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
||||
endfunction()
|
||||
|
||||
# Flutter library and tool build rules.
|
||||
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
||||
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
||||
|
||||
# System-level dependencies.
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||
|
||||
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
|
||||
|
||||
# Define the application target. To change its name, change BINARY_NAME above,
|
||||
# not the value here, or `flutter run` will no longer work.
|
||||
#
|
||||
# Any new source files that you add to the application should be added here.
|
||||
add_executable(${BINARY_NAME}
|
||||
"main.cc"
|
||||
"my_application.cc"
|
||||
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
|
||||
)
|
||||
|
||||
# Apply the standard set of build settings. This can be removed for applications
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# Add dependency libraries. Add any application-specific dependencies here.
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
|
||||
|
||||
# Run the Flutter tool portions of the build. This must not be removed.
|
||||
add_dependencies(${BINARY_NAME} flutter_assemble)
|
||||
|
||||
# Only the install-generated bundle's copy of the executable will launch
|
||||
# correctly, since the resources must in the right relative locations. To avoid
|
||||
# people trying to run the unbundled copy, put it in a subdirectory instead of
|
||||
# the default top-level location.
|
||||
set_target_properties(${BINARY_NAME}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
|
||||
)
|
||||
|
||||
# Generated plugin build rules, which manage building the plugins and adding
|
||||
# them to the application.
|
||||
include(flutter/generated_plugins.cmake)
|
||||
|
||||
include_directories(../../ios/include)
|
||||
|
||||
|
||||
|
||||
# === Installation ===
|
||||
# By default, "installing" just makes a relocatable bundle in the build
|
||||
# directory.
|
||||
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
|
||||
endif()
|
||||
|
||||
# Start with a clean build bundle directory every time.
|
||||
install(CODE "
|
||||
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
|
||||
" COMPONENT Runtime)
|
||||
|
||||
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
||||
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
|
||||
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
|
||||
install(FILES "${bundled_library}"
|
||||
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
endforeach(bundled_library)
|
||||
|
||||
# Fully re-copy the assets directory on each build to avoid having stale files
|
||||
# from a previous install.
|
||||
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
|
||||
install(CODE "
|
||||
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
|
||||
" COMPONENT Runtime)
|
||||
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
|
||||
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
|
||||
|
||||
# Install the AOT library on non-Debug builds only.
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
endif()
|
||||
88
examples/flutter/example/linux/flutter/CMakeLists.txt
Normal file
@@ -0,0 +1,88 @@
|
||||
# This file controls Flutter-level build steps. It should not be edited.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
||||
|
||||
# Configuration provided via flutter tool.
|
||||
include(${EPHEMERAL_DIR}/generated_config.cmake)
|
||||
|
||||
# TODO: Move the rest of this into files in ephemeral. See
|
||||
# https://github.com/flutter/flutter/issues/57146.
|
||||
|
||||
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
|
||||
# which isn't available in 3.10.
|
||||
function(list_prepend LIST_NAME PREFIX)
|
||||
set(NEW_LIST "")
|
||||
foreach(element ${${LIST_NAME}})
|
||||
list(APPEND NEW_LIST "${PREFIX}${element}")
|
||||
endforeach(element)
|
||||
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# === Flutter Library ===
|
||||
# System-level dependencies.
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
||||
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
|
||||
|
||||
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
|
||||
|
||||
# Published to parent scope for install step.
|
||||
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
|
||||
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
|
||||
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
|
||||
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
|
||||
|
||||
list(APPEND FLUTTER_LIBRARY_HEADERS
|
||||
"fl_basic_message_channel.h"
|
||||
"fl_binary_codec.h"
|
||||
"fl_binary_messenger.h"
|
||||
"fl_dart_project.h"
|
||||
"fl_engine.h"
|
||||
"fl_json_message_codec.h"
|
||||
"fl_json_method_codec.h"
|
||||
"fl_message_codec.h"
|
||||
"fl_method_call.h"
|
||||
"fl_method_channel.h"
|
||||
"fl_method_codec.h"
|
||||
"fl_method_response.h"
|
||||
"fl_plugin_registrar.h"
|
||||
"fl_plugin_registry.h"
|
||||
"fl_standard_message_codec.h"
|
||||
"fl_standard_method_codec.h"
|
||||
"fl_string_codec.h"
|
||||
"fl_value.h"
|
||||
"fl_view.h"
|
||||
"flutter_linux.h"
|
||||
)
|
||||
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
|
||||
add_library(flutter INTERFACE)
|
||||
target_include_directories(flutter INTERFACE
|
||||
"${EPHEMERAL_DIR}"
|
||||
)
|
||||
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
|
||||
target_link_libraries(flutter INTERFACE
|
||||
PkgConfig::GTK
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GIO
|
||||
)
|
||||
add_dependencies(flutter flutter_assemble)
|
||||
|
||||
# === Flutter tool backend ===
|
||||
# _phony_ is a non-existent file to force this command to run every time,
|
||||
# since currently there's no way to get a full input/output list from the
|
||||
# flutter tool.
|
||||
add_custom_command(
|
||||
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/_phony_
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
${FLUTTER_TOOL_ENVIRONMENT}
|
||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
|
||||
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(flutter_assemble DEPENDS
|
||||
"${FLUTTER_LIBRARY}"
|
||||
${FLUTTER_LIBRARY_HEADERS}
|
||||
)
|
||||