[Papervision3D] Could be a 2 minute fix for someone more advanced than myself!

Scott Gilmour scott.gilmour at 999design.com
Thu Nov 13 06:03:00 PST 2008


Hi,

Thank you for all your responses and time taken to look into tis for  
me, I will have a bash at a few variations suggested and will let you  
know.

Thanks again.

Cheers,
Scott.



On 13 Nov 2008, at 13:44, dongeroo wrote:

>
> Yup.....good ol' BasicView.....makes life even easier!
>
>
> John Brookes-2 wrote:
>>
>> many other ways as well
>>
>> package {
>> import flash.display.Sprite;
>> import flash.events.Event;
>> import org.papervision3d.objects.primitives.Plane;
>> import org.papervision3d.view.BasicView;
>> import org.papervision3d.scenes.*;
>> import org.papervision3d.cameras.*;
>> import org.papervision3d.objects.*;
>> import org.papervision3d.materials.*;
>> public class tooIdle extends BasicView
>>    {
>>        public function tooIdle() {
>>            kittenFluffer();
>>            singleRender();
>>        }
>>        public function kittenFluffer():void {
>> camera.zoom = 10;
>>
>> var mat1:BitmapAssetMaterial = new BitmapAssetMaterial("image1");
>> //var mat1:ColorMaterial = new ColorMaterial();
>> mat1.smooth = true;
>> mat1.oneSide = false;
>>
>> var photo1:Plane = new Plane(mat1, 196, 150,3,3);
>> scene.addChild(photo1);
>> photo1.x = -400;
>> photo1.y = -214;
>> photo1.z = 0;
>>
>> addEventListener(Event.ENTER_FRAME, render);
>>    }
>>    private function render(e:Event):void
>> {
>>  camera.x += (((stage.mouseX-(stage.stageWidth *.5))*2)-camera.x )*. 
>> 05;
>>  camera.y += (((stage.mouseY - (stage.stageHeight * .5)) * 2) -  
>> camera.y
>> )
>> * .05;
>>  singleRender();
>> }
>> }
>> }
>>
>> 2008/11/13 dongeroo <shanej at shanejohnson.co.uk>
>>
>>>
>>> Have you tried adding a viewport, scene and renderer instead of the
>>> container
>>> sprite:
>>>
>>> var renderer:BasicRenderEngine = new BasicRenderEngine();
>>> var scene:Scene3D = new Scene3D();
>>> var viewport:Viewport3D =  new Viewport3D();
>>> var camera:Camera3D = new Camera3D();
>>>
>>> and then rendering with the renderer:
>>>
>>> renderer.renderScene(scene, camera, viewport);
>>>
>>> instead of trying to render with the scene?
>>>
>>> You will of course need to import these to your frame script:
>>>
>>> import org.papervision3d.view.Viewport3D;
>>> import org.papervision3d.cameras.Camera3D;
>>> import org.papervision3d.scenes.Scene3D;
>>> import org.papervision3d.render.BasicRenderEngine;
>>>
>>> Shane
>>>
>>>
>>> Scott Gilmour wrote:
>>>>
>>>> Hi,
>>>>
>>>> Hope your all well.
>>>>
>>>> I would greatly appreciate it if someone had two minutes to look  
>>>> over
>>>> my code, copied below.
>>>>
>>>> It's something which has evolved from a tutorial I did a while  
>>>> back,
>>>> however, testing it now it fails to work.
>>>>
>>>> My first thought is that I created this before I updated my SVN  
>>>> folder
>>>> but not sure.
>>>>
>>>> Thank you in advance for anyone willing to lend a hand.
>>>>
>>>> All the best.
>>>>
>>>>  . . . . . . . . . . . . . . . . . .
>>>>
>>>>  SCOTT GILMOUR
>>>>  SENIOR DIGITAL DESIGNER
>>>>
>>>>  999
>>>>  33 LYNEDOCH STREET
>>>>  GLASGOW  G3 6AA
>>>>
>>>>  T + 44 (0)141 332 2684
>>>>  M + 44 (0)7827 330 229
>>>>
>>>>
>>>>  999DESIGN.COM
>>>>  . . . . . . . . . . . . . . . . . .
>>>>
>>>>
>>>> import org.papervision3d.scenes.*;
>>>> import org.papervision3d.cameras.*;
>>>> import org.papervision3d.objects.*;
>>>> import org.papervision3d.materials.*;
>>>>
>>>> var container:Sprite = new Sprite();
>>>> container.x = stage.stageWidth * 0.5;
>>>> container.y = stage.stageHeight * 0.5;
>>>> addChild(container);
>>>>
>>>> var scene:Scene3D = new Scene3D(container);
>>>> var camera:Camera3D = new Camera3D();
>>>> camera.zoom = 10;
>>>>
>>>> var mat1:BitmapAssetMaterial = new BitmapAssetMaterial("image1");
>>>> mat1.smooth = true;
>>>> mat1.oneSide = false;
>>>>
>>>> var mat2:BitmapAssetMaterial = new BitmapAssetMaterial("image2");
>>>> mat2.smooth = true;
>>>> mat2.oneSide = false;
>>>>
>>>> var mat3:BitmapAssetMaterial = new BitmapAssetMaterial("image3");
>>>> mat3.smooth = true;
>>>> mat3.oneSide = false;
>>>>
>>>> var mat4:BitmapAssetMaterial = new BitmapAssetMaterial("image4");
>>>> mat4.smooth = true;
>>>> mat4.oneSide = false;
>>>>
>>>> var mat5:BitmapAssetMaterial = new BitmapAssetMaterial("image5");
>>>> mat5.smooth = true;
>>>> mat5.oneSide = false;
>>>>
>>>> var mat6:BitmapAssetMaterial = new BitmapAssetMaterial("image6");
>>>> mat6.smooth = true;
>>>> mat6.oneSide = false;
>>>>
>>>> var mat7:BitmapAssetMaterial = new BitmapAssetMaterial("image7");
>>>> mat7.smooth = true;
>>>> mat7.oneSide = false;
>>>>
>>>> var mat8:BitmapAssetMaterial = new BitmapAssetMaterial("image8");
>>>> mat8.smooth = true;
>>>> mat8.oneSide = false;
>>>>
>>>> var mat9:BitmapAssetMaterial = new BitmapAssetMaterial("image9");
>>>> mat9.smooth = true;
>>>> mat9.oneSide = false;
>>>>
>>>> var mat10:BitmapAssetMaterial = new BitmapAssetMaterial("image10");
>>>> mat10.smooth = true;
>>>> mat10.oneSide = false;
>>>>
>>>> var mat11:BitmapAssetMaterial = new BitmapAssetMaterial("image11");
>>>> mat11.smooth = true;
>>>> mat11.oneSide = false;
>>>>
>>>> var mat12:BitmapAssetMaterial = new BitmapAssetMaterial("image12");
>>>> mat12.smooth = true;
>>>> mat12.oneSide = false;
>>>>
>>>> var mat13:BitmapAssetMaterial = new BitmapAssetMaterial("image13");
>>>> mat13.smooth = true;
>>>> mat13.oneSide = false;
>>>>
>>>> var mat14:BitmapAssetMaterial = new BitmapAssetMaterial("image14");
>>>> mat14.smooth = true;
>>>> mat14.oneSide = false;
>>>>
>>>> var mat15:BitmapAssetMaterial = new BitmapAssetMaterial("image15");
>>>> mat15.smooth = true;
>>>> mat15.oneSide = false;
>>>>
>>>> var mat16:BitmapAssetMaterial = new BitmapAssetMaterial("image16");
>>>> mat16.smooth = true;
>>>> mat16.oneSide = false;
>>>>
>>>> var mat17:BitmapAssetMaterial = new BitmapAssetMaterial("image17");
>>>> mat17.smooth = true;
>>>> mat17.oneSide = false;
>>>>
>>>> var mat18:BitmapAssetMaterial = new BitmapAssetMaterial("image18");
>>>> mat18.smooth = true;
>>>> mat18.oneSide = false;
>>>>
>>>> var mat19:BitmapAssetMaterial = new BitmapAssetMaterial("image19");
>>>> mat19.smooth = true;
>>>> mat19.oneSide = false;
>>>>
>>>> var mat20:BitmapAssetMaterial = new BitmapAssetMaterial("image20");
>>>> mat20.smooth = true;
>>>> mat20.oneSide = false;
>>>>
>>>> var photo1:Plane = new Plane(mat1, 196, 150,3,3);
>>>> scene.addChild(photo1);
>>>> photo1.x = -400;
>>>> photo1.y = -214;
>>>> photo1.z = 0;
>>>>
>>>> var photo2:Plane = new Plane(mat2, 196, 150,3,3);
>>>> scene.addChild(photo2);
>>>> photo2.x = -201;
>>>> photo2.y = -214;
>>>> photo2.z = 0;
>>>>
>>>> var photo3:Plane = new Plane(mat3, 196, 150,3,3);
>>>> scene.addChild(photo3);
>>>> photo3.x = 2;
>>>> photo3.y = -214;
>>>> photo3.z = 0;
>>>>
>>>> var photo4:Plane = new Plane(mat4, 196, 150,3,3);
>>>> scene.addChild(photo4);
>>>> photo4.x = 203;
>>>> photo4.y = -214;
>>>> photo4.z = 0;
>>>>
>>>> var photo5:Plane = new Plane(mat5, 196, 150,3,3);
>>>> scene.addChild(photo5);
>>>> photo5.x = 404;
>>>> photo5.y = -214;
>>>> photo5.z = 0;
>>>>
>>>> var photo6:Plane = new Plane(mat6, 196, 150,3,3);
>>>> scene.addChild(photo6);
>>>> photo6.x = -400;
>>>> photo6.y = -59;
>>>> photo6.z = 0;
>>>>
>>>> var photo7:Plane = new Plane(mat7, 196, 150,3,3);
>>>> scene.addChild(photo7);
>>>> photo7.x = -201;
>>>> photo7.y = -59;
>>>> photo7.z = 0;
>>>>
>>>> var photo8:Plane = new Plane(mat8, 196, 150,3,3);
>>>> scene.addChild(photo8);
>>>> photo8.x = 2;
>>>> photo8.y = -59;
>>>> photo8.z = 0;
>>>>
>>>> var photo9:Plane = new Plane(mat9, 196, 150,3,3);
>>>> scene.addChild(photo9);
>>>> photo9.x = 203;
>>>> photo9.y = -59;
>>>> photo9.z = 0;
>>>>
>>>> var photo10:Plane = new Plane(mat10, 196, 150,3,3);
>>>> scene.addChild(photo10);
>>>> photo10.x = 404;
>>>> photo10.y = -59;
>>>> photo10.z = 0;
>>>>
>>>> var photo11:Plane = new Plane(mat11, 196, 150,3,3);
>>>> scene.addChild(photo11);
>>>> photo11.x = -400;
>>>> photo11.y = 96;
>>>> photo11.z = 0;
>>>>
>>>> var photo12:Plane = new Plane(mat12, 196, 150,3,3);
>>>> scene.addChild(photo12);
>>>> photo12.x = -201;
>>>> photo12.y = 96;
>>>> photo12.z = 0;
>>>>
>>>> var photo13:Plane = new Plane(mat13, 196, 150,3,3);
>>>> scene.addChild(photo13);
>>>> photo13.x = 2;
>>>> photo13.y = 96;
>>>> photo13.z = 0;
>>>>
>>>> var photo14:Plane = new Plane(mat14, 196, 150,3,3);
>>>> scene.addChild(photo14);
>>>> photo14.x = 203;
>>>> photo14.y = 96;
>>>> photo14.z = 0;
>>>>
>>>> var photo15:Plane = new Plane(mat15, 196, 150,3,3);
>>>> scene.addChild(photo15);
>>>> photo15.x = 404;
>>>> photo15.y = 96;
>>>> photo15.z = 0;
>>>>
>>>> var photo16:Plane = new Plane(mat16, 196, 150,3,3);
>>>> scene.addChild(photo16);
>>>> photo16.x = -400;
>>>> photo16.y = 251;
>>>> photo16.z = 0;
>>>>
>>>> var photo17:Plane = new Plane(mat17, 196, 150,3,3);
>>>> scene.addChild(photo17);
>>>> photo17.x = -201;
>>>> photo17.y = 251;
>>>> photo17.z = 0;
>>>>
>>>> var photo18:Plane = new Plane(mat18, 196, 150,3,3);
>>>> scene.addChild(photo18);
>>>> photo18.x = 2;
>>>> photo18.y = 251;
>>>> photo18.z = 0;
>>>>
>>>> var photo19:Plane = new Plane(mat19, 196, 150,3,3);
>>>> scene.addChild(photo19);
>>>> photo19.x = 203;
>>>> photo19.y = 251;
>>>> photo19.z = 0;
>>>>
>>>> var photo20:Plane = new Plane(mat20, 196, 150,3,3);
>>>> scene.addChild(photo20);
>>>> photo20.x = 404;
>>>> photo20.y = 251;
>>>> photo20.z = 0;
>>>>
>>>> addEventListener(Event.ENTER_FRAME, render);
>>>>
>>>> function render(e:Event):void
>>>> {
>>>>   camera.x += (((stage.mouseX-(stage.stageWidth *.5))*2)- 
>>>> camera.x )*.
>>>> 05;
>>>>   camera.y += (((stage.mouseY-(stage.stageHeight*.5))*2)- 
>>>> camera.y )*.
>>>> 05;
>>>>   scene.renderCamera(camera);
>>>> }
>>>>
>>>>
>>>> _______________________________________________
>>>> Papervision3D mailing list
>>>> Papervision3D at osflash.org
>>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Could-be-a-2-minute-fix-for-someone-more-advanced-than-myself%21-tp20479519p20480141.html
>>> Sent from the Papervision3D mailing list archive at Nabble.com.
>>>
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Could-be-a-2-minute-fix-for-someone-more-advanced-than-myself%21-tp20479519p20481061.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org

  . . . . . . . . . . . . . . . . . .

  SCOTT GILMOUR
  SENIOR DIGITAL DESIGNER/DEVELOPER

  999
  33 LYNEDOCH STREET
  GLASGOW  G3 6AA

  T + 44 (0)141 332 2684
  M + 44 (0)7827 330 229


  999DESIGN.COM
  . . . . . . . . . . . . . . . . . .

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20081113/3e52084a/attachment-0001.html>


More information about the Papervision3D mailing list