Skip to content

Commit cd86afb

Browse files
authored
Merge branch 'develop' into new-api-integration
2 parents 9e98d9a + 31ab4f8 commit cd86afb

29 files changed

+46
-100
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
scratch-gui modified for use in [TurboWarp](https://turbowarp.org/) then modified for use in [PenguinMod](https://penguinmod.github.io/penguinmod.github.io/) 😀
1+
scratch-gui modified for use in [TurboWarp](https://turbowarp.org/) then modified for use in [PenguinMod](https://studio.penguinmod.com) 😀
22
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/PenguinMod/penguinmod.github.io/)
33
## Setup
44

src/addons/addons/mediarecorder/userscript.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -323,24 +323,6 @@ export default async ({ addon, console, msg }) => {
323323
vm.runtime.audioEngine.inputNode.connect(mediaStreamDestination);
324324
const audioSource = ctx.createMediaStreamSource(mediaStreamDestination.stream);
325325
audioSource.connect(dest);
326-
// extended audio should be recorded
327-
if ("ext_jgExtendedAudio" in vm.runtime) {
328-
const extension = vm.runtime.ext_jgExtendedAudio;
329-
const helper = extension.helper;
330-
// audio context might not be created, make it for him
331-
if (!helper.audioContext) helper.audioContext = new AudioContext();
332-
// gain node for volume slidor might not be created, make it for him
333-
if (!helper.audioGlobalVolumeNode) {
334-
helper.audioGlobalVolumeNode = helper.audioContext.createGain();
335-
helper.audioGlobalVolumeNode.gain.value = vm.runtime.audioEngine.inputNode.gain.value;
336-
helper.audioGlobalVolumeNode.connect(helper.audioContext.destination);
337-
}
338-
// create media stream
339-
const mediaStreamDestination = helper.audioContext.createMediaStreamDestination();
340-
helper.audioGlobalVolumeNode.connect(mediaStreamDestination);
341-
const audioSource = ctx.createMediaStreamSource(mediaStreamDestination.stream);
342-
audioSource.connect(dest);
343-
}
344326
// literally any other extension
345327
for (const audioData of vm.runtime._extensionAudioObjects.values()) {
346328
if (audioData.audioContext && audioData.gainNode) {

src/addons/addons/vol-slider/module.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,6 @@ const callbacks = [];
1111
export const setVolume = (newVolume) => {
1212
if (gainNode) {
1313
gainNode.value = newVolume;
14-
// extended audio
15-
if ("ext_jgExtendedAudio" in globalVm.runtime) {
16-
const extension = globalVm.runtime.ext_jgExtendedAudio;
17-
const helper = extension.helper;
18-
// audio context might not be created, make it for him
19-
if (!helper.audioContext) helper.audioContext = new AudioContext();
20-
// gain node for volume slidor might not be created, make it for him
21-
if (!helper.audioGlobalVolumeNode) {
22-
helper.audioGlobalVolumeNode = helper.audioContext.createGain();
23-
helper.audioGlobalVolumeNode.gain.value = gainNode.value;
24-
helper.audioGlobalVolumeNode.connect(helper.audioContext.destination);
25-
} else {
26-
helper.audioGlobalVolumeNode.gain.value = gainNode.value;
27-
}
28-
}
2914
// literally any other extension
3015
for (const audioData of globalVm.runtime._extensionAudioObjects.values()) {
3116
if (audioData.gainNode) {
@@ -73,21 +58,6 @@ const gotAudioEngine = (audioEngine) => {
7358
}
7459
gainNode = audioEngine.inputNode.gain;
7560
gainNode.value = volumeBeforeFinishSetup;
76-
// extended audio
77-
if ("ext_jgExtendedAudio" in globalVm.runtime) {
78-
const extension = globalVm.runtime.ext_jgExtendedAudio;
79-
const helper = extension.helper;
80-
// audio context might not be created, make it for him
81-
if (!helper.audioContext) helper.audioContext = new AudioContext();
82-
// gain node for volume slidor might not be created, make it for him
83-
if (!helper.audioGlobalVolumeNode) {
84-
helper.audioGlobalVolumeNode = helper.audioContext.createGain();
85-
helper.audioGlobalVolumeNode.gain.value = gainNode.value;
86-
helper.audioGlobalVolumeNode.connect(helper.audioContext.destination);
87-
return;
88-
}
89-
helper.audioGlobalVolumeNode.gain.value = gainNode.value;
90-
}
9161
// literally any other extension
9262
for (const audioData of globalVm.runtime._extensionAudioObjects.values()) {
9363
if (audioData.gainNode) {

src/components/tw-studioview/studioview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,11 @@ StudioView.prototype.onselect = function (id, el) { };
299299
StudioView.prototype.onpageload = function () { };
300300
StudioView.prototype.onend = function () { };
301301

302-
StudioView.STUDIO_API = 'http://localhost:8080/api/v1';
302+
StudioView.STUDIO_API = 'https://projects.penguinmod.com/api/v1';
303303

304304
// The URL to download thumbnails from.
305305
// $id is replaced with the project's ID.
306-
StudioView.THUMBNAIL_SRC = 'http://localhost:8080/api/v1/projects/getproject?projectID=$id&requestType=thumbnail';
306+
StudioView.THUMBNAIL_SRC = 'https://projects.penguinmod.com/api/v1/projects/getproject?projectID=$id&requestType=thumbnail';
307307

308308
// The URL for project pages.
309309
// $id is replaced with the project ID.

src/components/variables-tab/variables-tab.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Input from '../forms/input.jsx';
99
import Box from '../box/box.jsx';
1010
import styles from './variables-tab.css';
1111

12-
class ShareButton extends React.Component {
12+
class VariablesTab extends React.Component {
1313
constructor(props) {
1414
super(props);
1515
bindAll(this, [
@@ -104,7 +104,7 @@ class ShareButton extends React.Component {
104104
}
105105
}
106106

107-
ShareButton.propTypes = {
107+
VariablesTab.propTypes = {
108108
localVariables: PropTypes.any,
109109
globalVariables: PropTypes.any,
110110
showLargeValue: PropTypes.any,
@@ -121,4 +121,4 @@ ShareButton.propTypes = {
121121
onTypeVariableValue: PropTypes.func.isRequired,
122122
};
123123

124-
export default injectIntl(ShareButton);
124+
export default injectIntl(VariablesTab);

src/containers/home-communication.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {connect} from 'react-redux';
55
import {setUsername, setUsernameInvalid, setUsernameLoggedIn} from '../reducers/tw';
66

77
let origin = "https://penguinmod.com";
8-
// origin = 'http://localhost:5173';
8+
// origin = 'https://penguinmod-home-git-new-backend-live-penguinmod.vercel.app/';
99

1010
class HomeCommunication extends React.Component {
1111
constructor (props) {

src/containers/tw-security-manager.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const isTrustedExtension = url => (
3434
url.startsWith('http://localhost:8000') ||
3535
url.startsWith('http://localhost:6000') || // Launcher Home
3636
url.startsWith('http://localhost:6001') || // Launcher Extensions
37-
url.startsWith('http://localhost:5173') || // Local Home or Extensions
37+
url.startsWith('https://penguinmod-home-git-new-backend-live-penguinmod.vercel.app/') || // Local Home or Extensions
3838
url.startsWith('http://localhost:5174') || // Local Home or Extensions
3939

4040
extensionsTrustedByUser.has(url)

src/lib/libraries/extensions/index.jsx

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ import sharkpoolGalleryIcon from './penguinmod/sharkpool-library.svg';
6262
import turboBuilderIcon from './penguinmod/turbobuilder.png';
6363
import turboBuilderDevIcon from './penguinmod/turbobuilder-dev.png';
6464

65-
import filesExtensionIcon from './penguinmod/extensions/files.png';
65+
import filesExtensionIcon from './penguinmod/extensions/files.svg';
6666
import jgJSONExtensionIcon from './penguinmod/extensions/json.png';
6767
import jgTailgatingExtensionIcon from './penguinmod/extensions/tailgating.png';
68-
import jgRuntimeExtensionIcon from './penguinmod/extensions/runtime.png';
68+
import jgRuntimeExtensionIcon from './penguinmod/extensions/runtime.svg';
6969
import jgPrismExtensionIcon from './penguinmod/extensions/prism.png';
7070

71-
import jwProtoExtensionIcon from './penguinmod/extensions/proto.png';
71+
import jwProtoExtensionIcon from './penguinmod/extensions/proto.svg';
7272
import jwUniteExtensionIcon from './penguinmod/extensions/Unite.png';
7373
import jwXmlExtensionIcon from './penguinmod/extensions/xml.png';
7474

@@ -94,14 +94,14 @@ import griffpatchPhysicsIcon from './penguinmod/extensions/griffpatch_physicsIco
9494
import gp from './penguinmod/extensions/gamepad.svg';
9595
import clippingblending from './penguinmod/extensions/clippingblending.svg';
9696

97-
import pointerlockThumb from './penguinmod/extensions/pointerlock.svg';
97+
import pointerlockThumb from './penguinmod/extensions/pointerlock.png';
9898
import cursorThumb from './penguinmod/extensions/cursor.svg';
9999

100100
// LilyMakesThings 🙏
101101
// import lmsMcUtilsIcon from './penguinmod/extensions/mcutils.png';
102102

103103
// more icons so they arent just red when the extension color is not red
104-
import gsaTempVariablesExtensionIcon from './penguinmod/extensions/tempvariables.png';
104+
import gsaTempVariablesExtensionIcon from './penguinmod/extensions/tempvariables.svg';
105105
import gsaColorUtilExtensionIcon from './penguinmod/extensions/colorutil.png';
106106
import jgIframeExtensionIcon from './penguinmod/extensions/iframe.png';
107107
import jgExtendedAudioExtensionIcon from './penguinmod/extensions/extendedaudio.png';
@@ -128,12 +128,12 @@ import fr3dPhysicsInsetExtensionIcon from './penguinmod/extensions/3d_physics_ic
128128
import jgVrExtensionIcon from './penguinmod/extensions/vr_extension.png';
129129

130130
import theshovelCustomStylesIcon from './penguinmod/orgtw/CustomStyles.svg';
131-
import theshovelCanvasEffectsIcon from './penguinmod/extensions/canvas_effects.png';
131+
import theshovelCanvasEffectsIcon from './penguinmod/extensions/canvas_effects.svg';
132132
import theshovelLzCompressIcon from './penguinmod/orgtw/lz-compress2.svg';
133133
import theshovelColorPickerIcon from './penguinmod/orgtw/ColorPicker.svg';
134134

135135
// sharkpool
136-
import sharkpoolPrintingIcon from './penguinmod/extensions/printing.png';
136+
import sharkpoolPrintingIcon from './penguinmod/extensions/printing.svg';
137137
import jgScriptsExtensionIcon from './penguinmod/extensions/scripts.svg';
138138

139139
// events
@@ -379,7 +379,7 @@ const menuItems = [
379379
tags: ['penguinmod', 'categoryexpansion'],
380380
description: 'More control blocks for animations, complex systems or cleaner one-time use blocks.',
381381
featured: true,
382-
credits: '"new thread" by CubesterYT, CST1229'
382+
credits: '"new thread" by CubesterYT, CST1229, SharkPool'
383383
},
384384
{
385385
name: 'Sensing Expansion',
@@ -1070,6 +1070,18 @@ const menuItems = [
10701070
}
10711071
];
10721072

1073+
/*
1074+
----------------------------------------------
1075+
### NOTE TO PENGUINMOD FORKS: ###
1076+
Please DO NOT make the extensions below accessible in the editor without livetests!
1077+
They are NOT fully developed for people to use and create full projects with!
1078+
1079+
These extensions could have missing features, cause random errors, broken projects, or even crash the editor!
1080+
Moving these into the main extension list will cause people who use your fork to assume they are ready for them to use!
1081+
1082+
Please keep these in livetests to reduce bug reports on your fork! :)
1083+
----------------------------------------------
1084+
*/
10731085
if (IsLocal || IsLiveTests) {
10741086
const extras = [
10751087
{
Binary file not shown.

src/lib/libraries/extensions/penguinmod/extensions/canvas_effects.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)