-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript / tsconfig.json
set "strict": true
+ refactor
#153
Comments
TODO: consider setting `"strict": true`, see #153
- rename interface `ITreeMember` to `ISvelthreeGLTFTreeMapMember` - `GLTF` is now passed via constructor, e.g. `const foo: SvelthreeGLTF = new SvelthreeGLTF(loaded_gltf_file: GLTF)` - `apply(...)` now uses a `Canvas` component reference instead of a `Canvas` DOM Element. - various `strict: true` related changes (due to `strict: true` in the SvelteKit tests project, see also #153 )
tsconfig.json
consider setting "strict": true
+ refactortsconfig.json
set "strict": true
+ refactor
Current Status
Atm still untested! |
Current StatusAfter first tests and fixes (see above) -> looking quite good! 🤞 |
…153) No `props` provided -> silent, but catch possible errors when creating new `SvelthreeProps` instance.
Don't create helper if there's already one (don't double create). This happened due to changed reactive conditional (removed `!light.userData.helper`)
…istent helper (#153) instead log `debug` (atm) as an alternative to being silent.
…xistent helper (#153) Analog `*Light` components
…153) Use `$` prefixed store reference (not `store`) in these cases: - in reactive conditions - when setting a store value: casted to `StoreBody` -> we know the store value is truthy / not `null` because the `store` reference is truthy. REMARK: this would unfortunately be marked as `error` in `strict` mode (VS Code) / `$svelthreeStores[sti]` not recognized as truthy inside the if-statement: ``` if ($svelthreeStores[sti]) { $svelthreeStores[sti].foo = value } ``` so instead we do this: ``` const store = $svelthreeStores[sti] if (store) { ;($svelthreeStores[sti] as StoreBody).foo = value } ```
Wasn't functioning correctly after recent changes.
`foo` will always be replaced by the corresponding `three.js` instance, even if it's not being used by the animation logic itself (which is unlikely but possible).
Change logging from `debug` to `info` where it makes more sense, warn only where really needed / critical., log errors.
Current Statussvelte-check: OK ✔️ (no warnings / errors) So far, all "new" test-scenes are working as expected, Next I need to adapt the rest of the old test-scenes + add some more, this will take a couple of days. |
yeah 🤔... think about it: to do or not to do / why I haven't done in the first place? (I remember this was a decision though)
undefined
to every prop union type, it was kind of annoying in the early development phase.strict
per default afterSvelte 3
release, this changed recently increate-svelte
.This has to be done before next.1
The text was updated successfully, but these errors were encountered: