Adding filter3d to View3d on Away3d 4.1.6.

I am trying to add a filter3d property to view3d while keeping the background image. Ive created an instance of stage3DManager and also installed stage3DProxy:

stage3DManager = Stage3DManager.getInstance(_stage);
stage3DProxy   = stage3DManager.getFreeStage3DProxy();

stage3DProxy.addEventListener(Stage3DEvent.CONTEXT3D_CREATED, onContextCreated);

When creating a 3D context, only an instance of view3d is created:

away3dView = new View3D();
away3dView.stage3DProxy = stage3DProxy;
away3dView.shareContext = true;
// away3dView.filters3d = [new MotionBlurFilter3D()];     <——  (╯°□°)╯︵ ┻━┻)

When you try to add this line of code, it simply reduces or decreases the "background" depending on how the background is created. Ive tried two different ways to add background:

Assigning a BitmapTexture to the background property on View3d causes the background to shift

view.background = new BitmapTexture(footballBackgroundBmd);

Using a starling, as shown in this tutorial , removes the background

starlingCheckerboard = new Starling(BackgroundImage, _stage, stage3DProxy.viewPort, stage3DProxy.stage3D);

. filters3d View3d . , filter3d , , .

, Im - :/

+4

Source: https://habr.com/ru/post/1530051/


All Articles