Skip to content
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

Dev #91

Merged
merged 8 commits into from
Feb 2, 2024
Merged

Dev #91

Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions examples/audio1/frag.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fnusin } from '../../src/core/animation.js';
import { snoise } from './../../src/core/noise2d.js';
import { sdfCircle } from './../../src/core/sdf.js';
import { WHITE, RED, layer } from './../../src/core/color.js';
import { audioAverage, audioAverageSegments } from '../../src/core/audio.js';
import { fnusin } from 'animation';
import { snoise } from 'noise2d';
import { sdfCircle } from 'sdf';
import { WHITE, RED, layer } from 'color';
import { audioAverage, audioAverageSegments } from 'audio';

const frag = /*wgsl*/`

Expand Down
2 changes: 1 addition & 1 deletion examples/audio1/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import vert from './vert.js';
import compute from './compute.js';
import frag from './frag.js';
import Points from './../../src/absulit.points.module.js';
import Points from 'points';

let audio = null;

Expand Down
12 changes: 6 additions & 6 deletions examples/audio2/frag.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { fnusin } from '../../src/core/animation.js';
import { snoise } from '../../src/core/noise2d.js';
import { sdfCircle } from '../../src/core/sdf.js';
import { WHITE, RED, GREEN, YELLOW, layer } from '../../src/core/color.js';
import { audioAverage, audioAverageSegments } from '../../src/core/audio.js';
import { texturePosition } from '../../src/core/image.js';
import { fnusin } from 'animation';
import { snoise } from 'noise2d';
import { sdfCircle } from 'sdf';
import { WHITE, RED, GREEN, YELLOW, layer } from 'color';
import { audioAverage, audioAverageSegments } from 'audio';
import { texturePosition } from 'image';

const frag = /*wgsl*/`

Expand Down
4 changes: 2 additions & 2 deletions examples/audio2/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import vert from './vert.js';
import compute from './compute.js';
import frag from './frag.js';
import Points from '../../src/absulit.points.module.js';
import RenderPasses from './../../src/RenderPasses.js';
import Points from 'points';
import RenderPasses from 'renderpasses';

let audio = null;

Expand Down
2 changes: 1 addition & 1 deletion examples/base/frag.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fnusin } from '../../src/core/animation.js';
import { fnusin } from 'animation';

const frag = /*wgsl*/`

Expand Down
2 changes: 1 addition & 1 deletion examples/base/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import vert from './vert.js';
import compute from './compute.js';
import frag from './frag.js';
import Points from './../../src/absulit.points.module.js';
import Points from 'points';

const base = {
vert,
Expand Down
12 changes: 6 additions & 6 deletions examples/bloom1/frag.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { snoise } from '../../src/core/noise2d.js';
import { texturePosition } from '../../src/core/image.js';
import { bloom, brightness } from '../../src/core/color.js';
import { sdfCircle, sdfLine, sdfSegment } from '../../src/core/sdf.js';
import { fnusin, fusin } from '../../src/core/animation.js';
import { polar, PI } from '../../src/core/math.js';
import { snoise } from 'noise2d';
import { texturePosition } from 'image';
import { bloom, brightness } from 'color';
import { sdfCircle, sdfLine, sdfSegment } from 'sdf';
import { fnusin, fusin } from 'animation';
import { polar, PI } from 'math';

const frag = /*wgsl*/`

Expand Down
2 changes: 1 addition & 1 deletion examples/circleblur/compute.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { clearMix } from './../../src/core/effects.js';
import { clearMix } from 'effects';
const compute = /*wgsl*/`

${clearMix}
Expand Down
4 changes: 2 additions & 2 deletions examples/circleblur/frag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fnusin, fusin } from '../../src/core/animation.js';
import { texturePosition } from '../../src/core/image.js';
import { fnusin, fusin } from 'animation';
import { texturePosition } from 'image';

const frag = /*wgsl*/`

