|
@@ -767,10 +767,8 @@ class EmitterObject extends h3d.scene.Object {
|
|
|
// Should we do this manually here or make a recursive makeInstance on the template?
|
|
|
var materials = particleTemplate.getAll(hrt.prefab.Material);
|
|
|
for(mat in materials) {
|
|
|
- if(mat.enabled) {
|
|
|
+ if(mat.enabled)
|
|
|
mat.makeInstance(template);
|
|
|
- template.shared.contexts.remove(mat);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
// Setup shaders
|
|
@@ -779,7 +777,6 @@ class EmitterObject extends h3d.scene.Object {
|
|
|
for( shader in shaders ) {
|
|
|
if( !shader.enabled ) continue;
|
|
|
var shCtx = shader.makeInstance(template);
|
|
|
- template.shared.contexts.remove(shader);
|
|
|
if( shCtx == null ) continue;
|
|
|
hrt.prefab.fx.BaseFX.getShaderAnims(template, shader, shaderAnims);
|
|
|
}
|
|
@@ -806,8 +803,6 @@ class EmitterObject extends h3d.scene.Object {
|
|
|
batch = new h3d.scene.MeshBatch(meshPrim, mesh.material, this);
|
|
|
batch.name = "batch";
|
|
|
}
|
|
|
-
|
|
|
- template.shared.contexts.remove(particleTemplate);
|
|
|
template.local3d.remove();
|
|
|
}
|
|
|
}
|