Yes, although most likely the API doesn’t expose all the functionality that the configurator will need.
To use the API you need to set a custom index.html
file for your scene. You can download this file: https://drive.google.com/file/d/10rlsUk8Gb2FubUegrSmj-ydXOJ4e0zb8 as index.html
to C:\Users\<USER>\Documents\Shapespark\<SCENE NAME>\
At the bottom of the file you will find an API entry point:
window.onload = function() {
var config = new WALK.SceneLoadConfig();
config.assetsUrl = './';
config.onMaterialClicked(function(material) {
alert('Material ' + material.name + ' clicked');
material.color.setRGB(0.7, 0.1, 0.1);
material.setUniforms();
return true;
});
WALK.init(config);
}
The code prints a clicked material name and changes the materials color to red.
One caveat is that in trial you won’t able to upload a scene with a custom index.html, but you can test locally, or send us your username and we will whitelist your account to allow the upload.
Aside from the API, did you already have a chance to try standard Shapespark functions with the models of your homes?