rename setLayerEnabled to setLayerVisibility, add setVisibilityLayer method
This commit is contained in:
@@ -1155,10 +1155,18 @@ external void get_bounding_box_to_out(
|
||||
|
||||
@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int, ffi.Bool)>(
|
||||
isLeaf: true)
|
||||
external void set_layer_enabled(
|
||||
external void set_layer_visibility(
|
||||
ffi.Pointer<ffi.Void> sceneManager,
|
||||
int layer,
|
||||
bool enabled,
|
||||
bool visible,
|
||||
);
|
||||
|
||||
@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int)>(
|
||||
isLeaf: true)
|
||||
external void set_visibility_layer(
|
||||
ffi.Pointer<ffi.Void> sceneManager,
|
||||
int entity,
|
||||
int layer,
|
||||
);
|
||||
|
||||
@ffi.Native<
|
||||
@@ -1203,6 +1211,15 @@ external void remove_stencil_highlight(
|
||||
int entity,
|
||||
);
|
||||
|
||||
@ffi.Native<
|
||||
ffi.Pointer<TMaterialInstance> Function(
|
||||
ffi.Pointer<ffi.Void>, EntityId, ffi.Int)>(isLeaf: true)
|
||||
external ffi.Pointer<TMaterialInstance> get_material_instance_at(
|
||||
ffi.Pointer<ffi.Void> sceneManager,
|
||||
int entity,
|
||||
int materialIndex,
|
||||
);
|
||||
|
||||
@ffi.Native<
|
||||
ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int,
|
||||
ffi.Pointer<ffi.Char>, ffi.Float)>(isLeaf: true)
|
||||
|
||||
@@ -1920,8 +1920,17 @@ class ThermionViewerFFI extends ThermionViewer {
|
||||
///
|
||||
///
|
||||
///
|
||||
Future setLayerEnabled(int layer, bool enabled) async {
|
||||
set_layer_enabled(_sceneManager!, layer, enabled);
|
||||
Future setLayerVisibility(int layer, bool visible) {
|
||||
set_layer_visibility(_sceneManager!, layer, visible);
|
||||
return Future.value();
|
||||
}
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
Future setVisibilityLayer(ThermionEntity entity, int layer) {
|
||||
set_visibility_layer(_sceneManager!, entity, layer);
|
||||
return Future.value();
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -545,7 +545,7 @@ abstract class ThermionViewer {
|
||||
Future moveCameraToAsset(ThermionEntity entity);
|
||||
|
||||
///
|
||||
/// Enables/disables frustum culling. Currently we don't expose a method for manipulating the camera projection/culling matrices so this is your only option to deal with unwanted near/far clipping.
|
||||
/// Enables/disables frustum culling.
|
||||
///
|
||||
Future setViewFrustumCulling(bool enabled);
|
||||
|
||||
@@ -596,14 +596,15 @@ abstract class ThermionViewer {
|
||||
/// Sets the material property [propertyName] under material [materialIndex] for [entity] to [value].
|
||||
/// [entity] must have a Renderable attached.
|
||||
///
|
||||
Future setMaterialPropertyInt(ThermionEntity entity, String propertyName,
|
||||
int materialIndex, int value);
|
||||
Future setMaterialPropertyInt(
|
||||
ThermionEntity entity, String propertyName, int materialIndex, int value);
|
||||
|
||||
///
|
||||
/// Sets the depthWrite material instance at [materialIndex] for [entity] to [enabled].
|
||||
/// [entity] must have a Renderable attached.
|
||||
///
|
||||
Future setMaterialDepthWrite(ThermionEntity entity, int materialIndex, bool enabled);
|
||||
Future setMaterialDepthWrite(
|
||||
ThermionEntity entity, int materialIndex, bool enabled);
|
||||
|
||||
///
|
||||
/// Scale [entity] to fit within the unit cube.
|
||||
@@ -853,7 +854,12 @@ abstract class ThermionViewer {
|
||||
/// We place all scene assets in layer 0 (enabled by default), gizmos in layer 1 (enabled by default), world grid in layer 2 (disabled by default).
|
||||
/// Use this method to toggle visibility of the respective layer.
|
||||
///
|
||||
Future setLayerEnabled(int layer, bool enabled);
|
||||
Future setLayerVisibility(int layer, bool visible);
|
||||
|
||||
///
|
||||
/// Assigns [entity] to visibility layer [layer].
|
||||
///
|
||||
Future setVisibilityLayer(ThermionEntity entity, int layer);
|
||||
|
||||
///
|
||||
/// Show/hide the translation gizmo.
|
||||
|
||||
Reference in New Issue
Block a user