rename plugin from PolyvoxFilament to FlutterFilament
rename plugin from PolyvoxFilament to FlutterFilament
This commit is contained in:
@@ -11,15 +11,15 @@ import 'generated_bindings_web.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
|
||||
/// A web implementation of the PolyvoxFilamentPlatform of the PolyvoxFilament plugin.
|
||||
class PolyvoxFilamentPluginWeb {
|
||||
/// A web implementation of the FlutterFilamentPlatform of the FlutterFilament plugin.
|
||||
class FlutterFilamentPluginWeb {
|
||||
// late html.CanvasElement _canvas;
|
||||
late RenderingContext _gl;
|
||||
DynamicLibrary _nativeLib;
|
||||
dynamic _texture;
|
||||
|
||||
|
||||
PolyvoxFilamentPluginWeb() {
|
||||
FlutterFilamentPluginWeb() {
|
||||
var canvas = document.querySelector('#drawHere') as CanvasElement;
|
||||
|
||||
_gl = canvas.getContext("webgl") as RenderingContext;
|
||||
@@ -50,7 +50,7 @@ class PolyvoxFilamentPluginWeb {
|
||||
static void registerWith(Registrar registrar) {
|
||||
final MethodChannel channel = MethodChannel("app.polyvox.filament/event",
|
||||
const StandardMethodCodec(), registrar.messenger);
|
||||
final PolyvoxFilamentPluginWeb instance = PolyvoxFilamentPluginWeb();
|
||||
final FlutterFilamentPluginWeb instance = FlutterFilamentPluginWeb();
|
||||
channel.setMethodCallHandler(instance.handleMethodCall);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:polyvox_filament/animations/animation_data.dart';
|
||||
import 'package:flutter_filament/animations/animation_data.dart';
|
||||
import 'package:vector_math/vector_math.dart';
|
||||
|
||||
class AnimationBuilder {
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'dart:ui' as ui;
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'package:polyvox_filament/animations/animation_data.dart';
|
||||
import 'package:flutter_filament/animations/animation_data.dart';
|
||||
|
||||
typedef FilamentEntity = int;
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import 'dart:ui' as ui;
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:ffi/ffi.dart';
|
||||
|
||||
import 'package:polyvox_filament/filament_controller.dart';
|
||||
import 'package:flutter_filament/filament_controller.dart';
|
||||
|
||||
import 'package:polyvox_filament/animations/animation_data.dart';
|
||||
import 'package:polyvox_filament/generated_bindings.dart';
|
||||
import 'package:polyvox_filament/rendering_surface.dart';
|
||||
import 'package:flutter_filament/animations/animation_data.dart';
|
||||
import 'package:flutter_filament/generated_bindings.dart';
|
||||
import 'package:flutter_filament/rendering_surface.dart';
|
||||
|
||||
// ignore: constant_identifier_names
|
||||
const FilamentEntity _FILAMENT_ASSET_ERROR = 0;
|
||||
@@ -46,7 +46,7 @@ class FilamentControllerFFI extends FilamentController {
|
||||
|
||||
///
|
||||
/// This controller uses platform channels to bridge Dart with the C/C++ code for the Filament API.
|
||||
/// Setting up the context/texture (since this is platform-specific) and the render ticker are platform-specific; all other methods are passed through by the platform channel to the methods specified in PolyvoxFilamentApi.h.
|
||||
/// Setting up the context/texture (since this is platform-specific) and the render ticker are platform-specific; all other methods are passed through by the platform channel to the methods specified in FlutterFilamentApi.h.
|
||||
///
|
||||
FilamentControllerFFI({this.uberArchivePath}) {
|
||||
// on some platforms, we ignore the resize event raised by the Flutter RenderObserver
|
||||
@@ -70,7 +70,7 @@ class FilamentControllerFFI extends FilamentController {
|
||||
if (Platform.isIOS || Platform.isMacOS || Platform.isWindows) {
|
||||
dl = DynamicLibrary.process();
|
||||
} else {
|
||||
dl = DynamicLibrary.open("libpolyvox_filament_android.so");
|
||||
dl = DynamicLibrary.open("libflutter_filament_android.so");
|
||||
}
|
||||
_lib = NativeLibrary(dl);
|
||||
if(Platform.isWindows) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'dart:async';
|
||||
import 'dart:ui' as ui;
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:polyvox_filament/filament_controller.dart';
|
||||
import 'package:flutter_filament/filament_controller.dart';
|
||||
|
||||
import 'package:polyvox_filament/animations/animation_data.dart';
|
||||
import 'package:polyvox_filament/generated_bindings_web.dart';
|
||||
import 'package:flutter_filament/animations/animation_data.dart';
|
||||
import 'package:flutter_filament/generated_bindings_web.dart';
|
||||
import 'filament_controller.dart';
|
||||
|
||||
typedef AssetManager = int;
|
||||
@@ -34,7 +34,7 @@ class FilamentControllerMethodChannel extends FilamentController {
|
||||
|
||||
///
|
||||
/// This controller uses platform channels to bridge Dart with the C/C++ code for the Filament API.
|
||||
/// Setting up the context/texture (since this is platform-specific) and the render ticker are platform-specific; all other methods are passed through by the platform channel to the methods specified in PolyvoxFilamentApi.h.
|
||||
/// Setting up the context/texture (since this is platform-specific) and the render ticker are platform-specific; all other methods are passed through by the platform channel to the methods specified in FlutterFilamentApi.h.
|
||||
///
|
||||
FilamentController() {
|
||||
_channel.setMethodCallHandler((call) async {
|
||||
|
||||
@@ -2380,8 +2380,8 @@ typedef FreeFilamentResourceFromOwner = ffi.Pointer<
|
||||
ffi
|
||||
.NativeFunction<ffi.Void Function(ResourceBuffer, ffi.Pointer<ffi.Void>)>>;
|
||||
|
||||
/// This header replicates most of the methods in PolyvoxFilamentApi.h, and is only intended to be used to generate client FFI bindings.
|
||||
/// The intention is that calling one of these methods will call its respective method in PolyvoxFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety.
|
||||
/// This header replicates most of the methods in FlutterFilamentApi.h, and is only intended to be used to generate client FFI bindings.
|
||||
/// The intention is that calling one of these methods will call its respective method in FlutterFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety.
|
||||
typedef EntityId = ffi.Int32;
|
||||
typedef FilamentRenderCallback = ffi.Pointer<
|
||||
ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void> owner)>>;
|
||||
|
||||
@@ -4,8 +4,8 @@ import 'dart:io';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:polyvox_filament/widgets/filament_gesture_detector_desktop.dart';
|
||||
import 'package:polyvox_filament/widgets/filament_gesture_detector_mobile.dart';
|
||||
import 'package:flutter_filament/widgets/filament_gesture_detector_desktop.dart';
|
||||
import 'package:flutter_filament/widgets/filament_gesture_detector_mobile.dart';
|
||||
import '../filament_controller.dart';
|
||||
|
||||
enum GestureType { RotateCamera, PanCamera, PanBackground }
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
||||
import 'package:polyvox_filament/filament_controller.dart';
|
||||
import 'package:flutter_filament/filament_controller.dart';
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user