Easter cleaning git

This commit is contained in:
Willem Cazander 2025-04-27 00:09:28 +02:00
commit d0529bfadf
500 changed files with 116670 additions and 0 deletions

View file

@ -0,0 +1,42 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>love.distributedrebirth.gdxapp4d</groupId>
<artifactId>gdxapp4d</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>gdxapp4d-app-notepad</artifactId>
<name>GDXApp⁴ᴰ-App-සටහන් පොත</name>
<packaging>bundle</packaging>
<dependencies>
<dependency>
<groupId>love.distributedrebirth.gdxapp4d</groupId>
<artifactId>gdxapp4d-vrgem4</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<exportScr>true</exportScr>
<niceManifest>true</niceManifest>
<instructions>
<_donotcopy>(.git)</_donotcopy>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
<Import-Package>
${tos4.packages},
${vrgem4.packages}
</Import-Package>
<Bundle-Vendor>distributedrebirth.love</Bundle-Vendor>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,77 @@
/*
* Copyright ©Δ 仙上主天
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
* even on air gaped systems, all information in the universe is owned by the pi creator.
*
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package love.distributedrebirth.gdxapp4d.app.notepad;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxLog;
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppLauncher;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppMenuSection;
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
@Component
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
public class NotepadComponent {
@Reference
private SystemGdxLog log;
@Reference
private VrGem4DeskAppService deskAppService;
@Reference
private VrGem4Unicode4DService unicode4DService;
private final DeskAppLauncher launcher;
public NotepadComponent() {
Bundle bundle = FrameworkUtil.getBundle(NotepadComponent.class);
BundleContext context = bundle.getBundleContext();
launcher = new DeskAppLauncher(DeskAppMenuSection.EDITORS, "Notepad", () -> new NotepadDeskApp(context, unicode4DService));
}
@Activate
void open() {
log.debug(this, SystemGdxLog.ACTIVATE);
deskAppService.installDeskApp(launcher);
}
@Deactivate
void close() {
log.debug(this, SystemGdxLog.DEACTIVATE);
deskAppService.removeDeskApp(launcher);
}
}

View file

@ -0,0 +1,238 @@
/*
* Copyright ©Δ 仙上主天
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
* even on air gaped systems, all information in the universe is owned by the pi creator.
*
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package love.distributedrebirth.gdxapp4d.app.notepad;
import java.util.Random;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import imgui.ImColor;
import imgui.ImDrawList;
import imgui.ImGui;
import imgui.ImVec2;
import imgui.type.ImBoolean;
import imgui.type.ImInt;
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
import love.distributedrebirth.unicode4d.draw.DrawCharacter;
import love.distributedrebirth.unicode4d.draw.ImCharacter;
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒃᐤᣔᐪ.BãßBȍőnBőatꞱᴿᴳᴮ;
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒄᓫᣔᐪᑋ.BãßBȍőnCoffinGhostCharm;
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒄᓫᣔᐪᑋ.ᔆᣖᑊᒄᓫᣗ.BãßBȍőnSpiderEgg注;
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒄᓫᣔᐪᑋ.ᔆᣖᑊᒄᓫᣗ.BãßBȍőnSpiderWire注;
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒼᒻᣔᙆᙆ.ᣖᑊᣗᣔᐪᓫ.BãßBȍőnꝐḯŕḕʸᴰ;
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᔿᓑᔿᔿᔋᐝᣚ.BãßᛗᚢᛗᛗᛉBoneBabe𓄯;
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᒢℭỗᶇṧⱦᶏꬼȶʂ;
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᐪᓫᕽᐪ.ᓑᣕᣳᒼᐤᒄᓫ.UnicodePlane;
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
public class NotepadDeskApp extends AbstractDeskApp implements DeskAppRenderer, BãßᛗᚢᛗᛗᛉBoneBabe𓄯<NotepadDeskApp> {
//private final VrGem4Unicode4DService unicode4DService;
private final int gridWidth = 120;
private final int gridHeight = 40;
private final int[][] gridBuffer;
private final int[] gridRank;
private final Random random;
private int runCounter;
private final ImInt runSpeed = new ImInt(ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟTEN);
private final ImBoolean runChina = new ImBoolean(false);
private final static char DEFAULT_CHAR = '亞';
private final static UnicodePlane[] GRID_PLANES = {
UnicodePlane.BRAHMI,
UnicodePlane.UGARITIC,
UnicodePlane.BAMUM_SUPPLEMENT,
UnicodePlane.TAI_XUAN_JING_SYMBOLS
};
private final static UnicodePlane[] GRID_PLANES_CHINA = {
UnicodePlane.CJK_UNIFIED_IDEOGRAPHS,
UnicodePlane.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A,
UnicodePlane.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B,
UnicodePlane.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C,
UnicodePlane.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D,
UnicodePlane.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E,
UnicodePlane.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F
};
private final static int Y_LINE_COLOR = ImColor.intToColor(200, 10, 10);
private String gridChars;
private int[] yLine;
private float[] yScale;
enum ꝐŕḯṿªḕꝐḯŕḕʸᴰ implements BãßBȍőnꝐḯŕḕʸᴰ {
𑀳𑁂𑀮𑀺,𑀉𑁄,𑀤𑁄,𑀭𑁂,𑀡,𑀪𑀸,𑀕;
private static final BãßBȍőnCoffinGhostCharm GHOST_BUNDLE = BãßBȍőnCoffinGhostCharm.hocusᴾᵒᶜᵘˢ();
@BãßBȍőnSpiderWire注(paint = BãßBȍőnBőatꞱᴿᴳᴮ.ẞassPaint.ꞱTBoneWire.class)
private NotepadDeskApp boon;
@BãßBȍőnSpiderEgg注
public VrGem4Unicode4DService locateVrGem4Unicode4DService() {
Class<?> eggType = VrGem4Unicode4DService.class;
BundleContext context = boon.thisᵀᴮᵒⁿᵉᴳʳᵃᵛᵉ().onheɨlḮg(ꝐŕḯṿªḕꝐḯŕḕʸᴰ.class).gềễstDɨng(GHOST_BUNDLE, BundleContext.class);
ServiceReference<?> serviceRef = context.getServiceReference(eggType);
Object service = context.getService(serviceRef);
return (VrGem4Unicode4DService)service;
}
}
@BãßBȍőnSpiderWire注()
private VrGem4Unicode4DService unicode4DService;
public NotepadDeskApp(BundleContext context, VrGem4Unicode4DService unicode4DService3) {
thisᵀᴮᵒⁿᵉᴳʳᵃᵛᵉ().onheɨlḮgSpreǜk(ꝐŕḯṿªḕꝐḯŕḕʸᴰ.class).bewaarGềễst(ꝐŕḯṿªḕꝐḯŕḕʸᴰ.GHOST_BUNDLE, context); // tmp test
亞ᶦᶦᶦ.thisʸᴰᐧᐧᶜᵒⁿˢᵗʳᵘᶜᵗᵒʳ(thisᵀᴮᵒⁿᵉ());
//this.unicode4DService = unicode4DService;
this.gridBuffer = new int[gridHeight][gridWidth];
this.gridRank = new int[gridWidth];
this.random = new Random();
for (int y=ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO; y<gridWidth; y++) {
gridRank[y] = ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO;
for (int x=ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO; x<gridHeight; x++) {
gridBuffer[x][y] = ᒢℭỗᶇṧⱦᶏꬼȶʂ.CHARᣟᐧᣟSPACE;
}
}
gridChars = createGridChars();
yLine = new int[4];
yScale = new float[4];
}
public void create() {
getContours().setTitle("Notepad");
getContours().registrateContour(DeskAppContourSection.MAIN, this);
}
@Override
public void render() {
ImGui.sliderInt(ᒢℭỗᶇṧⱦᶏꬼȶʂ.STRᣟᐧᣟSPACE, runSpeed.getData(), 0, 60); // empty ID not allowed in ImGui, but whitespace is an ID :)
ImGui.sameLine();
if (ImGui.checkbox("Chinees", runChina)) {
gridChars = createGridChars();
}
ImGui.sameLine();
ImCharacter.render("speedId", "Speed", DEFAULT_CHAR, v -> unicode4DService.getCharacterForUnicode(v));
ImGui.invisibleButton("matrix", ImGui.getWindowWidth(), ImGui.getWindowHeight()-(2*ImGui.getFontSize()));
ImVec2 p0 = ImGui.getItemRectMin();
ImVec2 p1 = ImGui.getItemRectMax();
ImDrawList drawList = ImGui.getWindowDrawList();
drawList.pushClipRect(p0.x, p0.y, p1.x, p1.y);
for(int y=ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO; y<gridHeight; y++) {
for(int x=ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO; x<gridWidth; x++) {
int unicodeChar = gridBuffer[y][x];
DrawCharacter drawChar = unicode4DService.getCharacterForUnicode(unicodeChar);
if (drawChar == null) {
drawChar = unicode4DService.getCharacterForUnicode(DEFAULT_CHAR);
if (drawChar == null) {
continue;
}
}
float scale = 1f;
int color = 0x3c68bb5b;
for (int i=0;i<4;i++) {
if (yLine[i] == 0) {
continue;
}
if (y == yLine[i] && (x == 10 || x == 15 || x== 20 || x == 25 || x == 30 || x == 35 || x == 40 || x == 45 || x == 50 || x == 55)) {
yScale[i] = yScale[i] + .11f;
scale = yScale[i];
color = Y_LINE_COLOR;
if (yScale[i] > 50f) {
yLine[i] = 0;
}
}
}
ImCharacter.drawUnicode4D(drawChar, x*ImCharacter.WIDTH, y*ImCharacter.HEIGHT, color, drawList, scale);
}
}
drawList.popClipRect();
updateGrid();
}
private String createGridChars() {
StringBuilder buf = new StringBuilder();
UnicodePlane[] planes = GRID_PLANES;
if (runChina.get()) {
planes = GRID_PLANES_CHINA;
}
for (UnicodePlane plane:planes) {
for (int i=plane.getStart();i<plane.getStop();i++) {
buf.appendCodePoint(i);
}
}
return buf.toString();
}
private void updateGrid() {
runCounter++;
if (runCounter < runSpeed.get()) {
return;
}
runCounter = ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO;
for (int i=0;i<4;i++) {
if (yLine[i] == 0) {
yLine[i] = random.nextInt(gridHeight);
yScale[i] = ᒢℭỗᶇṧⱦᶏꬼȶʂ.FLOATᣟᐧᣟONE;
}
}
for (int x=gridHeight-1; x>ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO; x--) {
for (int y=ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO; y<gridWidth; y++) {
gridBuffer[x][y] = gridBuffer[x-1][y];
}
}
for (int y=0; y<gridWidth; y++) {
int charSelect = ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO;
for (int i=ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO;i<4;i++) {
charSelect = gridChars.codePointAt(random.nextInt(gridChars.length()));
DrawCharacter drawChar = unicode4DService.getCharacterForUnicode(charSelect);
if (drawChar != null) {
break;
}
}
if (gridRank[y] > ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO) {
gridBuffer[ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO][y] = random.nextInt(100)<70? charSelect:ᒢℭỗᶇṧⱦᶏꬼȶʂ.CHARᣟᐧᣟSPACE;
} else {
gridBuffer[ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO][y] = random.nextInt(100)<ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟONE? charSelect:ᒢℭỗᶇṧⱦᶏꬼȶʂ.CHARᣟᐧᣟSPACE;
}
if (gridBuffer[0][y]==ᒢℭỗᶇṧⱦᶏꬼȶʂ.CHARᣟᐧᣟSPACE) {
gridRank[y] = ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO;
} else {
gridRank[y]++;
}
}
}
}