|
@@ -14,6 +14,12 @@ class Light extends h3d.scene.Light {
|
|
if( shadows == null ) shadows = new h3d.pass.Shadows(this);
|
|
if( shadows == null ) shadows = new h3d.pass.Shadows(this);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ override function dispose() {
|
|
|
|
+ super.dispose();
|
|
|
|
+ if( shadows != null ) shadows.dispose();
|
|
|
|
+ if( primitive != null ) primitive.dispose();
|
|
|
|
+ }
|
|
|
|
+
|
|
override function sync(ctx) {
|
|
override function sync(ctx) {
|
|
super.sync(ctx);
|
|
super.sync(ctx);
|
|
if(isMainLight){
|
|
if(isMainLight){
|