Expand Down
2 changes: 1 addition & 1 deletion examples/circleblur/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import vert from './vert.js';
import compute from './compute.js';
import frag from './frag.js';
import RenderPass from './../../src/RenderPass.js';
import RenderPass from 'renderpass';
const circleblur = {
renderPasses: [
new RenderPass(null, null, compute, 800, 800, 1),
Expand Down
10 changes: 5 additions & 5 deletions examples/dithering1/frag.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { snoise } from '../../src/core/noise2d.js';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from '../../src/core/effects.js';
import { pixelateTexture, texturePosition } from '../../src/core/image.js';
import { brightness } from './../../src/core/color.js';
import { fnusin } from '../../src/core/animation.js';
import { snoise } from 'noise2d';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from 'effects';
import { pixelateTexture, texturePosition } from 'image';
import { brightness } from 'color';
import { fnusin } from 'animation';

const frag = /*wgsl*/`

Expand Down
10 changes: 5 additions & 5 deletions examples/dithering2/frag.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { snoise } from '../../src/core/noise2d.js';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from '../../src/core/effects.js';
import { texturePosition } from '../../src/core/image.js';
import { brightness } from './../../src/core/color.js';
import { fnusin, fusin } from '../../src/core/animation.js';
import { snoise } from 'noise2d';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from 'effects';
import { texturePosition } from 'image';
import { brightness } from 'color';
import { fnusin, fusin } from 'animation';

const frag = /*wgsl*/`

Expand Down
2 changes: 1 addition & 1 deletion examples/dithering3_1/compute.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { brightness } from '../../src/core/color.js';
import { brightness } from 'color';

const compute = /*wgsl*/`

Expand Down
8 changes: 4 additions & 4 deletions examples/dithering3_1/frag.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { snoise } from '../../src/core/noise2d.js';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from '../../src/core/effects.js';
import { texturePosition } from '../../src/core/image.js';
import { fnusin } from '../../src/core/animation.js';
import { snoise } from 'noise2d';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from 'effects';
import { texturePosition } from 'image';
import { fnusin } from 'animation';

const frag = /*wgsl*/`
struct Variable{
Expand Down
2 changes: 1 addition & 1 deletion examples/dithering3_1/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import vert from './vert.js';
import compute from './compute.js';
import frag from './frag.js';
import ShaderType from '../../src/absulit.points.module.js';
import ShaderType from 'shadertype';
const dithering3 = {
vert,
compute,
Expand Down
2 changes: 1 addition & 1 deletion examples/dithering3_2/compute.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { brightness } from '../../src/core/color.js';
import { brightness } from 'color';

const compute = /*wgsl*/`

Expand Down
8 changes: 4 additions & 4 deletions examples/dithering3_2/frag.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { snoise } from '../../src/core/noise2d.js';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from '../../src/core/effects.js';
import { texturePosition } from '../../src/core/image.js';
import { fnusin } from '../../src/core/animation.js';
import { snoise } from 'noise2d';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from 'effects';
import { texturePosition } from 'image';
import { fnusin } from 'animation';

const frag = /*wgsl*/`
struct Variable{
Expand Down
4 changes: 2 additions & 2 deletions examples/dithering3_2/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import vert from './vert.js';
import compute from './compute.js';
import frag from './frag.js';
import RenderPass from './../../src/RenderPass.js';
import ShaderType from './../../src/ShaderType.js';
import RenderPass from 'renderpass';
import ShaderType from 'shadertype';
const dithering3 = {
renderPasses: [
new RenderPass(vert, frag, compute, 800, 800)
Expand Down
12 changes: 6 additions & 6 deletions examples/dithering4/frag.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { snoise } from '../../src/core/noise2d.js';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from '../../src/core/effects.js';
import { PI } from '../../src/core/math.js';
import { texturePosition } from '../../src/core/image.js';
import { fnusin } from '../../src/core/animation.js';
import { brightness } from '../../src/core/color.js';
import { snoise } from 'noise2d';
import { getClosestColorInPalette, orderedDithering, orderedDithering_threshold_map } from 'effects';
import { PI } from 'math';
import { texturePosition } from 'image';
import { fnusin } from 'animation';
import { brightness } from 'color';

const frag = /*wgsl*/`

Expand Down
4 changes: 2 additions & 2 deletions examples/events1/frag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { sdfCircle } from '../../src/core/sdf.js';
import { WHITE, BLUE, GREEN, RED, YELLOW } from '../../src/core/color.js';
import { sdfCircle } from 'sdf';
import { WHITE, BLUE, GREEN, RED, YELLOW } from 'color';

const frag = /*wgsl*/`

Expand Down
2 changes: 1 addition & 1 deletion examples/events1/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import vert from './vert.js';
import compute from './compute.js';
import frag from './frag.js';
import Points from '../../src/absulit.points.module.js';
import Points from 'points';

const base = {
vert,
Expand Down
4 changes: 2 additions & 2 deletions examples/imagescale1/frag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { texturePosition } from '../../src/core/image.js';
import { layer } from '../../src/core/color.js';
import { texturePosition } from 'image';
import { layer } from 'color';

const frag = /*wgsl*/`

Expand Down
2 changes: 1 addition & 1 deletion examples/imagetexture1/frag.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { texturePosition } from '../../src/core/image.js';
import { texturePosition } from 'image';

const frag = /*wgsl*/`

Expand Down
10 changes: 5 additions & 5 deletions examples/imagetexture2/frag.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fnusin } from '../../src/core/animation.js';
import { brightness } from '../../src/core/color.js';
import { polar } from '../../src/core/math.js';
import { snoise } from '../../src/core/noise2d.js';
import { texturePosition } from './../../src/core/image.js';
import { fnusin } from 'animation';
import { brightness } from 'color';
import { polar } from 'math';
import { snoise } from 'noise2d';
import { texturePosition } from 'image';

const frag = /*wgsl*/`

Expand Down
6 changes: 3 additions & 3 deletions examples/imagetexture3/frag.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fnusin } from '../../src/core/animation.js';
import { brightness } from '../../src/core/color.js';
import { texturePosition } from '../../src/core/image.js';
import { fnusin } from 'animation';
import { brightness } from 'color';
import { texturePosition } from 'image';

const frag = /*wgsl*/`

Expand Down
4 changes: 2 additions & 2 deletions examples/imagetexture4/frag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { snoise } from '../../src/core/noise2d.js';
import { texturePosition } from '../../src/core/image.js';
import { snoise } from 'noise2d';
import { texturePosition } from 'image';

const frag = /*wgsl*/`

Expand Down
27 changes: 27 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@

<script src="../src/vendor/stats.js"></script>
<script src="../src/vendor/ccapture/CCapture.all.min.js"></script>

<script type="importmap">
{
"imports": {
"points": "../src/absulit.points.module.js",

"datasize": "../src/data-size.js",
"renderpass": "../src/RenderPass.js",
"shadertype": "../src/ShaderType.js",

"animation": "../src/core/animation.js",
"audio": "../src/core/audio.js",
"color": "../src/core/color.js",
"debug": "../src/core/debug.js",
"effects": "../src/core/effects.js",
"image": "../src/core/image.js",
"math": "../src/core/math.js",
"noise2d": "../src/core/noise2d.js",
"random": "../src/core/random.js",
"renderpasses": "../src/RenderPasses.js",
"sdf": "../src/core/sdf.js",

"datgui": "../src/vendor/datgui/dat.gui.module.js"
}
}
</script>

<script src="main.js" type="module"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion examples/layers1/frag.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fnusin } from './../../src/core/animation.js';
import { fnusin } from 'animation';
const frag = /*wgsl*/`

${fnusin}
Expand Down
8 changes: 4 additions & 4 deletions examples/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';
import * as dat from './../src/vendor/datgui/dat.gui.module.js';
import Points from '../src/absulit.points.module.js';
import ShaderType from '../src/ShaderType.js';
import RenderPass from '../src/RenderPass.js';
import * as dat from 'datgui';
import Points from 'points';
import ShaderType from 'shadertype';
import RenderPass from 'renderpass';

/***************/
const stats = new Stats();
Expand Down
2 changes: 1 addition & 1 deletion examples/mesh1/frag.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fnusin } from './../../src/core/animation.js';
import { fnusin } from 'animation';
const frag = /*wgsl*/`

${fnusin}
Expand Down
2 changes: 1 addition & 1 deletion examples/mesh1/vert.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fnusin } from './../../src/core/animation.js';
import { fnusin } from 'animation';
const vert = /*wgsl*/`

${fnusin}
Expand Down
4 changes: 2 additions & 2 deletions examples/mouse1/frag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { showDebugCross, showDebugFrame } from '../../src/core/debug.js';
import { sdfLine, sdfSegment } from '../../src/core/sdf.js';
import { showDebugCross, showDebugFrame } from 'debug';
import { sdfLine, sdfSegment } from 'sdf';

const frag = /*wgsl*/`

Expand Down
4 changes: 2 additions & 2 deletions examples/mouseclickscroll1/frag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { sdfCircle } from '../../src/core/sdf.js';
import { GREEN, RED } from './../../src/core/color.js';
import { sdfCircle } from 'sdf';
import { GREEN, RED } from 'color';

const frag = /*wgsl*/`

Expand Down
4 changes: 2 additions & 2 deletions examples/noise1/frag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fnusin } from '../../src/core/animation.js';
import { snoise } from '../../src/core/noise2d.js';
import { fnusin } from 'animation';
import { snoise } from 'noise2d';

const frag = /*wgsl*/`

Expand Down
4 changes: 2 additions & 2 deletions examples/noisecircle1/frag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { sdfCircle } from '../../src/core/sdf.js';
import { snoise } from '../../src/core/noise2d.js';
import { sdfCircle } from 'sdf';
import { snoise } from 'noise2d';

const frag = /*wgsl*/`

Expand Down
4 changes: 2 additions & 2 deletions examples/params_test/frag.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fnusin } from '../../src/core/animation.js';
import { fnusin } from 'animation';
import { structs } from './structs.js';
import { rand } from '../../src/core/random.js';
import { rand } from 'random';

const frag = /*wgsl*/`

Expand Down
Loading