update
This commit is contained in:
29
.idea/workspace.xml
generated
29
.idea/workspace.xml
generated
@@ -30,8 +30,6 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="70635ef7-86ab-4681-b98d-dc8e4999995b" name="Default Changelist" comment="">
|
<list default="true" id="70635ef7-86ab-4681-b98d-dc8e4999995b" name="Default Changelist" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/ui/App.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/ui/App.svelte" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/ui/Sidebar.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/ui/Sidebar.svelte" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -78,20 +76,20 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"WebServerToolWindowFactoryState": "false",
|
"WebServerToolWindowFactoryState": "false",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"ts.external.directory.path": "/home/ledda/Documents/Projects/soma/node_modules/typescript/lib",
|
"ts.external.directory.path": "/home/ledda/Documents/Projects/soma/node_modules/typescript/lib",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
<recent name="$PROJECT_DIR$/public" />
|
<recent name="$PROJECT_DIR$/public" />
|
||||||
@@ -165,6 +163,7 @@
|
|||||||
<workItem from="1636284015038" duration="35000" />
|
<workItem from="1636284015038" duration="35000" />
|
||||||
<workItem from="1653769272575" duration="98000" />
|
<workItem from="1653769272575" duration="98000" />
|
||||||
<workItem from="1653769394515" duration="1008000" />
|
<workItem from="1653769394515" duration="1008000" />
|
||||||
|
<workItem from="1653822125424" duration="699000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
5014
package-lock.json
generated
5014
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -38,16 +38,21 @@
|
|||||||
"sirv-cli": "^1.0.0",
|
"sirv-cli": "^1.0.0",
|
||||||
"source-map-support": "^0.5.19",
|
"source-map-support": "^0.5.19",
|
||||||
"three": "^0.128.0",
|
"three": "^0.128.0",
|
||||||
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.4.0-dev.20210525"
|
"typescript": "^4.4.0-dev.20210525"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "de.djledda.somaesque",
|
"appId": "de.djledda.somaesque",
|
||||||
"copyright": "Copyright © 2021 Daniel Ledda",
|
"copyright": "Copyright © 2021 Daniel Ledda",
|
||||||
"win": {
|
"win": {
|
||||||
"target": ["portable"]
|
"target": [
|
||||||
|
"portable"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"target": ["AppImage"]
|
"target": [
|
||||||
|
"AppImage"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": "./public/favicon.png",
|
"icon": "./public/favicon.png",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|||||||
@@ -237,21 +237,21 @@ export default class VoxelSpaceBigInt {
|
|||||||
// [1, 0, 0] [x] [ x]
|
// [1, 0, 0] [x] [ x]
|
||||||
// [0, 0, -1] * [y] = [-z]
|
// [0, 0, -1] * [y] = [-z]
|
||||||
// [0, 1, 0] [z] [ y]
|
// [0, 1, 0] [z] [ y]
|
||||||
private newIndexRotX(x: number, y: number, z: number) {
|
newIndexRotX(x: number, y: number, z: number) {
|
||||||
return this.dims[2] * this.dims[1] * x + this.dims[1] * (this.dims[2] - 1 - z) + y;
|
return this.dims[2] * this.dims[1] * x + this.dims[1] * (this.dims[2] - 1 - z) + y;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [ 0, 0, 1] [x] [ z]
|
// [ 0, 0, 1] [x] [ z]
|
||||||
// [ 0, 1, 0] * [y] = [ y]
|
// [ 0, 1, 0] * [y] = [ y]
|
||||||
// [-1, 0, 0] [z] [-x]
|
// [-1, 0, 0] [z] [-x]
|
||||||
private newIndexRotY(x: number, y: number, z: number) {
|
newIndexRotY(x: number, y: number, z: number) {
|
||||||
return this.dims[1] * this.dims[0] * z + this.dims[0] * y + (this.dims[0] - 1 - x);
|
return this.dims[1] * this.dims[0] * z + this.dims[0] * y + (this.dims[0] - 1 - x);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [0, -1, 0] [x] [-y]
|
// [0, -1, 0] [x] [-y]
|
||||||
// [1, 0, 0] * [y] = [ x]
|
// [1, 0, 0] * [y] = [ x]
|
||||||
// [0, 0, 1] [z] [ z]
|
// [0, 0, 1] [z] [ z]
|
||||||
private newIndexRotZ(x: number, y: number, z: number) {
|
newIndexRotZ(x: number, y: number, z: number) {
|
||||||
return this.dims[0] * this.dims[2] * (this.dims[1] - 1 - y) + this.dims[2] * x + z;
|
return this.dims[0] * this.dims[2] * (this.dims[1] - 1 - y) + this.dims[2] * x + z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
19
src/solver/js/tests.ts
Normal file
19
src/solver/js/tests.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import VoxelSpaceBoolean from "../../VoxelSpaceBoolean";
|
||||||
|
|
||||||
|
(function test1() {
|
||||||
|
const spaces = [ 23n, 30n, 15n, 43n, 172n, 92n, 11n ].map((space: bigint) => {
|
||||||
|
return new VoxelSpaceBoolean({
|
||||||
|
id: 1,
|
||||||
|
dims: [3, 3, 3],
|
||||||
|
space,
|
||||||
|
cullEmpty: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(spaces[0].at(0, 0, 1));
|
||||||
|
console.log(spaces[0].at(1, 0, 0));
|
||||||
|
console.log(spaces[0].at(2, 1, 2));
|
||||||
|
console.log(spaces[0].at(1, 2, 1));
|
||||||
|
console.log(spaces[0].at(0, 0, 0));
|
||||||
|
console.log(spaces[0].at(2, 2, 1));
|
||||||
|
})();
|
||||||
17
src/tests.ts
Normal file
17
src/tests.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import VoxelSpaceBigInt from "./VoxelSpaceBigInt";
|
||||||
|
|
||||||
|
(function test1() {
|
||||||
|
const spaces = [ 23n, 30n, 15n, 43n, 172n, 92n, 11n ].map((space: bigint) => {
|
||||||
|
return new VoxelSpaceBigInt({
|
||||||
|
id: 1,
|
||||||
|
dims: [3, 3, 3],
|
||||||
|
space,
|
||||||
|
cullEmpty: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
console.log(spaces[1].rotated90('x').getRaw());
|
||||||
|
console.log(spaces[1].rotated90('y').getRaw());
|
||||||
|
console.log(spaces[1].rotated90('z').getRaw());
|
||||||
|
})();
|
||||||
Reference in New Issue
Block a user