I want to reload the scene rather than refreshing the window.Can you tell how to do that
var RestartButton = pc.createScript('restartButton');
RestartButton.prototype.initialize = function () {
this.button = this.entity;
this.button.element.on('mousedown', this.onButtonDown, this);
};
RestartButton.prototype.onButtonDown = function (event) {
this.button.tween(this.button.getLocalScale())
.to({ x: 0.7, y: 0.7, z: 0.7 }, 0.2, pc.SineOut)
.on('complete', function () {
this.button.tween(this.button.getLocalScale())
.to({ x: 0.6, y: 0.6, z: 0.6 }, 0.2, pc.SineOut)
.on('complete', function () {
window.location.reload();
}.bind(this)).start()
}.bind(this))
.start();
};