move flutter_filament plugin to federated structure
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"flutterSdkVersion": "3.16.0-0.2.pre",
|
||||
"flavors": {}
|
||||
}
|
||||
30
flutter_filament_federated/flutter_filament/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
|
||||
51
flutter_filament_federated/flutter_filament/example/.gitignore
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# 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
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# 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
|
||||
@@ -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'
|
||||
@@ -0,0 +1,21 @@
|
||||
# flutter_filament_example
|
||||
|
||||
Demonstrates how to use the flutter_filament 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.
|
||||
@@ -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
|
||||
15
flutter_filament_federated/flutter_filament/example/android/.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
|
||||
.cxx/
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
@@ -0,0 +1,81 @@
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 34
|
||||
ndkVersion "25.2.9519653"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId "app.polyvox.flutter_filament_example"
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 31
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
ndk {
|
||||
abiFilters 'arm64-v8a' // 'x86_64' 'armeabi-v7a'
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.debug
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile(
|
||||
'proguard-android-optimize.txt'),
|
||||
'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
|
||||
implementation "androidx.annotation:annotation:1.3.0"
|
||||
implementation "androidx.core:core:1.7.0"
|
||||
implementation 'net.java.dev.jna:jna:5.10.0@aar'
|
||||
}
|
||||
9
flutter_filament_federated/flutter_filament/example/android/app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
-keep class io.flutter.app.** { *; }
|
||||
-keep class io.flutter.plugin.** { *; }
|
||||
-keep class io.flutter.util.** { *; }
|
||||
-keep class io.flutter.view.** { *; }
|
||||
-keep class io.flutter.** { *; }
|
||||
-keep class io.flutter.plugins.** { *; }
|
||||
-dontwarn java.awt.*
|
||||
-keep class com.sun.jna.* { *; }
|
||||
-keepclassmembers class * extends com.sun.jna.* { public *; }
|
||||
@@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="app.polyvox.flutter_filament_example">
|
||||
<!-- Flutter 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,46 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="app.polyvox.flutter_filament_example">
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<application
|
||||
android:name="${applicationName}"
|
||||
android:label="flutter_filament_example"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:exported="true">
|
||||
<!-- 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"
|
||||
/>
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<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>
|
||||
</manifest>
|
||||
@@ -0,0 +1,10 @@
|
||||
package app.polyvox.flutter_filament_example
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.android.TransparencyMode
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
override fun getTransparencyMode(): TransparencyMode {
|
||||
return TransparencyMode.transparent
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
Flutter 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,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="app.polyvox.flutter_filament_example">
|
||||
<!-- Flutter 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,30 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.0'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
org.gradle.jvmargs=-Xmx1536M \
|
||||
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
|
||||
--add-opens=java.base/java.lang=ALL-UNNAMED \
|
||||
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
|
||||
--add-opens=java.base/java.io=ALL-UNNAMED \
|
||||
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,15 @@
|
||||
include ':app'
|
||||
|
||||
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
|
||||
|
||||
def plugins = new Properties()
|
||||
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
|
||||
if (pluginsFile.exists()) {
|
||||
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
|
||||
}
|
||||
|
||||
plugins.each { name, path ->
|
||||
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
|
||||
include ":$name"
|
||||
project(":$name").projectDir = pluginDirectory
|
||||
}
|
||||
BIN
flutter_filament_federated/flutter_filament/example/assets/1.glb
Normal file
BIN
flutter_filament_federated/flutter_filament/example/assets/2.glb
Normal file
BIN
flutter_filament_federated/flutter_filament/example/assets/3.glb
Normal file
|
After Width: | Height: | Size: 531 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 856 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 3.7 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 500 KiB |
|
After Width: | Height: | Size: 614 KiB |
|
After Width: | Height: | Size: 457 KiB |
@@ -0,0 +1,755 @@
|
||||
{
|
||||
"accessors": [
|
||||
{
|
||||
"componentType": 5123,
|
||||
"count": 24408,
|
||||
"type": "SCALAR"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 8468,
|
||||
"type": "VEC2"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 8468,
|
||||
"type": "VEC3"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 8468,
|
||||
"type": "VEC4"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 8468,
|
||||
"type": "VEC3",
|
||||
"max": [
|
||||
0.131662,
|
||||
0.137638986,
|
||||
0.10078799
|
||||
],
|
||||
"min": [
|
||||
-0.131333,
|
||||
-0.028128,
|
||||
-0.137763992
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentType": 5123,
|
||||
"count": 65688,
|
||||
"type": "SCALAR"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 12552,
|
||||
"type": "VEC2"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 12552,
|
||||
"type": "VEC3"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 12552,
|
||||
"type": "VEC4"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 12552,
|
||||
"type": "VEC3",
|
||||
"max": [
|
||||
0.11722149,
|
||||
0.196387976,
|
||||
0.132422984
|
||||
],
|
||||
"min": [
|
||||
-0.11722149,
|
||||
-0.196387976,
|
||||
-0.132422984
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentType": 5123,
|
||||
"count": 2208,
|
||||
"type": "SCALAR"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 436,
|
||||
"type": "VEC2"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 436,
|
||||
"type": "VEC3"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 436,
|
||||
"type": "VEC4"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 436,
|
||||
"type": "VEC3",
|
||||
"max": [
|
||||
0.09527509,
|
||||
0.114654,
|
||||
-0.08429489
|
||||
],
|
||||
"min": [
|
||||
-0.0952748954,
|
||||
0.0551489964,
|
||||
-0.14295499
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentType": 5123,
|
||||
"count": 60288,
|
||||
"type": "SCALAR"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 17186,
|
||||
"type": "VEC2"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 17186,
|
||||
"type": "VEC3"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 17186,
|
||||
"type": "VEC4"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 17186,
|
||||
"type": "VEC3",
|
||||
"max": [
|
||||
0.1572095,
|
||||
0.2716865,
|
||||
0.162181988
|
||||
],
|
||||
"min": [
|
||||
-0.1572095,
|
||||
-0.2716865,
|
||||
-0.162181988
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentType": 5123,
|
||||
"count": 131574,
|
||||
"type": "SCALAR"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 24148,
|
||||
"type": "VEC2"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 24148,
|
||||
"type": "VEC3"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 24148,
|
||||
"type": "VEC4"
|
||||
},
|
||||
{
|
||||
"componentType": 5126,
|
||||
"count": 24148,
|
||||
"type": "VEC3",
|
||||
"max": [
|
||||
0.1504075,
|
||||
0.328366965,
|
||||
0.173673
|
||||
],
|
||||
"min": [
|
||||
-0.1504075,
|
||||
-0.328366965,
|
||||
-0.173673
|
||||
]
|
||||
}
|
||||
],
|
||||
"asset": {
|
||||
"generator": "glTF Tools for Unity",
|
||||
"version": "2.0"
|
||||
},
|
||||
"bufferViews": [
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 0,
|
||||
"byteLength": 59806
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 59808,
|
||||
"byteLength": 99674
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 159484,
|
||||
"byteLength": 4875
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 164360,
|
||||
"byteLength": 133545
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 297908,
|
||||
"byteLength": 203914
|
||||
}
|
||||
],
|
||||
"buffers": [
|
||||
{
|
||||
"name": "FlightHelmet",
|
||||
"byteLength": 501824,
|
||||
"uri": "FlightHelmet.bin"
|
||||
}
|
||||
],
|
||||
"images": [
|
||||
{
|
||||
"name": "FlightHelmet_baseColor",
|
||||
"uri": "FlightHelmet_baseColor.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_occlusionRoughnessMetallic",
|
||||
"uri": "FlightHelmet_occlusionRoughnessMetallic.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_normal",
|
||||
"uri": "FlightHelmet_normal.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_baseColor1",
|
||||
"uri": "FlightHelmet_baseColor1.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_occlusionRoughnessMetallic1",
|
||||
"uri": "FlightHelmet_occlusionRoughnessMetallic1.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_normal1",
|
||||
"uri": "FlightHelmet_normal1.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_baseColor2",
|
||||
"uri": "FlightHelmet_baseColor2.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_occlusionRoughnessMetallic2",
|
||||
"uri": "FlightHelmet_occlusionRoughnessMetallic2.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_normal2",
|
||||
"uri": "FlightHelmet_normal2.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_baseColor3",
|
||||
"uri": "FlightHelmet_baseColor3.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_occlusionRoughnessMetallic3",
|
||||
"uri": "FlightHelmet_occlusionRoughnessMetallic3.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_normal3",
|
||||
"uri": "FlightHelmet_normal3.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_baseColor4",
|
||||
"uri": "FlightHelmet_baseColor4.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_occlusionRoughnessMetallic4",
|
||||
"uri": "FlightHelmet_occlusionRoughnessMetallic4.png"
|
||||
},
|
||||
{
|
||||
"name": "FlightHelmet_normal4",
|
||||
"uri": "FlightHelmet_normal4.png"
|
||||
}
|
||||
],
|
||||
"meshes": [
|
||||
{
|
||||
"primitives": [
|
||||
{
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 1,
|
||||
"NORMAL": 2,
|
||||
"TANGENT": 3,
|
||||
"POSITION": 4
|
||||
},
|
||||
"indices": 0,
|
||||
"material": 0,
|
||||
"mode": 4,
|
||||
"extensions": {
|
||||
"KHR_draco_mesh_compression": {
|
||||
"bufferView": 0,
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 0,
|
||||
"NORMAL": 1,
|
||||
"TANGENT": 2,
|
||||
"POSITION": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "GlassPlastic_low"
|
||||
},
|
||||
{
|
||||
"primitives": [
|
||||
{
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 6,
|
||||
"NORMAL": 7,
|
||||
"TANGENT": 8,
|
||||
"POSITION": 9
|
||||
},
|
||||
"indices": 5,
|
||||
"material": 1,
|
||||
"mode": 4,
|
||||
"extensions": {
|
||||
"KHR_draco_mesh_compression": {
|
||||
"bufferView": 1,
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 0,
|
||||
"NORMAL": 1,
|
||||
"TANGENT": 2,
|
||||
"POSITION": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "LeatherParts_low"
|
||||
},
|
||||
{
|
||||
"primitives": [
|
||||
{
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 11,
|
||||
"NORMAL": 12,
|
||||
"TANGENT": 13,
|
||||
"POSITION": 14
|
||||
},
|
||||
"indices": 10,
|
||||
"material": 2,
|
||||
"mode": 4,
|
||||
"extensions": {
|
||||
"KHR_draco_mesh_compression": {
|
||||
"bufferView": 2,
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 0,
|
||||
"NORMAL": 1,
|
||||
"TANGENT": 2,
|
||||
"POSITION": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "Lenses_low"
|
||||
},
|
||||
{
|
||||
"primitives": [
|
||||
{
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 16,
|
||||
"NORMAL": 17,
|
||||
"TANGENT": 18,
|
||||
"POSITION": 19
|
||||
},
|
||||
"indices": 15,
|
||||
"material": 3,
|
||||
"mode": 4,
|
||||
"extensions": {
|
||||
"KHR_draco_mesh_compression": {
|
||||
"bufferView": 3,
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 0,
|
||||
"NORMAL": 1,
|
||||
"TANGENT": 2,
|
||||
"POSITION": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "MetalParts_low"
|
||||
},
|
||||
{
|
||||
"primitives": [
|
||||
{
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 21,
|
||||
"NORMAL": 22,
|
||||
"TANGENT": 23,
|
||||
"POSITION": 24
|
||||
},
|
||||
"indices": 20,
|
||||
"material": 4,
|
||||
"mode": 4,
|
||||
"extensions": {
|
||||
"KHR_draco_mesh_compression": {
|
||||
"bufferView": 4,
|
||||
"attributes": {
|
||||
"TEXCOORD_0": 0,
|
||||
"NORMAL": 1,
|
||||
"TANGENT": 2,
|
||||
"POSITION": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "RubberWood_low"
|
||||
}
|
||||
],
|
||||
"materials": [
|
||||
{
|
||||
"pbrMetallicRoughness": {
|
||||
"baseColorTexture": {
|
||||
"index": 0,
|
||||
"texCoord": 0
|
||||
},
|
||||
"metallicRoughnessTexture": {
|
||||
"index": 1,
|
||||
"texCoord": 0
|
||||
},
|
||||
"baseColorFactor": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"metallicFactor": 1,
|
||||
"roughnessFactor": 1
|
||||
},
|
||||
"normalTexture": {
|
||||
"index": 2,
|
||||
"texCoord": 0
|
||||
},
|
||||
"occlusionTexture": {
|
||||
"index": 1,
|
||||
"texCoord": 0
|
||||
},
|
||||
"name": "GlassPlasticMat",
|
||||
"emissiveFactor": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"alphaMode": "OPAQUE",
|
||||
"doubleSided": false
|
||||
},
|
||||
{
|
||||
"pbrMetallicRoughness": {
|
||||
"baseColorTexture": {
|
||||
"index": 3,
|
||||
"texCoord": 0
|
||||
},
|
||||
"metallicRoughnessTexture": {
|
||||
"index": 4,
|
||||
"texCoord": 0
|
||||
},
|
||||
"baseColorFactor": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"metallicFactor": 1,
|
||||
"roughnessFactor": 1
|
||||
},
|
||||
"normalTexture": {
|
||||
"index": 5,
|
||||
"texCoord": 0
|
||||
},
|
||||
"occlusionTexture": {
|
||||
"index": 4,
|
||||
"texCoord": 0
|
||||
},
|
||||
"name": "LeatherPartsMat",
|
||||
"emissiveFactor": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"alphaMode": "OPAQUE",
|
||||
"doubleSided": false
|
||||
},
|
||||
{
|
||||
"pbrMetallicRoughness": {
|
||||
"baseColorTexture": {
|
||||
"index": 6,
|
||||
"texCoord": 0
|
||||
},
|
||||
"metallicRoughnessTexture": {
|
||||
"index": 7,
|
||||
"texCoord": 0
|
||||
},
|
||||
"baseColorFactor": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"metallicFactor": 1,
|
||||
"roughnessFactor": 1
|
||||
},
|
||||
"normalTexture": {
|
||||
"index": 8,
|
||||
"texCoord": 0
|
||||
},
|
||||
"occlusionTexture": {
|
||||
"index": 7,
|
||||
"texCoord": 0
|
||||
},
|
||||
"alphaMode": "BLEND",
|
||||
"name": "LensesMat",
|
||||
"emissiveFactor": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"doubleSided": false
|
||||
},
|
||||
{
|
||||
"pbrMetallicRoughness": {
|
||||
"baseColorTexture": {
|
||||
"index": 9,
|
||||
"texCoord": 0
|
||||
},
|
||||
"metallicRoughnessTexture": {
|
||||
"index": 10,
|
||||
"texCoord": 0
|
||||
},
|
||||
"baseColorFactor": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"metallicFactor": 1,
|
||||
"roughnessFactor": 1
|
||||
},
|
||||
"normalTexture": {
|
||||
"index": 11,
|
||||
"texCoord": 0
|
||||
},
|
||||
"occlusionTexture": {
|
||||
"index": 10,
|
||||
"texCoord": 0
|
||||
},
|
||||
"name": "MetalPartsMat",
|
||||
"emissiveFactor": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"alphaMode": "OPAQUE",
|
||||
"doubleSided": false
|
||||
},
|
||||
{
|
||||
"doubleSided": true,
|
||||
"pbrMetallicRoughness": {
|
||||
"baseColorTexture": {
|
||||
"index": 12,
|
||||
"texCoord": 0
|
||||
},
|
||||
"metallicRoughnessTexture": {
|
||||
"index": 13,
|
||||
"texCoord": 0
|
||||
},
|
||||
"baseColorFactor": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"metallicFactor": 1,
|
||||
"roughnessFactor": 1
|
||||
},
|
||||
"normalTexture": {
|
||||
"index": 14,
|
||||
"texCoord": 0
|
||||
},
|
||||
"occlusionTexture": {
|
||||
"index": 13,
|
||||
"texCoord": 0
|
||||
},
|
||||
"name": "RubberWoodMat",
|
||||
"emissiveFactor": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"alphaMode": "OPAQUE"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"mesh": 0,
|
||||
"name": "GlassPlastic_low"
|
||||
},
|
||||
{
|
||||
"mesh": 1,
|
||||
"translation": [
|
||||
0.000434499962,
|
||||
0.032592997,
|
||||
0.011676996
|
||||
],
|
||||
"name": "LeatherParts_low",
|
||||
"rotation": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"scale": [
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"mesh": 2,
|
||||
"name": "Lenses_low"
|
||||
},
|
||||
{
|
||||
"mesh": 3,
|
||||
"translation": [
|
||||
0.0331545,
|
||||
-0.1488645,
|
||||
-0.0242879968
|
||||
],
|
||||
"name": "MetalParts_low",
|
||||
"rotation": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"scale": [
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"mesh": 4,
|
||||
"translation": [
|
||||
-0.00190849893,
|
||||
-0.111985,
|
||||
-0.013313001
|
||||
],
|
||||
"name": "RubberWood_low",
|
||||
"rotation": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"scale": [
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"rotation": [
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"name": "FlightHelmet",
|
||||
"translation": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
}
|
||||
],
|
||||
"scene": 0,
|
||||
"scenes": [
|
||||
{
|
||||
"nodes": [
|
||||
5
|
||||
]
|
||||
}
|
||||
],
|
||||
"textures": [
|
||||
{
|
||||
"source": 0
|
||||
},
|
||||
{
|
||||
"source": 1
|
||||
},
|
||||
{
|
||||
"source": 2
|
||||
},
|
||||
{
|
||||
"source": 3
|
||||
},
|
||||
{
|
||||
"source": 4
|
||||
},
|
||||
{
|
||||
"source": 5
|
||||
},
|
||||
{
|
||||
"source": 6
|
||||
},
|
||||
{
|
||||
"source": 7
|
||||
},
|
||||
{
|
||||
"source": 8
|
||||
},
|
||||
{
|
||||
"source": 9
|
||||
},
|
||||
{
|
||||
"source": 10
|
||||
},
|
||||
{
|
||||
"source": 11
|
||||
},
|
||||
{
|
||||
"source": 12
|
||||
},
|
||||
{
|
||||
"source": 13
|
||||
},
|
||||
{
|
||||
"source": 14
|
||||
}
|
||||
],
|
||||
"extensionsRequired": [
|
||||
"KHR_draco_mesh_compression"
|
||||
],
|
||||
"extensionsUsed": [
|
||||
"KHR_draco_mesh_compression"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 5.1 MiB |
|
After Width: | Height: | Size: 806 KiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 3.8 MiB |
|
After Width: | Height: | Size: 3.0 MiB |
|
After Width: | Height: | Size: 5.4 MiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 4.4 MiB |
|
After Width: | Height: | Size: 5.1 MiB |
|
After Width: | Height: | Size: 737 KiB |
|
After Width: | Height: | Size: 3.6 MiB |
|
After Width: | Height: | Size: 4.3 MiB |
@@ -0,0 +1,16 @@
|
||||
# Flight Helmet
|
||||
|
||||
## Screenshot
|
||||
|
||||

|
||||
|
||||
## License Information
|
||||
|
||||
Donated by Microsoft for glTF testing
|
||||
|
||||
[](http://creativecommons.org/publicdomain/zero/1.0/)
|
||||
To the extent possible under law, Microsoft has waived all copyright and related or neighboring rights to this asset.
|
||||
|
||||
Draco compression was done via Cesium tools on 27-03-2020 as follows.
|
||||
|
||||
gltf-pipeline -i FlightHelmet.gltf -o FlightHelmet.gltf -d -s --keep-unused-elements
|
||||
|
After Width: | Height: | Size: 572 KiB |
|
After Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,14 @@
|
||||
material {
|
||||
name : SolidColor,
|
||||
shadingModel : unlit,
|
||||
culling : none,
|
||||
featureLevel : 1,
|
||||
vertexDomain: object
|
||||
}
|
||||
|
||||
fragment {
|
||||
void material(inout MaterialInputs material) {
|
||||
prepareMaterial(material);
|
||||
material.baseColor = vec4(0.1f, 0.5f, 0.9f, 1.0f);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
device=$1
|
||||
if [ -z "$device" ]; then
|
||||
echo "Usage: $0 <device_id>"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
rm -f integration_test/goldens/{ios,macos,windows,android}/diffs/*.png
|
||||
flutter drive --driver=test_driver/integration_test.dart -d $1 --target=integration_test/plugin_integration_test.dart
|
||||
|
After Width: | Height: | Size: 252 KiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
@@ -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:flutter_filament/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 FlutterFilamentPlugin (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
flutter_filament_federated/flutter_filament/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
|
||||
@@ -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>
|
||||
@@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||