xml3d / xml3d.js

The WebGL/JS implementation of XML3D
Other
75 stars 25 forks source link

View not changing #154

Closed wheybags closed 8 years ago

wheybags commented 8 years ago

Hey, currently tags are not fuctioning as expected, (or, as described in the tutorial: https://github.com/xml3d/xml3d.js/wiki/The-Basics-of-XML3D )

With the following html:

<html>
    <head>
        <script src="../build/output/xml3d.js"></script>
        <script src="../tools/camera.js"></script>
    </head>
    <body>
        <xml3d>
            <view position="0 0 100"></view>
            <mesh src="teapot.json"></mesh>
        </xml3d>
    </body>
</html>

I expect to get: image

, but what I get is the view from the default position at the origin: image

(screenshots taken from the tutorial page I linked earlier)

Also, the camera controller doesn't work.

It works in the 4.9.5 tag. Using bisect, the first bad commit for the view tag not functioning is 51caae628c0c0d45e8a3ca64722d1682f096bea6, so ping @ksons

wheybags commented 8 years ago

6e17a1f66d6f5b08462353ad4aa052a953b7df72 is the first bad commit for the camera not working (I think, it just has a bunch of errors in console and nothing rendered), ping @csvurt

wheybags commented 8 years ago

Ugh, my bisects are probably inaccurate because of commits that just error out on anything, but you get the gist of it. There are commits where the views position attribute is being applied but the camera doesn't work

csvurt commented 8 years ago

Oh balls, I forgot to update the tutorials to 5.0. I'll get on that first thing on Monday, until then you'll want to use a transform with the view element instead:

<view style="transform: translate3d(0, 0, 100px);"></view>

or 

<transform id="cameraTransform" translation="0 0 100"></transform>
<view transform="#cameraTransform"></view>

Sorry for the confusion :S

csvurt commented 8 years ago

Ok, the wiki pages and tutorials should be up to date now. Thanks again for the heads up!