diff --git a/CHANGELOG.md b/CHANGELOG.md index 0313450..c0638ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.0.3 +- Enhance package imports. + ## 0.0.2 - Add support for Dart 3.0.0 and Flutter 3.10 diff --git a/README.md b/README.md index 7584f46..be9825f 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ In the `dependencies:` section of your `pubspec.yaml`, add the following line: ```yaml dependencies: - playx_3d_scene: ^0.0.2 + playx_3d_scene: ^0.0.3 ``` ## Usage diff --git a/android/src/main/kotlin/io/sourcya/playx_3d_scene/method_handler/PlayxEventHandler.kt b/android/src/main/kotlin/io/sourcya/playx_3d_scene/method_handler/PlayxEventHandler.kt index 8fc507c..8d57217 100644 --- a/android/src/main/kotlin/io/sourcya/playx_3d_scene/method_handler/PlayxEventHandler.kt +++ b/android/src/main/kotlin/io/sourcya/playx_3d_scene/method_handler/PlayxEventHandler.kt @@ -162,7 +162,6 @@ class PlayxEventHandler ( rendererEventSink =null } }) - } private fun cancelRendererEventChannel(){ diff --git a/example/lib/main.dart b/example/lib/main.dart index 0b0d102..4fdcdd3 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,34 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:playx_3d_scene/controller/playx_3d_scene_controller.dart'; -import 'package:playx_3d_scene/models/model/animation.dart'; -import 'package:playx_3d_scene/models/model/glb_model.dart'; -import 'package:playx_3d_scene/models/scene/camera/camera.dart'; -import 'package:playx_3d_scene/models/scene/camera/exposure.dart'; -import 'package:playx_3d_scene/models/scene/geometry/direction.dart'; -import 'package:playx_3d_scene/models/scene/geometry/position.dart'; -import 'package:playx_3d_scene/models/scene/ground.dart'; -import 'package:playx_3d_scene/models/scene/indirect_light/hdr_indirect_light.dart'; -import 'package:playx_3d_scene/models/scene/light/light.dart'; -import 'package:playx_3d_scene/models/scene/light/light_type.dart'; -import 'package:playx_3d_scene/models/scene/material/material.dart'; -import 'package:playx_3d_scene/models/scene/material/material_paramater.dart'; -import 'package:playx_3d_scene/models/scene/material/texture/enums/texture_type.dart'; -import 'package:playx_3d_scene/models/scene/material/texture/texture.dart'; -import 'package:playx_3d_scene/models/scene/material/texture/texture_sampler.dart'; -import 'package:playx_3d_scene/models/scene/scene.dart'; -import 'package:playx_3d_scene/models/scene/skybox/hdr_skybox.dart'; -import 'package:playx_3d_scene/models/shapes/cube.dart'; -import 'package:playx_3d_scene/models/shapes/sphere.dart'; -import 'package:playx_3d_scene/models/state/model_state.dart'; -import 'package:playx_3d_scene/models/state/scene_state.dart'; -import 'package:playx_3d_scene/models/state/shape_state.dart'; -import 'package:playx_3d_scene/utils/result.dart'; -import 'package:playx_3d_scene/view/playx_3d_scene.dart'; +import 'package:playx_3d_scene/playx_3d_scene.dart'; void main() { runApp(const MyApp()); } + class MyApp extends StatefulWidget { const MyApp({super.key}); diff --git a/lib/playx_3d_scene.dart b/lib/playx_3d_scene.dart new file mode 100644 index 0000000..68b4523 --- /dev/null +++ b/lib/playx_3d_scene.dart @@ -0,0 +1,49 @@ +export 'src/view/playx_3d_scene.dart'; +export 'src/utils/result.dart'; +export 'src/controller/playx_3d_scene_controller.dart'; +export 'src/models/model/animation.dart'; +export 'src/models/model/glb_model.dart'; +export 'src/models/model/gltf_model.dart'; +export 'src/models/model/model.dart'; +export 'src/models/scene/camera/camera.dart'; +export 'src/models/scene/camera/exposure.dart'; +export 'src/models/scene/camera/lens_projection.dart'; +export 'src/models/scene/camera/projection.dart'; +export 'src/models/scene/camera/enums/camera_mode.dart'; +export 'src/models/scene/camera/enums/fov.dart'; +export 'src/models/scene/camera/enums/projection_type.dart'; +export 'src/models/scene/geometry/direction.dart'; +export 'src/models/scene/geometry/position.dart'; +export 'src/models/scene/geometry/size.dart'; +export 'src/models/scene/indirect_light/default_indirect_light.dart'; +export 'src/models/scene/indirect_light/hdr_indirect_light.dart'; +export 'src/models/scene/indirect_light/indirect_light.dart'; +export 'src/models/scene/indirect_light/ktx_indirect_light.dart'; +export 'src/models/scene/light/light.dart'; +export 'src/models/scene/light/light_type.dart'; +export 'src/models/scene/material/material.dart'; +export 'src/models/scene/material/material_parameter.dart'; +export 'src/models/scene/material/material_type.dart'; +export 'src/models/scene/material/texture/texture.dart'; +export 'src/models/scene/material/texture/texture_sampler.dart'; +export 'src/models/scene/material/texture/enums/mag_filter.dart'; +export 'src/models/scene/material/texture/enums/min_filter.dart'; +export 'src/models/scene/material/texture/enums/texture_type.dart'; +export 'src/models/scene/material/texture/enums/wrap_mode.dart'; +export 'src/models/scene/skybox/colored_skybox.dart'; +export 'src/models/scene/skybox/hdr_skybox.dart'; +export 'src/models/scene/skybox/ktx_skybox.dart'; +export 'src/models/scene/skybox/skybox.dart'; +export 'src/models/scene/ground.dart'; +export 'src/models/scene/scene.dart'; +export 'src/models/shapes/cube.dart'; +export 'src/models/shapes/plane.dart'; +export 'src/models/shapes/shape.dart'; +export 'src/models/shapes/sphere.dart'; +export 'src/models/state/model_state.dart'; +export 'src/models/state/scene_state.dart'; +export 'src/models/state/shape_state.dart'; + + + + diff --git a/lib/controller/playx_3d_scene_controller.dart b/lib/src/controller/playx_3d_scene_controller.dart similarity index 96% rename from lib/controller/playx_3d_scene_controller.dart rename to lib/src/controller/playx_3d_scene_controller.dart index e599f8f..103105c 100644 --- a/lib/controller/playx_3d_scene_controller.dart +++ b/lib/src/controller/playx_3d_scene_controller.dart @@ -1,17 +1,17 @@ import 'package:flutter/services.dart'; -import 'package:playx_3d_scene/models/scene/camera/camera.dart'; -import 'package:playx_3d_scene/models/scene/camera/exposure.dart'; -import 'package:playx_3d_scene/models/scene/camera/lens_projection.dart'; -import 'package:playx_3d_scene/models/scene/camera/projection.dart'; -import 'package:playx_3d_scene/models/scene/geometry/position.dart'; -import 'package:playx_3d_scene/models/scene/ground.dart'; -import 'package:playx_3d_scene/models/scene/indirect_light/default_indirect_light.dart'; -import 'package:playx_3d_scene/models/scene/light/light.dart'; -import 'package:playx_3d_scene/models/scene/material/material.dart'; -import 'package:playx_3d_scene/models/shapes/shape.dart'; -import 'package:playx_3d_scene/models/state/model_state.dart'; -import 'package:playx_3d_scene/utils/result.dart'; -import 'package:playx_3d_scene/utils/utils.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/camera.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/exposure.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/lens_projection.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/projection.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/position.dart'; +import 'package:playx_3d_scene/src/models/scene/ground.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/default_indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/light/light.dart'; +import 'package:playx_3d_scene/src/models/scene/material/material.dart'; +import 'package:playx_3d_scene/src/models/shapes/shape.dart'; +import 'package:playx_3d_scene/src/models/state/model_state.dart'; +import 'package:playx_3d_scene/src/utils/result.dart'; +import 'package:playx_3d_scene/src/utils/utils.dart'; ///An object which helps facilitate communication between the [Playx3dScene] Widget ///and android side model viewer based on Filament. diff --git a/lib/models/model/animation.dart b/lib/src/models/model/animation.dart similarity index 100% rename from lib/models/model/animation.dart rename to lib/src/models/model/animation.dart diff --git a/lib/models/model/glb_model.dart b/lib/src/models/model/glb_model.dart similarity index 100% rename from lib/models/model/glb_model.dart rename to lib/src/models/model/glb_model.dart diff --git a/lib/models/model/gltf_model.dart b/lib/src/models/model/gltf_model.dart similarity index 97% rename from lib/models/model/gltf_model.dart rename to lib/src/models/model/gltf_model.dart index e4fc274..03bcc8d 100644 --- a/lib/models/model/gltf_model.dart +++ b/lib/src/models/model/gltf_model.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/model/model.dart'; +import 'package:playx_3d_scene/src/models/model/model.dart'; /// represents object of model that will be loaded from gltf file. /// diff --git a/lib/models/model/model.dart b/lib/src/models/model/model.dart similarity index 80% rename from lib/models/model/model.dart rename to lib/src/models/model/model.dart index 6efcbb9..1744757 100644 --- a/lib/models/model/model.dart +++ b/lib/src/models/model/model.dart @@ -1,7 +1,7 @@ -import 'package:playx_3d_scene/models/model/animation.dart'; -import 'package:playx_3d_scene/models/model/glb_model.dart'; -import 'package:playx_3d_scene/models/model/gltf_model.dart'; -import 'package:playx_3d_scene/models/scene/geometry/position.dart'; +import 'package:playx_3d_scene/src/models/model/animation.dart'; +import 'package:playx_3d_scene/src/models/model/glb_model.dart'; +import 'package:playx_3d_scene/src/models/model/gltf_model.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/position.dart'; /// represents base object of the 3d model to be rendered. /// diff --git a/lib/models/scene/camera/camera.dart b/lib/src/models/scene/camera/camera.dart similarity index 93% rename from lib/models/scene/camera/camera.dart rename to lib/src/models/scene/camera/camera.dart index aa9b961..66eb39c 100644 --- a/lib/models/scene/camera/camera.dart +++ b/lib/src/models/scene/camera/camera.dart @@ -1,10 +1,10 @@ import 'dart:core'; -import 'package:playx_3d_scene/models/scene/camera/enums/camera_mode.dart'; -import 'package:playx_3d_scene/models/scene/camera/enums/fov.dart'; -import 'package:playx_3d_scene/models/scene/camera/exposure.dart'; -import 'package:playx_3d_scene/models/scene/camera/projection.dart'; -import 'package:playx_3d_scene/models/scene/geometry/position.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/enums/camera_mode.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/enums/fov.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/exposure.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/projection.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/position.dart'; import 'lens_projection.dart'; diff --git a/lib/models/scene/camera/enums/camera_mode.dart b/lib/src/models/scene/camera/enums/camera_mode.dart similarity index 100% rename from lib/models/scene/camera/enums/camera_mode.dart rename to lib/src/models/scene/camera/enums/camera_mode.dart diff --git a/lib/models/scene/camera/enums/fov.dart b/lib/src/models/scene/camera/enums/fov.dart similarity index 100% rename from lib/models/scene/camera/enums/fov.dart rename to lib/src/models/scene/camera/enums/fov.dart diff --git a/lib/models/scene/camera/enums/projection_type.dart b/lib/src/models/scene/camera/enums/projection_type.dart similarity index 100% rename from lib/models/scene/camera/enums/projection_type.dart rename to lib/src/models/scene/camera/enums/projection_type.dart diff --git a/lib/models/scene/camera/exposure.dart b/lib/src/models/scene/camera/exposure.dart similarity index 100% rename from lib/models/scene/camera/exposure.dart rename to lib/src/models/scene/camera/exposure.dart diff --git a/lib/models/scene/camera/lens_projection.dart b/lib/src/models/scene/camera/lens_projection.dart similarity index 100% rename from lib/models/scene/camera/lens_projection.dart rename to lib/src/models/scene/camera/lens_projection.dart diff --git a/lib/models/scene/camera/projection.dart b/lib/src/models/scene/camera/projection.dart similarity index 96% rename from lib/models/scene/camera/projection.dart rename to lib/src/models/scene/camera/projection.dart index 604e9e6..cc0617c 100644 --- a/lib/models/scene/camera/projection.dart +++ b/lib/src/models/scene/camera/projection.dart @@ -1,6 +1,6 @@ import 'dart:core'; -import 'package:playx_3d_scene/models/scene/camera/enums/fov.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/enums/fov.dart'; import 'enums/projection_type.dart'; diff --git a/lib/models/scene/geometry/direction.dart b/lib/src/models/scene/geometry/direction.dart similarity index 100% rename from lib/models/scene/geometry/direction.dart rename to lib/src/models/scene/geometry/direction.dart diff --git a/lib/models/scene/geometry/position.dart b/lib/src/models/scene/geometry/position.dart similarity index 100% rename from lib/models/scene/geometry/position.dart rename to lib/src/models/scene/geometry/position.dart diff --git a/lib/models/scene/geometry/size.dart b/lib/src/models/scene/geometry/size.dart similarity index 100% rename from lib/models/scene/geometry/size.dart rename to lib/src/models/scene/geometry/size.dart diff --git a/lib/models/scene/ground.dart b/lib/src/models/scene/ground.dart similarity index 85% rename from lib/models/scene/ground.dart rename to lib/src/models/scene/ground.dart index 1c6f447..b40e541 100644 --- a/lib/models/scene/ground.dart +++ b/lib/src/models/scene/ground.dart @@ -1,5 +1,5 @@ -import 'package:playx_3d_scene/models/scene/geometry/size.dart'; -import 'package:playx_3d_scene/models/shapes/plane.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/size.dart'; +import 'package:playx_3d_scene/src/models/shapes/plane.dart'; ///An object that represents ground plane to be drawn on the scene. class Ground extends Plane { diff --git a/lib/models/scene/indirect_light/default_indirect_light.dart b/lib/src/models/scene/indirect_light/default_indirect_light.dart similarity index 97% rename from lib/models/scene/indirect_light/default_indirect_light.dart rename to lib/src/models/scene/indirect_light/default_indirect_light.dart index 1a19e72..534d198 100644 --- a/lib/models/scene/indirect_light/default_indirect_light.dart +++ b/lib/src/models/scene/indirect_light/default_indirect_light.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/scene/indirect_light/indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/indirect_light.dart'; /// An object that represents indirect light based on given parameters like: /// Irradiance diff --git a/lib/models/scene/indirect_light/hdr_indirect_light.dart b/lib/src/models/scene/indirect_light/hdr_indirect_light.dart similarity index 87% rename from lib/models/scene/indirect_light/hdr_indirect_light.dart rename to lib/src/models/scene/indirect_light/hdr_indirect_light.dart index 6556d55..92f4673 100644 --- a/lib/models/scene/indirect_light/hdr_indirect_light.dart +++ b/lib/src/models/scene/indirect_light/hdr_indirect_light.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/scene/indirect_light/indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/indirect_light.dart'; /// An object that represents indirect light that is created from hdr file format. class HdrIndirectLight extends IndirectLight { diff --git a/lib/models/scene/indirect_light/indirect_light.dart b/lib/src/models/scene/indirect_light/indirect_light.dart similarity index 88% rename from lib/models/scene/indirect_light/indirect_light.dart rename to lib/src/models/scene/indirect_light/indirect_light.dart index e9a669f..4f30f69 100644 --- a/lib/models/scene/indirect_light/indirect_light.dart +++ b/lib/src/models/scene/indirect_light/indirect_light.dart @@ -1,6 +1,6 @@ -import 'package:playx_3d_scene/models/scene/indirect_light/default_indirect_light.dart'; -import 'package:playx_3d_scene/models/scene/indirect_light/hdr_indirect_light.dart'; -import 'package:playx_3d_scene/models/scene/indirect_light/ktx_indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/default_indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/hdr_indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/ktx_indirect_light.dart'; /// An object that represents Indirect Light which is used to simulate environment lighting, a form of global illumination. /// Filament supports rendering with image-based lighting, or IBL. diff --git a/lib/models/scene/indirect_light/ktx_indirect_light.dart b/lib/src/models/scene/indirect_light/ktx_indirect_light.dart similarity index 89% rename from lib/models/scene/indirect_light/ktx_indirect_light.dart rename to lib/src/models/scene/indirect_light/ktx_indirect_light.dart index b4ea69c..1b1efd1 100644 --- a/lib/models/scene/indirect_light/ktx_indirect_light.dart +++ b/lib/src/models/scene/indirect_light/ktx_indirect_light.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/scene/indirect_light/indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/indirect_light.dart'; /// An object that represents indirect light that is created from ktx file format. /// diff --git a/lib/models/scene/light/light.dart b/lib/src/models/scene/light/light.dart similarity index 96% rename from lib/models/scene/light/light.dart rename to lib/src/models/scene/light/light.dart index ba8f800..c527a11 100644 --- a/lib/models/scene/light/light.dart +++ b/lib/src/models/scene/light/light.dart @@ -1,9 +1,9 @@ import 'dart:ui'; -import 'package:playx_3d_scene/models/scene/geometry/direction.dart'; -import 'package:playx_3d_scene/models/scene/geometry/position.dart'; -import 'package:playx_3d_scene/models/scene/light/light_type.dart'; -import 'package:playx_3d_scene/utils/utils.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/direction.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/position.dart'; +import 'package:playx_3d_scene/src/models/scene/light/light_type.dart'; +import 'package:playx_3d_scene/src/utils/utils.dart'; /// An object that allows you to create a light source in the scene, such as a sun or street lights. /// Light types - Lights come in three flavors: diff --git a/lib/models/scene/light/light_type.dart b/lib/src/models/scene/light/light_type.dart similarity index 100% rename from lib/models/scene/light/light_type.dart rename to lib/src/models/scene/light/light_type.dart diff --git a/lib/models/scene/material/material.dart b/lib/src/models/scene/material/material.dart similarity index 93% rename from lib/models/scene/material/material.dart rename to lib/src/models/scene/material/material.dart index 62d2a28..36f8440 100644 --- a/lib/models/scene/material/material.dart +++ b/lib/src/models/scene/material/material.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/scene/material/material_paramater.dart'; +import 'package:playx_3d_scene/src/models/scene/material/material_parameter.dart'; /// An object that defines the visual appearance of a surface. /// Filament offers a customizable material system diff --git a/lib/models/scene/material/material_paramater.dart b/lib/src/models/scene/material/material_parameter.dart similarity index 94% rename from lib/models/scene/material/material_paramater.dart rename to lib/src/models/scene/material/material_parameter.dart index 246375e..c20520b 100644 --- a/lib/models/scene/material/material_paramater.dart +++ b/lib/src/models/scene/material/material_parameter.dart @@ -1,8 +1,8 @@ import 'dart:ui'; -import 'package:playx_3d_scene/models/scene/material/material_type.dart'; -import 'package:playx_3d_scene/models/scene/material/texture/texture.dart'; -import 'package:playx_3d_scene/utils/utils.dart'; +import 'package:playx_3d_scene/src/models/scene/material/material_type.dart'; +import 'package:playx_3d_scene/src/models/scene/material/texture/texture.dart'; +import 'package:playx_3d_scene/src/utils/utils.dart'; /// An object that represents material parameters that are defined in the .mat file. class MaterialParameter { diff --git a/lib/models/scene/material/material_type.dart b/lib/src/models/scene/material/material_type.dart similarity index 100% rename from lib/models/scene/material/material_type.dart rename to lib/src/models/scene/material/material_type.dart diff --git a/lib/models/scene/material/texture/enums/mag_filter.dart b/lib/src/models/scene/material/texture/enums/mag_filter.dart similarity index 81% rename from lib/models/scene/material/texture/enums/mag_filter.dart rename to lib/src/models/scene/material/texture/enums/mag_filter.dart index 3260012..62c0a8c 100644 --- a/lib/models/scene/material/texture/enums/mag_filter.dart +++ b/lib/src/models/scene/material/texture/enums/mag_filter.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/scene/material/texture/texture_sampler.dart'; +import 'package:playx_3d_scene/src/models/scene/material/texture/texture_sampler.dart'; ///Magnification filter to be used. /// diff --git a/lib/models/scene/material/texture/enums/min_filter.dart b/lib/src/models/scene/material/texture/enums/min_filter.dart similarity index 100% rename from lib/models/scene/material/texture/enums/min_filter.dart rename to lib/src/models/scene/material/texture/enums/min_filter.dart diff --git a/lib/models/scene/material/texture/enums/texture_type.dart b/lib/src/models/scene/material/texture/enums/texture_type.dart similarity index 100% rename from lib/models/scene/material/texture/enums/texture_type.dart rename to lib/src/models/scene/material/texture/enums/texture_type.dart diff --git a/lib/models/scene/material/texture/enums/wrap_mode.dart b/lib/src/models/scene/material/texture/enums/wrap_mode.dart similarity index 100% rename from lib/models/scene/material/texture/enums/wrap_mode.dart rename to lib/src/models/scene/material/texture/enums/wrap_mode.dart diff --git a/lib/models/scene/material/texture/texture.dart b/lib/src/models/scene/material/texture/texture.dart similarity index 75% rename from lib/models/scene/material/texture/texture.dart rename to lib/src/models/scene/material/texture/texture.dart index e189f10..877da6b 100644 --- a/lib/models/scene/material/texture/texture.dart +++ b/lib/src/models/scene/material/texture/texture.dart @@ -1,5 +1,5 @@ -import 'package:playx_3d_scene/models/scene/material/texture/enums/texture_type.dart'; -import 'package:playx_3d_scene/models/scene/material/texture/texture_sampler.dart'; +import 'package:playx_3d_scene/src/models/scene/material/texture/enums/texture_type.dart'; +import 'package:playx_3d_scene/src/models/scene/material/texture/texture_sampler.dart'; /// An object represents textures to be loaded by the material. class PlayxTexture { diff --git a/lib/models/scene/material/texture/texture_sampler.dart b/lib/src/models/scene/material/texture/texture_sampler.dart similarity index 75% rename from lib/models/scene/material/texture/texture_sampler.dart rename to lib/src/models/scene/material/texture/texture_sampler.dart index 2b5355b..8f753c9 100644 --- a/lib/models/scene/material/texture/texture_sampler.dart +++ b/lib/src/models/scene/material/texture/texture_sampler.dart @@ -1,6 +1,6 @@ -import 'package:playx_3d_scene/models/scene/material/texture/enums/mag_filter.dart'; -import 'package:playx_3d_scene/models/scene/material/texture/enums/min_filter.dart'; -import 'package:playx_3d_scene/models/scene/material/texture/enums/wrap_mode.dart'; +import 'package:playx_3d_scene/src/models/scene/material/texture/enums/mag_filter.dart'; +import 'package:playx_3d_scene/src/models/scene/material/texture/enums/min_filter.dart'; +import 'package:playx_3d_scene/src/models/scene/material/texture/enums/wrap_mode.dart'; /// An object that defines how a texture is accessed. class PlayxTextureSampler { diff --git a/lib/models/scene/scene.dart b/lib/src/models/scene/scene.dart similarity index 61% rename from lib/models/scene/scene.dart rename to lib/src/models/scene/scene.dart index b46a4dc..caa96c3 100644 --- a/lib/models/scene/scene.dart +++ b/lib/src/models/scene/scene.dart @@ -1,8 +1,8 @@ -import 'package:playx_3d_scene/models/scene/camera/camera.dart'; -import 'package:playx_3d_scene/models/scene/ground.dart'; -import 'package:playx_3d_scene/models/scene/indirect_light/indirect_light.dart'; -import 'package:playx_3d_scene/models/scene/light/light.dart'; -import 'package:playx_3d_scene/models/scene/skybox/skybox.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/camera.dart'; +import 'package:playx_3d_scene/src/models/scene/ground.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/light/light.dart'; +import 'package:playx_3d_scene/src/models/scene/skybox/skybox.dart'; /// An object that represents the scene to be rendered with information about light, skybox and more. class Scene { diff --git a/lib/models/scene/skybox/colored_skybox.dart b/lib/src/models/scene/skybox/colored_skybox.dart similarity index 72% rename from lib/models/scene/skybox/colored_skybox.dart rename to lib/src/models/scene/skybox/colored_skybox.dart index a602ba1..ccd0c8a 100644 --- a/lib/models/scene/skybox/colored_skybox.dart +++ b/lib/src/models/scene/skybox/colored_skybox.dart @@ -1,5 +1,5 @@ -import 'package:playx_3d_scene/models/scene/skybox/skybox.dart'; -import 'package:playx_3d_scene/utils/utils.dart'; +import 'package:playx_3d_scene/src/models/scene/skybox/skybox.dart'; +import 'package:playx_3d_scene/src/utils/utils.dart'; /// An object that represents skybox based that shows a color only. class ColoredSkybox extends Skybox { diff --git a/lib/models/scene/skybox/hdr_skybox.dart b/lib/src/models/scene/skybox/hdr_skybox.dart similarity index 91% rename from lib/models/scene/skybox/hdr_skybox.dart rename to lib/src/models/scene/skybox/hdr_skybox.dart index dbe16c0..ed373dc 100644 --- a/lib/models/scene/skybox/hdr_skybox.dart +++ b/lib/src/models/scene/skybox/hdr_skybox.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/scene/skybox/skybox.dart'; +import 'package:playx_3d_scene/src/models/scene/skybox/skybox.dart'; /// An object that represents skybox that will be loaded from hdr file. class HdrSkybox extends Skybox { diff --git a/lib/models/scene/skybox/ktx_skybox.dart b/lib/src/models/scene/skybox/ktx_skybox.dart similarity index 91% rename from lib/models/scene/skybox/ktx_skybox.dart rename to lib/src/models/scene/skybox/ktx_skybox.dart index 98380b1..5d4eaed 100644 --- a/lib/models/scene/skybox/ktx_skybox.dart +++ b/lib/src/models/scene/skybox/ktx_skybox.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/scene/skybox/skybox.dart'; +import 'package:playx_3d_scene/src/models/scene/skybox/skybox.dart'; /// An object that represents skybox that will be loaded from ktx file. /// Filament supports rendering with image-based lighting, or IBL. diff --git a/lib/models/scene/skybox/skybox.dart b/lib/src/models/scene/skybox/skybox.dart similarity index 80% rename from lib/models/scene/skybox/skybox.dart rename to lib/src/models/scene/skybox/skybox.dart index 6e32c3a..0963f69 100644 --- a/lib/models/scene/skybox/skybox.dart +++ b/lib/src/models/scene/skybox/skybox.dart @@ -1,9 +1,9 @@ import 'dart:ui'; -import 'package:playx_3d_scene/models/scene/skybox/colored_skybox.dart'; -import 'package:playx_3d_scene/models/scene/skybox/hdr_skybox.dart'; -import 'package:playx_3d_scene/models/scene/skybox/ktx_skybox.dart'; -import 'package:playx_3d_scene/utils/utils.dart'; +import 'package:playx_3d_scene/src/models/scene/skybox/colored_skybox.dart'; +import 'package:playx_3d_scene/src/models/scene/skybox/hdr_skybox.dart'; +import 'package:playx_3d_scene/src/models/scene/skybox/ktx_skybox.dart'; +import 'package:playx_3d_scene/src/utils/utils.dart'; /// An object that represents the skybox to be rendered in the scene. /// diff --git a/lib/models/shapes/cube.dart b/lib/src/models/shapes/cube.dart similarity index 81% rename from lib/models/shapes/cube.dart rename to lib/src/models/shapes/cube.dart index 47b4919..2abae2b 100644 --- a/lib/models/shapes/cube.dart +++ b/lib/src/models/shapes/cube.dart @@ -1,5 +1,5 @@ -import 'package:playx_3d_scene/models/scene/geometry/size.dart'; -import 'package:playx_3d_scene/models/shapes/shape.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/size.dart'; +import 'package:playx_3d_scene/src/models/shapes/shape.dart'; /// An object that represents a cube shape to be rendered. class Cube extends Shape { diff --git a/lib/models/shapes/plane.dart b/lib/src/models/shapes/plane.dart similarity index 85% rename from lib/models/shapes/plane.dart rename to lib/src/models/shapes/plane.dart index 76f85b3..cd4554c 100644 --- a/lib/models/shapes/plane.dart +++ b/lib/src/models/shapes/plane.dart @@ -1,5 +1,5 @@ -import 'package:playx_3d_scene/models/scene/geometry/size.dart'; -import 'package:playx_3d_scene/models/shapes/shape.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/size.dart'; +import 'package:playx_3d_scene/src/models/shapes/shape.dart'; /// An object that represents a plane shape to be rendered. class Plane extends Shape { diff --git a/lib/models/shapes/shape.dart b/lib/src/models/shapes/shape.dart similarity index 64% rename from lib/models/shapes/shape.dart rename to lib/src/models/shapes/shape.dart index e6cbfe2..8c13509 100644 --- a/lib/models/shapes/shape.dart +++ b/lib/src/models/shapes/shape.dart @@ -1,9 +1,9 @@ -import 'package:playx_3d_scene/models/scene/geometry/direction.dart'; -import 'package:playx_3d_scene/models/scene/geometry/position.dart'; -import 'package:playx_3d_scene/models/scene/material/material.dart'; -import 'package:playx_3d_scene/models/shapes/cube.dart'; -import 'package:playx_3d_scene/models/shapes/plane.dart'; -import 'package:playx_3d_scene/models/shapes/sphere.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/direction.dart'; +import 'package:playx_3d_scene/src/models/scene/geometry/position.dart'; +import 'package:playx_3d_scene/src/models/scene/material/material.dart'; +import 'package:playx_3d_scene/src/models/shapes/cube.dart'; +import 'package:playx_3d_scene/src/models/shapes/plane.dart'; +import 'package:playx_3d_scene/src/models/shapes/sphere.dart'; /// An object that represents shapes to be rendered on the scene. /// diff --git a/lib/models/shapes/sphere.dart b/lib/src/models/shapes/sphere.dart similarity index 92% rename from lib/models/shapes/sphere.dart rename to lib/src/models/shapes/sphere.dart index 451ed86..6d49cd3 100644 --- a/lib/models/shapes/sphere.dart +++ b/lib/src/models/shapes/sphere.dart @@ -1,4 +1,4 @@ -import 'package:playx_3d_scene/models/shapes/shape.dart'; +import 'package:playx_3d_scene/src/models/shapes/shape.dart'; /// An object that represents a cube shape to be rendered. class Sphere extends Shape { diff --git a/lib/models/state/model_state.dart b/lib/src/models/state/model_state.dart similarity index 100% rename from lib/models/state/model_state.dart rename to lib/src/models/state/model_state.dart diff --git a/lib/models/state/scene_state.dart b/lib/src/models/state/scene_state.dart similarity index 100% rename from lib/models/state/scene_state.dart rename to lib/src/models/state/scene_state.dart diff --git a/lib/models/state/shape_state.dart b/lib/src/models/state/shape_state.dart similarity index 100% rename from lib/models/state/shape_state.dart rename to lib/src/models/state/shape_state.dart diff --git a/lib/utils/result.dart b/lib/src/utils/result.dart similarity index 100% rename from lib/utils/result.dart rename to lib/src/utils/result.dart diff --git a/lib/utils/utils.dart b/lib/src/utils/utils.dart similarity index 100% rename from lib/utils/utils.dart rename to lib/src/utils/utils.dart diff --git a/lib/view/playx_3d_scene.dart b/lib/src/view/playx_3d_scene.dart similarity index 89% rename from lib/view/playx_3d_scene.dart rename to lib/src/view/playx_3d_scene.dart index 9e64188..16b9bad 100644 --- a/lib/view/playx_3d_scene.dart +++ b/lib/src/view/playx_3d_scene.dart @@ -5,21 +5,21 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/services.dart'; -import 'package:playx_3d_scene/controller/playx_3d_scene_controller.dart'; -import 'package:playx_3d_scene/models/model/model.dart'; -import 'package:playx_3d_scene/models/scene/camera/camera.dart'; -import 'package:playx_3d_scene/models/scene/ground.dart'; -import 'package:playx_3d_scene/models/scene/indirect_light/indirect_light.dart'; -import 'package:playx_3d_scene/models/scene/light/light.dart'; -import 'package:playx_3d_scene/models/scene/scene.dart'; -import 'package:playx_3d_scene/models/scene/skybox/skybox.dart'; -import 'package:playx_3d_scene/models/shapes/cube.dart'; -import 'package:playx_3d_scene/models/shapes/plane.dart'; -import 'package:playx_3d_scene/models/shapes/shape.dart'; -import 'package:playx_3d_scene/models/shapes/sphere.dart'; -import 'package:playx_3d_scene/models/state/model_state.dart'; -import 'package:playx_3d_scene/models/state/scene_state.dart'; -import 'package:playx_3d_scene/models/state/shape_state.dart'; +import 'package:playx_3d_scene/src/controller/playx_3d_scene_controller.dart'; +import 'package:playx_3d_scene/src/models/model/model.dart'; +import 'package:playx_3d_scene/src/models/scene/camera/camera.dart'; +import 'package:playx_3d_scene/src/models/scene/ground.dart'; +import 'package:playx_3d_scene/src/models/scene/indirect_light/indirect_light.dart'; +import 'package:playx_3d_scene/src/models/scene/light/light.dart'; +import 'package:playx_3d_scene/src/models/scene/scene.dart'; +import 'package:playx_3d_scene/src/models/scene/skybox/skybox.dart'; +import 'package:playx_3d_scene/src/models/shapes/cube.dart'; +import 'package:playx_3d_scene/src/models/shapes/plane.dart'; +import 'package:playx_3d_scene/src/models/shapes/shape.dart'; +import 'package:playx_3d_scene/src/models/shapes/sphere.dart'; +import 'package:playx_3d_scene/src/models/state/model_state.dart'; +import 'package:playx_3d_scene/src/models/state/scene_state.dart'; +import 'package:playx_3d_scene/src/models/state/shape_state.dart'; typedef Playx3dSceneCreatedCallback = void Function( Playx3dSceneController controller); diff --git a/playx_3d_products_grid_example/.flutter-plugins b/playx_3d_products_grid_example/.flutter-plugins new file mode 100644 index 0000000..3c8f0ab --- /dev/null +++ b/playx_3d_products_grid_example/.flutter-plugins @@ -0,0 +1,2 @@ +# This is a generated file; do not edit or check into version control. +playx_3d_scene=E:\\Sourcaya\\Apps\\playx-model-viewer\\ diff --git a/playx_3d_products_grid_example/.flutter-plugins-dependencies b/playx_3d_products_grid_example/.flutter-plugins-dependencies new file mode 100644 index 0000000..e6b11ce --- /dev/null +++ b/playx_3d_products_grid_example/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[],"android":[{"name":"playx_3d_scene","path":"E:\\\\Sourcaya\\\\Apps\\\\playx-model-viewer\\\\","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"playx_3d_scene","dependencies":[]}],"date_created":"2023-04-27 17:10:35.609910","version":"3.7.11"} \ No newline at end of file diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/checksums/checksums.lock b/playx_3d_products_grid_example/android/.gradle/7.5/checksums/checksums.lock new file mode 100644 index 0000000..eb1f51b Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/checksums/checksums.lock differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/checksums/md5-checksums.bin b/playx_3d_products_grid_example/android/.gradle/7.5/checksums/md5-checksums.bin new file mode 100644 index 0000000..0998bf4 Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/checksums/md5-checksums.bin differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/checksums/sha1-checksums.bin b/playx_3d_products_grid_example/android/.gradle/7.5/checksums/sha1-checksums.bin new file mode 100644 index 0000000..58dadd4 Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/checksums/sha1-checksums.bin differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock b/playx_3d_products_grid_example/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock new file mode 100644 index 0000000..1166314 Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/dependencies-accessors/gc.properties b/playx_3d_products_grid_example/android/.gradle/7.5/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/executionHistory/executionHistory.bin b/playx_3d_products_grid_example/android/.gradle/7.5/executionHistory/executionHistory.bin new file mode 100644 index 0000000..36e5e23 Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/executionHistory/executionHistory.bin differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/executionHistory/executionHistory.lock b/playx_3d_products_grid_example/android/.gradle/7.5/executionHistory/executionHistory.lock new file mode 100644 index 0000000..ebb662f Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/executionHistory/executionHistory.lock differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/fileChanges/last-build.bin b/playx_3d_products_grid_example/android/.gradle/7.5/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/fileChanges/last-build.bin differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/fileHashes.bin b/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/fileHashes.bin new file mode 100644 index 0000000..05b9fac Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/fileHashes.bin differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/fileHashes.lock b/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/fileHashes.lock new file mode 100644 index 0000000..8163be2 Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/fileHashes.lock differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/resourceHashesCache.bin b/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..c72fedd Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/7.5/fileHashes/resourceHashesCache.bin differ diff --git a/playx_3d_products_grid_example/android/.gradle/7.5/gc.properties b/playx_3d_products_grid_example/android/.gradle/7.5/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..f998fd4 Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/cache.properties b/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..c779e4a --- /dev/null +++ b/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Sun Apr 16 15:38:21 EET 2023 +gradle.version=7.5 diff --git a/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/outputFiles.bin b/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..9252e5f Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/playx_3d_products_grid_example/android/.gradle/file-system.probe b/playx_3d_products_grid_example/android/.gradle/file-system.probe new file mode 100644 index 0000000..ffee5a6 Binary files /dev/null and b/playx_3d_products_grid_example/android/.gradle/file-system.probe differ diff --git a/playx_3d_products_grid_example/android/.gradle/vcs-1/gc.properties b/playx_3d_products_grid_example/android/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/playx_3d_products_grid_example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/playx_3d_products_grid_example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java new file mode 100644 index 0000000..96d84e1 --- /dev/null +++ b/playx_3d_products_grid_example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -0,0 +1,24 @@ +package io.flutter.plugins; + +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import io.flutter.Log; + +import io.flutter.embedding.engine.FlutterEngine; + +/** + * Generated file. Do not edit. + * This file is generated by the Flutter tool based on the + * plugins that support the Android platform. + */ +@Keep +public final class GeneratedPluginRegistrant { + private static final String TAG = "GeneratedPluginRegistrant"; + public static void registerWith(@NonNull FlutterEngine flutterEngine) { + try { + flutterEngine.getPlugins().add(new io.sourcya.playx_3d_scene.Playx3dScenePlugin()); + } catch(Exception e) { + Log.e(TAG, "Error registering plugin playx_3d_scene, io.sourcya.playx_3d_scene.Playx3dScenePlugin", e); + } + } +} diff --git a/playx_3d_products_grid_example/android/gradle/wrapper/gradle-wrapper.jar b/playx_3d_products_grid_example/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..13372ae Binary files /dev/null and b/playx_3d_products_grid_example/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/playx_3d_products_grid_example/android/gradlew b/playx_3d_products_grid_example/android/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/playx_3d_products_grid_example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/playx_3d_products_grid_example/android/gradlew.bat b/playx_3d_products_grid_example/android/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/playx_3d_products_grid_example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/playx_3d_products_grid_example/android/local.properties b/playx_3d_products_grid_example/android/local.properties new file mode 100644 index 0000000..0fae89c --- /dev/null +++ b/playx_3d_products_grid_example/android/local.properties @@ -0,0 +1,3 @@ +sdk.dir=E:\\sdk +flutter.sdk=E:\\flutter\\sdk +flutter.buildMode=debug \ No newline at end of file diff --git a/playx_3d_products_grid_example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/playx_3d_products_grid_example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig new file mode 100644 index 0000000..de114d4 --- /dev/null +++ b/playx_3d_products_grid_example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig @@ -0,0 +1,11 @@ +// This is a generated file; do not edit or check into version control. +FLUTTER_ROOT=E:\flutter\sdk +FLUTTER_APPLICATION_PATH=E:\Sourcaya\Apps\playx-model-viewer\playx_3d_products_grid_example +COCOAPODS_PARALLEL_CODE_SIGN=true +FLUTTER_BUILD_DIR=build +FLUTTER_BUILD_NAME=1.0.0 +FLUTTER_BUILD_NUMBER=1 +DART_OBFUSCATION=false +TRACK_WIDGET_CREATION=true +TREE_SHAKE_ICONS=false +PACKAGE_CONFIG=.dart_tool/package_config.json diff --git a/playx_3d_products_grid_example/macos/Flutter/ephemeral/flutter_export_environment.sh b/playx_3d_products_grid_example/macos/Flutter/ephemeral/flutter_export_environment.sh new file mode 100644 index 0000000..adba1b1 --- /dev/null +++ b/playx_3d_products_grid_example/macos/Flutter/ephemeral/flutter_export_environment.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=E:\flutter\sdk" +export "FLUTTER_APPLICATION_PATH=E:\Sourcaya\Apps\playx-model-viewer\playx_3d_products_grid_example" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_BUILD_DIR=build" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=true" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/pubspec.yaml b/pubspec.yaml index b1587dd..dda0cc7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,15 @@ name: playx_3d_scene description: Plugin for rendering interactive 3D models based on Google filament natively on Android. With the ability of controlling environment skybox, light, camera, ground and more. -version: 0.0.2 +version: 0.0.3 homepage: https://sourcya.com/ repository: https://github.com/playx-flutter/playx-3d-scene issue_tracker: https://github.com/playx-flutter/playx-3d-scene/issues +screenshots: + - description: 'This screenshot shows 3d model with HDR environment.' + path: screenshots/screenshot1.jpg + - description: 'This screenshot shows different shapes with HDR environment' + path: screenshots/screenshot2.jpg environment: sdk: ">=2.19.0 <4.0.0" @@ -13,12 +18,12 @@ environment: dependencies: flutter: sdk: flutter - plugin_platform_interface: ^2.1.4 + plugin_platform_interface: ^2.1.6 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.1 + flutter_lints: ^2.0.3 flutter: plugin: diff --git a/screenshots/1.jpg b/screenshots/screenshot1.jpg similarity index 100% rename from screenshots/1.jpg rename to screenshots/screenshot1.jpg diff --git a/screenshots/2.jpg b/screenshots/screenshot2.jpg similarity index 100% rename from screenshots/2.jpg rename to screenshots/screenshot2.jpg