chore: merge master
This commit is contained in:
@@ -1,3 +1,66 @@
|
||||
## 0.2.1-dev.9
|
||||
|
||||
> Note: This release has breaking changes.
|
||||
|
||||
- **REFACTOR**: continual refactor to support multiple render targets.
|
||||
- **REFACTOR**: continual refactor to support multiple render targets.
|
||||
- **FIX**: (flutter) pass ThermionFlutterOptions to ThermionWidget, use dpr for resizeTexture, delete unnecessary TransparencyPainter class.
|
||||
- **FIX**: (flutter/web) use window.devicePixelRatio for viewport.
|
||||
- **FIX**: use internal Set for determining first ThermionTextureWidget to call requestFrame and cleanup destruction logic.
|
||||
- **FIX**: (flutter) pass ThermionFlutterOptions to ThermionWidget, use dpr for resizeTexture, delete unnecessary TransparencyPainter class.
|
||||
- **FIX**: fix all Windows warnings so apps will compile with /WX.
|
||||
- **FIX**: (flutter) desktop gesture detector changes for new Gizmo methods.
|
||||
- **FIX**: (flutter/web) use window.devicePixelRatio for viewport.
|
||||
- **FIX**: use internal Set for determining first ThermionTextureWidget to call requestFrame and cleanup destruction logic.
|
||||
- **FIX**: fix all Windows warnings so apps will compile with /WX.
|
||||
- **FIX**: (flutter) desktop gesture detector changes for new Gizmo methods.
|
||||
- **FEAT**: highlight gizmo on hover.
|
||||
- **FEAT**: add rendering check to ThermionWidget ticker.
|
||||
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
|
||||
- **FEAT**: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated.
|
||||
- **FEAT**: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated.
|
||||
- **FEAT**: allow passing null options to ThermionWidget.
|
||||
- **FEAT**: (flutter) (web) if importCanvasAsWidget is false, render transparency.
|
||||
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
|
||||
- **FEAT**: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated.
|
||||
- **FEAT**: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated.
|
||||
- **FEAT**: use imported texture on iOS.
|
||||
- **FEAT**: support multiple ThermionWidget on Android.
|
||||
- **FEAT**: highlight gizmo on hover.
|
||||
- **FEAT**: (flutter) (web) if importCanvasAsWidget is false, render transparency.
|
||||
- **FEAT**: working implementation of multiple widgets on macos.
|
||||
- **FEAT**: add rendering check to ThermionWidget ticker.
|
||||
- **FEAT**: working implementation of multiple widgets on macos.
|
||||
- **FEAT**: camera and resizing improvements.
|
||||
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
|
||||
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
|
||||
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
|
||||
- **FEAT**: (flutter) (windows) add Destroy() to BackingWindow.
|
||||
- **FEAT**: (flutter) (windows) add Destroy() to BackingWindow.
|
||||
- **FEAT**: camera and resizing improvements.
|
||||
- **FEAT**: support multiple ThermionWidget on Android.
|
||||
- **FEAT**: (flutter) (windows) add DestroyRenderingSurface method.
|
||||
- **FEAT**: allow passing null options to ThermionWidget.
|
||||
- **FEAT**: use imported texture on iOS.
|
||||
- **BREAKING** **FIX**: remove EntityControllerMouseWidget (replace with GestureHandler).
|
||||
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
|
||||
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
|
||||
- **BREAKING** **FIX**: remove EntityControllerMouseWidget (replace with GestureHandler).
|
||||
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
|
||||
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
|
||||
- **BREAKING** **FEAT**: (web) (flutter) create canvas when createViewer is called (no longer need to manually add canvas element to web HTML).
|
||||
- **BREAKING** **FEAT**: resize canvas on web.
|
||||
- **BREAKING** **FEAT**: (web) (flutter) create canvas when createViewer is called (no longer need to manually add canvas element to web HTML).
|
||||
- **BREAKING** **FEAT**: resize canvas on web.
|
||||
- **BREAKING** **CHORE**: remove superseded HardwareKeyboard* classes.
|
||||
- **BREAKING** **CHORE**: (flutter) cleanup for pub.dev publishing.
|
||||
- **BREAKING** **CHORE**: remove EntityListWidget - will replace with new Scene.
|
||||
- **BREAKING** **CHORE**: rename controller to viewer in gesture detector widgets.
|
||||
- **BREAKING** **CHORE**: rename controller to viewer in gesture detector widgets.
|
||||
- **BREAKING** **CHORE**: remove EntityListWidget - will replace with new Scene.
|
||||
- **BREAKING** **CHORE**: (flutter) cleanup for pub.dev publishing.
|
||||
- **BREAKING** **CHORE**: remove superseded HardwareKeyboard* classes.
|
||||
|
||||
## 0.2.1-dev.8
|
||||
|
||||
- **FIX**: fix all Windows warnings so apps will compile with /WX.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: thermion_flutter
|
||||
description: Flutter plugin for 3D rendering with the Thermion toolkit.
|
||||
version: 0.2.1-dev.8
|
||||
version: 0.2.1-dev.9
|
||||
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.2.1-dev.0.0.9
|
||||
thermion_flutter_platform_interface: ^0.2.1-dev.8
|
||||
thermion_flutter_ffi: ^0.2.1-dev.8
|
||||
thermion_flutter_web: ^0.1.1
|
||||
thermion_dart: ^0.2.1-dev.0.0.10
|
||||
thermion_flutter_platform_interface: ^0.2.1-dev.9
|
||||
thermion_flutter_ffi: ^0.2.1-dev.9
|
||||
thermion_flutter_web: ^0.2.0
|
||||
logging: ^1.2.0
|
||||
web: ^1.0.0
|
||||
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
## 0.2.1-dev.9
|
||||
|
||||
> Note: This release has breaking changes.
|
||||
|
||||
- **REFACTOR**: continual refactor to support multiple render targets.
|
||||
- **REFACTOR**: continual refactor to support multiple render targets.
|
||||
- **FIX**: on resize, destroy swapchain if destroySwapChainOnResize is true.
|
||||
- **FIX**: add listener in ThermionFlutterTextureBackedPlatform to unset viewer on dispose.
|
||||
- **FIX**: add listener in ThermionFlutterMethodChannelInterface to unset viewer on dispose.
|
||||
- **FIX**: clean up destruction logic for FlutterPlatformTexture.
|
||||
- **FIX**: on resize, destroy swapchain if destroySwapChainOnResize is true.
|
||||
- **FIX**: add listener in ThermionFlutterTextureBackedPlatform to unset viewer on dispose.
|
||||
- **FIX**: add listener in ThermionFlutterMethodChannelInterface to unset viewer on dispose.
|
||||
- **FIX**: clean up destruction logic for FlutterPlatformTexture.
|
||||
- **FIX**: web/JS bool checks need to compare to int.
|
||||
- **FEAT**: support multiple ThermionWidget on Android.
|
||||
- **FEAT**: use imported texture on iOS.
|
||||
- **FEAT**: working implementation of multiple widgets on macos.
|
||||
- **FEAT**: (flutter) move DPR calculation to resizeTexture and add createViewerWithOptions method to ThermionFlutterFFI.
|
||||
- **FEAT**: support multiple ThermionWidget on Android.
|
||||
- **FEAT**: use imported texture on iOS.
|
||||
- **FEAT**: working implementation of multiple widgets on macos.
|
||||
- **FEAT**: (flutter) move DPR calculation to resizeTexture and add createViewerWithOptions method to ThermionFlutterFFI.
|
||||
- **BREAKING** **REFACTOR**: refactor to support multiple Views/Render Targets.
|
||||
- **BREAKING** **REFACTOR**: refactor to support multiple Views/Render Targets.
|
||||
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
|
||||
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
|
||||
- **BREAKING** **FEAT**: big refactor to support multiple swapchains.
|
||||
- **BREAKING** **FEAT**: big refactor to support multiple swapchains.
|
||||
|
||||
## 0.2.1-dev.8
|
||||
|
||||
- **FIX**: on resize, destroy swapchain if destroySwapChainOnResize is true.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
library;
|
||||
export 'src/thermion_flutter_windows.dart';
|
||||
export 'src/thermion_flutter_texture_backed_platform.dart';
|
||||
export 'src/thermion_flutter_texture_backed_platform.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: thermion_flutter_ffi
|
||||
description: An FFI implementation for thermion_flutter (i.e. all platforms except web).
|
||||
repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter
|
||||
version: 0.2.1-dev.8
|
||||
version: 0.2.1-dev.9
|
||||
|
||||
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.2.1-dev.8
|
||||
thermion_dart: ^0.2.1-dev.0.0.9
|
||||
thermion_flutter_platform_interface: ^0.2.1-dev.9
|
||||
thermion_dart: ^0.2.1-dev.0.0.10
|
||||
logging: ^1.2.0
|
||||
|
||||
dev_dependencies:
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
## 0.2.1-dev.9
|
||||
|
||||
> Note: This release has breaking changes.
|
||||
|
||||
- **REFACTOR**: continual refactor to support multiple render targets.
|
||||
- **REFACTOR**: continual refactor to support multiple render targets.
|
||||
- **FEAT**: support multiple ThermionWidget on Android.
|
||||
- **FEAT**: working implementation of multiple widgets on macos.
|
||||
- **FEAT**: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated.
|
||||
- **FEAT**: add ThermionFlutterOptions classes, rename interface parameter for offsetTop and ensure pixelRatio is passed to resizeTexture.
|
||||
- **FEAT**: support multiple ThermionWidget on Android.
|
||||
- **FEAT**: working implementation of multiple widgets on macos.
|
||||
- **FEAT**: add createViewerWithOptions to ThermionFlutterPlugin and mark createViewer as deprecated.
|
||||
- **FEAT**: add ThermionFlutterOptions classes, rename interface parameter for offsetTop and ensure pixelRatio is passed to resizeTexture.
|
||||
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
|
||||
- **BREAKING** **FIX**: (flutter) pass pixelRatio to createTexture.
|
||||
|
||||
## 0.2.1-dev.8
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
@@ -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.2.1-dev.8
|
||||
version: 0.2.1-dev.9
|
||||
|
||||
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.2.1-dev.0.0.9
|
||||
thermion_dart: ^0.2.1-dev.0.0.10
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
## 0.2.0
|
||||
|
||||
> Note: This release has breaking changes.
|
||||
|
||||
- **FIX**: (flutter/web) use window.devicePixelRatio for viewport.
|
||||
- **FIX**: (flutter/web) use window.devicePixelRatio for viewport.
|
||||
- **FEAT**: (flutter) (web) use options to determine whether to create canvas, and set fixed position + offset.
|
||||
- **FEAT**: add ThermionFlutterOptions classes, rename interface parameter for offsetTop and ensure pixelRatio is passed to resizeTexture.
|
||||
- **FEAT**: (flutter) (web) use options to determine whether to create canvas, and set fixed position + offset.
|
||||
- **FEAT**: add ThermionFlutterOptions classes, rename interface parameter for offsetTop and ensure pixelRatio is passed to resizeTexture.
|
||||
- **FEAT**: allow passing assetPathPrefix to ThermionViewerWasm to account for Flutter build asset paths.
|
||||
- **BREAKING** **FEAT**: (flutter) (web) upgrade package:web dep to 1.0.0.
|
||||
- **BREAKING** **FEAT**: (web) (flutter) create canvas when createViewer is called (no longer need to manually add canvas element to web HTML).
|
||||
- **BREAKING** **FEAT**: resize canvas on web.
|
||||
- **BREAKING** **FEAT**: (flutter) (web) upgrade package:web dep to 1.0.0.
|
||||
- **BREAKING** **FEAT**: (web) (flutter) create canvas when createViewer is called (no longer need to manually add canvas element to web HTML).
|
||||
- **BREAKING** **FEAT**: resize canvas on web.
|
||||
- **BREAKING** **CHORE**: restructure viewer folders as libraries to only export the public interface.
|
||||
- **BREAKING** **CHORE**: restructure viewer folders as libraries to only export the public interface.
|
||||
|
||||
## 0.1.1
|
||||
|
||||
- **FEAT**: allow passing assetPathPrefix to ThermionViewerWasm to account for Flutter build asset paths.
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
import 'package:thermion_dart/thermion_dart.dart';
|
||||
import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart';
|
||||
import 'package:thermion_flutter_platform_interface/thermion_flutter_texture.dart';
|
||||
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
import 'package:thermion_flutter_web/thermion_flutter_web_options.dart';
|
||||
import 'package:web/web.dart';
|
||||
|
||||
class ThermionFlutterWebPlugin extends ThermionFlutterPlatform {
|
||||
|
||||
ThermionViewerWasm? _viewer;
|
||||
|
||||
static void registerWith(Registrar registrar) {
|
||||
ThermionFlutterPlatform.instance = ThermionFlutterWebPlugin();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ThermionFlutterTexture?> createTexture(double width, double height,
|
||||
double offsetLeft, double offsetTop, double pixelRatio) async {
|
||||
await _viewer!.destroySwapChain();
|
||||
await _viewer!.createSwapChain(width.ceil(), height.ceil());
|
||||
|
||||
final canvas = document.getElementById("canvas") as HTMLCanvasElement;
|
||||
canvas.width = (width * pixelRatio).ceil();
|
||||
canvas.height = (height * pixelRatio).ceil();
|
||||
|
||||
(canvas as HTMLElement).style.position = "fixed";
|
||||
(canvas as HTMLElement).style.zIndex = "-1";
|
||||
(canvas as HTMLElement).style.left =
|
||||
(offsetLeft * pixelRatio).ceil().toString();
|
||||
(canvas as HTMLElement).style.top =
|
||||
(offsetTop * pixelRatio).ceil().toString();
|
||||
|
||||
_viewer!
|
||||
.updateViewportAndCameraProjection(width.ceil(), height.ceil(), 1.0);
|
||||
|
||||
return ThermionFlutterTexture(null, null, 0, 0, null);
|
||||
}
|
||||
|
||||
@override
|
||||
Future destroyTexture(ThermionFlutterTexture texture) async {
|
||||
// noop
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ThermionFlutterTexture?> resizeTexture(ThermionFlutterTexture texture,
|
||||
int width, int height, int offsetLeft, int offsetTop, double pixelRatio) async {
|
||||
final canvas = document.getElementById("canvas") as HTMLCanvasElement;
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
(canvas as HTMLElement).style.position = "fixed";
|
||||
(canvas as HTMLElement).style.zIndex = "-1";
|
||||
(canvas as HTMLElement).style.left =
|
||||
(offsetLeft * pixelRatio).ceil().toString();
|
||||
(canvas as HTMLElement).style.top =
|
||||
(offsetTop * pixelRatio).ceil().toString();
|
||||
_viewer!.updateViewportAndCameraProjection(width, height, 1.0);
|
||||
return ThermionFlutterTexture(null, null, 0, 0, null);
|
||||
}
|
||||
|
||||
Future<ThermionViewer> createViewerWithOptions(
|
||||
ThermionFlutterWebOptions options) async {
|
||||
_viewer = ThermionViewerWasm(assetPathPrefix: "/assets/");
|
||||
|
||||
final canvas = options.createCanvas
|
||||
? document.createElement("canvas") as HTMLCanvasElement?
|
||||
: document.getElementById("canvas") as HTMLCanvasElement?;
|
||||
if (canvas == null) {
|
||||
throw Exception("Could not locate or create canvas");
|
||||
}
|
||||
canvas.id = "canvas";
|
||||
document.body!.appendChild(canvas);
|
||||
canvas.style.display = 'none';
|
||||
final pixelRatio = window.devicePixelRatio;
|
||||
|
||||
await _viewer!
|
||||
.initialize(1, 1, pixelRatio, uberArchivePath: options.uberarchivePath);
|
||||
return _viewer!;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ThermionViewer> createViewer({String? uberarchivePath}) {
|
||||
throw Exception("Use createViewerWithOptions instead");
|
||||
}
|
||||
}
|
||||
@@ -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.1.1
|
||||
version: 0.2.0
|
||||
|
||||
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.2.1-dev.0.0.9
|
||||
thermion_flutter_platform_interface: ^0.2.1-dev.8
|
||||
thermion_dart: ^0.2.1-dev.0.0.10
|
||||
thermion_flutter_platform_interface: ^0.2.1-dev.9
|
||||
flutter_web_plugins:
|
||||
sdk: flutter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user