Skip to content

Commit ab89931

Browse files
committed
Checked compatibility with WordPress 5.9
2 parents 07ee021 + 365fb6e commit ab89931

File tree

5 files changed

+34
-15
lines changed

5 files changed

+34
-15
lines changed

block.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"apiVersion": 2,
3-
"name": "zebra-north/webgl-shader",
4-
"version": "1.0.1",
5-
"title": "WebGL Shader",
3+
"name": "zebra-north/display-webgl-shader",
4+
"version": "1.0.2",
5+
"title": "Display WebGL Shader",
66
"category": "media",
77
"icon": "format-video",
88
"description": "Display a WebGL fragment shader compatible with Shadertoy",
99
"keywords": ["webgl", "shader", "glsl", "opengl"],
1010
"supports": {
1111
"html": false
1212
},
13-
"textdomain": "webgl-shader",
13+
"textdomain": "display-webgl-shader",
1414
"editorScript": "file:./build/index.js",
1515
"editorStyle": "file:./build/index.css",
1616
"style": "file:./build/style-index.css",

webgl-shader.js renamed to display-webgl-shader.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
'use strict';
22

33
/**
4-
* WebGL Shader WordPress Block v1.0.1.
4+
* Display WebGL Shader WordPress Block.
5+
*
6+
* https://mrzebra.co.uk/
57
*
68
* Copyright (c) Zebra North, 2021
79
*/

webgl-shader.php renamed to display-webgl-shader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22
/**
3-
* Plugin Name: WebGL Shader
3+
* Plugin Name: Display WebGL Shader
44
* Description: Display a WebGL shader
55
* Requires at least: 5.8
66
* Requires PHP: 7.0
7-
* Version: 1.0.1
7+
* Version: 1.0.2
88
* Author: Zebra North
99
* License: GPLv3
1010
* License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
11-
* Text Domain: webgl-shader
11+
* Text Domain: display-webgl-shader
1212
*
1313
* @package zebra-north
1414
*/
@@ -29,7 +29,7 @@ function zebra_north_webgl_shader_block_init() {
2929
*/
3030
function zebra_north_webgl_shader_enqueue_scripts() {
3131
wp_enqueue_script('zebra_north_gl_matrix', plugin_dir_url(__FILE__) . '/gl-matrix.js');
32-
wp_enqueue_script('zebra_north_webgl_shader', plugin_dir_url(__FILE__) . '/webgl-shader.js');
32+
wp_enqueue_script('zebra_north_webgl_shader', plugin_dir_url(__FILE__) . '/display-webgl-shader.js');
3333
}
3434

3535
add_action( 'init', 'zebra_north_webgl_shader_block_init' );

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "webgl-shader",
3-
"version": "1.0.1",
2+
"name": "display-webgl-shader",
3+
"version": "1.0.2",
44
"description": "Display a WebGL shader",
55
"author": "Zebra North",
6-
"license": "Proprietary",
6+
"license": "GPLv3",
77
"main": "build/index.js",
88
"scripts": {
99
"build": "wp-scripts build",

readme.txt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
=== WebGL Shader ===
1+
=== Display WebGL Shader ===
22
Contributors: zebranorth
33
Donate link: https://paypal.me/zebranorth
44
Tags: block, shader, shadertoy, webgl, webgl2, opengl, graphics
55
Requires at least: 5.8.0
66
Tested up to: 5.9.0
7-
Stable tag: 1.0.1
7+
Stable tag: 1.0.2
88
Requires PHP: 7.0
99
License: GPLv3
1010
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
@@ -19,9 +19,22 @@ Simply copy and paste the code of your fragment shader into the edit box.
1919

2020
This plugin makes use of the open source "gl-matrix" library by Brandon Jones and Colin MacKensie IV.
2121

22+
Your shader code should look like the example below. The mainImage() function is called once for each pixel.
23+
24+
```
25+
void mainImage(out vec4 fragColor, in vec2 fragCoord)
26+
{
27+
// Normalized pixel coordinates (from 0 to 1).
28+
vec2 uv = fragCoord / iResolution.xy;
29+
30+
// Output to screen as (r, g, b, alpha).
31+
fragColor = vec4(uv.x, uv.y, 0.0, 1.0);
32+
}
33+
```
34+
2235
== Installation ==
2336

24-
1. Upload the plugin files to the `/wp-content/plugins/webgl-shader` directory, or install the plugin through the WordPress plugins screen directly.
37+
1. Upload the plugin files to the `/wp-content/plugins/display-webgl-shader` directory, or install the plugin through the WordPress plugins screen directly.
2538
1. Activate the plugin through the 'Plugins' screen in WordPress
2639

2740
== Screenshots ==
@@ -30,6 +43,10 @@ This plugin makes use of the open source "gl-matrix" library by Brandon Jones an
3043

3144
== Changelog ==
3245

46+
= 1.0.2 =
47+
48+
Rename from "WebGL Shader" to "Display WebGL Shader".
49+
3350
= 1.0.1 =
3451
* Minor updates so the plugin can be hosted on wordpress.org.
3552

0 commit comments

Comments
 (0)