Comments (6)
Hey @alvarosabu ,
The approach you mention would work for the render phase. But ideally here, this needs to keep a few other things from happening too early.
We should avoid at least one of these until the system is ready:
- starting the loop
- calling any loop callbacks
If we do either of those, there's no need to modify the render phase specifically.
I'm working on a fix.
from tres.
Hey @alvarosabu !
I saw that you labelled this as PR welcome
. Great! I'll be happy to submit a PR eventually.
For now, I'm trying to submit issues highlighting rough spots encountered while building things with Tres.
My hope is that in assembling the issues, we'll be able to knock all (or most) of them out at once.
from tres.
Related?
This issue maybe pops up with custom shaders and HMR.
When doing off-screen rendering using a custom shader, this error is thrown on HMR:
from tres.
This usecase is covered by the new useLoop
composable available on v4
https://docs.tresjs.org/api/composables.html#useloop
from tres.
Hey @alvarosabu ,
This is still an issue with useLoop
in the latest v4
, as far as I can see. If you modify the code from the docs like this:
let logged = false
const { off } = render(({ renderer, scene, camera }) => {
if (!logged) {
logged = true
console.log("canvas width/height:", renderer.domElement.width, renderer.domElement.height)
console.log(`camera.aspect: ${camera.aspect}`);
}
renderer.render(scene, camera)
})
It will log this:
canvas width/height: 0 0
camera.aspect: 1
As with v3
these initial values will be changed on the next tick.
from tres.
OHHHH ok I see @andretchen0 we could add a check that if the size is !=0 it does render here:
tres/src/composables/useTresContextProvider/index.ts
Lines 196 to 199 in 8d53bba
from tres.
Related Issues (20)
- Add userData to vue devtools component inspector
- Invalid watch source error when declaring a CatmullRomCurve3 HOT 1
- position type is incorrect
- The Lifecycle Hooks is out of order after v3.9.0 HOT 8
- `<primitive> :object` breaking references to THREE objects HOT 1
- Physics support integration! HOT 3
- Toggle v-if on a Tres component declared in a separate SFC makes it detach from its parent HOT 9
- V4 drops fps HOT 2
- v4.0.1 The `onPointerLeave` function is not activating. HOT 8
- Manual rendering (edge case): canvases loaded into new tabs are initially blank
- Cannot read properties of undefined (reading 'dispose') - GridHelper HOT 6
- `Camera` wrapped by `TresGroup` cannot be used properly after `version 4.0` HOT 2
- `Event` is not triggered in `TresGroup` HOT 2
- Impossible to `inject` variable in canvas child component HOT 4
- intersect only objects with events registered HOT 3
- No more outlines since V4 HOT 8
- TresInstancedMesh breaks with a dynamic instance count HOT 14
- Nested component not rendering HOT 2
- Deltatime Documentation Inaccuracy
- Rigged models are squished and broken HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tres.