rename setLayerEnabled to setLayerVisibility, add setVisibilityLayer method
This commit is contained in:
@@ -55,6 +55,7 @@ namespace thermion_filament
|
||||
|
||||
enum LAYERS {
|
||||
DEFAULT_ASSETS = 0,
|
||||
BACKGROUND = 6,
|
||||
OVERLAY = 7,
|
||||
};
|
||||
|
||||
@@ -229,11 +230,8 @@ namespace thermion_filament
|
||||
|
||||
///
|
||||
/// Toggles the visibility of the given layer.
|
||||
/// Layer 0 - regular scene assets
|
||||
/// Layer 1 - unused
|
||||
/// Layer 2 - grid
|
||||
///
|
||||
void setLayerEnabled(int layer, bool enabled);
|
||||
void setLayerVisibility(SceneManager::LAYERS layer, bool enabled);
|
||||
|
||||
///
|
||||
/// Creates an entity with the specified geometry/material/normals and adds to the scene.
|
||||
@@ -284,6 +282,8 @@ namespace thermion_filament
|
||||
return _assetLoader->createInstance(asset);
|
||||
}
|
||||
|
||||
MaterialInstance* getMaterialInstanceAt(EntityId entityId, int materialIndex);
|
||||
|
||||
void setMaterialProperty(EntityId entity, int materialIndex, const char* property, float value);
|
||||
void setMaterialProperty(EntityId entity, int materialIndex, const char* property, int32_t value);
|
||||
void setMaterialProperty(EntityId entityId, int materialIndex, const char* property, filament::math::float4& value);
|
||||
@@ -298,6 +298,8 @@ namespace thermion_filament
|
||||
|
||||
MaterialInstance* createUnlitMaterialInstance();
|
||||
|
||||
void setVisibilityLayer(EntityId entityId, int layer);
|
||||
|
||||
private:
|
||||
gltfio::AssetLoader *_assetLoader = nullptr;
|
||||
const ResourceLoaderWrapperImpl *const _resourceLoaderWrapper;
|
||||
|
||||
@@ -269,11 +269,13 @@ extern "C"
|
||||
EMSCRIPTEN_KEEPALIVE void get_gizmo(void *const sceneManager, EntityId *out);
|
||||
EMSCRIPTEN_KEEPALIVE Aabb2 get_bounding_box(void *const sceneManager, EntityId entity);
|
||||
EMSCRIPTEN_KEEPALIVE void get_bounding_box_to_out(void *const sceneManager, EntityId entity, float *minX, float *minY, float *maxX, float *maxY);
|
||||
EMSCRIPTEN_KEEPALIVE void set_layer_enabled(void *const sceneManager, int layer, bool enabled);
|
||||
EMSCRIPTEN_KEEPALIVE void set_layer_visibility(void *const sceneManager, int layer, bool visible);
|
||||
EMSCRIPTEN_KEEPALIVE void set_visibility_layer(void *const sceneManager, EntityId entity, int layer);
|
||||
EMSCRIPTEN_KEEPALIVE void pick_gizmo(void *const sceneManager, int x, int y, void (*callback)(EntityId entityId, int x, int y));
|
||||
EMSCRIPTEN_KEEPALIVE void set_gizmo_visibility(void *const sceneManager, bool visible);
|
||||
EMSCRIPTEN_KEEPALIVE void set_stencil_highlight(void *const sceneManager, EntityId entity, float r, float g, float b);
|
||||
EMSCRIPTEN_KEEPALIVE void remove_stencil_highlight(void *const sceneManager, EntityId entity);
|
||||
EMSCRIPTEN_KEEPALIVE TMaterialInstance* get_material_instance_at(void *const sceneManager, EntityId entity, int materialIndex);
|
||||
EMSCRIPTEN_KEEPALIVE void set_material_property_float(void *const sceneManager, EntityId entity, int materialIndex, const char *property, float value);
|
||||
EMSCRIPTEN_KEEPALIVE void set_material_property_int(void *const sceneManager, EntityId entity, int materialIndex, const char *property, int value);
|
||||
EMSCRIPTEN_KEEPALIVE void set_material_property_float4(void *const sceneManager, EntityId entity, int materialIndex, const char *property, double4 value);
|
||||
|
||||
Reference in New Issue
Block a user