filament icon indicating copy to clipboard operation
filament copied to clipboard

Binding error following redball tutorial

Open davidwarford opened this issue 4 years ago • 3 comments

redball.html:1 Uncaught (in promise) BindingError {name: "BindingError", message: "function Engine.createCamera called with 0 arguments, expected 1 args!", stack: "BindingError: function Engine.createCamera called …)↵ at http://127.0.0.1:8080/filament.js:126:21"} this is following the red ball tutorial, can't find any info online so i figured it was a good idea to make an issue. I am using the javascript file from the web page and I am using the latest release of filament my html file looks like

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Filament Tutorial</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1">
    <style>
        body { margin: 0; overflow: hidden; }
        canvas { touch-action: none; width: 100%; height: 100%; }
    </style>
</head>
<body>
    <canvas></canvas>
    <script src="filament.js"></script>
    <script src="//unpkg.com/[email protected]/dist/gl-matrix-min.js"></script>
    <script src="redball.js"></script>
</body>
</html>

davidwarford avatar Oct 16 '20 20:10 davidwarford

It seems like a version mismatch.

@prideout Are the tutorials up to date with all the recent API changes?

romainguy avatar Oct 16 '20 20:10 romainguy

Oh... that's probably it then. Do you have advice for how to refactor the tutorials (Im really new to webdev)? i noticed that the triangle material is out of date when i was doing the triangle tutorial

davidwarford avatar Oct 16 '20 20:10 davidwarford

The tutorials are out of date, which I will endeavor to update soon. Meanwhile you might want to look at web/samples, which are kept up to date (be aware of #3128 however)

prideout avatar Oct 19 '20 00:10 prideout

I added some notes to #5530 regarding the state of JS documentation, closing this as a pseudo dup of that bug.

prideout avatar Nov 01 '22 18:11 prideout