Skip to content

WIP on-screen error messages for Lumin - #126

Open
kpiascik wants to merge 9 commits into
masterfrom
errorReport
Open

kpiascik wants to merge 9 commits into
masterfrom
errorReport

Conversation

@kpiascik

@kpiascik kpiascik commented Apr 9, 2020

Copy link
Copy Markdown
Collaborator

Thank you for your contribution to MagicScript Project.
Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • You are using approved terminology
  • You have added unit tests

var obj = mxs._nativeFactory.createElement(type, rootContainerInstance, props);
} catch (e) {
let message = `ERROR Type: ${type}\nproperties: ${JSON.stringify(props)}`;
console.error(`${message}\n${e.message}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @grozdanov uses logError / logWarning for all kinds of output.

@grozdanov grozdanov Apr 16, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to have completely independent (from the factory) code which pops the exception message since createElement might fail for the text element as well. I will pull this branch and re-work it.

@grozdanov

Copy link
Copy Markdown
Contributor

WIP: Just added SpatialLogger which purpose would be to render spatial log messages.
Next: Add capabilities to open a prism which loads all the log messages sent to the SpatialLogger. The idea is to have spatial console.

@grozdanov

grozdanov commented Apr 27, 2020

Copy link
Copy Markdown
Contributor

Testing with src/configuration.js having showSpatialLogger: true throws:
Fatal signal 11 (SIGSEGV), code 1 ... (index.js) which is an exception while invoking:
app.requestNewPrism([1.0, 1.5, 0.2])
Requires further investigation.

@grozdanov

Copy link
Copy Markdown
Contributor

The reason for the exception has been identified: requestNewPrism() must be executed from within BaseApp.onAppStart().

@grozdanov

Copy link
Copy Markdown
Contributor

In order to activate the SpatialLogger the developer needs to add configuration for the logger prism to lumin/main.js file:

const spatialLogger = {
    size: [0.5, 1.0, 0.2],
    position: [-1.0, 0, 0],
    orientation: [0, 0, 0, 0]
}

mxs.bootstrap(<MyApp type='landscape' timeDelta={0.5} spatialLogger={spatialLogger}/>);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants