-
Notifications
You must be signed in to change notification settings - Fork 250
Open
Labels
Description
Steps to reproduce
- Create a node
- Mount the node
- Add a Mesh to the node
- Dismount the node via
removeChildon parent
Example (self-contained)
'use strict';
var DOMElement = require('famous/dom-renderables/DOMElement');
var FamousEngine = require('famous/core/FamousEngine');
var Mesh = require('famous/webgl-renderables/Mesh');
FamousEngine.init();
var scene = FamousEngine.createScene();
var parent = scene.addChild();
var child = parent.addChild();
var mesh = new Mesh(parent);
mesh.setGeometry('Sphere');
setTimeout(function () {
scene.removeChild(parent);
}, 1000);
var domElement = new DOMElement(child, {
properties: {
background: 'blue'
}
});
parent
.setSizeMode('absolute', 'absolute', 'absolute')
.setAbsoluteSize(250, 250, 250)
.setAlign(0.5, 0.5)
.setMountPoint(0.5, 0.5)
.setOrigin(0.5, 0.5);
var spinner = parent.addComponent({
onUpdate: function(time) {
parent.setRotation(time / 1000, time / 2000, time / 3000);
parent.requestUpdateOnNextTick(spinner);
}
});
parent.requestUpdate(spinner);Relevant code sample
setTimeout(function () {
scene.removeChild(parent);
}, 1000);Error
Uncaught TypeError: Cannot read property 'split' of null
Cause
The commands sent by Mesh#onDismount are incorrect. They don't include a node location/ path. Therefore the compositor can't split the command.
/**
* Queues the command for dismounting Mesh
*
* @method
*
* @return {undefined} undefined
*/
Mesh.prototype.onDismount = function onDismount () {
this._initialized = false;
this._changeQueue.push(Commands.GL_REMOVE_MESH);
this._requestUpdate();
};Reactions are currently unavailable