Skip to content

Commit

Permalink
wip rework
Browse files Browse the repository at this point in the history
  • Loading branch information
Bassadin committed Nov 28, 2023
1 parent e2619d2 commit d8abb17
Show file tree
Hide file tree
Showing 7 changed files with 450 additions and 260 deletions.
23 changes: 23 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"root": true,
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"env": {
"browser": true,
"es2021": true
},
"rules": {
"prettier/prettier": "error",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
"linebreak-style": ["error", "windows"],
"quotes": ["warn", "single"],
"semi": ["error", "always"],
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/member-ordering": 1
}
}
21 changes: 0 additions & 21 deletions .eslintrc.js

This file was deleted.

21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "three-npm",
"name": "three.ls",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"start": "snowpack dev",
Expand All @@ -16,24 +17,24 @@
"dependencies": {
"@snowpack/plugin-sass": "^1.4",
"stats-js": "^1.0.1",
"three": "^0.148",
"three": "^0.158",
"three.meshline": "^1.3"
},
"devDependencies": {
"@snowpack/plugin-typescript": "^1.2.1",
"@types/offscreencanvas": "^2019.6.4",
"@types/offscreencanvas": "^2019.7.3",
"@types/snowpack-env": "2.3",
"@types/stats": "^0.16",
"@types/three": "^0.148",
"@typescript-eslint/eslint-plugin": "^5.5",
"@typescript-eslint/parser": "^5.5",
"eslint": "^8.3",
"eslint-config-prettier": "^8.3",
"eslint-plugin-prettier": "^4.0",
"@types/three": "^0.158",
"@typescript-eslint/eslint-plugin": "^6.13",
"@typescript-eslint/parser": "^6.13",
"eslint": "^8.54",
"eslint-config-prettier": "^9.0",
"eslint-plugin-prettier": "^5.0",
"prettier": "^2.5",
"snowpack": "^3",
"ts-loader": "^9",
"typescript": "^4.5"
"typescript": "^5.3"
},
"husky": {
"hooks": {
Expand Down
8 changes: 4 additions & 4 deletions src/LindenmayerFormularAR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,25 @@ export class LindenmayerFormularAR {
this.btnOne.addEventListener('click', (e) => {
e.stopPropagation();
this.presetNumber = 0;
document.getElementById('actPreset').innerHTML = this.presetNumber.toString();
document.getElementById('actPreset')?.innerHTML = this.presetNumber.toString();
});

this.btnTwo.addEventListener('click', (e) => {
e.stopPropagation();
this.presetNumber = 1;
document.getElementById('actPreset').innerHTML = this.presetNumber.toString();
document.getElementById('actPreset')?.innerHTML = this.presetNumber.toString();
});

this.btnThree.addEventListener('click', (e) => {
e.stopPropagation();
this.presetNumber = 2;
document.getElementById('actPreset').innerHTML = this.presetNumber.toString();
document.getElementById('actPreset')?.innerHTML = this.presetNumber.toString();
});

this.btnFour.addEventListener('click', (e) => {
e.stopPropagation();
this.presetNumber = 3;
document.getElementById('actPreset').innerHTML = this.presetNumber.toString();
document.getElementById('actPreset')?.innerHTML = this.presetNumber.toString();
});
}
}
2 changes: 1 addition & 1 deletion src/indexNormal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as THREE from 'three';
import { Clock, Scene } from 'three';
import { TrackballControls } from 'three/examples/jsm/controls/TrackballControls.js';
import { TrackballControls } from 'three/addons/controls/TrackballControls.js';
import Turtle from './Turtle';
import { LindenmayerFormular } from './LindenmayerFormular';
import PerformanceStats from './PerformanceStats';
Expand Down
9 changes: 4 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"compilerOptions": {
"outDir": "./dist/",
"strict": true,
"noImplicitAny": true,
"sourceMap": true,
"module": "es6",
"target": "es6",
"moduleResolution": "node",
"jsx": "react",
"allowJs": true
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Node"
},
"include": ["./src/**/*.ts"]
}
Loading

0 comments on commit d8abb17

Please sign in to comment.