Skip to content

Commit

Permalink
chore(release): 1.1.3 [skip ci]
Browse files Browse the repository at this point in the history
## [1.1.3](v1.1.2...v1.1.3) (2021-01-20)

### Bug Fixes

* remove console.logs ([fd63390](fd63390))
  • Loading branch information
semantic-release-bot committed Jan 20, 2021
1 parent 87479fd commit 7291abe
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 34 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.1.3](https://github.com/6eDesign/svelte-three-mograph/compare/v1.1.2...v1.1.3) (2021-01-20)


### Bug Fixes

* remove console.logs ([fd63390](https://github.com/6eDesign/svelte-three-mograph/commit/fd63390d3b12fd4ebe673d1408d1ba737387ec57))

## [1.1.2](https://github.com/6eDesign/svelte-three-mograph/compare/v1.1.1...v1.1.2) (2021-01-19)


Expand Down
1 change: 0 additions & 1 deletion docs/_dist_/components/lights/PointLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ function instance($$self, $$props, $$invalidate) {
sceneCtx.scene.add(light);

onDestroy(() => {
console.log("removing light");
sceneCtx.scene.remove(light);
});

Expand Down
92 changes: 92 additions & 0 deletions docs/_dist_/components/materials/StandardMaterial.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* src/components/materials/StandardMaterial.svelte generated by Svelte v3.31.2 */
import {
SvelteComponent,
assign,
create_slot,
exclude_internal_props,
init,
safe_not_equal,
transition_in,
transition_out,
update_slot
} from "../../../web_modules/svelte/internal.js";

import { MeshStandardMaterial } from "../../../web_modules/three.js";
import { setContext } from "../../../web_modules/svelte.js";
import { writable } from "../../../web_modules/svelte/store.js";

function create_fragment(ctx) {
let current;
const default_slot_template = /*#slots*/ ctx[4].default;
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[3], null);

return {
c() {
if (default_slot) default_slot.c();
},
m(target, anchor) {
if (default_slot) {
default_slot.m(target, anchor);
}

current = true;
},
p(ctx, [dirty]) {
if (default_slot) {
if (default_slot.p && dirty & /*$$scope*/ 8) {
update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[3], dirty, null, null);
}
}
},
i(local) {
if (current) return;
transition_in(default_slot, local);
current = true;
},
o(local) {
transition_out(default_slot, local);
current = false;
},
d(detaching) {
if (default_slot) default_slot.d(detaching);
}
};
}

function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
let { metalness = 0.8 } = $$props;
let { roughness = 0.2 } = $$props;
let { color = Math.random() * 16777215 } = $$props;
const material = new MeshStandardMaterial({ metalness, roughness, color, ...$$props });
setContext("material", material);

$$self.$$set = $$new_props => {
$$invalidate(6, $$props = assign(assign({}, $$props), exclude_internal_props($$new_props)));
if ("metalness" in $$new_props) $$invalidate(0, metalness = $$new_props.metalness);
if ("roughness" in $$new_props) $$invalidate(1, roughness = $$new_props.roughness);
if ("color" in $$new_props) $$invalidate(2, color = $$new_props.color);
if ("$$scope" in $$new_props) $$invalidate(3, $$scope = $$new_props.$$scope);
};

$$self.$$.update = () => {
$: Object.entries($$props, ([key, val]) => {
update(mat => {
mat[key] = val;
return mat;
});
});
};

$$props = exclude_internal_props($$props);
return [metalness, roughness, color, $$scope, slots];
}

class StandardMaterial extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, { metalness: 0, roughness: 1, color: 2 });
}
}

export default StandardMaterial;
3 changes: 3 additions & 0 deletions docs/_dist_/components/materials/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import StandardMaterial from './StandardMaterial.js';

export { StandardMaterial };
60 changes: 28 additions & 32 deletions docs/_dist_/documentation/pages/Cloner.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function create_default_slot_6(ctx) {
};
}

// (40:4) <GridCloner instances={[7, 7, 7]} {spaceBetween} {rotation} let:position>
// (39:4) <GridCloner instances={[7, 7, 7]} {spaceBetween} {rotation} let:position>
function create_default_slot_5(ctx) {
let material;
let current;
Expand Down Expand Up @@ -113,15 +113,15 @@ function create_default_slot_5(ctx) {
};
}

