getChildEntities method

  1. @JSExport()
JSPromise<JSArray<JSNumber>> getChildEntities(
  1. ThermionEntity parent,
  2. bool renderableOnly
)

Implementation

@JSExport()
JSPromise<JSArray<JSNumber>> getChildEntities(
    ThermionEntity parent, bool renderableOnly) {
  return viewer
      .getChildEntities(
        parent,
        renderableOnly,
      )
      .then((entities) => entities.map((entity) => entity.toJS).toList().toJS)
      .onError((e, st) async {
    _logger.severe("Error : $e\n$st");
    return <JSNumber>[].toJS;
  }).toJS;
}