Does a WILL 2.0 data file include pressure data?
No pressure data is recorded in WILL 2.0 files.
Here is how the SDK works:
Input (containing x, y and pressure) ---> is passed to the PressurePathBuilder ---> Produces output (containing X, Y and Size) ---> Output is saved in .will file.
Input (containing x, y and timestamp) ---> is passed to the SpeedPathBuilder ---> Produces output (containing X, Y and Size) ---> Output is saved in .will file
In both cases the output looks the same and it contains neither pressure, nor timestamp values.
The operation of transforming the data from pressure/timestamp to size is irreversible and there is no way to get pressure information from the file.
Web tutorial: shows a black screen
Most probably you are trying to access tutorials from your filesystem. The browser throws a security exception because the Ink Engine loads local resources.
The recommended solution is to execute examples in a web environment. You need a simple http server.
In the samples folder you can execute:
python -m SimpleHTTPServer 8080
This is simplest way to start a server without any configuration. Then access it under http://localhost:8080
An alternative solution is to tell the browser to skip security restrictions.
NOTE This solution is not recommended because the modified browser settings could later become a security issue.
Under Mozilla Firefox
Set the security.fileuri.strict_origin_policy parameter to false.
To do this, enter about:config in the address bar, then search for the parameter.
Under Google Chrome
Start the executable with the following parameter:
Web tutorial: handling a WILL file
Due to the specifics of the web architecture there is no support for the WILL file contents.
The only way to get the information from the file is to extract its contents.
While the Web SDK does not have support for the WILL file format, it provides InkEncoder and InkDecoder classes that can access the protobuf data from the file.
For more information about the structure of the file see WILL File Format
Also we highly recommend you to check 2.2 (Stroke serialization) from the examples which can be found in the downloaded SDK.
Differences between WILL 2.0 and 3.0
What are the differences between WILL 2.0 and 3.0 and do you have any guidance for migrating?
WILL 2 for Windows is based on asm.js (http://asmjs.org/faq.html).
The underlying technology used for inking is WebGL.
The latest version of WILL 2 is v.2.1.0.
The underlying technology used for inking is 2D.
WebGL is also available for complex tools used in sketching apps.
WILL 3 significantly reduces the complexity of canvas interaction and works as an extension of 2D context - it just adds inking functionality.
There is no migration guide between WILL 2 and 3 because WILL 3 provides completely new concepts of path building and technology.
Rendering primitives is almost the same but data format is completely different.
A converter from a WILL 2 to a WILL 3 data file is available if needed.
WILL 3 has several distributions:
wacom-digital-ink.js - UMD distribution - This is used for CDN imports or for bundling.
For bundles additional configuration is required - there are native dependencies which should be excluded from the bundle.
wacom-digital-ink-esm.js - ECMA6 distribution This is used with import/export statements (the next version name will be updated to wacom-digital-ink.mjs)
wacom-digital-ink-cjs.js - CommonJS build This is compatible with NodeJS env (the next version name will be updated to wacom-digital-ink.cjs)
wacom-digital-ink.cjs.mjs Provides ECMA6 for NodeJS
The package should be available in npm repository one day (depending on legal authorisation).
WILL 3 does not have tutorials or samples yet, but a demo app (based on CDN syntax) and API documentation have been provided.
The demo app provides the basic concepts of Vector and Raster inking. The source is available here: https://github.com/Wacom-Developer/sdk-for-ink-web
You can access the demo app here: https://will3-web-ink-demo.azurewebsites.net
Tool Configurator app:
For WILL 2 see https://developer-demos.wacom.com/ToolConfigurator
For WILL 3 see http://ink-designer.trafficmanager.net/
This provides many new features. Path building is much more powerful and path point geometry configuration is handled much more precisely.
WILL 3 comes with tilt support and control on everything related to path building.
WILL 2 has support for variable size and alpha color channel only - many properties can be varied in WILL 3.