// (60:8) <Particle rotationalVelocity={[ Math.random() * 0.03, Math.random() * 0.03, Math.random() * 0.03, ]} let:rotation >
// (59:8) <Particle rotationalVelocity={[ Math.random() * 0.03, Math.random() * 0.03, Math.random() * 0.03, ]} let:rotation >
function create_default_slot_4(ctx) {
let torus;
let current;

torus = new /*Torus*/ ctx[5]({
props: {
position: /*position*/ ctx[12],
rotation: /*rotation*/ ctx[3],
rotation: /*rotation*/ ctx[2],
radialSegments: 4,
tubularSegments: 60,
radius: 4.7 * (1 - /*index*/ ctx[13] * 0.04),
Expand All @@ -140,7 +140,7 @@ function create_default_slot_4(ctx) {
p(ctx, dirty) {
const torus_changes = {};
if (dirty & /*position*/ 4096) torus_changes.position = /*position*/ ctx[12];
if (dirty & /*rotation*/ 8) torus_changes.rotation = /*rotation*/ ctx[3];
if (dirty & /*rotation*/ 4) torus_changes.rotation = /*rotation*/ ctx[2];
if (dirty & /*index*/ 8192) torus_changes.radius = 4.7 * (1 - /*index*/ ctx[13] * 0.04);
torus.$set(torus_changes);
},
Expand All @@ -159,7 +159,7 @@ function create_default_slot_4(ctx) {
};
}

// (53:6) <Material color="#fff" metalness={0.85} roughness={0.7} opacity={0.6} transparent={true} >
// (52:6) <Material color="#fff" metalness={0.85} roughness={0.7} opacity={0.6} transparent={true} >
function create_default_slot_3(ctx) {
let particle;
let current;
Expand All @@ -170,8 +170,8 @@ function create_default_slot_3(ctx) {
$$slots: {
default: [
create_default_slot_4,
({ rotation }) => ({ 3: rotation }),
({ rotation }) => rotation ? 8 : 0
({ rotation }) => ({ 2: rotation }),
({ rotation }) => rotation ? 4 : 0
]
},
$$scope: { ctx }
Expand All @@ -189,7 +189,7 @@ function create_default_slot_3(ctx) {
p(ctx, dirty) {
const particle_changes = {};

if (dirty & /*$$scope, position, rotation, index*/ 28680) {
if (dirty & /*$$scope, position, rotation, index*/ 28676) {
particle_changes.$$scope = { dirty, ctx };
}

Expand All @@ -210,7 +210,7 @@ function create_default_slot_3(ctx) {
};
}

// (46:4) <LinearCloner instances={14} spaceBetween={0} direction={[0, 0, 1]} let:position let:index >
// (45:4) <LinearCloner instances={14} spaceBetween={0} direction={[0, 0, 1]} let:position let:index >
function create_default_slot_2(ctx) {
let material;
let current;
Expand Down Expand Up @@ -238,7 +238,7 @@ function create_default_slot_2(ctx) {
p(ctx, dirty) {
const material_changes = {};

if (dirty & /*$$scope, position, rotation, index*/ 28680) {
if (dirty & /*$$scope, position, rotation, index*/ 28676) {
material_changes.$$scope = { dirty, ctx };
}

Expand All @@ -259,7 +259,7 @@ function create_default_slot_2(ctx) {
};
}

// (38:2) <Group position={[0, 0, 0]}>
// (37:2) <Group position={[0, 0, 0]}>
function create_default_slot_1(ctx) {
let orbitexample;
let t0;
Expand All @@ -272,8 +272,8 @@ function create_default_slot_1(ctx) {
gridcloner = new /*GridCloner*/ ctx[7]({
props: {
instances: [7, 7, 7],
spaceBetween: /*spaceBetween*/ ctx[1],
rotation: /*rotation*/ ctx[3],
spaceBetween: /*spaceBetween*/ ctx[3],
rotation: /*rotation*/ ctx[2],
$$slots: {
default: [
create_default_slot_5,
Expand Down Expand Up @@ -319,8 +319,8 @@ function create_default_slot_1(ctx) {
},
p(ctx, dirty) {
const gridcloner_changes = {};
if (dirty & /*spaceBetween*/ 2) gridcloner_changes.spaceBetween = /*spaceBetween*/ ctx[1];
if (dirty & /*rotation*/ 8) gridcloner_changes.rotation = /*rotation*/ ctx[3];
if (dirty & /*spaceBetween*/ 8) gridcloner_changes.spaceBetween = /*spaceBetween*/ ctx[3];
if (dirty & /*rotation*/ 4) gridcloner_changes.rotation = /*rotation*/ ctx[2];

if (dirty & /*$$scope, position*/ 20480) {
gridcloner_changes.$$scope = { dirty, ctx };
Expand All @@ -329,7 +329,7 @@ function create_default_slot_1(ctx) {
gridcloner.$set(gridcloner_changes);
const linearcloner_changes = {};

if (dirty & /*$$scope, position, rotation, index*/ 28680) {
if (dirty & /*$$scope, position, rotation, index*/ 28676) {
linearcloner_changes.$$scope = { dirty, ctx };
}

Expand Down Expand Up @@ -358,7 +358,7 @@ function create_default_slot_1(ctx) {
};
}

// (34:0) <Scene {width} height={450} bind:time background="#67727e">
// (33:0) <Scene {width} height={450} bind:time background="#67727e">
function create_default_slot(ctx) {
let ambientlight;
let t0;
Expand Down Expand Up @@ -396,7 +396,7 @@ function create_default_slot(ctx) {
p(ctx, dirty) {
const group_changes = {};

if (dirty & /*$$scope, rotation, spaceBetween*/ 16394) {
if (dirty & /*$$scope, rotation, spaceBetween*/ 16396) {
group_changes.$$scope = { dirty, ctx };
}

Expand Down Expand Up @@ -442,8 +442,8 @@ function create_fragment(ctx) {
$$scope: { ctx }
};

if (/*time*/ ctx[2] !== void 0) {
scene_props.time = /*time*/ ctx[2];
if (/*time*/ ctx[1] !== void 0) {
scene_props.time = /*time*/ ctx[1];
}

scene = new Scene({ props: scene_props });
Expand All @@ -461,13 +461,13 @@ function create_fragment(ctx) {
const scene_changes = {};
if (dirty & /*width*/ 1) scene_changes.width = /*width*/ ctx[0];

if (dirty & /*$$scope, rotation, spaceBetween*/ 16394) {
if (dirty & /*$$scope, rotation, spaceBetween*/ 16396) {
scene_changes.$$scope = { dirty, ctx };
}

if (!updating_time && dirty & /*time*/ 4) {
if (!updating_time && dirty & /*time*/ 2) {
updating_time = true;
scene_changes.time = /*time*/ ctx[2];
scene_changes.time = /*time*/ ctx[1];
add_flush_callback(() => updating_time = false);
}

Expand Down Expand Up @@ -509,7 +509,7 @@ function instance($$self, $$props, $$invalidate) {

function scene_time_binding(value) {
time = value;
$$subscribe_time($$invalidate(2, time));
$$subscribe_time($$invalidate(1, time));
}

$$self.$$set = $$props => {
Expand All @@ -518,25 +518,21 @@ function instance($$self, $$props, $$invalidate) {
};

$$self.$$.update = () => {
if ($$self.$$.dirty & /*time, medianSpaceBetween, rotation, $time*/ 1548) {
if ($$self.$$.dirty & /*time, medianSpaceBetween, rotation, $time*/ 1542) {
$: if (time && medianSpaceBetween) {
$$invalidate(3, rotation = rotation.map(n => n += 0.01));
$$invalidate(1, spaceBetween = medianSpaceBetween + Math.sin($time / 600) * spaceBetweenVariance);
$$invalidate(2, rotation = rotation.map(n => n += 0.01));
$$invalidate(3, spaceBetween = medianSpaceBetween + Math.sin($time / 600) * spaceBetweenVariance);
}
}

if ($$self.$$.dirty & /*spaceBetween*/ 2) {
$: console.log(spaceBetween);
}
};

$: $$invalidate(9, medianSpaceBetween = cubeSize + spaceBetweenVariance + 0.005);

return [
width,
spaceBetween,
time,
rotation,
spaceBetween,
Cube,
Torus,
LinearCloner,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@6edesign/svelte-three",
"svelte": "src/components/index.js",
"main": "src/components/index.js",
"version": "1.1.2",
"version": "1.1.3",
"license": "MIT",
"keywords": [
"svelte",
Expand Down

0 comments on commit 7291abe

Please sign in to comment.