Compare commits
9 Commits
thermion_f
...
429b8eb93b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
429b8eb93b | ||
|
|
413faec849 | ||
|
|
433b6373a9 | ||
|
|
ad2c5afb7f | ||
|
|
a561c847a7 | ||
|
|
ef7ba24ecc | ||
|
|
ee176d2684 | ||
|
|
fa168df28f | ||
|
|
ba3d016c1a |
41
CHANGELOG.md
41
CHANGELOG.md
@@ -3,6 +3,47 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## 2025-07-08
|
||||
|
||||
### Changes
|
||||
|
||||
---
|
||||
|
||||
Packages with breaking changes:
|
||||
|
||||
- There are no breaking changes in this release.
|
||||
|
||||
Packages with other changes:
|
||||
|
||||
- [`thermion_dart` - `v0.3.2`](#thermion_dart---v032)
|
||||
- [`thermion_flutter` - `v0.3.2`](#thermion_flutter---v032)
|
||||
- [`thermion_flutter_method_channel` - `v0.3.2`](#thermion_flutter_method_channel---v032)
|
||||
- [`thermion_flutter_web` - `v0.3.2`](#thermion_flutter_web---v032)
|
||||
- [`thermion_flutter_platform_interface` - `v0.3.2`](#thermion_flutter_platform_interface---v032)
|
||||
|
||||
---
|
||||
|
||||
#### `thermion_dart` - `v0.3.2`
|
||||
|
||||
- Bump "thermion_dart" to `0.3.2`.
|
||||
|
||||
#### `thermion_flutter` - `v0.3.2`
|
||||
|
||||
- Bump "thermion_flutter" to `0.3.2`.
|
||||
|
||||
#### `thermion_flutter_method_channel` - `v0.3.2`
|
||||
|
||||
- Bump "thermion_flutter_method_channel" to `0.3.2`.
|
||||
|
||||
#### `thermion_flutter_web` - `v0.3.2`
|
||||
|
||||
- **FIX**: add missing destroySwapchain argument for web.
|
||||
|
||||
#### `thermion_flutter_platform_interface` - `v0.3.2`
|
||||
|
||||
- Bump "thermion_flutter_platform_interface" to `0.3.2`.
|
||||
|
||||
|
||||
## 2025-07-08
|
||||
|
||||
### Changes
|
||||
|
||||
@@ -79,4 +79,4 @@ Thank you to the following people:
|
||||
- @LukasPoque for CI/refactoring work
|
||||
- @alexmercerind for his work on integrating ANGLE textures on Flutter Windows
|
||||
- @BrutalCoding for documentation fixes
|
||||
|
||||
- @chenriji for testing and bug fixes
|
||||
|
||||
@@ -108,10 +108,13 @@ fragment {
|
||||
1.0
|
||||
);
|
||||
|
||||
color.rgb = (axes.x < 1e-8) ? color.rgb : AXIS_COLOR_X;
|
||||
color.rgb = (axes.z < 1e-8) ? color.rgb : AXIS_COLOR_Z;
|
||||
|
||||
material.baseColor = color * gridAlpha;
|
||||
|
||||
if(axes.x > 1e-8) {
|
||||
material.baseColor = vec4(AXIS_COLOR_X, 1.0);
|
||||
} else if(axes.z > 1e-8) {
|
||||
material.baseColor = vec4(AXIS_COLOR_Z, 1.0);
|
||||
} else {
|
||||
material.baseColor = color * gridAlpha;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
name: thermion_workspace
|
||||
packages:
|
||||
- thermion_dart
|
||||
- thermion_flutter/**
|
||||
- thermion_flutter/thermion_flutter_platform_interface
|
||||
- thermion_flutter/thermion_flutter_method_channel
|
||||
- thermion_flutter/thermion_flutter_web
|
||||
- thermion_flutter/thermion_flutter
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 0.3.2
|
||||
|
||||
- Bump "thermion_dart" to `0.3.2`.
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- **REFACTOR**: remove covariant keyword from createInstance args.
|
||||
|
||||
@@ -5,11 +5,10 @@ import '../../../utils/src/matrix.dart';
|
||||
|
||||
class FFICamera extends Camera<Pointer<TCamera>> {
|
||||
final Pointer<TCamera> camera;
|
||||
|
||||
|
||||
@override
|
||||
Pointer<TCamera> getNativeHandle() {
|
||||
return camera;
|
||||
|
||||
}
|
||||
|
||||
final FFIFilamentApp app;
|
||||
@@ -92,6 +91,16 @@ class FFICamera extends Camera<Pointer<TCamera>> {
|
||||
double far = kFar,
|
||||
double aspect = 1.0,
|
||||
double focalLength = kFocalLength}) async {
|
||||
if (near.isNaN ||
|
||||
far.isNaN ||
|
||||
aspect.isNaN ||
|
||||
focalLength.isNaN ||
|
||||
near.isNegative ||
|
||||
far.isNegative ||
|
||||
aspect.isNegative ||
|
||||
focalLength.isNegative) {
|
||||
throw FormatException();
|
||||
}
|
||||
Camera_setLensProjection(camera, near, far, aspect, focalLength);
|
||||
}
|
||||
|
||||
|
||||
@@ -344,13 +344,14 @@ abstract class ThermionViewer {
|
||||
int getCameraCount();
|
||||
|
||||
///
|
||||
/// Adds the asset to the scene, meaning the asset will be rendered/visible.
|
||||
/// Adds the asset to the scene. All renderable entities attached to
|
||||
/// the asset will be visible.
|
||||
///
|
||||
Future addToScene(covariant ThermionAsset asset);
|
||||
|
||||
///
|
||||
/// Removes the asset from the scene, meaning the asset will not be rendered/visible.
|
||||
/// The asset itself will remain valid.
|
||||
/// Removes the asset from the scene. None of the renderable entities
|
||||
/// attached to the asset will be visible, but the asset itself remains valid.
|
||||
///
|
||||
Future removeFromScene(covariant ThermionAsset asset);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@ GRID_PACKAGE:
|
||||
GRID_GRID_OFFSET:
|
||||
.int 0
|
||||
GRID_GRID_SIZE:
|
||||
.int 50913
|
||||
.int 49793
|
||||
|
||||
|
||||
@@ -8,5 +8,5 @@ _GRID_PACKAGE:
|
||||
_GRID_GRID_OFFSET:
|
||||
.int 0
|
||||
_GRID_GRID_SIZE:
|
||||
.int 50913
|
||||
.int 49793
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
name: thermion_dart
|
||||
description: 3D rendering toolkit for Dart.
|
||||
version: 0.3.1
|
||||
version: 0.3.2
|
||||
homepage: https://thermion.dev
|
||||
repository: https://github.com/nmfisher/thermion
|
||||
|
||||
|
||||
@@ -82,10 +82,6 @@ class TestHelper {
|
||||
testDir = Directory("${packageUri}test").path;
|
||||
outDir = Directory("$testDir/output/${dir}");
|
||||
outDir.createSync(recursive: true);
|
||||
if (Platform.isMacOS) {
|
||||
DynamicLibrary.open('${testDir}/generated/objective_c.dylib');
|
||||
DynamicLibrary.open('${testDir}/generated/libThermionTextureSwift.dylib');
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
@@ -226,6 +222,10 @@ class TestHelper {
|
||||
|
||||
FFIRenderTarget? renderTarget;
|
||||
if (createRenderTarget) {
|
||||
// if (Platform.isMacOS) {
|
||||
// DynamicLibrary.open('${testDir}/generated/objective_c.dylib');
|
||||
// DynamicLibrary.open('${testDir}/generated/libThermionTextureSwift.dylib');
|
||||
// }
|
||||
// var metalColorTexture = await createTexture(
|
||||
// viewportDimensions.width, viewportDimensions.height);
|
||||
// var metalDepthTexture = await createTexture(
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 0.3.2
|
||||
|
||||
- Bump "thermion_flutter" to `0.3.2`.
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- **FIX**: addDestroySwapchain argument to createViewer() (true by default). This is only used on iOS/macOS where a single swapchain is shared between all render targets.
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||

|
||||
|
||||
<p align="center">
|
||||
<a href="https://thermion.dev/quickstart">Quickstart (Flutter)</a> •
|
||||
<a href="https://thermion.dev/quickstart">Documentation</a> •
|
||||
<a href="https://thermion.dev/showcase">Showcase</a> •
|
||||
<a href="https://dartpad.thermion.dev/">Playground</a> •
|
||||
<a href="https://discord.gg/h2VdDK3EAQ">Discord</a>
|
||||
</p>
|
||||
|
||||
## Cross-platform 3D engine for Dart and Flutter.
|
||||
|
||||
<a href="https://pub.dev/packages/thermion_dart"><img src="https://img.shields.io/pub/v/thermion_dart?label=pub.dev&labelColor=333940&logo=dart&color=00589B" alt="pub"></a>
|
||||
<a href="https://github.com/nmfisher/thermion"><img src="https://img.shields.io/github/stars/nmfisher/flutter_filament?style=flat&label=stars&labelColor=333940&color=8957e5&logo=github" alt="github"></a>
|
||||
<a href="https://discord.gg/h2VdDK3EAQ"><img src="https://img.shields.io/discord/993167615587520602?logo=discord&logoColor=fff&labelColor=333940" alt="discord"></a>
|
||||
<a href="https://github.com/nmfisher/thermion"><img src="https://img.shields.io/github/contributors/nmfisher/flutter_filament?logo=github&labelColor=333940" alt="contributors"></a>
|
||||
|
||||
### Quickstart (Flutter)
|
||||
|
||||
```
|
||||
_thermionViewer = await ThermionFlutterPlugin.createViewer();
|
||||
|
||||
// Geometry and models are represented as "entities". Here, we load a glTF
|
||||
// file containing a plain cube.
|
||||
// By default, all paths are treated as asset paths. To load from a file
|
||||
// instead, use file:// URIs.
|
||||
var entity =
|
||||
await _thermionViewer!.loadGlb("assets/cube.glb", keepData: true);
|
||||
|
||||
// Thermion uses a right-handed coordinate system where +Y is up and -Z is
|
||||
// "into" the screen.
|
||||
// By default, the camera is located at (0,0,0) looking at (0,0,-1); this
|
||||
// would place it directly inside the cube we just loaded.
|
||||
//
|
||||
// Let's move the camera to (0,0,10) to ensure the cube is visible in the
|
||||
// viewport.
|
||||
await _thermionViewer!.setCameraPosition(0, 0, 10);
|
||||
|
||||
// Without a light source, your scene will be totally black. Let's load a skybox
|
||||
// (a cubemap image that is rendered behind everything else in the scene)
|
||||
// and an image-based indirect light that has been precomputed from the same
|
||||
// skybox.
|
||||
await _thermionViewer!.loadSkybox("assets/default_env_skybox.ktx");
|
||||
await _thermionViewer!.loadIbl("assets/default_env_ibl.ktx");
|
||||
|
||||
// Finally, you need to explicitly enable rendering. Setting rendering to
|
||||
// false is designed to allow you to pause rendering to conserve battery life
|
||||
await _thermionViewer!.setRendering(true);
|
||||
```
|
||||
|
||||
and then in your Flutter application:
|
||||
```
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(children: [
|
||||
if (_thermionViewer != null)
|
||||
Positioned.fill(
|
||||
child: ThermionWidget(
|
||||
viewer: _thermionViewer!,
|
||||
)),
|
||||
]);
|
||||
}
|
||||
```
|
||||
1
thermion_flutter/thermion_flutter/README.md
Symbolic link
1
thermion_flutter/thermion_flutter/README.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../../thermion_dart/README.md
|
||||
@@ -1,6 +1,6 @@
|
||||
name: thermion_flutter
|
||||
description: Flutter plugin for 3D rendering with the Thermion toolkit.
|
||||
version: 0.3.1
|
||||
version: 0.3.2
|
||||
homepage: https://thermion.dev
|
||||
repository: https://github.com/nmfisher/thermion
|
||||
|
||||
@@ -17,10 +17,10 @@ dependencies:
|
||||
plugin_platform_interface: ^2.0.0
|
||||
ffi: ^2.1.2
|
||||
animation_tools_dart: ^0.1.0
|
||||
thermion_dart: ^0.3.1
|
||||
thermion_flutter_platform_interface: ^0.3.1
|
||||
thermion_flutter_method_channel: ^0.3.1
|
||||
thermion_flutter_web: ^0.3.1
|
||||
thermion_dart: ^0.3.2
|
||||
thermion_flutter_platform_interface: ^0.3.2
|
||||
thermion_flutter_method_channel: ^0.3.2
|
||||
thermion_flutter_web: ^0.3.2
|
||||
logging: ^1.2.0
|
||||
web: ^1.0.0
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 0.3.2
|
||||
|
||||
- Bump "thermion_flutter_method_channel" to `0.3.2`.
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- **FIX**: addDestroySwapchain argument to createViewer() (true by default). This is only used on iOS/macOS where a single swapchain is shared between all render targets.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: thermion_flutter_method_channel
|
||||
description: Desktop + mobile implementation for texture creation + registration with Flutter.
|
||||
repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter
|
||||
version: 0.3.1
|
||||
version: 0.3.2
|
||||
|
||||
environment:
|
||||
sdk: ">=3.3.0 <4.0.0"
|
||||
@@ -23,8 +23,8 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
plugin_platform_interface: ^2.1.0
|
||||
thermion_flutter_platform_interface: ^0.3.1
|
||||
thermion_dart: ^0.3.1
|
||||
thermion_flutter_platform_interface: ^0.3.2
|
||||
thermion_dart: ^0.3.2
|
||||
logging: ^1.2.0
|
||||
dependency_overrides:
|
||||
thermion_dart:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 0.3.2
|
||||
|
||||
- Bump "thermion_flutter_platform_interface" to `0.3.2`.
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- **FIX**: addDestroySwapchain argument to createViewer() (true by default). This is only used on iOS/macOS where a single swapchain is shared between all render targets.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: thermion_flutter_platform_interface
|
||||
description: A common platform interface for the thermion_flutter plugin.
|
||||
repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter
|
||||
version: 0.3.1
|
||||
version: 0.3.2
|
||||
|
||||
environment:
|
||||
sdk: ">=3.3.0 <4.0.0"
|
||||
@@ -11,7 +11,7 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
plugin_platform_interface: ^2.1.0
|
||||
thermion_dart: ^0.3.1
|
||||
thermion_dart: ^0.3.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 0.3.2
|
||||
|
||||
- **FIX**: add missing destroySwapchain argument for web.
|
||||
|
||||
## 0.3.1
|
||||
|
||||
## 0.3.0
|
||||
|
||||
@@ -40,7 +40,7 @@ class ThermionFlutterWebPlugin extends ThermionFlutterPlatform {
|
||||
return asset.buffer.asUint8List(asset.offsetInBytes);
|
||||
}
|
||||
|
||||
Future<ThermionViewer> createViewer() async {
|
||||
Future<ThermionViewer> createViewer({bool destroySwapchain = true}) async {
|
||||
HTMLCanvasElement? canvas;
|
||||
if (FilamentApp.instance == null) {
|
||||
// first, try and initialize bindings to see if the user has included thermion_dart.js manually in index.html
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: thermion_flutter_web
|
||||
description: A web platform interface for the thermion_flutter plugin.
|
||||
repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter
|
||||
version: 0.3.1
|
||||
version: 0.3.2
|
||||
|
||||
environment:
|
||||
sdk: ">=3.3.0 <4.0.0"
|
||||
@@ -20,8 +20,8 @@ dependencies:
|
||||
sdk: flutter
|
||||
plugin_platform_interface: ^2.1.0
|
||||
web: ^1.0.0
|
||||
thermion_dart: ^0.3.1
|
||||
thermion_flutter_platform_interface: ^0.3.1
|
||||
thermion_dart: ^0.3.2
|
||||
thermion_flutter_platform_interface: ^0.3.2
|
||||
flutter_web_plugins:
|
||||
sdk: flutter
|
||||
logging: ^1.3.0
|
||||
|
||||
Reference in New Issue
Block a user