@@ -13,9 +13,6 @@
"eslint-plugin-require-trailing-comma"
],
"extends": "eslint:recommended",
- "globals": {
- "THREE": true
- },
"rules": {
"no-alert": 2,
"no-array-constructor": 2,
@@ -34,6 +34,8 @@
<script>
'use strict';
+/* global THREE */
+
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas: canvas});
@@ -33,9 +33,10 @@ p {
<script src="../../resources/threejs-utils.js"></script>
<script src="canvas-wrapper.js"></script>
-/* global wrapCanvasRenderingContext2D, threejsUtils */
+/* global wrapCanvasRenderingContext2D, threejsUtils */
const root = {
@@ -1,6 +1,6 @@
-/* global threejsLessonUtils */
+/* global THREE, threejsLessonUtils */
{
function addShape(color, geometry) {
function fogExample(scene, fog) {
@@ -1,5 +1,7 @@
window.threejsLessonUtils = {
init() {
if (this.renderer) {
function makeCheckerTexture(repeats) {
function makeSphere(widthDivisions, heightDivisions) {
const diagrams = {
const loader = new THREE.TextureLoader();
@@ -42,6 +42,8 @@ and pass it to three.js.
@@ -26,7 +26,7 @@
-/* global dat */
+/* global THREE, dat */
@@ -42,7 +42,7 @@
@@ -38,6 +38,8 @@
@@ -24,7 +24,7 @@
@@ -23,6 +23,8 @@
@@ -13,6 +13,8 @@
@@ -27,7 +27,7 @@
@@ -24,6 +24,8 @@
@@ -50,7 +50,7 @@
@@ -48,6 +48,8 @@