MLJ.core.File namespace
- Source:
Methods
(static) this.createLayer(name) → {MLJ.core.Layer}
Creates a new mesh file using the c++ functions bound to JavaScript
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the new mesh file |
- Source:
Returns:
The new layer
- Type
- MLJ.core.Layer
(static) this.openMeshFile(toOpen)
Opens a mesh file or a list of mesh files
Parameters:
Name | Type | Description |
---|---|---|
toOpen |
File | FileList | A single mesh file or a list of mesh files |
- Source:
Fires:
(static) this.reloadMeshFile(mf)
Reloads an existing layer, that is recovers the file linked to the layer and reinitializes the cppMesh of the layer with it
Parameters:
Name | Type | Description |
---|---|---|
mf |
MLJ.core.Layer | the MeshFile to be reloaded |
- Source:
Fires:
Events
MeshFileOpened
Triggered when a mash file is opened
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
meshFile |
MLJ.core.Layer | The opened mesh file |
- Source:
Example
$(document).on("MeshFileOpened",
function (event, meshFile) {
//do something
}
);
MeshFileReloaded
Triggered when a mesh file is reloaded
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
meshFile |
MLJ.core.Layer | The reloaded mesh file |
- Source:
Example
$(document).on("MeshFileReloaded",
function (event, meshFile) {
//do something
}
);