Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b5b63cb
Add template for WebGL block
ajlende Jan 14, 2020
02c518d
Update script hook to show in the editor too
ajlende Jan 17, 2020
c12ee5a
Add 'paint' background shader
ajlende Jan 21, 2020
7618277
Update twgl.js and include sourcemaps and types for debugging
ajlende Feb 3, 2020
148142d
Refactor and add custom gradient
ajlende Feb 7, 2020
7496e4f
Fix performance on creating framebuffers
ajlende Feb 7, 2020
80f500a
Adjust where the canvas is inserted
ajlende Feb 7, 2020
8a4c34f
Remove debugging parts from shaders
ajlende Feb 7, 2020
9a24e4a
Fix canvas positioning at 600px
ajlende Feb 7, 2020
202a309
Remove unused css
ajlende Feb 7, 2020
6edda57
Clean up shaders
ajlende Feb 7, 2020
c1a5a89
Update UI for custom colors
ajlende Feb 7, 2020
099e6c7
Update fragment shader effect source comment
ajlende Feb 7, 2020
2717a82
Remove allowReset from range sliders
ajlende Feb 7, 2020
be4cc91
Refactor for readability
ajlende Feb 7, 2020
3a12327
Fix effect stretching
ajlende Feb 7, 2020
bc7b525
Initialize rgb values in case the color string is invalid
ajlende Feb 7, 2020
fb29c86
Add support for image upload
ajlende Feb 7, 2020
60b1bc1
Update UI for image select
ajlende Feb 7, 2020
f83e117
Fix z-index issue
ajlende Feb 7, 2020
5f3d7b0
Remove default color values
ajlende Feb 7, 2020
5b03f86
Fix media placeholder overlay on gradient
ajlende Feb 7, 2020
35d37a1
Fix blocks sticking to screen when scrolling fast
ajlende Feb 7, 2020
3ca9a69
Fix canvas not appearing when adding first block
ajlende Feb 7, 2020
f9525a5
Add URL image select
ajlende Feb 7, 2020
ae43d91
Add accept and allowedTypes for image
ajlende Feb 7, 2020
b627987
Fix memory leak
ajlende Feb 7, 2020
9cf6d57
Optimize the parseColor function
ajlende Feb 12, 2020
6eeaa1a
Update default colors to be darker
ajlende Feb 12, 2020
69c446f
Code cleanup
ajlende Feb 12, 2020
aa12468
Set background for image placeholder
ajlende Feb 12, 2020
b54d39b
Add text heading
ajlende Feb 12, 2020
a147bb0
Add block.json for block directory
ajlende Feb 12, 2020
6b53caf
Fix image replace not changing
ajlende Feb 14, 2020
f2b45f9
Fix webgl context in IE11
ajlende Feb 14, 2020
22171df
Fix image placeholder CSS
ajlende Feb 14, 2020
927cdf8
Replace for...of with lodash forEach for IE support
ajlende Mar 3, 2020
c1ed359
Fix device preview background
ajlende Mar 3, 2020
1c6a054
Try canvas container block
ajlende Mar 5, 2020
d03b0b5
Fix block positioning within canvas
ajlende Mar 10, 2020
b93974b
Temporarily use supports align to change canvas size
ajlende Mar 10, 2020
958e7da
Remove console log
ajlende Mar 10, 2020
b6b56ed
Make debug cursor more visible
ajlende Mar 10, 2020
b380736
Fix eslint on math expression
ajlende Mar 10, 2020
2c169d0
Fix cursor position
ajlende Mar 10, 2020
b5b692b
Add lodash frontend dependency
ajlende Mar 10, 2020
77ce72f
Fix left positioning in device preview mode
ajlende Mar 10, 2020
903ee8a
Remove debug cursor code
ajlende Mar 10, 2020
1bf50b9
Rename container to canvas provider
ajlende Mar 10, 2020
aa3e26b
Fix vertex shader compiler error
ajlende Mar 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix memory leak
  • Loading branch information
ajlende committed Feb 7, 2020
commit b627987df4934ba0f52e26e06ca54c09d9f678e0
11 changes: 5 additions & 6 deletions blocks/motion-background/motion-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,11 @@
function renderBlock( block, resolution, offset ) {
let textureInfo = textureInfos.get( block );

if (
! textureInfo ||
textureInfo.mode !== block.dataset.mode ||
textureInfo.imageUrl !== block.dataset.imageUrl
) {
if ( block.dataset.mode === 'image' ) {
if ( ! textureInfo || textureInfo.mode !== block.dataset.mode ) {
if (
block.dataset.mode === 'image' &&
( ! textureInfo || textureInfo.imageUrl !== block.dataset.imageUrl )
) {
// Default to transparent so the media placeholder shows behind
const src = block.dataset.imageUrl || [ 0, 0, 0, 0 ];
// Match the structure of what createFramebufferInfo makes for the WebGLTexture
Expand Down