Comments (5)
Same frame rendered in 0.25x, 0.5x, 1.0x and 2.0x scale:
from motion-canvas.
Can you take a look at #1026 to see if it fixes the issue completly?
from motion-canvas.
From my tests it fixed everything except inside of cached nodes.
If you use the same shader as before but like this it will still have the issue, the destinationUV is resized to the size of the cached node, but when you change the scale is stays at the size the node had before scaling.
import { Node, Rect, makeScene2D } from '@motion-canvas/2d'
import destinationUVbug from '../shaders/destinationUVbug.glsl'
export default makeScene2D(function* (view) {
// view.shaders(destinationUVbug)
view.add(
<Node cache>
<Rect size={view.size().sub(200)} shaders={destinationUVbug} />
</Node>
)
})
One funny interaction I noticed is that if you set the size of the rect with numbers or by subtracting from the view.size() like in the code above, the shader destinationUV will fit the Node properly at the normal scale, but if you do:
<Node cache>
<Rect size={view.size().mul(0.5)} shaders={destinationUVbug} />
</Node>
Multiplying or dividing, the scale is broken just like when changing the scale of the scene. But this only happens if the scale of the scene isn't 1,0x. So my guess is both of these are the same issue.
from motion-canvas.
@HikariIsChillin Thanks for checking this out!
I added a fixup to #1026 now everything should work
from motion-canvas.
@aarthificial Everything is working now
from motion-canvas.
Related Issues (20)
- Incorrect Code node width when final line is longest
- Switch code node to use treesitter HOT 3
- tsc command fails with .md files HOT 3
- Make fill and stroke options accept shaders
- gap prop in LayoutProps has the wrong type
- Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
- Allow specifying origin for Grid
- Allow matching substrings instead of patterns HOT 3
- Handle invalid offset values in the meta file HOT 2
- Introduce smoothstep interpolation function to chain animations with different interpolation functions smoothly
- How to use themes with the new Code node HOT 5
- Polygon side tweening moves the 0 point on the middle of the created edge HOT 1
- Stack overflow error when attempting to restore a saved state of a `Code` node. HOT 1
- Images not rendered in Camera HOT 4
- Document node's `element` property HOT 3
- Video stuttering when playing both video and animation HOT 1
- Fix reparent docs not accurate when it comes to layout
- Possibility of using Webcodecs for fast rendering HOT 3
- Video stuttering in editor/presentation mode
- Animating `Txt`'s text with emojis causes broken characters HOT 1
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 motion-canvas.