Skip to content

set_grid method produce "Uncaught ReferenceError: THREE is not defined" #26

@ldenisey

Description

@ldenisey

Thanks for your work. I am starting to use it. Using release 1.13, adding set_grid call from base example :

<!DOCTYPE html>
<html>
<head>
    <script src="viewstl/stl_viewer.min.js"></script>
</head>
<body>
<div id="stl_cont"></div>
<script>
			var stl_viewer=new StlViewer
			(
				document.getElementById("stl_cont"),
				{
					models:
					[{filename:
					"../cube.stl"
					}]
				}
			);
			stl_viewer.set_grid(true);
</script>
</body>
</html>

The script loading are automatically added in the head section (including three.min.js), the stl is showed, but not the grid., The error is "Uncaught ReferenceError: THREE is not defined at StlViewer.set_grid (stl_viewer.min.js:2:6412)".

Also, there is a typo in the documentation : set_grid (b), size, divisions instead of set_grid (b, size, divisions).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions