fabric-engine/JSSceneGraph — Issue #146: Flocking demo does not compile
Author: ericplante
Created: 2012-02-15 19:12:17+00:00
State: open

I get an empty grey viewport. Javascript console says:

Error compiling operator: copyCurrentFrameDataToPrevFrameData in FABRIC_ROOT/SG/KL/particles.kl
File:FABRIC_ROOT/SG/KL/particles.kl
25:18: error: no cast exists from Integer to Index
io HashTable hashtable,
io Integer cellIndices<>
) {
// Reset the hash table, and re-accumulate the ids.
Size numCells = hashtable.x_count * hashtable.y_count * hashtable.z_count;
hashtable.cells.resize(numCells);
>>>	for (var Index i = 0; i < numCells; ++ i)
hashtable.cells[i].resize(0);

for (var Integer i = 0; i < cellIndices.size; i++) {
var Integer cellIndex = cellIndices[i];
hashtable.cells[cellIndex].push(i);
}
/~ericplante/Fabric/SG/SceneGraph.js?ver=1021:399Error compiling operator: populateHashTable in FABRIC_ROOT/SG/KL/particles.kl
File:FABRIC_ROOT/SG/KL/particles.kl
25:18: error: no cast exists from Integer to Index
io HashTable hashtable,
io Integer cellIndices<>
) {
// Reset the hash table, and re-accumulate the ids.
Size numCells = hashtable.x_count * hashtable.y_count * hashtable.z_count;
hashtable.cells.resize(numCells);
>>>	for (var Index i = 0; i < numCells; ++ i)
hashtable.cells[i].resize(0);

for (var Integer i = 0; i < cellIndices.size; i++) {
var Integer cellIndex = cellIndices[i];
hashtable.cells[cellIndex].push(i);
}
/~ericplante/Fabric/SG/SceneGraph.js?ver=1021:399Error compiling operator: calcCellIndex in FABRIC_ROOT/SG/KL/particles.kl
File:FABRIC_ROOT/SG/KL/particles.kl
25:18: error: no cast exists from Integer to Index
io HashTable hashtable,
io Integer cellIndices<>
) {
// Reset the hash table, and re-accumulate the ids.
Size numCells = hashtable.x_count * hashtable.y_count * hashtable.z_count;
hashtable.cells.resize(numCells);
>>>	for (var Index i = 0; i < numCells; ++ i)
hashtable.cells[i].resize(0);

for (var Integer i = 0; i < cellIndices.size; i++) {
var Integer cellIndex = cellIndices[i];
hashtable.cells[cellIndex].push(i);
}
Flocking.html:282Uncaught Flock_AttributesDGNode:["binding 0: operator 'calcCellIndex': compile failed","binding 1: operator 'copyCurrentFrameDataToPrevFrameData': compile failed","binding 2: operator 'populateHashTable': compile failed"],calcCellIndex:["compile failed"],copyCurrentFrameDataToPrevFrameData:["compile failed"],populateHashTable:["compile failed"]
FABRIC.js:2292[MT] redrawEvent: exception thrown: cannot execute because of errors