Effects on PV3D

参考一些外国的demo,做了3个effect,分享之。

随机坐标创建50个3D矩形

Effects on PV3Dfor(var i:int = 0; i < 50; i ++)
            }

为每个矩形创建Blur效果

Effects on PV3Dif(depthDemo)
            }

创建一个3D球体

Effects on PV3Dvar s:Sphere = new Sphere(new WireframeMaterial(), 150128);
Effects on PV3Ds.name 
= "sphere 11";
Effects on PV3Dscene.addChild(s);

创建一个特效层

Effects on PV3Dvar bfx:BitmapEffectLayer = new BitmapEffectLayer(viewport, 500500);
Effects on PV3Dviewport.containerSprite.addLayer(bfx);

把球体加入这个特效层,并为层定义特效

Effects on PV3Dbfx.addDisplayObject3D(s);
Effects on PV3Dbfx.addEffect(
new BitmapLayerEffect(new BlurFilter(228)));
Effects on PV3Dbfx.setScroll(
0-4);
Effects on PV3Dbfx.setTracking(s);

光照效果在前面的文章已提供源码,请参阅。

Preview:http://niuniuzhu.cn/p/3DRenderDemo/index.html?p=1

相关文章:

  • 2021-11-09
  • 2022-12-23
  • 2021-06-19
  • 2021-08-18
  • 2022-02-24
  • 2022-02-14
  • 2022-03-04
猜你喜欢
  • 2021-07-27
  • 2021-07-31
  • 2022-12-23
  • 2022-01-05
  • 2021-09-17
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案