Skip to content

v1.8.5 #66

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

Merged
merged 4 commits into from
Oct 15, 2021
Merged
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spacesvr",
"version": "1.8.3",
"version": "1.8.5",
"private": true,
"description": "An Environment for WebXR Spaces",
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions src/ideas/components/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useMemo, useRef, useState } from "react";
import * as THREE from "three";
import { useThree } from "@react-three/fiber";
import Frame from "../misc/Frame";
import { Material, Vector2 } from "three";
import { DoubleSide, LinearEncoding, Material, Vector2 } from "three";

type Props = JSX.IntrinsicElements["group"] & {
src: string;
Expand Down Expand Up @@ -111,8 +111,8 @@ export const Video = (props: Props) => {
<group {...props}>
<mesh>
<planeBufferGeometry attach="geometry" args={[width, height]} />
<meshBasicMaterial>
<videoTexture attach="map" args={[video]} />
<meshBasicMaterial side={DoubleSide}>
<videoTexture attach="map" args={[video]} encoding={LinearEncoding} />
</meshBasicMaterial>
</mesh>
{speaker && <primitive object={speaker} />}
Expand Down
31 changes: 14 additions & 17 deletions src/layers/reality/players/colliders/CapsuleCollider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,23 @@ export const useCapsuleCollider = (pos = [0, 0, 0]) => {
const vPos = pos as Triplet;

const { paused } = useEnvironment();
const [mass, setMass] = useState(0);

const compoundBody = useCompoundBody(
() => ({
mass: mass,
position: vPos,
segments: 8,
fixedRotation: true,
type: "Dynamic",
shapes: [sphere1, sphere2, sphere3],
}),
undefined,
[mass]
);
const [setup, setSetup] = useState(false);

const compoundBody = useCompoundBody(() => ({
mass: 0,
position: vPos,
segments: 8,
fixedRotation: true,
type: "Dynamic",
shapes: [sphere1, sphere2, sphere3],
}));

useEffect(() => {
if (!paused && mass === 0) {
setMass(62);
if (!paused && !setup) {
compoundBody[1].mass?.set(62);
setSetup(true);
}
}, [mass, paused]);
}, [setup, paused, compoundBody]);

return compoundBody;
};
Expand Down
2 changes: 1 addition & 1 deletion src/layers/reality/ui/PauseMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default function PauseMenu(props: PauseMenuProps) {
)}`,
},
{
text: "v1.8.3",
text: "v1.8.5",
action: () => {
console.log("");
},
Expand Down